There is an error in your ai.ini. Most likely you messed up a trigger. I will add some actual error reporting relatively soon and incorporate E1's adjustments. I'm a bit busy at the moment. QUICK_EDIT
The structure number offsets work as specified earlier. 131072 case is for nearest and 196608 is for farthest.
It can be tested by increasing the Adjacent value of a building and placing them sufficiently near and far
from the AI base.
Not approaching threat is threat avoidance in path finding, governed by AvoidThreats=yes in AI team or
higher value in ThreatAvoidanceCoefficient in rules. This threat evaluation is done frequently in path finding.
Bridges are special case, where threat is evaluated before entering the bridge considering the threat on the
other end of the bridge. Engagement tags are like Aggressive, Suicide.
Threat assessment in target selection is affected by the threat posed by units etc. present near any building.
For example if you create 4 instances of the same building, and place some units near one of them, then ai
team with say attack structure script 0=46,(65536+index) will choose the one building with forces nearby.
When there are multiple buildings with equal threat, then the building that was constructed first by the
target side is chosen in both 0 and 65536 cases (if the first was destroyed/sold etc., then next constructed
building becomes target).
My confusion was with 262144 or higher number, which turned out to be not working. When tested with
0=46,(262144+index), script ends without doing anything as the members got recruited to other team
immediately in my test case. QUICK_EDIT
Soooo I just tried this, I get a crash with a "null string" error... any idea?
It expects section declaration to be in the sequence like in the vanilla ai.ini. Usually parsing problem.
Why does it load like that? Why not cache the entire INI and then get INI sections as it sees fit? Even it's kept in, a message should be shown. _________________
It was parsing the file from a certain point rather than from the beginning. Fix was a quick 3 line addition.
If you are rewriting, well and good.
While at it, can look into these also:
- Copy/remove on TeamTypes does not show TaskForce and Script. Can click on other TeamTypes and
coming back to it, shows it.
- Structure number offset UI. On insert, always the first on the offset dropdown is inserted. On Add, when
adding several of them, it alters the offset of others already added in some cases. So had to put a Note: on
its usage in the earlier post.
- In config\ts.ini, Weather Storm has to be replaced to Ion Storm in 3 places.
----------------------------------------
Additional info on AvoidThreats is that AI tries to avoid the path itself that falls in enemy range. Looks like
it is a path selection logic rather than just coming into enemy range. Also observed that, this threat evaluation
is performed at periodic intervals rather than at every cell travelled by the units. Units might travel 15-20 cells,
unaware of any change in threat situation during that period. QUICK_EDIT
I don't remember why I wrote it like that, years ago. Anyway, just put the sections in the proper order. It's not difficult.
The odd part of this statement is that my ai.ini is based on the original RA2 format, declarations ahead of code... my cross-checking scripts had the same problem when I tried them with YR, they expected the same order. After I actually looked at aimd.ini, I realized it was a hopeless mess and did what RP suggested, load the entire file, then parse it in memory. QUICK_EDIT
Minor update - version 1.05.2
- Section order need not be sequential like in vanilla INI files.
- Group values changed in the config INI files and added sorting for its dropdown.
- Config\ts.ini - changed Weather Storm to Ion Storm
Attached v1.05.2 and the source changes over 1.05.
Minor update - version 1.05.2
- Section order need not be sequential like in vanilla INI files.
- Group values changed in the config INI files and added sorting for its dropdown.
- Config\ts.ini - changed Weather Storm to Ion Storm
Attached v1.05.2 and the source changes over 1.05.
Thanks. Can you explain what the meaning is of the group values you added?
You may be pleased to know that I am working on a new version of AI Editor - recoded from scratch! It has many improvements including but not limited to better interface, sortable lists, and being to able to see how often the *Types are actually used. I attached some preview screenshots of the work in progress.
Thanks. Can you explain what the meaning is of the group values you added?
Though any arbitrary number could be used, I have included the ones that were used in TS/RA2 maps.
Only -1 and -2 seem to have special meaning. Others are just unique IDs. These unique numbers are
used with Recruiter=no, to recruit from the same group units, thus avoid recruits from other groups.
Group=-1 is no group case used as default by the game (starting units, drop pods/paradrops/crates,
escape units from buildings etc.). As typical AI teamtype group is -1, game recruits such free units
whenever available and applicable by default.
Group=-2 is any group case (even with Recruiter=no), it allows other groups to recruit from its team.
TeamType's group is used for recruitment checking except when it has Group=-1 where it checks for
its task force's group.
Recruiter=yes allows inter-group recruitment without any group checks. QUICK_EDIT
Look at ModEnc, not Deezire's AI guide for Group definition. Unit gets associated with a group ID
and is mainly used for recruitment. Vanilla TS uses -40094 for pool teams put into area guard and
for MCVs to deploy. There is no threat involved in these cases. QUICK_EDIT
Nice to see further development on this tool. Parsing looks better. UI changes of click and edit, Use
Info are good features too.
Few suggestions:
- key and value could also be trimmed in the parser. INI may contain key = value instead of key=value.
Name entry could be an exception but it is better to trim that too for consistency.
- new script item can be appended to the end of the list. Inserting at the top and then moving down is not
comfortable
- it allows right click on script tab on the right panel when nothing is selected (crashes when clicked on new)
- group numbers: -40094 cannot be called as Pool Group, as pool teams can have any group number. It is
confusing to see -3 or -4 as Group 1 or 2. I can understand that you are trying to keep it simple for the user.
Entries -1 and -2 are fine. But for the rest, it is better to put them as -3=Group -3, -40094=Group -40094 and
so on.
- does not update the number of uses in teamtypes say when an AITrigger is deleted. Also does not allow
entries to be deleted for taskforce/script/teamtypes until saved and reloaded and it shows 0 uses.
Removed features:
- hierarchically AITriggers has reference to teamtype and teamtype to its taskforce and script. Links with
View button was quite helpful in the earlier version.
- copy or cloning existing entry was also helpful
- Name= can't be edited (no rename?) QUICK_EDIT
Nice to see further development on this tool. Parsing looks better. UI changes of click and edit, Use
Info are good features too.
Few suggestions:
- key and value could also be trimmed in the parser. INI may contain key = value instead of key=value.
Name entry could be an exception but it is better to trim that too for consistency.
I thought I did that already but maybe I forgot. Will be fixed.
Quote:
- new script item can be appended to the end of the list. Inserting at the top and then moving down is not
comfortable
Items are inserted at the point of the currently selected item. So if you select the last item first you will insert at the bottom. You can also use the keyboard shortcuts insert/delete/pageup/pagedown.
Quote:
- it allows right click on script tab on the right panel when nothing is selected (crashes when clicked on new)
Whoops. Will be fixed.
Quote:
- group numbers: -40094 cannot be called as Pool Group, as pool teams can have any group number. It is
confusing to see -3 or -4 as Group 1 or 2. I can understand that you are trying to keep it simple for the user.
Entries -1 and -2 are fine. But for the rest, it is better to put them as -3=Group -3, -40094=Group -40094 and
so on.
Yes, I want to keep it simple and consistent so I'm keeping things the way they are if it's all the same. Except for group -40094 I guess.
Quote:
- does not update the number of uses in teamtypes say when an AITrigger is deleted. Also does not allow
entries to be deleted for taskforce/script/teamtypes until saved and reloaded and it shows 0 uses.
Whoops. Will be fixed.
Quote:
Removed features:
- hierarchically AITriggers has reference to teamtype and teamtype to its taskforce and script. Links with
View button was quite helpful in the earlier version.
I'll add the ability to take you to the teamtype etc by double clicking on the entry.
Quote:
- copy or cloning existing entry was also helpful
I'll add it back in.
Quote:
- Name= can't be edited (no rename?)
You can rename by double clicking on the list entry. QUICK_EDIT
@Askeladd:
New script item - right click on the last entry works for appending but needs some getting used to.
When nothing is selected it can still be appended to the end of the list. Page up/down is handy.
Rename works with F2 key as well. Both rename and new name could also be trimmed before adding.
Currently vanilla RA2 INI crashes the tool. It is expecting YR teamtype option of MindControlDecision.
Tool could take 2 separate config files for RA2 and YR. Config for RA2 only needs removing YR entries
from Sides, TeamTypeOptions, MissionTypes and ActionTypes.
@G-E:
You could modify the config\ra2.ini for your RA2 needs as mentioned above. This tool crashes because
of several taskforce definition are missing Group= entries in your mod ai.ini. Name= fields are also
missing in some of your scripts, but the tool is able to display its ID in its place. Invalid entries of PROC
and RADAR also gets pointed out in your AITriggers.
@Pop000100:
Source link works, I even commented after looking at the source. If it is getting hidden, just reload
the page. QUICK_EDIT
I meant not all the script actions are available in RA2, you should have some kind of auto-detect or a toggle button to limit the choices to only what's valid in RA2. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
Did some "beta testing" seems it uses lists literally... I set two of the unit indexes to the same number and it said the earlier one is missing, which then caused other compounding errors.
And I notice it no longer complains about missing Name= lines in the ai
*edit*
I do have a complaint, when trying to rename items in the left column, the box it gives you to edit within is tiny, and typing immediately doesn't erase the entire previous text... _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
Adding the default for a missing Group= tag in taskforce is replacing an existing entry. Other cases
seem fine.
Left out on the trimming of input field for Name= on either adding new or rename. Not so essential.
Literals in list index is not a problem, you could have xyz=xyz in lists. Game will truncate 24 characters
and above for IDs. Game uses only numbers for index in taskforce and scripts. 0 to 5 for taskforce and
0 to 49 for scripts. Additional entries are ignored by the game. (From DCoder's factoids)
Duplicate index entries are lost in parsing, so those should be corrected either by the user or the tool.
But the tool wouldn't know what the user wanted with those duplicate entries. QUICK_EDIT
Imo you should stick to what the game does, as those duplicates are removed there.
This way your editor does not create a list that may not correspond to that of the game.
You can always log that there are duplicates. _________________
Found an annoying "bug", the editor will not open the aimd.ini if a TaskForce and a ScriptTypes has the same name, comes up with a string error and won't let you proceed, I manually changed the names in the ini so they don't clash and that fixed it. e.g. 01000005-G changed to 01696905-G in TaskForce and to 01303005-G in ScriptTypes
Another is, the old editor would show you the unit code as well (e.g. HTNK) can you please put this back in, helps when identifying between multiple units with the same name (AI cheat units etc). QUICK_EDIT
Having same IDs even from different lists should be avoided as common entries of Name and Group
etc. will be overridden whereas similar entries from taskforce and scripts could crash the game or
make that trigger non-functional. Those should be corrected by the user.
Whether log shows them or not, user should compare the save (atleast the first save) from this tool
with a backup AI ini file to check out the differences.
In the meantime, until Askeladd responds, you can use the attached version which shows the ID
along with its name for technotypes as in the earlier version.
Update - Changes in v2.0.2.1 over v2.0.2:
- Techno type name is appended with its ID
Cheers, is it common for this tool to delete scripts and change them around, it creates duplicates as well. Nothing that manually editting the ini cant fix but it gets very annoying. _________________
ayylmao on Discord QUICK_EDIT
Duplicate entries in either the list or sections are the ones that get removed, even the game does that.
That is why the first save with this tool has to be compared with a backup.
As for changes, it fills up the defaults such as Name or Group if you have missed them. And there is
sorting.
I don't think it creates duplicates or shuffles the script elements. You should give an example, so that
it can be identified and fixed. QUICK_EDIT
Any chance of getting this to work with multiple sides? Manually changing the AITriggers to the new side's number (e.g. 4,0,<none>) then opening the aimd.ini file with the editor and then saving it removes all new side triggers from the file. QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum