[Modding] Names in events and adding crewmembers

Discuss and distribute tools and methods for modding. Moderator - Grognak
rolfy
Posts: 11
Joined: Mon Oct 01, 2012 4:06 am

[Modding] Names in events and adding crewmembers

Postby rolfy » Tue Oct 02, 2012 12:04 pm

After looking at nameEvents.xml, I had a little play with names in events and adding crewmembers. Here are my findings so far.
Don't get your hopes up - it looks (from nameEvents.xml) like the devs had grand plans, but they were never realised. Still, I hope this might be useful to somebody.

Names in Events.
When used in a text node:
%crew is replaced with the name of a random crew member. If the character has a short form of their name, then that will be used.
%crew_he is replaced with he/she, depending on gender of %crew.
%crew_his is replaced with his/her, depending on gender of %crew.
%crew_him is replaced with him/her, depending on gender of %crew.
I couldn't find a key that would give me the his/hers pair ("That ship is his/hers"). Not too difficult to work around ("That ship belongs to him/her") but if anyone finds it, please let us know.

%add1, %add2, %add3, %add4, %req all work like %crew (I gather from nameEvents that they were meant to do other stuff, but they don't seem to) with each selecting a crew member at random. BUT any of these can be the same crew member, so if you script a conversation between %crew and %add1, you might end up with a character talking to themselves (the smaller the crew, the more likely this is to happen).
To be clear: %add1 does NOT give you the name of a crew member about to be added, or the last crew member added. %req does NOT give you the name of the crew member who satisfied the requirement for the current option. %crew does NOT give you the name of the crew member about to be removed. Bummer, right?

Putting any number outside the range of 1-4 after %add (eg. %add5) will give you funky glitchy text. Looks like some kind of pointer-out-of-range thingy.

I'm not sure when %crew gets re-randomised, apart from "not often enough". I use %crew in my START_BEACON event, and if I go back to the hangar and start again, I get a crewmember name from my previous ship.

Adding Crew.
To specify species when adding a crew member, use <crewMember amount="1" class="engi" />
To specify a name when adding a crew member, use <crewMember amount="1">Rolfy</crewMember>
There doesn't appear to be a way to specify gender when adding a crewmember (eg. sex="male" doesn't work). The gender is random, and the probability depends on the names.xml file - each name has an equal chance of appearing, which is why the game is a bit of a sausagefest (there are many more male names in the list).

Aliens do have genders, but both genders use the same spritemap. There is only one male name list and one female name list - the race property of nameList is ignored.

Never add more than one crew member at a time! (unless you just removed someone) If you reach 9, the player will be asked to dismiss one. If you reach 10, the game will crash.

You can check if there are at least a certain number of a species on the ship. eg. <choice hidden="true" req="human" lvl="2"> checks that there are at least 2 humans.
Last edited by rolfy on Tue Oct 02, 2012 12:22 pm, edited 1 time in total.
AngryRob
Posts: 1
Joined: Wed Oct 03, 2012 12:52 pm

Re: [Modding] Names in events and adding crewmembers

Postby AngryRob » Wed Oct 03, 2012 12:55 pm

Ah thank you for this, I was very annoyed after modifying the names list that a crew member named Charlie was being added to my crew. I was able to mod that name out of the events list thanks to this guide. The Charlie events now give me a randomly named crew member from my custom names list. yay!
Icehawk78
Posts: 230
Joined: Tue Sep 18, 2012 4:55 pm

Re: [Modding] Names in events and adding crewmembers

Postby Icehawk78 » Thu Oct 04, 2012 5:39 pm

rolfy wrote:You can check if there are at least a certain number of a species on the ship. eg. <choice hidden="true" req="human" lvl="2"> checks that there are at least 2 humans.

Is this an exact match, or a minimum? (ie can you say "if there are exactly 2 humans", but not if there are either 1 or 3?)
amasa
Posts: 1
Joined: Sat Mar 16, 2013 2:38 am

Re: [Modding] Names in events and adding crewmembers

Postby amasa » Sat Mar 16, 2013 2:48 am

Aliens seem to ignore the gender property as well as the race property. So an alien could have literally any name. I added a nameList to my names.xml file that looks like this:

<namesList race="" sex="">
<name>Worf</name>
<name>Data</name>
<name>Troi</name>
...
</namesList>

And those names show up on aliens of all kinds. IN FACT, those names show up on any character, human or alien.

I'm still experimenting with the names.xml file, but I'm not sure what to make of it. I'm still optimistic there might possibly be more ways to divide names between races or genders.
DryEagle
Posts: 363
Joined: Thu Oct 04, 2012 11:17 am

Re: [Modding] Names in events and adding crewmembers

Postby DryEagle » Sat Mar 16, 2013 9:42 am

mantis not happy :x
Last edited by DryEagle on Sat Mar 16, 2013 7:16 pm, edited 2 times in total.
All ships I have created include custom weapons, graphics etc:
Image
ImageImageImageImage
UltraMantis
Posts: 2141
Joined: Thu Sep 20, 2012 3:17 pm

Re: [Modding] Names in events and adding crewmembers

Postby UltraMantis » Sat Mar 16, 2013 6:44 pm

Actually, it would be better if you avoided agrresively moderating others. Even moderators don't do that.

There's nothing wrong with making a topical post no matter how old the thread is. Probably better than making clone topics imo.
Report spam using the handy Report Button Mod.
FlawlessCowboy
Posts: 1
Joined: Tue Apr 30, 2013 7:51 am

Re: [Modding] Names in events and adding crewmembers

Postby FlawlessCowboy » Wed May 08, 2013 12:08 am

amasa wrote:Aliens seem to ignore the gender property as well as the race property. So an alien could have literally any name. I added a nameList to my names.xml file that looks like this:

<namesList race="" sex="">
<name>Worf</name>
<name>Data</name>
<name>Troi</name>
...
</namesList>

And those names show up on aliens of all kinds. IN FACT, those names show up on any character, human or alien.

I'm still experimenting with the names.xml file, but I'm not sure what to make of it. I'm still optimistic there might possibly be more ways to divide names between races or genders.


I'm having this same problem, I really would like to be able to restrict the names somehow. I notice there are 4 lists in the names.xml file (Male, Female and then Kickstarter Male and Kickstarter Female - all human) Is there any difference in the use of these lists? Will some only appear in stores vs being in your starting crew.

I've attempted adding new lists that point to different races, but it didn't seem to have an effect (note: specifying another race without a sex will cause a hang. This actually gives me a little hope as it suggests it is reading my additional lines.)

I'm wondering how much of a code poke it would take to fix this.. probably not much.

Who is online

Users browsing this forum: No registered users and 6 guests