[Modding] Names in events and adding crewmembers
Posted: 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.
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.