Page 1 of 1

Need help making an event and enemy ship.

Posted: Sun Dec 08, 2013 10:51 am
by RedAbsol0
NOTE: MY PROBLEM ISN'T LOADING IT. THE THING JUST CRASHES.

I've been trying to make two things for my FTL mod;
1. An enemy ship (The rebel auto destroyer, a powerful version of auto assault)
2. An event in which you find one, and can battle it as well as many other options.

I've followed this tutorial: https://docs.google.com/document/pub?id ... mzX32GB-Dw but it's still not working. If you want my code it's here.

Code: Select all

<eventlist name="ADVANCED_AI">
	<event load="REBEL_DESTROYER"/>
	<event load="DECOY_DESTROYER"/>
</eventlist>

<event name="REBEL_DESTROYER">
	<text>You've run into an Automated Rebel Destroyer! You stare at it's complex structure in awe, but it fires a warning shot!</text>
		<choice>
		<text>Go closer to the ship</text>
		<event load="REBEL_DESTROYER_EXPLORE_RESULTS"/>
	</choice>
	
		<choice>
		<text>Back away</text>
		<event>
			<text>You slowly back away from the Destroyer and it eventually loses interest in you.</text>
		</event>
		
		<event>
			<text>You slowly back away from the Destroyer but it chases after you. Prepare to fight.</text>
			<ship load="AUTO" hostile="true"/>
			
		<event>
			<text>You slowly back away from the Destroyer and it FTLS away. Let's hope it didn't contact the Rebels.</text>
			<event load="REBEL_DESTROYER_ESCAPE"/>
		</event>
		</choice>
</event>

<event name="DECOY_DESTROYER">
	<text planet="NONE">You arrive upon a beacon with signals you believed were an Automated Rebel Destroyer, but all you find is empty space. Beautiful empty space however.</text>
</event>

<eventlist name="REBEL_DESTROYER_ESCAPE">
	<event>
	<modifyPursuit amount="0" />
	</event>
	
	<event>
	<modifyPursuit amount="1" />
	</event>
	
	<event>
	<modifyPursuit amount="2" />
	</event>
	
	<event>
	<modifyPursuit amount="-1" />
	</event>
	
	<event>
	<modifyPursuit amount="-2" />
	</event>
</eventlist>

<eventlist name="REBEL_DESTROYER_EXPLORE_RESULTS">
	<event>
		<text>On closer inspection it turns out the Destroyer's been long deactivated. The shot was just a malfunction. You decide to take the weapon and some scrap.</text>
			<autoReward level="MED">scrap_only</autoReward>
			<weapon name="RANDOM"/>
	</event>
	
	<event>
		<text>On closer inspection it turns out the Destroyer's been long deactivated. The shot was just a malfunction. After looking inside you find a broken Engi. After long thinking you decide to reassemble it.</text>
			<crewMember amount="1" class="engi"/>
	</event>
	
	<event>
		<text>When you go closer to the ship it's hit by an asteroid and it suddenly turns on again! You prepare to fight the Destroyer!
		<ship load="AUTO" hostile="true"/>
		<environment type="asteroid" />
	</event>
	
	<event>
		<text>When you go closer to the ship it's hit by an asteroid and it suddenly turns on again! But the pressure from the hit is too much and it blows up, leaving Debris and a weapon floating near your ship.
		<autoReward level="HIGH">scrap_only</autoReward>
		<autoReward level="HIGH">fuel_only</autoReward>
		<weapon name="RANDOM"/>
	</event>
</eventlist>
Any ideas? Also does anyone know where to find a tutorial on enemy ships that don't replace existing, it would really help. c: And yes, I have searched this a stupid amount over around 3 days time.

Re: Need help making an event and enemy ship.

Posted: Sun Dec 08, 2013 12:35 pm
by kartoFlane

Code: Select all

<event name="REBEL_DESTROYER">
	<!-- ... -->
	<choice>
		<text>Back away</text>
		<!-- you can't have multiple <event> tags in a <choice> tag. Use <event load="EVENTLIST"/> instead -->
		<!-- ... -->
	</choice>
</event>

<!-- Lowercase L in eventList name, happens in other eventLists too -->
<eventlist name="REBEL_DESTROYER_ESCAPE">
	<!-- ... -->
</eventlist>

