I'm trying to connect two mods together. I'm using global variables to achieve a sort of dependency injection - if the optional mod is enabled, it should save it's introduction event to the global storage, and the main mod will execute it at the proper time.
I use "Trigger (Script)" resources hooked up to "Start of round" event to set up the necessary variables. However I cannot influence the order in which the events trigger. It's always "Optional" mod first, and "Main" mod second, no matter how the Priority field is set up. Here's how I test it:
Main mod's "First turn" script defines variable TEST and tries to access variable TEST2.
The optional mod defines TEST2 and tries to access TEST:
With main mod's priority set to `0` I would expect that TEST would be set to 500 and no gold would be granted, because TEST2 is not set. Then optional mod would set TEST2 to 2500 and grant 500 imperium. However, the opposite is the case - no matter the Priority values, the optional mod's trigger is always evaluated first.
Is this a bug? Am I doing something wrong? Perhaps the priority is only ensured within one .rpk?
I use "Trigger (Script)" resources hooked up to "Start of round" event to set up the necessary variables. However I cannot influence the order in which the events trigger. It's always "Optional" mod first, and "Main" mod second, no matter how the Priority field is set up. Here's how I test it:
Main mod's "First turn" script defines variable TEST and tries to access variable TEST2.

The optional mod defines TEST2 and tries to access TEST:

With main mod's priority set to `0` I would expect that TEST would be set to 500 and no gold would be granted, because TEST2 is not set. Then optional mod would set TEST2 to 2500 and grant 500 imperium. However, the opposite is the case - no matter the Priority values, the optional mod's trigger is always evaluated first.
Is this a bug? Am I doing something wrong? Perhaps the priority is only ensured within one .rpk?
- 1