For the first question, this is what happens right now:
1. Start game (without my mod)
2. Save Game
3. Exit
4. Install mod
5. Load game (mod is loaded, I see my show_help message but the mod doesn't works)
6. Save game
7. Load game (mod works)
In my "init" cue, I'm listening for <event_cue_signalled cue="md.Setup.Start" /> because this is triggered on new game and loaded game. The problem is, I need to call but the problem is my CUE has a subcue that listens for <event_game_loaded/> so I can call <signal_cue_instantly/> on a cue that I cannot call from my "Init" cue.
Essentially it looks like:
Code: Select all
<cue name="init">
<conditions>
<event_cue_signalled cue="md.Setup.Start" />
</conditions>
<actions>
<set_value name="$ModName" exact="'CUE Test'" />
<set_value name="$ModVer" exact="'1.0.0'"/>
<show_help duration="15s" custom="'%s'.[$ModName] + ' v%s'.[$ModVer] + ' loaded'"/>
<!-- THIS DOESN"T WORK
It seems the subcue isn't instantiated yet? I need to be able to call this on a save load
so users can add my mod to an existing save. Problem is if I move do_spawn outside
the CUES tag, then the other cues can't call it.
-->
<signal_cue_instantly cue="do_spawn" />
</actions>
<cues>
<cue name="mod_save_loaded" instantiate="true">
<conditions>
<event_game_loaded/>
</conditions>
<actions>
<!-- Do some stuff -->
</actions>
</cue>
<cue name="do_spawn" instantiate="true">
<conditions>
<event_cue_signaled />
</conditions>
<actions>
<!-- Do some stuff -->
</actions>
</cue>
</cues>
</cue>
This brings me to the second question, which I believe is probably related. If I decide to change what the cue "do_spawn" does, it doesn't seem to replace the cue that was saved in the save game. I would like to be able to change my mod and upload it so users can simply replace it without breaking their save game. I checked the X:Rebirth documentation but the details on CUE behavior are minimal. Looking through the extracted X4 files, it's not clear what order CUEs get loaded or called, when to instantiate a cue and when not to.
Any advice would be appreciated.