UPDATE: Self-resolved:
My issue was with a missing <choice> start tag... and possibly misplaced <text> element.
Corrected code follows:
Code: Select all
<event name="START_BEACON_ENGI">
<text load="START_BEACON_ENGI"/>
<choice hidden="true">
<text>Select this to NOT use Custom Repeated Fleet Delay mod... Continue...</text>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Load CHOOSE_REBEL_DELAY event... Continue...</text>
<event load="CHOOSE_REBEL_DELAY" />
</choice>
</event>
<textList name="START_BEACON_ENGI">
<text>The rebel fleet pursuit is delayed by your jump to a new sector. You have arrived in Engi space. The Mantis have been threatening the Engi core worlds, but you should be able to stock up for your journey.</text>
<text>The rebel fleet pursuit is delayed by your jump to a new sector. You have arrived in Engi space. The fall of the Federation has brought tough times for these robotic lifeforms, but they're usually willing to help.</text>
</textList>
==============================================
============RESOLVED=========================
==============================================
Question:
Can I?, and if so, how do I?... write .xml.append files such that they will use events from a different file?
For example: Make a call to use an event MY_EVENT found within the file MY_MOD_FILE.xml when re-writting the code for the event START_BEACON_ENGI in a file called events_engi.xml.append.
Context:
I'm writting a mod to delay the rebel fleet at the start of each sector (I know there's already a disable rebel fleet mod but when I tried it it seemed to only work in civilian sectors). I ended up having to make changes to all the START_BEACON events (START_BEACON, START_BEACON_ENGI, START_BEACON_MANTIS, ect. within each of the corresponding event.xml, events_engi.xml, ect.). Anyway, after editing those 9 or so files I managed to get the rebel fleet to be delayed by 5 turns at the start of each sector.
Then I decided, well, I guess it would be nicer if I could chose the delay amount, so I went ahead and used events with choices and made a menu to chose the delay. It works for civilian sectors. Now, I could probably just copy-paste that code into all the files (and I think at one point I tried that but something went wrong)... but that is definitely not ideal as it would be a pain to maintain.
attached files for reference:
v1.0.2 uses a hard-coded 5 turn per sector. Works, but I want to upgrade feature. (provided for reference only)
v1.2.3doc1 is the one I'm having trouble with. (provided to see if there's a way to make the START_BEACON_ENGI event call upon the CHOOSE_REBEL_DELAY event from event.xml.append (though preferably, I'd put all events except the START_BEACON event from the event.xml.append file into my own CUSTOM_FLEET_DELAY_MOD_events.xml file, and just call upon that file's events.)
Contents of event_engi.xml.append file:
Code: Select all
<event name="START_BEACON_ENGI">
<text load="START_BEACON_ENGI"/>
<text>Select this to NOT use Custom Repeated Fleet Delay mod... Continue...</text>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Load CHOOSE_REBEL_DELAY event... Continue...</text>
<event load="CHOOSE_REBEL_DELAY" />
<event />
</choice>
</event>
<textList name="START_BEACON_ENGI">
<text>The rebel fleet pursuit is delayed by your jump to a new system. You have arrived in Engi space. The Mantis have been threatening the Engi core worlds, but you should be able to stock up for your journey.</text>
<text>The rebel fleet pursuit is delayed by your jump to a new system. You have arrived in Engi space. The fall of the Federation has brought tough times for these robotic lifeforms, but they're usually willing to help.</text>
</textList>
Events that are in events.xml.append (which I would probably move to a file called CUSTOM_FLEET_DELAY_MOD_events.xml) and want to access these when writting .xml.append files that over-write the START_BEACON (or START_BEACON_ENGI, START_BEACON_MANTIS, etc) event for each sector (ex. events_engi.xml.append, events_mantis.xml.append, etc.))
Code: Select all
<event name="CHOOSE_WEALTH">
<text>You cheat your way into getting rich. Choose your bonus.</text>
<choice req="engines" lvl="1" hidden="true">
<text>Small Wealth Boost...(2-3 of each supply + 10 scrap)</text>
<event>
<text>Adding supplies...</text>
<item_modify>
<item type="fuel" min="3" max="3" />
<item type="missiles" min="2" max="2" />
<item type="drones" min="2" max="2" />
<item type="scrap" min="10" max="10" />
</item_modify>
</event>
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Medium Wealth Boost...(6-10 of each supply + 40 scrap)</text>
<event>
<text>Adding supplies...</text>
<item_modify>
<item type="fuel" min="10" max="10" />
<item type="missiles" min="6" max="6" />
<item type="drones" min="6" max="6" />
<item type="scrap" min="40" max="40" />
</item_modify>
</event>
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Large Wealth Boost...(30 of each supply + 200 scrap)</text>
<event>
<text>Adding supplies...</text>
<item_modify>
<item type="fuel" min="30" max="30" />
<item type="missiles" min="30" max="30" />
<item type="drones" min="30" max="30" />
<item type="scrap" min="200" max="200" />
</item_modify>
</event>
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Get a Random Augment...</text>
<event>
<text>Adding supplies...</text>
<augment name="RANDOM" />
</event>
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>(Super Rich Mode) OVER 9000...massive supplies and a free augment.</text>
<event>
<text>Adding supplies...</text>
<item_modify>
<item type="fuel" min="9001" max="9001" />
<item type="missiles" min="9001" max="9001" />
<item type="drones" min="9001" max="9001" />
<item type="scrap" min="9001" max="9001" />
</item_modify>
<augment name="NANO_MEDBAY" />
</event>
</choice>
<choice>
<text>I'm no cheater... I don't want free wealth... Continue...</text>
<event/>
</choice>
<choice>
<text>I'm no cheater... I don't want free wealth... Continue...</text>
<event/>
</choice>
<choice>
<text>I'm no cheater... I don't want free wealth... Continue...</text>
<event/>
</choice>
</event>
<event name="CHOOSE_REBEL_DELAY_HARDER">
<text>Choose a rebel fleet delay option:</text>
<choice>
<text>Fleet +1: (HARDER) Speed up the fleet 1 turn...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="1" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice>
<text>Fleet +2: (HARDER) Speed up the fleet 2 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="2" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice>
<text>Fleet +3: (HARDER) Speed up the fleet 3 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="3" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice>
<text>Fleet +4: (HARDER) Speed up the fleet 4 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="4" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice>
<text>Fleet +0: (NORMAL) No change to fleet pursuit...</text>
<event />
</choice>
</event>
<event name="CHOOSE_REBEL_DELAY_1-14">
<text>Choose a rebel fleet delay option:</text>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -1: (EASIER) Delay fleet 1 turn...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-1" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -2: (EASIER) Delay fleet 2 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-2" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -3: (EASIER) Delay fleet 3 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-3" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -4: (EASIER) Delay fleet 4 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-4" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -5: (EASIER) Delay fleet 5 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-5" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -6: (EASIER) Delay fleet 6 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-6" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -7: (EASIER) Delay fleet 7 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-7" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -8: (EASIER) Delay fleet 8 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-8" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -9: (EASIER) Delay fleet 9 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-9" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -10: (EASIER) Delay fleet 10 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-10" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -11: (EASIER) Delay fleet 11 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-11" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -12: (EASIER) Delay fleet 12 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-12" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -13: (EASIER) Delay fleet 13 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-13" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>Fleet -14: (EASIER) Delay fleet 14 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-14" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice>
<text>Fleet +0: (NORMAL) No change to fleet pursuit...</text>
<event />
</choice>
</event>
<event name="CHOOSE_REBEL_DELAY_ADDITIONAL_CHOICES">
<text>Choose a rebel fleet delay option:</text>
<choice req="engines" lvl="1" hidden="true">
<text>More options: Load CHOOSE_REBEL_DELAY_HARDER event...</text>
<event load="CHOOSE_REBEL_DELAY_HARDER" />
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>More options: Load CHOOSE_REBEL_DELAY_1-14 event...</text>
<event load="CHOOSE_REBEL_DELAY_1-14" />
<event />
</choice>
<choice>
<text>Fleet +0: (NORMAL) No change to fleet pursuit...</text>
<event />
</choice>
<choice>
<text>Fleet +0: Choose Wealth...</text>
<event load="CHOOSE_WEALTH" />
<event />
</choice>
<choice>
<text>Fleet -20: (EASIER) Delay fleet 20 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-20" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice>
<text>Fleet -50: (EASIER) Delay fleet 50 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-50" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice>
<text>Fleet -10000: (EASIER) Delay fleet 10000 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-10000" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<!-- ***************************************
<choice req="engines" lvl="1" hidden="true">
<text>Go back: Load CHOOSE_REBEL_DELAY event...</text>
<event load="CHOOSE_REBEL_DELAY"/>
<event/>
</choice>
-->
</event>
<event name="CHOOSE_REBEL_DELAY">
<text>Choose a rebel fleet delay option:</text>
<choice>
<text>Fleet -3: (EASIER) Delay fleet 3 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-3" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice>
<text>Fleet -4: (EASIER) Delay fleet 4 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-4" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice>
<text>Fleet -5: (EASIER) Delay fleet 5 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-5" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice>
<text>Fleet -10: (EASIER) Delay fleet 10 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-10" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice>
<text>Fleet -1000: (EASIER) Delay fleet 1000 turns...</text>
<event>
<text>Fleet change</text>
<modifyPursuit amount="-1000" />
<choice>
<text>Continue...</text>
<event />
</choice>
</event>
<event />
</choice>
<choice>
<text>I changed my mind... I don't want any change to rebel fleet pursuit.</text>
<event />
</choice>
<choice req="engines" lvl="1" hidden="true">
<text>More options: Load CHOOSE_REBEL_DELAY_ADDITIONAL_CHOICES event...</text>
<event load="CHOOSE_REBEL_DELAY_ADDITIONAL_CHOICES" />
<event />
</choice>
</event>
EDIT: forum doesn't like my uploading... so here's a link for files
https://www.mediafire.com/folder/a5ds8w ... o7k/shared
direct links:
http://download625.mediafire.com/c7kscb ... 1.5.13.ftl
http://download682.mediafire.com/94mfnh ... 1.5.13.ftl
EDIT2: Some notes for those that don't know:
1. .ftl is the extension used by slipstream mod manager, (you can just rename to .zip and extract to see what's in them)
2. .xml.append is also just a fancy-renamed .xml file (done so so that slipstream mod manager knows to append the contents rather than over-write... allowing for more mod compatibility with other mods)
Thanks in advance to anyone who can help me out with this.