Page 1 of 1

My Modding questions

Posted: Sun Feb 09, 2014 11:39 pm
by Stryke
As I have recently begun to mod FTL I've run into a lot (A LOT) of problems. This thread will consist of me begging someone more knowledgeable to help me with basic things.

Long live noobiness!



For my first failure...

I believe the following event is causing FTL to crash. Are there any glaring structure issues with it?

Code: Select all


<event name="REBEL_BLACK_MARKET">
	<text>After jumping you're quickly greeted by a voice on your comm system stating that you've just jumped to a Rebel Market but they're "willing to strike a deal"</text>
	<choice hidden="true">
		<text>Get the hell out of there. You doubt the Rebels are being sincere.</text>
	</choice>	
	<choice hidden="true">
		<text>Intrigued by how docile the rebels are being you decide to cut them some slack.</text>
		<event load="REBEL_MARKET_LIST"/>
	</choice>
</event>
		
		
<eventList name="REBEL_MARKET_LIST">		
	<event>
		<text>As soon as you board the space station you're ambushed and you attempt to fight your way out.</text>
	</event>
		<event>
			<text>On the way out one of the blaster shots catches a crew member in the shoulder and they go down.</text>
			<crewMember amount="-1">
		</event>
		<event>
			<text>By some miracle you manage to get off the station without a scratch and quickly power up the FTL drive to make a hasty retreat.</text>
		</event>
	<event>
		<text>The Rebels graciously welcome you inside and show you their wares.</text>
		<store/>
	</event>
</eventList>

Re: My Modding questions

Posted: Mon Feb 10, 2014 12:13 am
by agigabyte

Re: My Modding questions

Posted: Mon Feb 10, 2014 2:03 am
by Stryke
No offence but I don't see how that helps me at all. I've read all those guides and the error checker is saying everything is fine.

Re: My Modding questions

Posted: Mon Feb 10, 2014 2:28 am
by agigabyte
Ok,but you should have at least put it there, you know, in the MODDING section.

Re: My Modding questions

Posted: Mon Feb 10, 2014 3:12 am
by Stryke
Working Mods
Distribute and discuss mods that are functional.


Mod Development
Discuss and distribute tools and methods for modding.


Put it here because I thought it was only discussing actual mods but what do I know :oops:

Seriously though I want to know what I did wrong ;_;

Re: My Modding questions

Posted: Mon Feb 10, 2014 4:53 am
by Kieve
Stryke wrote:Working Mods
Distribute and discuss mods that are functional.


Mod Development
Discuss and distribute tools and methods for modding.


Put it here because I thought it was only discussing actual mods but what do I know :oops:

Seriously though I want to know what I did wrong ;_;
Don't let agigabyte get to you, he's short on tact. Not wrong though.
To answer your question, this is a common mistake:

Code: Select all

<choice hidden="true">
      <text>Get the hell out of there. You doubt the Rebels are being sincere.</text>
<event/> :ADD THIS
   </choice> 
The extra <event/> tag is necessary to properly close out that choice. Without it... crashing.

Re: My Modding questions

Posted: Mon Feb 10, 2014 5:32 am
by RAD-82

Code: Select all

<eventList name="REBEL_MARKET_LIST">      
   <event>
      <text>As soon as you board the space station you're ambushed and you attempt to fight your way out.</text>
   </event>
      <event>
         <text>On the way out one of the blaster shots catches a crew member in the shoulder and they go down.</text>
         <crewMember amount="-1">
      </event>
      <event>
         <text>By some miracle you manage to get off the station without a scratch and quickly power up the FTL drive to make a hasty retreat.</text>
      </event>
   <event>
      <text>The Rebels graciously welcome you inside and show you their wares.</text>
      <store/>
   </event>
</eventList>
I'm pretty sure this piece I selected isn't causing a crash, but it does look wrong. I think you wanted something more like this. The <crewMember> tag is also missing a closing / at the end.

Code: Select all

<eventList name="REBEL_MARKET_LIST">      
   <event>
      <text>As soon as you board the space station you're ambushed and you attempt to fight your way out.</text>
      <choice hidden="true">
         <text>Continue...</text>
         <event load="REBEL_MARKET_ESCAPE"/>
      </choice>
   </event>
   <event>
      <text>The Rebels graciously welcome you inside and show you their wares.</text>
      <store/>
   </event>
</eventList>

<eventList name="REBEL_MARKET_ESCAPE">
   <event>
      <text>On the way out one of the blaster shots catches a crew member in the shoulder and they go down.</text>
      <crewMember amount="-1"/>
   </event>
   <event>
      <text>By some miracle you manage to get off the station without a scratch and quickly power up the FTL drive to make a hasty retreat.</text>
   </event>
</eventList>

Re: My Modding questions

Posted: Tue Feb 11, 2014 5:44 pm
by TaxiService
Both Kieve and Rad are correct, but the ambush event's code seemed weird to me. I tested it in game and after the "you're ambushed" text nothing happened, so i rewrote the whole thing making a separate eventList for the ambush event.

Code: Select all

<event name="REBEL_BLACK_MARKET">
   <text>After jumping you're quickly greeted by a voice on your comm system stating that you've just jumped to a Rebel Market but they're "willing to strike a deal"</text>
   <choice hidden="true">
      <text>Get the hell out of there. You doubt the Rebels are being sincere.</text>
      <event/>
   </choice>   
   <choice hidden="true">
      <text>Intrigued by how docile the rebels are being you decide to cut them some slack.</text>
      <event load="REBEL_MARKET_LIST"/>
   </choice>
</event>
      
      
<eventList name="REBEL_MARKET_LIST">
   <event>
      <text>As soon as you board the space station you're ambushed and you attempt to fight your way out.</text>
      <choice>
         <text>Continue...</text>
         <event load="REBEL_MARKET_AMBUSH"/>
      </choice>
   </event>
   <event>
      <text>The Rebels graciously welcome you inside and show you their wares.</text>
      <store/>
   </event>
</eventList>


<eventList name="REBEL_MARKET_AMBUSH">
   <event>
      <text>On the way out one of the blaster shots catches a crew member in the shoulder and they go down.</text>
      <crewMember amount="-1"/>
   </event>
   <event>
      <text>By some miracle you manage to get off the station without a scratch and quickly power up the FTL drive to make a hasty retreat.</text>
   </event>
</eventList>
And it seems to work! I think that when you want to pick an event randomly you always need an eventList.

Anyway welcome to the forum, dude! : ) Like, good luck on your future projects and stuff!