Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby Sleeper Service » Sat Jun 27, 2015 8:21 pm

Many event actions don't work if there is no text within the actual event capsule. This should probably work:

Code: Select all

<event name="GET_A_GHOST">
   <text>Living beings are not suitable for this ship. One must be removed and replaced with a ghost.</text>
   <choice hidden="true" req="human">
      <text>The Human</text>
      <event>
         <text>The human dies and a ghost appears.</text>
         <removeCrew class="human">
            <clone>false</clone>
            <text>Your crewman's neuro-backup has disappeared from the clone-log as well. No trace of his existence remains aboard your ship.</text>
         </removeCrew>
         <crewMember amount="1" class="ghost"/>
      </event>
   </choice>
</event>
User avatar
5thHorseman
Posts: 1668
Joined: Sat Mar 02, 2013 2:29 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby 5thHorseman » Sat Jun 27, 2015 10:00 pm

Sleeper Service wrote:Many event actions don't work if there is no text within the actual event capsule. This should probably work:

Code: Select all

<event name="GET_A_GHOST">
   <text>Living beings are not suitable for this ship. One must be removed and replaced with a ghost.</text>
   <choice hidden="true" req="human">
      <text>The Human</text>
      <event>
         <text>The human dies and a ghost appears.</text>
         <removeCrew class="human">
            <clone>false</clone>
            <text>Your crewman's neuro-backup has disappeared from the clone-log as well. No trace of his existence remains aboard your ship.</text>
         </removeCrew>
         <crewMember amount="1" class="ghost"/>
      </event>
   </choice>
</event>

Thanks, I'll try that the next time I can stomach this.

However, I probably should have noted that the removeCrew block works if I leave out the crewMember block. I know FTL modding more closely resembles black magic than computer science, but it seems to me that if it works it should work.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
User avatar
5thHorseman
Posts: 1668
Joined: Sat Mar 02, 2013 2:29 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby 5thHorseman » Sun Jun 28, 2015 8:09 am

Okay I've figured out the problem, but don't have a solution yet.

It does whatever is second. If I do this:

Code: Select all

         <crewMember amount="1" class="ghost"/>
         <removeCrew class="human">
            <clone>false</clone>
            <text>Test Text.</text>
         </removeCrew>


...then it kills the human, but does not give me the ghost.

Any idea how I can make it do both?

Amusingly, if I do it without the "Test Text" line, FTL won't load even though it loads fine like this:

Code: Select all

         <removeCrew class="human">
            <clone>false</clone>
         </removeCrew>
         <crewMember amount="1" class="ghost"/>


EDIT: I found a way to do both. Not exactly what I want but at least I can move forward now :)

Code: Select all

<event name="GET_A_GHOST">
   <text>A new ghost appears on the ship.</text>
   <crewMember amount="1" class="ghost"/>
   <choice hidden="true" req="human">
      <text>Sacrifice the human for a soul.</text>
      <event>
         <removeCrew class="human">
            <clone>false</clone>
         </removeCrew>
      </event>
   </choice>
</event>

This gives you a ghost no matter what, and kills one human if available.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby Sleeper Service » Sun Jun 28, 2015 12:46 pm

Another thing to keep in mind might be that some crew related event actions don't work when executed together in the same event capsule. I gave the following a try in the MTE and it works as intended (checking for a human, removing it and then spawning a ghost):

Code: Select all

<event name="TESTBED_EVENTLOADER">
   <text>Living beings are not suitable for this ship. One must be removed and replaced with a ghost.</text>
   <choice hidden="true" req="human">
      <text>The Human</text>
      <event>
         <text>The human dies...</text>
         <removeCrew class="human">
            <clone>false</clone>
            <text>Your crewman's neuro-backup has disappeared from the clone-log as well. No trace of his existence remains aboard your ship.</text>
         </removeCrew>
      <choice hidden="true" req="human">
         <text>Continue...</text>
         <event>
               <text>...and a ghost appears.</text>
            <crewMember amount="1" class="ghost"/>
         </event>
      </choice>
      </event>
   </choice>
   <choice hidden="true">
   <text>None.</text>
         <event/>
   </choice>
