Help with Modding an Event

Discuss and distribute tools and methods for modding. Moderator - Grognak
FaldororLaridon
Posts: 2
Joined: Tue Jun 04, 2019 2:53 am

Help with Modding an Event

Postby FaldororLaridon » Tue Jun 04, 2019 3:24 am

Hello there! I've been working on making a starting event to test out an enemy ship I created, I ironed out all the kinks so SMM could patch the game to include it, but the moment I try and run the game, it crashes to desktop before hitting the menu. When I remove the events.xml.append, everything is fine; my custom enemy ship works in Superliminal 2, but the events bit seems to be busted. I haven't seen anything online to help me after a day of looking, so I'm feeling kinda desperate!
I was working off of the starting scrap advantage mod that comes along with SMM, and here's the entirety of events.xml.append, thank you so much for your time!

Code: Select all

<event name="START_GAME">
   <text>The data you carry is vital to the remaining Federation fleet. You'll need supplies for the journey, so make sure to explore each sector before moving on to the next. But get to the exit before the pursuing Rebel fleet can catch up!</text>
</event>

<event name="START_BEACON">
   <text>Welcome to a new sector! Get to the exit beacon and jump to the next sector before the pursuing Rebels catch you!</text>
   <choice hidden="true">
      <text>Continue...</text>
   </choice>
   <choice hidden="true">
      <text>Investigate this strange energy signature near the beacon.</text>
   <event>
      <text>You find a peculiar ship in the distance. Before you can take stock of its unique features, it powers up its weapons and attacks!</text>
      <shipload>"VICTOR_SCOUT" hostile="true"</shipload>
   </event>
   </choice>
</event>
<ship name="VICTOR_SCOUT" auto_blueprint="VICTOR_SCOUT">
   <surrender  chance="0.2" min="2" max="4">
   <text>From the comms, you hear a message from the other ship; "Enemy ship scanned. The Victors have been informed of this turn of events." They don't appear to be interested in ceasing their assault.</text>
   <choice hidden="true">
      <text>Continue...</text>
   </choice>
   </surrender>
   <deadCrew>
   <text>After fighting off mindless people, you are free to look around the ship.</text>
   <choice hidden="true">
      <text>Look through their weapons systems.</text>
      <event>
         <text>You find a unique weapon still intact, designed to destroy systems but little else. You should probably get moving before the Rebels find you here.</text>
         <weapon>VICTOR_LASER_1</weapon>
      </event>
   </choice>
   <choice hidden="true">
      <text>Search their computers for any information on what these people are.</text>
      <event>
         <text>The language used for the computers is different from any you have seen before. You do find a pattern indicating that this ship has been scanning this sector, and you collect the data. Better hurry before the Rebels catch up!"</text>
         <reveal_map />
      </event>
   </choice>
   </deadCrew>
   <destroyed>
      <text>The strange ship flies apart before your weapons. You scrap what you can and press forward.</text>
      <autoReward level="HIGH">standard</autoReward>
   </destroyed>
</ship>
User avatar
mr_easy_money
Posts: 611
Joined: Fri May 29, 2015 9:05 pm
Location: A galaxy far, far away

Re: Help with Modding an Event

Postby mr_easy_money » Tue Jun 04, 2019 7:53 am

FaldororLaridon wrote:Hello there!
Hello!
FaldororLaridon wrote:but the moment I try and run the game, it crashes to desktop before hitting the menu.
you have a few problems with your events.xml.append file, which I believe is causing FTL to crash.

if you look at this github gist I made, you can see the 4 changes that fix your event: https://gist.github.com/blizzarchon/478 ... split&ts=4
... basically two things:
1. every choice needs an event. even if you want the event to end on clicking the choice, you still need at least "<event />".
2. the syntax is very specific and must be followed. for example, "<shipload>" is invalid and will not do anything.

link to the working events.xml.append (I also fixed the indentation): https://gist.githubusercontent.com/bliz ... events.xml

~~~~~~
oh um, something else I forgot to mention, do note that START_BEACON is the same event that occurs at the start of civilian sectors, and so the event will occur there as well. you did mention this is just a test mod, but if you plan on making a custom starting event, you'll have to add something else.
Here are two threads where I discussed this matter in more detail: viewtopic.php?f=12&t=34480 and viewtopic.php?f=11&p=117562
FaldororLaridon
Posts: 2
Joined: Tue Jun 04, 2019 2:53 am

Re: Help with Modding an Event

Postby FaldororLaridon » Tue Jun 04, 2019 5:21 pm

Thank you so much! The event works great, and I managed to make it a starting event, too! Now I can go and iron out a few ship-related issues, and use this as a template for testing all the other ships I want to do!

Who is online

Users browsing this forum: No registered users and 10 guests