<!-- Lowercase L in eventList name -->
<eventlist name="REBEL_DESTROYER_EXPLORE_RESULTS">
	<!-- ... -->
	<event>
		<!-- Missing closing </text> tag here -->
		<text>When you go closer to the ship it's hit by an asteroid and it suddenly turns on again! You prepare to fight the Destroyer!
		<ship load="AUTO" hostile="true"/>
		<environment type="asteroid" />
	</event>
	
	<event>
		<!-- Missing closing </text> tag here -->
		<text>When you go closer to the ship it's hit by an asteroid and it suddenly turns on again! But the pressure from the hit is too much and it blows up, leaving Debris and a weapon floating near your ship.
		<autoReward level="HIGH">scrap_only</autoReward>
		<autoReward level="HIGH">fuel_only</autoReward>
		<weapon name="RANDOM"/>
	</event>
</eventlist>

Re: Need help making an event and enemy ship.

Posted: Sun Dec 08, 2013 1:54 pm
by RedAbsol0
kartoFlane wrote:

Code: Select all

<event name="REBEL_DESTROYER">
	<!-- ... -->
	<choice>
		<text>Back away</text>
		<!-- you can't have multiple <event> tags in a <choice> tag. Use <event load="EVENTLIST"/> instead -->
		<!-- ... -->
	</choice>
</event>

<!-- Lowercase L in eventList name, happens in other eventLists too -->
<eventlist name="REBEL_DESTROYER_ESCAPE">
	<!-- ... -->
</eventlist>

<!-- Lowercase L in eventList name -->
<eventlist name="REBEL_DESTROYER_EXPLORE_RESULTS">
	<!-- ... -->
	<event>
		<!-- Missing closing </text> tag here -->
		<text>When you go closer to the ship it's hit by an asteroid and it suddenly turns on again! You prepare to fight the Destroyer!
		<ship load="AUTO" hostile="true"/>
		<environment type="asteroid" />
	</event>
	
	<event>
		<!-- Missing closing </text> tag here -->
		<text>When you go closer to the ship it's hit by an asteroid and it suddenly turns on again! But the pressure from the hit is too much and it blows up, leaving Debris and a weapon floating near your ship.
		<autoReward level="HIGH">scrap_only</autoReward>
		<autoReward level="HIGH">fuel_only</autoReward>
		<weapon name="RANDOM"/>
	</event>
</eventlist>
Ta. Ah this is my first event I had no clue what was going on. Oh and the ship loads in game, I found one in the last area :D

Re: Need help making an event and enemy ship.

Posted: Sun Dec 08, 2013 3:51 pm
by RedAbsol0
Right, I've got it loading the game but as soon as I click play after selecting my ship it crashes. Any ideas?
Code:

Code: Select all

<eventList name="ADVANCED_AI">
	<event load="REBEL_DESTROYER"/>
	<event load="DECOY_DESTROYER"/>
</eventlist>

<event name="REBEL_DESTROYER">
	<text>You've run into an Automated Rebel Destroyer! You stare at it's complex structure in awe, but it fires a warning shot!</text>
		<ship load="AUTO_DESTROYER_FIGHT" hostile="false"/>
		<choice>
		<text>Go closer to the ship</text>
		<event load="REBEL_DESTROYER_EXPLORE_RESULTS"/>
	</choice>
	
		<choice>
		<text>Back away</text>
		<event load="REBEL_DESTROYER_BACK_AWAY"/>
		</choice>
</event>

<event name="DECOY_DESTROYER">
	<text planet="NONE">You arrive upon a beacon with signals you believed were an Automated Rebel Destroyer, but all you find is empty space. Beautiful empty space, however.</text>
</event>

<eventList name="REBEL_DESTROYER_ESCAPE">
	<event>
	<modifyPursuit amount="0" />
	</event>
	
	<event>
	<modifyPursuit amount="1" />
	</event>
	
	<event>
	<modifyPursuit amount="2" />
	</event>
	
	<event>
	<modifyPursuit amount="-1" />
	</event>
	
	<event>
	<modifyPursuit amount="-2" />
	</event>
</eventList>

