Help with any questions
Help with any questions
I think this is an interesting game.And it seems that many things can be modified to make it even more fun.
My modding level is very basic and I would like to find examples within the game.Or find in the forums help from people with more experience than I.
People who share what they know in a basic language and understandable to learn.Some tutorial on how to create scripts. With examples that can be used to practice and help to understand ...
Where should I look? What am I doing wrong?
The most that I have achieved is to have reinforcements appear when I capture a victory point ...(or enemy counterattack)
I recognize that language is a handicap for me...
Is this for people who already have a certain level?
If so ... do not they share what they know?
I learned a little about modifying games in the forum for dawn of war. And there it was all pretty well explained. Even for my level.
I can say that I made my own Minimod. Except the part of the scripts. That resists me.
I would really like to be able to do the same with this game. But I do not know how to find the information.
I hope not to disturb anyone with this. Just to receive some help or advice for a beginner without many computer skills.
thanks. and sorry for my english
My modding level is very basic and I would like to find examples within the game.Or find in the forums help from people with more experience than I.
People who share what they know in a basic language and understandable to learn.Some tutorial on how to create scripts. With examples that can be used to practice and help to understand ...
Where should I look? What am I doing wrong?
The most that I have achieved is to have reinforcements appear when I capture a victory point ...(or enemy counterattack)
I recognize that language is a handicap for me...
Is this for people who already have a certain level?
If so ... do not they share what they know?
I learned a little about modifying games in the forum for dawn of war. And there it was all pretty well explained. Even for my level.
I can say that I made my own Minimod. Except the part of the scripts. That resists me.
I would really like to be able to do the same with this game. But I do not know how to find the information.
I hope not to disturb anyone with this. Just to receive some help or advice for a beginner without many computer skills.
thanks. and sorry for my english
-
- Site Admin
- Posts: 9706
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Help with any questions
The simplest way to get help is to be clear about what you are trying to do - the modding is very powerful but probably not something that someone can explain all in one go. The key elements are explained in the wiki
http://archonwiki.slitherine.com/index.php/Modding
Beyond that, it all comes down to the detail and what you are trying to do.
Cheers
Pip
http://archonwiki.slitherine.com/index.php/Modding
Beyond that, it all comes down to the detail and what you are trying to do.
Cheers
Pip
follow me on Twitter here
Re: Help with any questions
I do not want to do just one thing. I want tutorials that explain to me how to do things and where are the limits in different aspects of the game.
And from there let my imagination develop something interesting.
Whenever I come up with any idea I should look at myriad of text documents to see if there is anything that resembles it.
And if I find it then I do not know what I should do to make it work.I think the wiki is missing examples of how to do things.
I'm sorry but that's my level. And I guess I'm not the only one who needs more examples and explanations.
thanks!!
And from there let my imagination develop something interesting.
Whenever I come up with any idea I should look at myriad of text documents to see if there is anything that resembles it.
And if I find it then I do not know what I should do to make it work.I think the wiki is missing examples of how to do things.
I'm sorry but that's my level. And I guess I'm not the only one who needs more examples and explanations.
thanks!!
-
- Site Admin
- Posts: 9706
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Help with any questions
The modding is very powerful, but it does take time to come up to speed. What I mean is to ask the question for what you want to achieve first. Starting small and getting something running is always the best approach. 99% of the time when people attempt a mod and fail it is because they try and begin with something complex and large and it is an overwhelming amount to learn at once.
Cheers
Pip
Cheers
Pip
follow me on Twitter here
Re: Help with any questions
Has anyone figured out a way to have hp bars always show, without needing to mousing over? I feel like I should be able to make a for loop somewhere. For example I put UnitScaling in uhh the two for loops in "FUNCTION HELPER_TILE_TOOLTIP" from Helpers.bsf. But I tried a few methods that didn't work. (1) Tried to iterate the HP bar in UI.bsf (2) Tried to call "DrawUi" (from UI.bsf) exactly where I put UnitScaling, but that required #including helpers that ended up "looping" (3) Tried to do a version of '2', this time copying over the "HP Part" of UI.bsf, but I couldn't understand how the coordinates of the HP bar because it looked like static numbers with no variables... (barhealth.dds I assume? because it was using HealthPerc->HealthWidth to modify the hp bar). Are they banners perhaps?
Number 3 Did create a tile-width healthbar in the bottom left of the screen lol.
It'd be really helpful to have a function that "select all" (not in a gameplay way, but to affect all units). I suppose I could make a custom function somewhere uh safe, iterating just like in Helpers.bsf... but even then I'm not sure if I'll run into having #including scripts in a way that loops again.
Also do unit icons differentiate unit types (e.g. Blood Claws, Grey Hunters, Long Fangs I'm asking in case I accidentally deleted a line in a script (You can see how I have learned some coding, enough to extrapolate a bit, but I would be a crap programmer because I don't have the patience to pseudocode, document, etc.). Because right now all the units on a side have the same icon. I think. Maybe I a little not sober enough last night. I could validate game files but I'm lazy and I'll probably forget where a good place to put UnitScaling in.
Number 3 Did create a tile-width healthbar in the bottom left of the screen lol.
It'd be really helpful to have a function that "select all" (not in a gameplay way, but to affect all units). I suppose I could make a custom function somewhere uh safe, iterating just like in Helpers.bsf... but even then I'm not sure if I'll run into having #including scripts in a way that loops again.
Also do unit icons differentiate unit types (e.g. Blood Claws, Grey Hunters, Long Fangs I'm asking in case I accidentally deleted a line in a script (You can see how I have learned some coding, enough to extrapolate a bit, but I would be a crap programmer because I don't have the patience to pseudocode, document, etc.). Because right now all the units on a side have the same icon. I think. Maybe I a little not sober enough last night. I could validate game files but I'm lazy and I'll probably forget where a good place to put UnitScaling in.
-
- Site Admin
- Posts: 9706
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Help with any questions
Unfortunately the health bar functionality is hard coded.
Cheers
Pip
Cheers
Pip
follow me on Twitter here
Re: Help with any questions
To clarify, does that mean that the function "FUNCTION DrawSelectedUI(me)" UI.bsf is not used? Because the partpipfromslitherine wrote:Unfortunately the health bar functionality is hard coded.
Cheers
Pip
Code: Select all
////////////////HP
StartString();
HPTotal = GetAttrib(me, "HitPoints");
HPTotal = HPTotal * GetAttrib(me, "ManCount");
man = 1;
HPCur = 0;
for(m=0; m<GetUnitMen(me); m++)
{
StartWorkString();
PrintWorkStringLiteral("manHP") ;
PrintWorkStringInt(man) ;
if (GetAttrib(me, GetWorkString()) > 0)
{
HPCur += GetAttrib(me, GetWorkString()) ;
man += man;
}
else
{
man += man;
}
}
PrintInt(HPCur);
PrintStringLiteral("/") ;
PrintInt(HPTotal);
HPPerc = GetPercent(HPCur, HPTotal);
HealthWidth = 100*10;
HealthWidth = HealthWidth/100;
HealthWidth = HealthWidth*HPPerc;
HealthWidth = HealthWidth / 10;
DrawImage(86, 705, HealthWidth, 217, "fffffffaf", "barhealth.dds", 0) ;
RenderString(105, 705, 6,"ffffffff", "ff000000");
However I threw used the (new) attribute "UnitScaling" into Helpers.bsf into the
Code: Select all
for(i=0; i<GetUnitCount(0); i++)
{
id = GetUnitID(0, i) ;
if(GetUnitDead(id) == 0)
{
if (IsUnitSquadType(id, "JUMP") == 1)
{
if (IsUnitMoving(id) == 0)
{
if (GetTerrainCoverValue(GetUnitX(id), GetUnitY(id), 0) > 0)
{
if (GetAttrib(id, "FlyingFollow") != 1)
{
SetAttrib(id, "FlyingFollow", 1);
}
}
else
{
if (GetAttrib(id, "FlyingFollow") != 0)
{
SetAttrib(id, "FlyingFollow", 0);
}
}
}
}
if (GetAttrib(id, "PlaybackID") != -1)
{
if (IsLongMoveVehicle(id) == 1)
{
if (IsUnitMoving(id) == 0)
{
StopSFX(GetAttrib(id, "PlaybackID"));
PlaySFX((GetUnitX(id)*100)+50, (GetUnitY(id)*100)+50, GetEndMoveSfx(id));
SetAttrib(id, "PlaybackID", -1);
}
}
}
}
}
Code: Select all
for(i=0; i<GetUnitCount(0); i++)
{
id = GetUnitID(0, i) ;
Code: Select all
for(i=0; i<GetUnitCount(0); i++)[code] (which then you guys made "id" = "i" (thus why I used passed "id" into the UnitScaling attribute).
However I could not figure out how to do the exact same thing, using a loop like [code]for(i=0; i<GetUnitCount(0); i++)
Yet like I mentioned (yet forgot, lol, because I am lazy and don't document) I was able to actually generate a healthbar, except it was one huge "healthbar" of a specific tile at the bottomleft of the screen. I did that by copying over the /////HP section of UI.bfs into the aforementioned for loop in Helpers.bsf (or maybe I just called the entire function of "DrawSelectedUI(me) in UI.bsf." But that one weird huge health bar was the most I could do.
But TLDR of the last paragraph is that I don't understand how the coordinates of the HP bar are set. Because "BATTLESCRIPT.TXT" in AUTODOCS defines "DrawImage" as needing to pass values so that it was
Code: Select all
DrawImage(x, y, width, height, colourString, imageName, [keepSquare], [path])
Code: Select all
DrawImage(86, 705, HealthWidth, 217, "fffffffaf", "barhealth.dds", 0) ;
Edit: I also opened every script in Notepad+ and I could not find a mention of "barhealth.dds" except in UI.bsf...
Edit 2: Nevermind, I noticed that "0" is actually the passed "keepSquare," and according to "BATTLESCRIPT," if "path" isn't passed it uses "UI/TEXTURE" as the directory of "barhealth.dds"?
Perhaps that part is deprecated and you guys hardcoded it instead?
Re: Help with any questions
BTW, completely off topic, but there is some script somewhere (I don't remember) that calls for the font "calson" yet there is no "calson" because it's actually "caslon" in "System/font.txt"
But it seems to only happen once because I see "WARNING: Missing font calsonsmall" it in "error.log" every time. So something is asking for the undefined font "calsonsmall."
Edit: Wait. Maybe the path should be "DATA/UI/TEXTURES" instead of what seems to be the default "UI/TEXTURES"
But it seems to only happen once because I see "WARNING: Missing font calsonsmall" it in "error.log" every time. So something is asking for the undefined font "calsonsmall."
Edit: Wait. Maybe the path should be "DATA/UI/TEXTURES" instead of what seems to be the default "UI/TEXTURES"
Re: Help with any questions
Okay I just switched the filenames of healthicon.dds and barhealth.dds and it didn't do anything :p
Edit: Wait! I see the health bar in the tooltip, instead of the health icon. Interesting...
Maybe I trick it into using barhealth.dds into being a banner?
Edit: Wait! I see the health bar in the tooltip, instead of the health icon. Interesting...
Maybe I trick it into using barhealth.dds into being a banner?
-
- Site Admin
- Posts: 9706
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Help with any questions
Sorry - I thought you meant the small per-man health bars which hover over the men, they are hardcoded. if you mean the ones down on the static UI, then they are probably drawn in the DrawSelectedUI, yes.
The coordinates for the draws etc are expected in 1024x768 space, and adjusted for other resolutions.
Cheers
Pip
The coordinates for the draws etc are expected in 1024x768 space, and adjusted for other resolutions.
Cheers
Pip
follow me on Twitter here
Re: Help with any questions
Well actually I renamed healthicon.dds to barhealth.dds and vice versa, which caused a small bar of health to appear in the pop-up mouseover tooltip and a missing health icon in the tooltip (I suppose it was above their head but I forgot to pay attention). In other words it seems like there is a function somewhere that checks if your cursor coordinates == a unit's coordinates. If so, then you could replace your passed coordinates in an "i, i < [number of units], i++" kind of loop, simulating a mouseover of all the units simultaneously without needing to actually moving your mouse. Heck you could probably just pass a unit's coordinates into the mouse's coordinates which means automatic reverse psychology mouseover.pipfromslitherine wrote:Sorry - I thought you meant the small per-man health bars which hover over the men, they are hardcoded. if you mean the ones down on the static UI, then they are probably drawn in the DrawSelectedUI, yes.
The coordinates for the draws etc are expected in 1024x768 space, and adjusted for other resolutions.
Cheers
Pip
Like I'm pretty sure I saw a "pass" variable that represented if your mouse was "passing" over a unit.
Besides simulating cursor coordinates... I understand the over-the-head bars are hardcoded, but could you not add for the rest of the units a health bar as an icon rather than the hardcoded health bars, calculated in the same way as "DrawSelectedUI" with HealthPerc -> HealthWidth -> Width of health bar but iterated so every unit had the HealthWidth modified "barhealth.dds" displayed above their head, again technically as an icon
As if it were... postprocessing? lol.
I guess this would just be a scripting project.
-
- Site Admin
- Posts: 9706
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Help with any questions
There isn't really any way to get the unit screen coordinates. The pass param you see in some of the UI functions is actually telling the fn whether it is being called prior to default rendering or after, to allow for different behaviours.
Cheers
Pip
Cheers
Pip
follow me on Twitter here
Re: Help with any questions
Awesome, thanks for the elaboration. Cheers!pipfromslitherine wrote:There isn't really any way to get the unit screen coordinates. The pass param you see in some of the UI functions is actually telling the fn whether it is being called prior to default rendering or after, to allow for different behaviours.
Cheers
Pip