</event>
User avatar
5thHorseman
Posts: 1668
Joined: Sat Mar 02, 2013 2:29 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby 5thHorseman » Sun Jun 28, 2015 1:28 pm

Ah I see. Clever. You put the crewMember event after a 2nd choice tag. Clever....

One question, that added "none" choice at the end, if I'm reading it right it'd give me the choice to not kill the human and get a ghost, right? Leaving that out won't break the rest of the code, will it? I specifically don't want the player to get the choice to not remove the human. And eventually there'll be a check for every non-ghost race, so you'll have to whittle down your crew.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
User avatar
TaxiService
Posts: 204
Joined: Mon Dec 23, 2013 6:04 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby TaxiService » Sun Jun 28, 2015 1:44 pm

aw. I would've posted this earlier, but i got sidetracked by trying to put the dead guy's name in the event text.

Code: Select all

   <choice req="human" lvl="1" hidden="true" blue="false">
      <text>GET_A_GHOST</text>
      <event loss1="req">
         <text>%loss1 died of dysentery.</text>
         <removeCrew class="human" lvl="1" name="loss1"> <!-- this is useless -->
            <clone>false</clone>
            <text>The clonebay fails to revive your crewmember.</text>
         </removeCrew>
         <choice hidden="true">
            <text>Continue...</text>
            <event>
                <text>Oh my god, it's %loss1's g-g-ghost!</text>
               <crewMember amount="1" class="ghost">a ghost</crewMember>
            </event>
         </choice>
      </event>
   </choice>


These stupid arguments do whatever the shit they please. : \ The dude's name appears, but it's not the one that gets killed. I tried putting lots of different arguments in different places, but it didn't ever work. I give up for today.
You guys should check the nameEvents.xml file and experiment with the stuff in it.
ImageImageImageImageImage
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby Sleeper Service » Sun Jun 28, 2015 1:49 pm

Yeah, I think that functionality was never completely integrated into the game. I also think remembering someone doing some testing with this and never getting anywhere, but that must have been years ago...
User avatar
5thHorseman
Posts: 1668
Joined: Sat Mar 02, 2013 2:29 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby 5thHorseman » Sun Jun 28, 2015 3:33 pm

Haha that's awesome. I didn't know that name thing existed even. Too bad it doesn't work. I wonder if they had it in there so "Virus" could keep his name, but never got it to work so just named the new engi Virus.

But in any case, I think I have the tools to do what I want here. It's a bit dodgy because I can't use the clone bay, and must go back to a medbay which means you won't have many people on your ship who aren't ghosts or Laniuses.

If you're curious the bug, it has to do with killing the only member of a species on your ship while they're in the clone bay (being cloned). I don't know the full extent of it, but I believe that if you encountered the Virus event with your only Engi in the clone bay, you'd lose a random other crew member (maybe the crew member on the list after the Engi) and then at the end get a 2nd Engi named Virus.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
User avatar
stylesrj
Posts: 3644
Joined: Tue Jul 08, 2014 7:54 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby stylesrj » Sun Jun 28, 2015 7:16 pm

Haha that's awesome. I didn't know that name thing existed even.


I think it existed with the Crystal Homeworlds beacon. You needed your Crystal to be named Ruwen if you wanted to activate the quest beacon in the Rock Homeworlds that would take you to the Crystal sector.

How does that work by chance?
User avatar
Crazybat
Posts: 49
Joined: Sat Jun 20, 2015 6:08 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby Crazybat » Sun Jun 28, 2015 7:21 pm

Probably making a simple mistake here, but whenever I insert gib images into superluminal2, they're stretched/distorted. Help?