Page 1 of 1

Same decision ID can be entered multiple times

Posted: Sun Feb 18, 2024 12:48 pm
by Lothos
Not sure if this is a bug or not but I noticed you can have the same decision ID used multiple times (even in the same file).

If this is not a bug then I have a question

If I have 3 Dummy Decisions all with the same ID

If the first one fires will the other two fire at a later date once their conditions are met or once the ID is used then all other decisions using the same ID from that point forward are ignored?

I am wondering because this could (in theory) be used as an OR statement for the same decision ID. Or statements do not exist in the current code and the only way around that was to create duplicate chains of events with different IDs.

Re: Same decision ID can be entered multiple times

Posted: Sun Feb 18, 2024 2:29 pm
by El_Condoro
I'm not sure if this is what you mean and what context you want to use an OR statement but #POSITION_CONDITION in decision scripts uses OR logic, so that might be able to be used.

Re: Same decision ID can be entered multiple times

Posted: Sun Feb 18, 2024 2:31 pm
by Lothos
El_Condoro wrote: Sun Feb 18, 2024 2:29 pm I'm not sure if this is what you mean and what context you want to use an OR statement but #POSITION_CONDITION in decision scripts uses OR logic, so that might be able to be used.
More complicated than that. My main focus is to get an answer on duplicate decision IDs and go from their.

Re: Same decision ID can be entered multiple times

Posted: Mon Feb 19, 2024 8:41 pm
by Hubert Cater
It's not intentional, and I would guess that the last ID read in would take precedent as the final state for that particular ID.

Off hand not sure if that helps or hinders what you would be after, and so then not sure if it is worth correcting as a result.

e.g. if it is of some benefit to have the last ID read in as the final result, I'm happy to leave it as is as it is not really an issue for any of the default campaigns as we don't use the same ID etc

Re: Same decision ID can be entered multiple times

Posted: Mon Feb 19, 2024 10:41 pm
by El_Condoro
I ran a simple test with 3 identical DE scripts with the same ID= 1. I varied #CONDITION_POSITION to require an enemy unit within 1,2, or 3 of a resource.

They all ran in order from top to bottom according to the conditions set.

However, I could not get a LINK= 1[1] to work, so this would need more investigation.