looking for help with events

Discuss and distribute tools and methods for modding. Moderator - Grognak
Post Reply
jollyolly
Posts: 11
Joined: Sun Sep 22, 2013 4:51 am

looking for help with events

Post by jollyolly »

i wanted to add a few events to the game. i started with a few simple ones that all worked just as i wanted them to, mostly just text and gaining resources/crew. i then made a decent one with a ship and such, it also worked (for the most part) the was i wanted it to.

trying to start on my second one and can't seem to get anything to work. i have it set up so that all of the events (currently only 3) to show up in the first sector with only random events and shops along with them. i edited the sector data so that my events are something like min-10 max-15 and that has been working fine for testing purposes.

basically if i only have an event and text it will work but every time i try to add a choice my events disappear and im left with a sector full of shops :?

here is the sector data part i changed

Code: Select all

<sectorDescription name="STANDARD_SPACE" minSector="0" unique="false">
	<nameList>
		<name>The Standards of Standard</name>
	</nameList>
	<trackList>
		<track>civilian</track>
		<track>cosmos</track>
		<track>milkyway</track>
	</trackList>
	<startEvent>START_BEACON</startEvent>
	<event name="LOGAN" min="10" max="15"/>
	<event name="STORE" min="1" max="2"/>
	<!--
	<event name="ITEMS" min="1" max="2"/>
	<event name="NEUTRAL2" min="2" max="4"/>
	<event name="NOTHING" min="1" max="2"/>
	<event name="DISTRESS_BEACON" min="1" max="2"/>
	<event name="HOSTILE2" min="4" max="6"/>
	<event name="NEBULA" min="0" max="4"/>
	<event name="QUESTS" min="1" max="1"/>
	<event name="HOSTILE1" min="2" max="2"/>
	<event name="HOSTILE_BOARDING" min="0" max="0"/>
	-->
</sectorDescription>
and event list i created for LOGAN

Code: Select all

<eventList name="LOGAN">
	<event load="LOGAN_A"/>
	<event load="LOGAN_B"/>
	<event load="LOGAN_C"/>
</eventList>
so i tried to remove everything except one choice and im still getting the same result. here what that looks like

Code: Select all

<event name="LOGAN_B">
	<text planet="NONE" back="BG_DARK">a strange man teleports aboard your ship, he spins a tale of his days as a captain and offers you his service.</text>
		<choice hidden="true">
			<text>you offer the man a stay on your ship</text>
			<crewMember ammount="1"/>
		</choice>
</event>
spacing so text and choice line up - didn't work

Code: Select all

<event name="LOGAN_B">
	<text planet="NONE" back="BG_DARK">a strange man teleports aboard your ship, he spins a tale of his days as a captain and offers you his service.</text>
	<choice hidden="true">
		<text>you offer the man a stay on your ship</text>
		<crewMember ammount="1"/>
	</choice>
</event>
so the word wrap kinda messes up the text part but its not wrapped in the file. still with the very simple version not working i can't get anything done. i've tried various things but still every time there's a choice it breaks and only shops appear. what is it that im doing wrong?

also if your interested here is what im hoping it will look like if i can figure out what wrong with it.

Code: Select all

<event name="LOGAN_B">
	<text>a strange man teleports aboard your ship, he spins a tale of his days as a captain and offers you his service.</text>
		<choice hidden="true">
			<text>you think its best to ask the crew</text>
			<event load="crew_decide"/>
		</choice>
		<choice hidden="true">
			<text>you think its best to personally decide this</text>
			<event load="risky_buisness"/>
		</choice>
		<choice hidden="true">
			<text>you tell the man you've already got a captain but offer to allow him transport to the next available station</text>
			<event>
				<text>your offer seems to offend the man, but instead of turning hostile he offers a few supplies he doesn't need and warps back to where he came from. you feel regretful you didn't take him up on his offer.</text>
			</event>
		</choice>
</event>
and the top two choices will be linked to these two event lists

Code: Select all

