Custom Crew Mod Request

Discuss and distribute tools and methods for modding. Moderator - Grognak
Post Reply
mcsniperslayer
Posts: 6
Joined: Sat Nov 09, 2013 10:36 pm

Custom Crew Mod Request

Post by mcsniperslayer »

I have yet to find a mod that lets you (when you start) to be able to choose all 4-6 members of your crew so they can be as diverse as you want. It would also make getting all of the ships a little easier since you would most-likely have one of each race on your crew.

If someone could take the time to make this mod that would be awesome.
I would do it but i do not know how to properly code, please and thank you.

~MCSniperslayer
agigabyte
Posts: 547
Joined: Fri May 31, 2013 1:59 am

Re: Custom Crew Mod Request

Post by agigabyte »

One word. Hardcoding.
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: Custom Crew Mod Request

Post by kartoFlane »

agigabyte wrote:One word. Hardcoding.
That one's actually possible. Can be achieved with some help from SMM's extended tags.

Code: Select all

<!-- c'n'p for all player ships -->
<mod:findName type="shipBlueprint" name="PLAYER_SHIP_HARD">
  <mod:findLike type="crewMember">
    </removeTag>
  </mod:findLike>
  <!-- add a crew member just so that the ship doesn't start as automated, we remove it later -->
  <mod-append:crewMember amount="1" class="human"/>
</mod:findName>
Then in events.xml.append, preferably using the USB framework...

Code: Select all

<mod:findName type="event" name="START_GAME_BEACON">
  <mod:setAttributes name="STARTING_CREW_MOD_START_GAME_BEACON_FINALIZE" />
</mod:findName>

<!-- first crew choice -->
<event name="START_GAME_BEACON">
  <text>Choose your companions:</text>
  <choice>
    <text>Human</text>
    <event>
      <crewMember amount="-1"/>
      <!-- brief time w/o crew... hopefully the player won't lose when this happens -->
      <crewMember amount="1" class="human"/>
    </event>
  </choice>
  <choice>
    <text>Engi</text>
    <event>
      <crewMember amount="-1"/>
      <crewMember amount="1" class="engi"/>
    </event>
  </choice>
  <!-- et cetera... -->
  <event load="STARTING_CREW_MOD_START_GAME_BEACON_1"/>
</event>

<!-- create # events like this, each calling the next one, then #th calling the _FINALIZE event... -->
<event name="STARTING_CREW_MOD_START_GAME_BEACON_#">
  <text>Choose your companions:</text>
  <choice>
    <text>Human</text>
    <event>
      <crewMember amount="1" class="human"/>
    </event>
  </choice>
  <choice>
    <text>Engi</text>
    <event>
      <crewMember amount="1" class="engi"/>
    </event>
  </choice>
  <!-- et cetera... -->
  <event load="STARTING_CREW_MOD_START_GAME_BEACON_FINALIZE" />
</event>
No idea if it'll actually work, but feels like it should *shrug*
Superluminal2 - a ship editor for FTL
User avatar
Sleeper Service
Posts: 2275
Joined: Sun Mar 24, 2013 8:49 pm

Re: Custom Crew Mod Request

Post by Sleeper Service »

Wow, pretty cool that this is actually possible. Slipstreams new capabilities keep surprising me. Would be pretty interesting to see if a split second without crew within an event actually causes the player to loose. I feel like the game makes this checks only after the event, but it would have to be tested... One could even give the player a budget and add (vanilla?) scrap costs, to make this balanced.
Image
Working on a sci-fi deckbuilder nowadays.
Other games I made.
User avatar
R4V3-0N
Posts: 1287
Joined: Sun Oct 06, 2013 11:44 am

Re: Custom Crew Mod Request

Post by R4V3-0N »

If your crew all die/ gone in an event and you get more in the same event the game won't say game over...

Mainly because I did it in vanilla game.

"Giant alien green spiders! aah"
-send my engi in from my vortex, engi b cruiser-
"you have pushed the giant alien spiders back, yippie! oh but 1 guy dies, another guy offers to join your crew"

and from that day forward, I can never forget the mantis flying around in the Vortex solo... but I am confused, a mantis can't take on spiders but an engi (technically) can!?!?
R4V3-0N, a dreamer.
User avatar
RAD-82
Posts: 795
Joined: Sat Nov 09, 2013 12:16 am

Re: Custom Crew Mod Request

Post by RAD-82 »

kartoFlane wrote:

Code: Select all

    <event>
      <crewMember amount="-1"/>
      <!-- brief time w/o crew... hopefully the player won't lose when this happens -->
      <crewMember amount="1" class="human"/>
    </event>
It seems you can't use the same tag twice in a single event. The last one seems to overwrite the previous one, so this wouldn't remove anyone. When using an event chain, I can verify that you do not lose the game if you add more crew before the event chain finishes.

My test involved removing all the crew (amount="-8"), adding an Engi with a specific name, then adding 6 more generic Engi crew.

I had to remove the crew with an event, because when I copied the SMM extended tag code for removing crew from a ship, SMM didn't like it, and it didn't remove the Kestral crew that I tried it on. Now that I look at the ship blueprints, I guess it might be because the tag should have been crewCount rather than crewMember. It currently doesn't concern me right now, so I won't bother testing it.
Post Reply