Wiki / events.xml structure

Discuss and distribute tools and methods for modding. Moderator - Grognak
Post Reply
E-Ripley
Posts: 2
Joined: Fri Dec 14, 2012 8:42 am

Wiki / events.xml structure

Post by E-Ripley »

Can anyone head to FTLwiki.com and fix the events structure wiki there? It's not very clear information, making life hard. Also, does anyone know how to use <ship hostile="false"/> with an eventlist load? or how to load an eventlist correctly after the end of combat? ie:

<event name="blah surrender"> <!-- surrender event out of a ship load -->
______<text>barf, blah.</text>
______<choice hidden="true">
___________<text> yes, blarf </text>
___________<event>
_________________<ship hostile="false"/>
_________________<event load="barfarama"/>
___________</event>
______</choice>
______<choice>
___________<text> nope </text>
___________<event/>
______ </choice>
</event>

<eventList name="barfarama">
________<event>
_____________<text> I see, excellent </text>
_____________<autoReward level="RANDOM">weapon</autoreward>
________</event>
________<event>
________ etc etc etc

.... I cannot get this to work no matter what I try. There needs to be multiple outcomes to surrender events with different auto rewards. RIght now I'm using a gigantic eventList because I cannot get the above to work. can anyone help?
DrkTemplar
Posts: 245
Joined: Mon Oct 08, 2012 4:24 pm

Re: Wiki / events.xml structure

Post by DrkTemplar »

Load the ship at the start of the event. Then "load the ship again" with hostile="true" to start the fight.

Code: Select all

<event name="INF_STEALTH_FOUND">
	<text>With the adjustment made to your sensors, you pick up a signal! You attempt to hail them, but get no response.</text>
	<ship load="INF_SHIP_STEALTH" hostile="false"/>
	<choice>
		<text>Attack the Stealth ship.</text>
        <event>
            <ship load="INF_SHIP_STEALTH" hostile="true"/>
        </event>
	</choice>
</event>
For an event after "combat", update the ship event itself. Below will load from an eventList if either the ship is destroyed or the crew is killed. There is a tag for surrender if you're trying to put the eventList there. Look in event_ships.xml for more information.

Code: Select all

<ship name="INF_SHIP_STEALTH" auto_blueprint="INF_SHIP_STEALTH">
	<escape timer="60" min="19" max="19">
		<text>The ship starts to power up its FTL Drive. The Stealth ship is trying to get away!</text>
	</escape>
	<gotaway>
		<text>The Stealth ship jumps away, taking their advanced technology with them!</text>
	</gotaway>
	<destroyed>
		<text>The ship explodes and you scrap what you can.</text>
		<item_modify>
			<item type="scrap" min="20" max="40"/>
			<item type="missiles" min="3" max="7"/>
			<item type="drones" min="3" max="7"/>
			<item type="fuel" min="3" max="7"/>
		</item_modify>
		<choice hidden="true">
			<text>Continue...</text>
			<event load="INF_ADV_TECH"/>
		</choice>
	</destroyed>
	<deadCrew>
		<text>With the crew dead you take as much salvage from the ship as possible.</text>
		<item_modify>
			<item type="scrap" min="30" max="50"/>
			<item type="missiles" min="5" max="10"/>
			<item type="drones" min="5" max="10"/>
			<item type="fuel" min="5" max="10"/>
		</item_modify>
		<choice hidden="true">
			<text>Continue...</text>
			<event load="INF_ADV_TECH"/>
		</choice>
	</deadCrew>
</ship>
E-Ripley
Posts: 2
Joined: Fri Dec 14, 2012 8:42 am

Re: Wiki / events.xml structure

Post by E-Ripley »

Thanks!
Post Reply