Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 Time Capsule (How-to Library) » "How do I do that?" Adding a new character
| "How do I do that?" Adding a new character[message #349550]
Sat, 15 April 2017 03:44
||"How do I do that?" Adding a new character
Thanks to years of coding by many people, we can nowadays add many new things to our beloved game, but sadly, I is not always clear to a user what changes are required, and where.
This guide aims to clarify what files have to be altered/created in order to create new characters for the game. It works both for the Stable 2014 release (r7609 and sevenfm' subsequent exes) and the current unstable trunk (r8400 & GameDir r2363 at the time of this writing). Unless stated otherwise, assume a change works for both.
While many changes/files are optional, past experience has taught me that stating so has the tendency to confuse people. For this reason, assume that all changes I list here are mandatory. They aren't, but you'll be on the safe side with this.
This guide assume you are working on a non-modded 1.13 SCI installation, thus the changes will mostly be in /Data-1.13 subfolders. In case you are working in a mod, you might need to alter the paths accordingly.
Section 5 contains a link to .7z file with 2 mercs I've created, in case you need an example.
Now, before we jump in, a few definitions are necessary - because there can be quite the confusion on what 'character' actually means:
This guide aims to explain how to create a new RPC, and how to create additional voices and faces for IMPs. Creating a new RPC will also yield most work required for NPCs, but I am not fully aware of all the quest/mapping work required for new quest NPCs, hopefully some modder might add these bits here later on.
- Person. At any time in the game, there can be up to 256 persons in the same sector (changed to up to 65K in my volatile releases. Persons are anybody who, well, moves/shoots/etc. in the game. This includes our mercenaries, the enemy team, civilians, militia, bloodcats, creatures, tanks, cows, crows... in the code they are called soldiers, but that would likely confuse people, as we mostly stuck that label the enemy team.
- Character. By this I mean a person with a profile. Put simply, these are persons who have a face portrait and voiced dialogue. These have much more data than the more-or-less randomly generated enemy forces and civilians. We will practically focus on these, because there isn't much to do for the others anyway.
Note: anybody under direct control of the player is a character. There have been requests to change that (mostly to control militia directly), but as non-characters have absolutely no personality, all the people who could code that regard that as a very bad idea, so we won't code that, so stop asking ;-)
Note 2: There can only be up to 256 characters in the game total, as there can only be 256 profiles. This is not to be confused with the above limitation per sector (although the problem is identical). This might be changed, in, I don't know, a few years, but would again require extensive code changes.
- PC (player character). Any character the player controls.
- RPC (recruitable player character). Your mercenaries - anybody you can hire or create ingame falls under this category.
- EPC (escortable player character). A few quest related characters (Maria, Joey, Skyrider...) can be directly controlled by the player at some point, but have 'limited functionality'. They aren't much use in combat (although they can be used as excellent suicide bombers) and are required to be escorted somewhere by quests.
- IMP. These are the guys the player can create according to their own specification ingame. They are not premade - the player can choose their looks, voice etc. Part of this guide will look at how you can add new faces or voices for IMPs.
- NPC (non-player character). All characters that aren't PC. Basically quest-people and shopkeepers in the game. Sometimes we also refer to non-characters this way, because we aren't that clear on definitions.
- Profile. Most of the character data is stored in what we call a profile in TableData/MercProfiles.xml, the number of the profile is called the profile id and is used in all data we will edit.
1. Creating a face
Faces are numbered, every profile slot has a face. It follows that when creating a face, it would be wise to know the profile id beforehand, otherwise you'd have to rename the face later on.
The face data is stored in .STI files, we store most of our graphic data in that format. Use the STI editor or Tox' editor to edit these.
The face data is stored in /Data-1.13/faces for characters, but IMP faces are stored in /Data-1.13/IMPFaces. There are several subfolders containing face data. Some folders only contain the face in a single image in various resolutions, every time called 'your profile number'.STI:
Other folders require several pictures in a library. This is a bit more tricky. Ingame, the face is supposed to move (mouth an eye movement), so what the game does is laying several pictures above each other. For example, these are the pictures for one of the stock IMP faces:
What happens later on is that the eye and mouth pics are layed on top of the first image. This requires x- and y-offsets - otherwise eye and mouth would be in the wrong position. Note these, we will add them to the xmls later.
We add this .STI library to several folders:
As you've probably guessed, the CAMO folders contain the desert/urban/woodland camo sets. Even if you don't have camoed versions of faces, replace these - otherwise a PC will change his face once you put camo on them, which looks.. odd.
- The folder itself
The FACESGEAR folder contains libraries with additional layers for certain face gear, like sunglasses. Edit the picture corresponding to the profile id to fit the face' proportions.
That was the face itself, we add corresponding xml entries later, as this differs between IMPs and other characters.
2. Creating a voice
A voiceset consists of several .ogg or .wav files that the game plays whenever a character speaks.
Note: In stable 2014 releases, a voiceset always has the same number as a profile id. So if you want to edit the voice of merc #87, alter the files that start '087_', and so on. In unstable releases after r8364, voicesets are now profile-independent. Any number between 0 and 2^32 can now be used to adress a voiceset, and several characters can use the same voice.
First of, you need to add the Battle sounds (short stuff, like character being hit, yelling 'yes# or 'no' etc.) to /Data-1.13/BattleSNDS. It looks like this:
In this case, 211 and 254 are the identifiers for the voicesets 211 and 254. To learn what a file should contain, just listen to one of the existing ones. If you've ever played the game, you should have a good idea when what is used.
Second, we need to add the spoken dialogue to /Data-1.13/Speech:
Now, this will be a bit tricky. Some of the dialogue is optional, and depends on the character itself. Dialogue that is used in regards with a characters buddies or hated ones is obviously only necessary when that character has buddies or hated ones, obviously. This gets even more complicated, as some dialogue numbers have different meanings - they differ between IMP, AIM merc, MERC merc and other RPCs. What is used when? As I don't intend to state that her for each file, you better take a look at existing voicesets and draw your own conclusions ;-). Anyway, here's the file list:
As a character can have 5 buddies and one learn to like, and 5 hated ones and one learn to hate, and each of these relations has 4 files, that's quite a lot of additional dialogue.
QUOTE_SEE_ENEMY = 0, // used when we spot an enemy
QUOTE_SEE_ENEMY_VARIATION, // used when we spot an enemy in this sector for the first time
QUOTE_IN_TROUBLE_SLASH_IN_BATTLE, // used when we spot an enemy and they significantly outnumber us
QUOTE_SEE_CREATURE, // used when we spot a bug
QUOTE_FIRSTTIME_GAME_SEE_CREATURE, // used when we spot a bug for the first time
QUOTE_TRACES_OF_CREATURE_ATTACK, // randomly played during the bug quest in the tunnels
QUOTE_HEARD_SOMETHING, // we heard a suspicious sound
QUOTE_SMELLED_CREATURE, // randomly played during the bug quest in the tunnels
QUOTE_WEARY_SLASH_SUSPUCIOUS, // we are weary, because some non-militia NPC has a rocketlauncher or cannon
QUOTE_WORRIED_ABOUT_CREATURE_PRESENCE, // randomly played during the bug quest in the tunnels
QUOTE_ATTACKED_BY_MULTIPLE_CREATURES, // used when we spot several bugs
QUOTE_SPOTTED_SOMETHING_ONE, // spotted an item
QUOTE_SPOTTED_SOMETHING_TWO, // spotted an item
QUOTE_OUT_OF_AMMO, // gun is empty
QUOTE_SERIOUSLY_WOUNDED, // lose life from bleeding below 15 HP
QUOTE_BUDDY_1_KILLED, // buddy 1 died
QUOTE_BUDDY_2_KILLED, // buddy 2 died
QUOTE_LEARNED_TO_LIKE_MERC_KILLED, // learn to like died
QUOTE_FORGETFULL_SLASH_CONFUSED, // currently not used
QUOTE_JAMMED_GUN, // gun is jammed
QUOTE_UNDER_HEAVY_FIRE, // heavily suppressed
QUOTE_TAKEN_A_BREATING, // took a lot of hits this turn
QUOTE_CLOSE_CALL, // almost hit by a projectile
QUOTE_NO_LINE_OF_FIRE, // really bad chance to hit target
QUOTE_STARTING_TO_BLEED, // we are bleeding
QUOTE_NEED_SLEEP, // going to sleep
QUOTE_OUT_OF_BREATH, // very low on breath points
QUOTE_KILLED_AN_ENEMY, // killed an enemy
QUOTE_KILLED_A_CREATURE, // killed an bug
QUOTE_HATED_1, // complain about hated 1
QUOTE_HATED_2, // complain about hated 2
QUOTE_LEARNED_TO_HATE_MERC, // complain about learn to hate
QUOTE_AIM_KILLED_MIKE, // AIM: killed Mike
QUOTE_MERC_QUIT_LEARN_TO_HATE = QUOTE_AIM_KILLED_MIKE, // MERC: quit because of guy we learned to hate
QUOTE_HEADSHOT, // complain about head explosion/corpse being disgusting
QUOTE_PERSONALITY_TRAIT, // disability kicks in (forgetfulness, afraid of heights etc.)
QUOTE_ASSIGNMENT_COMPLETE, // assignment is complete, so we tell the player
QUOTE_REFUSING_ORDER, // refuse to do action to target
QUOTE_KILLING_DEIDRANNA, // killed (or witnessed death of) Deidranna
QUOTE_KILLING_QUEEN, // killed (or witnessed death of) bug queen
QUOTE_ANNOYING_PC, // we dislike the NPC we just talked to
QUOTE_STARTING_TO_WHINE, // complain: low morale
QUOTE_NEGATIVE_COMPANY, // randomly played when we talk to a merc
QUOTE_AIR_RAID, // notify player of air raid / enemy helicopter spotted
QUOTE_WHINE_EQUIPMENT, // complain about quality of equipment
QUOTE_SOCIAL_TRAIT, // randomly played when we talk to a merc
QUOTE_PASSING_DISLIKE, // randomly played when we talk to a merc
QUOTE_EXPERIENCE_GAIN, // gained stats
QUOTE_REFUSE_TO_EATFOOD, // refuse to eat food
QUOTE_REFUSE_TO_SMOKE, // refuse to smoke
QUOTE_HATED_1_ARRIVES, // AIM: hated 1 arrives
QUOTE_MERC_QUIT_HATED_1 = QUOTE_HATED_1_ARRIVES, // MERC/NPC: quit because of hated 1
QUOTE_HATED_2_ARRIVES, // AIM: hated 2 arrives
QUOTE_MERC_QUIT_HATED_2 = QUOTE_HATED_2_ARRIVES, // MERC/NPC: quit because of hated 2
QUOTE_BUDDY_1_GOOD, // compliment buddy 1
QUOTE_BUDDY_2_GOOD, // compliment buddy 2
QUOTE_LEARNED_TO_LIKE_WITNESSED, // compliment learn to like
QUOTE_DELAY_CONTRACT_RENEWAL, // currently unused
QUOTE_NOT_GETTING_PAID = QUOTE_DELAY_CONTRACT_RENEWAL, // MERC: complain about not being paid
QUOTE_AIM_SEEN_MIKE, // AIM/MERC: see Mike
QUOTE_PC_DROPPED_OMERTA = QUOTE_AIM_SEEN_MIKE, // IMP: airdop in Omerta
QUOTE_NOT_GETTING_PAID_RPC = QUOTE_PC_DROPPED_OMERTA, // RPC: complain about not being paid
QUOTE_BLINDED, // an attack has blinded us
QUOTE_DEFINITE_CANT_DO, // we are hopeless at this skill check
QUOTE_LISTEN_LIKABLE_PERSON, // we like the NPC we just talked to
QUOTE_ENEMY_PRESENCE, // prior to combat, notify us of enemy presence
QUOTE_WARNING_OUTSTANDING_ENEMY_AFTER_RT, // realtime has begun, but hostiles are still around
QUOTE_FOUND_SOMETHING_SPECIAL, // we picked up an item we think is cool (once per day)
QUOTE_SATISFACTION_WITH_GUN_AFTER_KILL, // we are happy with the gun we are currently using (once per day)
QUOTE_SPOTTED_JOEY, // we spotted Joey during his quest
QUOTE_RESPONSE_TO_MIGUEL_SLASH_QUOTE_MERC_OR_RPC_LETGO, // AIM: answer to Miguel speech, MERC/RPC: warn that contract is over soon
QUOTE_SECTOR_SAFE, // we won the battle
QUOTE_STUFF_MISSING_DRASSEN, // notice shipment in Drassen was stolen
QUOTE_KILLED_FACTORY_MANAGER, // killed Deidranna
QUOTE_SPOTTED_BLOODCAT, // used when we spot a bloodcat
QUOTE_END_GAME_COMMENT, // end speech after game is won
QUOTE_ENEMY_RETREATED, // we won the battle due to enemy retreat
QUOTE_GOING_TO_AUTO_SLEEP, // currently not used
QUOTE_WORK_UP_AND_RETURNING_TO_ASSIGNMENT, // woke up from auto sleep, going back to work
QUOTE_ME_TOO, // me too quote, in agreement with whatever the merc previous said
QUOTE_USELESS_ITEM, // tried working the item in hand, and it's broken
QUOTE_BOOBYTRAP_ITEM, // item/door/etc. is boobytrapped
QUOTE_SUSPICIOUS_GROUND, // found mine etc. on floor tile
QUOTE_DROWNING, // currently not used, intended upon drowning
QUOTE_MERC_REACHED_DESTINATION, // strategic travel: arrived at destination
QUOTE_JA2UB_LAPTOP_FIXED, // JA2UB: played when the laptop is fixed
QUOTE_REPUTATION_REFUSAL, //80 // AIM: refuse to be hired due to bad player reputation
QUOTE_NON_AIM_BUDDY_3_KILLED = QUOTE_REPUTATION_REFUSAL, // not AIM: buddy 3 died
QUOTE_DEATH_RATE_REFUSAL, //= 81, // AIM: refuse to be hired due to high death rate
QUOTE_NON_AIM_BUDDY_4_KILLED = QUOTE_DEATH_RATE_REFUSAL, // not AIM: buddy 4 died
QUOTE_LAME_REFUSAL, //= 82, // AIM: refuse to be hired due not being in the mood (hangover etc.)
QUOTE_NON_AIM_BUDDY_5_KILLED = QUOTE_LAME_REFUSAL, // not AIM: buddy 5 died
QUOTE_WONT_RENEW_CONTRACT_LAME_REFUSAL, //=83, // AIM: refuse to be renew contract due to already having signed elsewhere
QUOTE_NON_AIM_HATED_3 = QUOTE_WONT_RENEW_CONTRACT_LAME_REFUSAL, // not AIM: complain about hated 3
QUOTE_ANSWERING_MACHINE_MSG, //= 84, // AIM: message that plays on the answering machine
QUOTE_NON_AIM_HATED_4 = QUOTE_ANSWERING_MACHINE_MSG, // not AIM: complain about hated 4
QUOTE_DEPARTING_COMMENT_CONTRACT_NOT_RENEWED_OR_48_OR_MORE, //=85, // AIM: warn that contract is >= 48 hours, would like to renew
QUOTE_NON_AIM_HATED_5 = QUOTE_DEPARTING_COMMENT_CONTRACT_NOT_RENEWED_OR_48_OR_MORE, // not AIM: complain about hated 5
QUOTE_HATED_1_ON_TEAM,// = 86, // AIM: played when we refuse to be hired because hated 1 is present and bHatedTime < 24 (else play QUOTE_HATED_1_ON_TEAM_LONGTIMETOHATE)
QUOTE_NON_AIM_BUDDY_3_GOOD = QUOTE_HATED_1_ON_TEAM, // not AIM: compliment buddy 3
QUOTE_HATED_2_ON_TEAM,// = 87, // AIM: played when we refuse to be hired because hated 2 is present and bHatedTime < 24 (else play QUOTE_HATED_2_ON_TEAM_LONGTIMETOHATE)
QUOTE_NON_AIM_BUDDY_4_GOOD = QUOTE_HATED_2_ON_TEAM, // not AIM: compliment buddy 4
QUOTE_LEARNED_TO_HATE_MERC_ON_TEAM,// = 88, // AIM: played when we refuse to be hired because learn to hate is present
QUOTE_NON_AIM_BUDDY_5_GOOD = QUOTE_LEARNED_TO_HATE_MERC_ON_TEAM, // not AIM: compliment buddy 5
QUOTE_CONTRACTS_OVER,// = 89, // tell player that contract is over
QUOTE_MERC_QUIT_HATED_3 = QUOTE_CONTRACTS_OVER, // MERC/RPC: quit because of hated 3
QUOTE_ACCEPT_CONTRACT_RENEWAL, // =90, // AIM: renew contract
QUOTE_MERC_QUIT_HATED_4 = QUOTE_ACCEPT_CONTRACT_RENEWAL, // MERC/RPC: quit because of hated 4
QUOTE_CONTRACT_ACCEPTANCE,// =91, // AIM: agree to contract
QUOTE_MERC_QUIT_HATED_5 = QUOTE_CONTRACT_ACCEPTANCE, // MERC/RPC: quit because of hated 5
QUOTE_JOINING_CAUSE_BUDDY_1_ON_TEAM,// = 92, // agree to contract because buddy 1 is here
QUOTE_JOINING_CAUSE_BUDDY_2_ON_TEAM,// = 93, // agree to contract because buddy 2 is here
QUOTE_JOINING_CAUSE_LEARNED_TO_LIKE_BUDDY_ON_TEAM,// = 94, // agree to contract because learn to like is here
QUOTE_REFUSAL_RENEW_DUE_TO_MORALE,// = 95, // AIM: refuse to be renew due to bad player reputation or morale
QUOTE_PRECEDENT_TO_REPEATING_ONESELF,// = 96, // say that you're repeating yourself
QUOTE_REFUSAL_TO_JOIN_LACK_OF_FUNDS,// = 97, // player can't afford hiring us
QUOTE_DEPART_COMMET_CONTRACT_NOT_RENEWED_OR_TERMINATED_UNDER_48,// = 98, // AIM: warn that contract is < 48 hours, would like to renew
QUOTE_DEATH_RATE_RENEWAL, // AIM: refuse to be renew due to high death rate
QUOTE_HATED_1_ON_TEAM_WONT_RENEW, // refuse to renew contract because hated 1 is here
QUOTE_HATED_2_ON_TEAM_WONT_RENEW, // refuse to renew contract because hated 2 is here
QUOTE_LEARNED_TO_HATE_ON_TEAM_WONT_RENEW, // refuse to renew contract because learn to hate is here
QUOTE_RENEWING_CAUSE_BUDDY_1_ON_TEAM, // renew contract only because buddy 1 is around
QUOTE_RENEWING_CAUSE_BUDDY_2_ON_TEAM, // renew contract only because buddy 2 is around
QUOTE_RENEWING_CAUSE_LEARNED_TO_LIKE_BUDDY_ON_TEAM, // renew contract only because learn to like is around
QUOTE_PRECEDENT_TO_REPEATING_ONESELF_RENEW, // repeat yourself during renewal process
QUOTE_RENEW_REFUSAL_DUE_TO_LACK_OF_FUNDS, // JA2UB: kill bloodcat quest fulfilled
QUOTE_GREETING, // AIM hiring screen: greet the player
QUOTE_SMALL_TALK, // AIM hiring screen: player says nothing, so do a bit of small talk
QUOTE_IMPATIENT_QUOTE, // AIM hiring screen: player says nothing, so get impatient / easter egg: female mercs complain about player trying to abuse the 'strip' command
QUOTE_LENGTH_OF_CONTRACT, // AIM hiring screen: ask player what contract terms they want
QUOTE_COMMENT_BEFORE_HANG_UP, // AIM hiring screen: player says nothing, we are fed up so end the cal
QUOTE_HATED_1_ON_TEAM_LONGTIMETOHATE, // AIM: played when we refuse to be hired because hated 1 is present and bHatedTime >= 24 (else play QUOTE_HATED_1_ON_TEAM)
QUOTE_HATED_2_ON_TEAM_LONGTIMETOHATE, // AIM: played when we refuse to be hired because hated 2 is present and bHatedTime >= 24 (else play QUOTE_HATED_2_ON_TEAM)
QUOTE_MERC_LEAVING_ALSUCO_SOON, // tell player that contract will be over soon
QUOTE_MERC_GONE_UP_IN_PRICE, // during contract renegotiation, inform the player of increased salary
QUOTE_ENTER_SECTOR_WITH_FAN_1, // special JA2UB dialogue about fan
QUOTE_ENTER_SECTOR_WITH_FAN_2, // special JA2UB dialogue about fan
QUOTE_AIM_BUDDY_3_KILLED = 119, // AIM: buddy 3 died
QUOTE_AIM_BUDDY_4_KILLED, // AIM: buddy 4 died
QUOTE_AIM_BUDDY_5_KILLED, // AIM: buddy 5 died
QUOTE_AIM_HATED_3, // AIM: complain about hated 3
QUOTE_AIM_HATED_4, // AIM: complain about hated 4
QUOTE_AIM_HATED_5, // AIM: complain about hated 5
QUOTE_HATED_3_ARRIVES, // AIM: hated 3 arrives
QUOTE_HATED_4_ARRIVES, // AIM: hated 4 arrives
QUOTE_HATED_5_ARRIVES, // AIM: hated 5 arrives
QUOTE_AIM_BUDDY_3_GOOD, // AIM: compliment buddy 3
QUOTE_AIM_BUDDY_4_GOOD, // AIM: compliment buddy 4
QUOTE_AIM_BUDDY_5_GOOD, // AIM: compliment buddy 5
QUOTE_HATED_3_ON_TEAM, // AIM: played when we refuse to be hired because hated 3 is present and bHatedTime < 24 ( else play QUOTE_HATED_3_ON_TEAM_LONGTIMETOHATE )
QUOTE_HATED_4_ON_TEAM, // AIM: played when we refuse to be hired because hated 4 is present and bHatedTime < 24 ( else play QUOTE_HATED_4_ON_TEAM_LONGTIMETOHATE )
QUOTE_HATED_5_ON_TEAM, // AIM: played when we refuse to be hired because hated 5 is present and bHatedTime < 24 ( else play QUOTE_HATED_5_ON_TEAM_LONGTIMETOHATE )
QUOTE_JOINING_CAUSE_BUDDY_3_ON_TEAM, // agree to contract because buddy 3 is here
QUOTE_JOINING_CAUSE_BUDDY_4_ON_TEAM, // agree to contract because buddy 4 is here
QUOTE_JOINING_CAUSE_BUDDY_5_ON_TEAM, // agree to contract because buddy 5 is here
QUOTE_HATED_3_ON_TEAM_WONT_RENEW, // refuse to renew contract because hated 3 is here
QUOTE_HATED_4_ON_TEAM_WONT_RENEW, // refuse to renew contract because hated 4 is here
QUOTE_HATED_5_ON_TEAM_WONT_RENEW, // refuse to renew contract because hated 5 is here
QUOTE_RENEWING_CAUSE_BUDDY_3_ON_TEAM, // renew contract only because buddy 3 is around
QUOTE_RENEWING_CAUSE_BUDDY_4_ON_TEAM, // renew contract only because buddy 4 is around
QUOTE_RENEWING_CAUSE_BUDDY_5_ON_TEAM, // renew contract only because buddy 5 is around
QUOTE_HATED_3_ON_TEAM_LONGTIMETOHATE, // AIM: played when we refuse to be hired because hated 3 is present and bHatedTime >= 24 (else play QUOTE_HATED_3_ON_TEAM)
QUOTE_HATED_4_ON_TEAM_LONGTIMETOHATE, // AIM: played when we refuse to be hired because hated 4 is present and bHatedTime >= 24 (else play QUOTE_HATED_4_ON_TEAM)
QUOTE_HATED_5_ON_TEAM_LONGTIMETOHATE, // AIM: played when we refuse to be hired because hated 5 is present and bHatedTime >= 24 (else play QUOTE_HATED_5_ON_TEAM)
From my experience, this is the hardest part about creating new characters. Taking sounds from movies etc. is bad, because you have to cut everything, have a lot of material to cut in the first place, and there is always background noise. Video games work much better, depending on the game ripping the sounds can range from trivial to I used several undocumented russian hacking tools I found while google-translating the pages I found, making me feel slightly uncomfortable, and then I had to sift through 400 MB of converted .mp3 to find fitting sounds, so no, this is definetely not easy. Additionally, finding fitting sounds gets hard fast, depending on the source material.
Of course, all of this dialogue also has subtitles, and you need to add that too. This happens in /Data-1.13/MercEdt. In here you need to add a file like 'your profile id'.edt, with every line number in that file corresponding to a dialogue file. We use this obscure, impractical file format for this instead of .txt or .xml files because the creators were serious twats sometimes, and should fornicate with themselves in ways both insulting and anatomically unlikely (we also won't ever change that format, because that would involve work and violate someones workflow or whatever shit). To even edit this obscure format, grab one of the editors - like CommieEDT - from kermi or scheinworld's archive. And save often.
Did I mention I hate .edt files? They are in my top 100 list of things I hate about this game.
Anyway, now we've got a voiceset - time to put this thing to use.
3. Creating a RPC
This is the part where we create a new RPC with a face and voiceset. Because you've grown to hate the .edt format, you can now edit another one of those: Edit /Data-1.13/BinaryData/AIMBIOS.EDT for AIM mercs or /Data-1.13/BinaryData/MERCBIOS.EDT for MERC mercs to set their webpage data.
The rest happens in /Data-1.13/TableData:
Actually, now that we're here, lets have a closer look at MercProfiles.xml, shall we? Looking at existing entries and the explanations on top should clear most questions, but a few tags are extra-interesting:
- Edit Email/EmailMercAvailable.xml for AIM and Email/EmailMercLevelUp.xml for MERC mercs.
- In Inventory/MercStartingGear.xml, you set up a merc's starting gear kits.
- In Sounds/SoundsProfiles.xml, we need an entry, too. Is this xml obviously pointless? Absolutely. Now stop asking questions.
- In the folder itself, alter AIMAvailability.xml for AIM and MercAvailability.xml for MERC mercs. See the existing contents of those xmls to get an idea of what to do here.
- Also, add entries for HiddenNames.xml and MercQuote.xml.
- In MercProfiles.xml, fill in the important character data. You might find out that there aren't that many slots free, so good luck here. Slot 200 is used for internal code reasons, don't ever, EVER use that one!!!
Note: You might have noticed that contrary to what I've said, we also somehow have slots here for our vehicles. This is the result of an atrocious hack Sirtech made that is both limiting, wasteful and a bitch to remove, so suck it up.
- MercOpinions.xml contains the opinions of each character for each other character. You might want to edit that to make your character more of a person, especially regarding buddies and hated ones.
- Backgrounds.xml contains a character's individual background. The number of a background is set in MercProfiles.xml via <usBackground> and does not have to equal the profile id (but doing so is logical, so do that).
Note: The <usVoiceIndex>-tag only exists in newer unstable relases - it is not present in unstable 2014 versions. You NEED to set this tag, otherwise your character will always use Barry Unger's voice.
<uiIndex>5</uiIndex> <- profile id
<ubFaceIndex>5</ubFaceIndex> <- face number
<usVoiceIndex>5</usVoiceIndex> <- voiceset
<usEyesX>10</usEyesX> <- eye coordinate from back when we created the face
<usMouthX>9</usMouthX> <- mouth coordinate from back when we created the face
To make matters worse, any changes to MercProfiles.xmlonly affect a newly created campaign[/b] - so you might end up starting quite a few one of those during testing.
And that's it. You now have a new character to blow up shit with.
4. Creating a new IMP slot
As you only create the IMPs during the game, they have no data set, so things are a bit different here. We need to edit less, but in different places:
Anyway, that should be all for a new IMP slot. Have fun and so on.
- In MercProfiles.xml, we need to reserve a slot for an IMP, there are already a few. If you've found one, note that number and add it under [Recruitment Settings] in Ja2_Options.ini, be sure to also alter the numbers there correctly.
- IMP gear selection depends on what is set in Inventory/IMPItemChoices.xml, in case you want to alter that.
- In Sounds/SoundsProfiles.xml, we need an entry, too. Is this xml obviously pointless? Absolutely. Now stop asking questions.
- In the folder itself, alter IMPPortraits.xml. We set the face coordinates here, as well as a few default values for the IMP creation process.
- Unstable relases only: IMPVoices.xml contains all voicesets that IMPs can use, so add a new voice here if you have one.
- Also, add entries for HiddenNames.xml and MercQuote.xml.
- Having any opinions set in MercOpinions.xml is kinda odd - make sure those are 0. Unless you want your IMP to have opinions on people, win which case - don't you really want a character instead?
Hopefully, that should provide insight as to how to create new characters. I'm sure questions will still come up, which will likely be adressed in this thread.
I've created mercs like this - here is an example for GameDir r2458. This contains 6 mercenaries - Cmdr. Shepard (#254), Lara Croft (#211), Sara Ryder (#212), Scott Ryder (#213), Max Payne (#214) and Angela 'Mercy' Ziegler 8#216) - that were created via the above steps. Shepard's, Sara's and Scott's data also contains faces to teach you what is needed there.
[Updated on: Tue, 09 April 2019 01:21]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Report message to a moderator
Current Time: Sat Sep 24 20:03:30 EEST 2022
Total time taken to generate the page: 0.01437 seconds