Page 1 of 1

Custom Crew Mod Request

Posted: Thu Nov 14, 2013 12:28 pm
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

Re: Custom Crew Mod Request

Posted: Thu Nov 14, 2013 3:22 pm
by agigabyte
One word. Hardcoding.

Re: Custom Crew Mod Request

Posted: Thu Nov 14, 2013 4:04 pm
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*

Re: Custom Crew Mod Request

Posted: Fri Nov 15, 2013 4:23 pm
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.

Re: Custom Crew Mod Request

Posted: Fri Nov 15, 2013 4:59 pm
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!?!?

Re: Custom Crew Mod Request

Posted: Sat Nov 30, 2013 7:02 pm
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.