Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Mar 29, 2024 6:13 am
All times are UTC + 0
Trigger Duplicates appearing in AIEditor
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Ich-Henker
Flamethrower


Joined: 06 Aug 2015
Location: Germany

PostPosted: Sun Oct 07, 2018 10:04 am    Post subject:  Trigger Duplicates appearing in AIEditor Reply with quote  Mark this post and the followings unread

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?

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Mon Oct 08, 2018 1:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Mon Oct 08, 2018 10:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
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

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Oct 09, 2018 1:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Oct 09, 2018 4:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
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

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Oct 09, 2018 6:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
Ich-Henker
Flamethrower


Joined: 06 Aug 2015
Location: Germany

PostPosted: Tue Oct 09, 2018 9:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Oct 09, 2018 11:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

It removes AIEdit from the array after saving the contents to a string, BEFORE orphan handling:
Code:
if [info exists rawaidata(AIEdit)] {
   set aiedit $rawaidata(AIEdit)
   unset rawaidata(AIEdit)
}

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Wed Oct 10, 2018 2:10 am    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Wed Oct 10, 2018 3:14 am    Post subject: Reply with quote  Mark this post and the followings unread

I got this problem long before...

_________________

Back to top
View user's profile Send private message Skype Account
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Oct 10, 2018 4:20 am    Post subject: Reply with quote  Mark this post and the followings unread

@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.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Wed Oct 10, 2018 6:06 am    Post subject: Reply with quote  Mark this post and the followings unread

Ahh yes I see I have a few incorrect indexes. You don't see it in the snapshot because that went through the cleaner which fixes all the lists.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Oct 10, 2018 7:05 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Another bug seems to be that if you open a new rules/ai after loading the first, it will throw a gazillion errors

This is fixed in AIEdit v2.0.3.7.

Back to top
View user's profile Send private message
Ich-Henker
Flamethrower


Joined: 06 Aug 2015
Location: Germany

PostPosted: Wed Oct 10, 2018 9:55 am    Post subject: Reply with quote  Mark this post and the followings unread

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!

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Oct 10, 2018 12:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.1700s ][ Queries: 11 (0.0086s) ][ Debug on ]