<eventList name="crew_decide">
	<event>
		<text>your crew decide its too risky and tell him to go back to he planet, he doesn't take this very well and informs you he's actually a rebel spy before arming a bomb strapped to his chest and killing one of you crew members</text>
		<crewMember amount="-1"/>
	</event>
	<event>
		<text>your crew decides it not in the best intrest of the mission to let this man stay aboard and politley ask him to leave. he does so without any confrontaion, and offers you some supplies for you journey.</text>
	</event>
	<event>
		<text>your crew decides that even though he is odd it would be a benifit to have him aboard, they welcome him in and he shows his appriciation by offering to add the rest of his supplies to your stockpiles.</text>
		<crewMember amount="1"/>
		<autoReward level="HIGH">standard</autoReward>
	</event>
	<event>your crew decides to welcome him aboard, but now the man insists that he has somewhere else to be. he offers you a few supplies as compensation for the misunderstanding</text>
	<autoReward level="HIGH">standard</autoReward>
		<choice>
			<text>continue...</text>
			<event>
				<text>you accept the supplies and moments later theres a large explosion from the cargo hold, you are unsure if they were booby-trapped or it some of the missiles were unstable, but one things for sure you just lost some of your stockpile.</text>
				<damage amount="7"/>
				<item_modify>
					<item type="scrap" min="-5" max="-20"/> <!-- updated --> <!-- updated -->
				</item_modify>
			</event>
		</choice>
	</event>
	<event>
		<text>your crew decides he would be a benifit to the crew and he gladly accepts a role on your ship</text>
		<crewMember amount="1"/>
	</event>
</eventList>

<eventList name="risky_business">
	<event>
		<choice hidden="true">
			<text>you decide to welcome him aboard only not as captain but as a crew member.</text>
			<event>
				<text>he seems pleased and gladly accepts</text>
				<crewMember ammount="1"/>
			</event>
		</choice>
		<choice hidden="true">
			<text>you decide its not worth the risk and ask him to leave the ship the way he came.</text>
			<event>
				<text>he seems understanding and agrees and teleports away, and offers supplies as a gift. without any time to answer he is gone and the supplies are on board.</text>
			</event>
		</choice>
		<choice hidden="true">
			<text>you are unsure what to do and ask him to better explain himself.</text>
			<event>
				<text>as soon as you start to press him, he seems to go insane. he starts raving about a sun god and how it will take you all. arming an explosive strapped to his chest he takes off into a corridor. a large explosion rips through the ship. one of your crew is missing likely killed in the explosion.</text>
				<damage amount="6"/>
				<crewMember ammount="-1"/>
			</event>
		</choice>
	</event>
	<event>
		<text>theres no time for questions as a rebel ship shows up on sensors very close to your location, looks like you've gained yourself a new crewmember, you prepare for fTL.</text>
		<crewMember amount="1"/>
	</event>
</eventList>
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: looking for help with events

Post by kartoFlane »

Code: Select all

<event name="LOGAN_B">
  <text planet="NONE" back="BG_DARK">a strange man teleports aboard your ship, he spins a tale of his days as a captain and offers you his service.</text>
  <choice hidden="true">
    <text>you offer the man a stay on your ship</text>
    <crewMember ammount="1"/>
  </choice>
</event>
<choice> tags can only contain <text> and <event> tags, and no other. Any actions a choice is supposed to execute have to be placed inside the <event> tag. So the above should look like this:

Code: Select all

<event name="LOGAN_B">
  <text planet="NONE" back="BG_DARK">a strange man teleports aboard your ship, he spins a tale of his days as a captain and offers you his service.</text>
  <choice hidden="true">
    <text>you offer the man a stay on your ship</text>
    <event>
      <crewMember ammount="1"/>
    </event>
  </choice>
</event>
Also, missing opening <text> tag:

Code: Select all

<event>your crew decides to welcome him aboard, but now the man insists that he has somewhere else to be. he offers you a few supplies as compensation for the misunderstanding</text>
Superluminal2 - a ship editor for FTL
jollyolly
Posts: 11
Joined: Sun Sep 22, 2013 4:51 am

Re: looking for help with events

Post by jollyolly »

<choice> tags can only contain <text> and <event> tags, and no other. Any actions a choice is supposed to execute have to be placed inside the <event> tag. So the above should look like this:

Code: Select all

<event name="LOGAN_B">
  <text planet="NONE" back="BG_DARK">a strange man teleports aboard your ship, he spins a tale of his days as a captain and offers you his service.</text>
  <choice hidden="true">
    <text>you offer the man a stay on your ship</text>
    <event>
      <crewMember ammount="1"/>
    </event>
  </choice>
</event>
thank you, i can't believe that i didn't notice that. i have now successfully made 3 pretty decent sized events that all work perfectly thanks to this simple answer and learning from other similarly dumb mistakes :D .
Post Reply