<eventList name="REBEL_DESTROYER_EXPLORE_RESULTS">
	<event>
		<text>On closer inspection it turns out the Destroyer's been long deactivated. The shot was just a malfunction. You decide to take the weapon and some scrap.</text>
			<autoReward level="MED">scrap_only</autoReward>
			<weapon name="RANDOM"/>
	</event>
	
	<event>
		<text>On closer inspection it turns out the Destroyer's been long deactivated. The shot was just a malfunction. You decide to take the weapon and some scrap. However just as you're mining, the ship comes back to life!</text>
		<ship load="AUTO_DESTROYER_FIGHT1" hostile="true"/>
	</event>
	
	<event>
		<text>On closer inspection it turns out the Destroyer's been long deactivated. The shot was just a malfunction. After looking inside you find a broken Engi. After long thinking you decide to reassemble it.</text>
			<crewMember amount="1" class="engi"/>
	</event>
	
	<event>
		<text>When you go closer to the ship it's hit by an asteroid and it suddenly turns on again! You prepare to fight the Destroyer!</text>
		<ship load="AUTO_DESTROYER_FIGHT" hostile="true"/>
		<environment type="asteroid" />
	</event>
	
	<event>
		<text>When you go closer to the ship it's hit by an asteroid and it suddenly turns on again! But the pressure from the hit is too much and it blows up, leaving Debris and a weapon floating near your ship.</text>
		<autoReward level="HIGH">scrap_only</autoReward>
		<autoReward level="HIGH">fuel_only</autoReward>
		<weapon name="RANDOM"/>
	</event>
</eventList>

<eventList name="REBEL_DESTROYER_BACK_AWAY">
	<event>
		<text>You slowly back away from the Destroyer and it eventually loses interest in you.</text>
	</event>
		
	<event>
		<text>You slowly back away from the Destroyer but it chases after you. Prepare to fight.</text>
		<ship load="AUTO_DESTROYER_FIGHT" hostile="true"/>
			
	<event>
		<text>You slowly back away from the Destroyer and it FTLS away. Let's hope it didn't contact the Rebels.</text>
		<event load="REBEL_DESTROYER_ESCAPE"/>
	</event>
</eventList>

<ship name="AUTO_DESTROYER_FIGHT" auto_blueprint="AUTO_DESTROYER">
	<destroyed>
	<text>The Rebel Destroyer breaks apart in a spontaneous fireball. You scrap the chunks that fly off.</text>
	<autoReward level="HIGH">scrap_only</autoReward>
	</destroyed>
</ship>

<ship name="AUTO_DESTROYER_FIGHT1" auto_blueprint="AUTO_DESTROYER">
	<escape timer="30" min="30" max="60">
		<text>"MUST ALERT REBELS OF FEDERATION PRESENCE." The ship prepares to load it's ftl drive. You need to kill it quickly!</text>
	</escape>
	<gotaway>
		<text>The ship FTLs away to tell the Rebel Fleet of your location. Better run.</text>
		<modifyPursuit amount="2" />
	</gotaway>
		<destroyed>
		<text>The Rebel Destroyer breaks apart in a spontaneous fireball. You scrap the chunks that fly off.</text>
		<autoReward level="HIGH">scrap_only</autoReward>
	</destroyed>
</ship>
(I'm guessing it's another dumb mistake)
If you could teach me to make it added to the sector that would help too :P

Re: Need help making an event and enemy ship.

Posted: Sun Dec 08, 2013 4:01 pm
by Metzelmax

Code: Select all


  
   <event>
   <modifyPursuit amount="1" />
   </event>
   
events always need a text tag with text in it... its basically always a pop up box.

same goes for choices. A choice includes always 1 event and only that. nothing else. Everything else done needs to be in that event (that event can also be an list of events).

I recommend you make a new event since there are to many mistakes in that one.

Make one basic like "hello world" then add more to it step by step.

Re: Need help making an event and enemy ship.

Posted: Sun Dec 08, 2013 4:32 pm
by RedAbsol0
Metzelmax wrote:

Code: Select all


  
   <event>
   <modifyPursuit amount="1" />
   </event>
   
events always need a text tag with text in it... its basically always a pop up box.

same goes for choices. A choice includes always 1 event and only that. nothing else. Everything else done needs to be in that event (that event can also be an list of events).

I recommend you make a new event since there are to many mistakes in that one.

Make one basic like "hello world" then add more to it step by step.
Oh yeah!
Then when it crashes I know what's making the problems!

Re: Need help making an event and enemy ship.

Posted: Thu Dec 12, 2013 4:59 pm
by RedAbsol0
Image
When I do my <choice> code THIS happens.
.-.

Re: Need help making an event and enemy ship.

Posted: Sat Dec 14, 2013 1:35 pm
by Metzelmax
code pls,
but generally If you get such glow you are accessing a not existing event, ie you have a typo in the name.