Posted: Sun Oct 07, 2018 10:04 am Post subject:
Trigger Duplicates appearing in AIEditor
Okay, I got a major Problem now.After using AIClean and then using the new AiFile with the AiEditor in it's latest incarnation, I get error messages whenever I create a new Trigger or Team or copy an existing one:
It says Duplicates are detected in AI Editor, or Trigger exists = duplicate in AICheck.
It is tedious and complicated to get rid of those, sometimes even new ones disappear or reappear - a team becomes a taskforce or a trigger - so some of the ID ordering is damaged. To get rid of it I have to copy a duplicate multiple times, till it isn't marked as duplicate anymore - it affects all triggers that i try to copy and all new ones.
Do you have an idea or a method within AIClean or manually to reorder all Triggers, Teams and TaskForces ID's? QUICK_EDIT
Hope you are using latest AIEditor v2.0.3.5, which was released because of your case. What was needed was to remove AIEdit from TeamTypes list and then use the AIEditor. That last version was coded to check existing IDs before creating new ones, so that it won't create duplicate IDs even if the [AIEdit] section was removed from the ai(md).ini. After saving, correct those duplicate ones manually. QUICK_EDIT
Hope you are using latest AIEditor v2.0.3.5, which was released because of your case. What was needed was to remove AIEdit from TeamTypes list and then use the AIEditor. That last version was coded to check existing IDs before creating new ones, so that it won't create duplicate IDs even if the [AIEdit] section was removed from the ai(md).ini. After saving, correct those duplicate ones manually.
Oh so that's what's going on...
E1: my script retained [AiEdit] section fine, but it won't retain the TeamTypes declaration, if you can recode to allow loading that section as an orphan without checking TeamTypes I think that will resolve the issue here. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
AIEditor updated version released (v2.0.3.6) which doesn't use [AIEdit] section for ID generation. It now treats AIEdit section like any other section listed or otherwise.
@G-E: Keep the exemption for [AIEdit] section in your scripts if you have already implemented so, for those who might still be using older versions of AIEditor. Anyway it is not a good idea to add unlisted sections to lists, even game ignores those and user may not want that done by default. QUICK_EDIT
AIEditor updated version released (v2.0.3.6) which doesn't use [AIEdit] section for ID generation. It now treats AIEdit section like any other section listed or otherwise.
@G-E: Keep the exemption for [AIEdit] section in your scripts if you have already implemented so, for those who might still be using older versions of AIEditor. Anyway it is not a good idea to add unlisted sections to lists, even game ignores those and user may not want that done by default.
Only AICLEAN modifies any files, and I'm leaving the exemption for the object. You can put anything you want inside [AIEdit], and it will just add it back exactly as it was read, after the cleaning process.
It isn't a good idea to declare it as TeamTypes, that logically doesn't jive for me. Leave it as an orphan like [Digest], and if not found do your counting jiggery pokery. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
It wasn't declared as a teamtype, [AIEdit] section was not in any list, your old AICLEAN5 script did that when it found it as an orphan section and added it to TeamTypes list, that is where the problem started. I did test your script and reported it here. QUICK_EDIT
Hey, thank you for replying; i got a funny thing to tell. After using the latest build 2.0.3.6, i tested it again. I created a new trigger without team or taskforce, saved and reloaded the file. The Error Log then showed 1567 Duplicates, all triggers teams and scripts were gone except for the one Test Trigger and the task forces. I used the new AIClean too but it did not prevent the slaughter of my AIfile.
Wow!
Before all this happened I renamed all Triggernames and TeamNames with AIEdit, ordered everything according to it's alphabetical order system in days of work, used AIClean... is there a way to rename all triggers and team ID's by hand?
...
Edit: Just opening my old working (but troubled, because infected with the Trigger duplicate problem with wich i started the thread)aimd.ini file and saving it with the new aiedit causes the same catastrophic damage.
The Version before opens and saves it normally. Even with creating a new trigger
Edit2: ... i toyed a bit with column editing and erased the first column of the trigger names according to the deezire guide where you can change the hexidecimal numbers to everything .... i look into it more. Old Version accepts and creates new triggers without problems; but the new version still erases everything but the taskforces for their duplicates. So AIEdit renames all triggers then? Last edited by Ich-Henker on Tue Oct 09, 2018 11:24 pm; edited 3 times in total QUICK_EDIT
So on the topic of AIEdit, I just downloaded your latest and opened mine, the error log is showing what I can only call a glitch (this particular script exists once, declared once, used twice):
Duplicate tag/index [TRANS_VS_INFANTRY] => 3 in ai.ini!
Duplicate tag/index [TRANS_VS_INFANTRY] => 4 in ai.ini!
Why would there be 2 error entries for the same error?
Another bug seems to be that if you open a new rules/ai after loading the first, it will throw a gazillion errors like it is trying to add the two together. I don't know if this is intentional or you just aren't clearing memory, but it seems to me a dumb idea if you aren't going for a multi-pane editor. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
@Ich-Henker: If you rename all your trigger and team names, it will only change the Name field, not the ID for that section/trigger. ID and Name are not the same, so it won't affect your duplicate problem. Looks like your AI INI is messed up, if you share (publicly/privately) your rules and ai ini files, I will look into it.
@G-E: What the duplicate it is showing with your INI is not in script exists once, declared once or used twice. You should look into that script [TRANS_VS_INFANTRY] for the likes of 3= and 4= twice. I am not getting that duplicate message from your 20th Sep snapshot.
On opening, INI one after another problem, I can replicate, will look into it.
@cxtian39: If there are duplicates, you should fix those, game will use only one of them. QUICK_EDIT
Thank you very much for your answer. The newer version 07 doesnt create the 1567 Errors; creating new Triggers, saving and loading works ... I still want to know how you rename all ID's (I am aware of the difference between ID and Name). Is there a known procedure to rename ID's. I tried to translate them with a Hex-translator but to no avail.
Thanks! QUICK_EDIT
Those hex IDs need not be translated, those just have to be unique. You can use alphabets/numbers/hyphen/underscore etc., even like [ICH-08ABCXYZ-AI], just don't make it too long. An AITrigger can have 1 or 2 teamtypes. TeamTypes have one script and one taskforce. So, when you find a duplicate ID you have to selectively replace/rename those IDs and also in places where it is referenced. That is hard work. Otherwise let the duplicates be removed and then recreate those with AIEdit. There is no tool available to quickly do that. Also one has to keep in mind that SP maps might be using some IDs, so those won't function if those IDs are renamed. QUICK_EDIT
You cannot post new topics in this forum You cannot 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