1. SPS Accounts:
    Do you find yourself coming back time after time? Do you appreciate the ongoing hard work to keep this community focused and successful in its mission? Please consider supporting us by upgrading to an SPS Account. Besides the warm and fuzzy feeling that comes from supporting a good cause, you'll also get a significant number of ever-expanding perks and benefits on the site and the forums. Click here to find out more.
    Dismiss Notice
Dismiss Notice
You are currently viewing Boards o' Magick as a guest, but you can register an account here. Registration is fast, easy and free. Once registered you will have access to search the forums, create and respond to threads, PM other members, upload screenshots and access many other features unavailable to guests.

BoM cultivates a friendly and welcoming atmosphere. We have been aiming for quality over quantity with our forums from their inception, and believe that this distinction is truly tangible and valued by our members. We'd love to have you join us today!

(If you have any problems with the registration process or your account login, please contact us. If you've forgotten your username or password, click here.)

Breakdown of the ToEEPC character file

Discussion in 'The Temple of Elemental Evil' started by Da_Ediot, Aug 29, 2005.

  1. Da_Ediot Gems: 1/31
    Latest gem: Turquoise


    Joined:
    Aug 29, 2005
    Messages:
    2
    Likes Received:
    0
    [​IMG] This is a breakdown of the fields and their purposes of the *.ToEEPC file. It is a work in progress. As I figure more out, I will add to this. I have tried to insure that all information is accurate.

    Please feel free to post, share, and improve upon it.

    If modifications are made to the TCE engine it could make character editing easier for some.
    This is from my study of the ToEEPC files. Some of these blocks can be found in the *.tfaf files (save game files) also. I haven’t checked them out yet to compare.

    Please ignore any grammatical or spelling errors.


    0900 0000 == Character sheet beginning block -- followed by 1 double-word
    Purpose Signifies this is the Player-Generated character – The pre-generated characters have a 0100 0000 here instead
    Purpose of value is unknown

    0200 0000 == variable length double-word bit data block. This type of block always uses a 0000 0000 “end-block” double-word to indicate the end of the field – in this case it is immediately followed by the end-block double-word, which I will refer to as the EBDW. End-block words will be EBW and end-block bytes will be EBB. There are no end-field bits, thankfully.

    Note: This field is, always, a group of double-words with a 0000 0000 double-word used to indicate the end of the block. Values are placed in between these two double-words and are double-word in length and are bit fields. It is used to indicate # and sequence of the data from previous block’s data. Bits are always read from right to left. Example: abcd efgh ijkl mnop shows 2 double-words of data. It will be read as opmn klij ghef cdab. Do not convert this to decimal. Just read the byte values from right to left. If no sequence is required, it will just show the # of useful data with 1’s filling right to left. So 1 data field means a bit value of 0001 for the “b” byte, and 2 would be 0011 with 3 being 0111 and 4 as 1111. At 5, move to the “a” byte and so on.

    xxxx yyyy == 4 double-word length field – has a 01 end-block byte (EBB) (byte after the last double-word to indicate the end of the block.
    Purpose unknown

    xxxx 0000 == Character name beginning block -- xxxx is the # of characters in the name -- each character is one byte in size ( the word Rogue would appear as 526F 6775 65)

    xxxx 0000 == First of 2 instances of character portrait -- refer to portrait.mes for portrait -- value points to the big picture

    xx00 0000 == sex -- 00 = Female 01 = Male

    xx00 0000 == First of 2 instances of class – values begin 07 for Barb up to 11 for Wiz in alphabetical order

    xx00 0000 == race –
    Values – 00 to 07 – Human, Dwarf, Elf, Gnome, Half-elf, Half-orc, Halfling, Monster in that order

    xx00 0000 == First of 2 instances of alignment –
    Values – 00 – N ; 01 – LN ; 02 – CN ; 04 – NG ; 05 – LG ; 06 – CG ; 08 – NE ; 09 – LE ; 0A – CE

    xx00 0000 == only instance of unknown value

    01 == The end-block byte (EBB) that I mentioned above.

    7700 0000 == Unknown block beginning signifier –
    Followed by 3 double-words that appear to be in byte or word values
    Purpose of unknown

    0200 0000 == Unknown double-word bit block – followed by the 0000 0000 EBDW
    Purpose unknown

    xxxx yyyy == unknown double-word of data that appears to be in byte or word form
    Purpose unknown

    0200 0000 == Unknown double-word bit block – followed by the 0000 0000 EBDW
    Purpose unknown

    xxxx yyyy == Unknown double-word block set -- 4 double-words long, that appears to be in byte or word form
    Purpose unknown

    0D00 0000 == Unknown byte block header -- followed 11 bytes. The last 4 bytes seem to always be 0000 and is probably the EBW
    Purpose unknown

    0200 0000 == Unknown double-word bit block – followed by the 0000 0000 EBDW.
    Purpose unknown

    xxxx yyyy == Unknown variable-length double-word block – It seems to have some preset values; but, not all characters will have same ones. They appear to be sequenced.
    Purpose and values unknown mostly – Near the end of the block you will find the HP double-word. It is usually within 3 double-words from the EBB.

    01 == EBB

    0400 0000 xxxx 0000 yyyy 0000 == Variable length double-word block begins -- xxxx is value for # of double-words of the block -- yyyy is on offset indicator –
    (Note: 0400 0000 always signals a variable length double-word block. Values will be in double-word data form)
    (Warning: if you add feats after initial generation of character, do not change this section. It is best to leave it alone until it is better understood. They game seems to place these in initially in the sequence you see them in when you View the character and look at the feats sub-window. Except for special class skills that don't get listed like the Rogue's sneak attack or the Clerics Turning and Positive/Negative Energy)
    Purpose -- This block indicates preset feats or effects based on choices made at startup like race, class and deity/domain
    Suspected values:
    5EA1 4D00 -- Human simple weapon proficiency
    064A 0000 -- Elf simple weapon proficiency
    6EF9 BC04 -- 2 weapon fighting proficiency
    85B6 6704 -- 2 weapon defense
    8242 8804 and 2CC6 FE02 related to Negotiator and Scribe Scroll
    A538 100F related to Improved Initiative

    0200 0000 == Double-word bit block – values for this field are not sequential, so it only indicates the # of fields above – has the EBDW

    xxxx yyyy == Unknown double-word block – values seen are 0000 0000 and FFFF FFFF only so far. If you have the FFFF FFFF, then you will have an extra double-word as the last double-word at the end of the file. So it is probably only here to indicate if there is a trailing double-word at the end of the file or not.

    01 == EBB

    0400 0000 xxxx 0000 yyyy 0000 == Variable length double-word block begins --
    Purpose of this field seems to be related to feats selected during generation of character; but, only those that affect things -- Combat reflexes will never appear here. It has 2 or more subsections indicated by starting with 0100 0000 -- first set seems to be for physical affecting feats like Improved Init or 2 weapon fighting -- second set seems to be for magical affecting sections –

    0200 0000 == Double-word bit block – with EBDW
    Purpose – indicate # of above fields and sequence if necessary -- values appear to indicate the above field is not sequential.

    01 == EBB

    0400 0000 0600 0000 yyyy 0000 == Variable length double-word block begins – yyyy is offset
    Purpose -- this one is for stats -- sequence is Str, Dex, Con, Int, Wis, Chr -- values will be in xxxx 0000 form

    0200 0000 == Double-word bit block –
    Purpose – indicate # of above fields and sequence if necessary -- has a 3F00 0000 bit field double-word to indicate the # of Values above and the EBDW

    01 == EBB

    0400 0000 0100 0000 yyyy 0000 == Variable length double-word block begins – of only 1 length
    Purpose – Second and final instance of class

    0200 0000 == Double-word bit block – has 0100 0000 and the EBDW

    xxxx yyyy == Block of double-word values for specific purposes.
    Purpose -- char description fields --
    1st double-word -- height
    2nd double-word -- wt
    3rd double-word -- alignment
    4th double-word – deity
    Clerics will have 3 more double-word fields of which the first 2 indicate Domains and the 3rd indicates positive or negative energy (It may be possible to give yourself more Domains here. Not sure.)

    01 == EBB

    <<Spell section for spellcasters begins -- only there if character has spells>>

    2000 0000 xxxx 0000 yyyy 0000 == variable length field for spells -- xxxx indicates the # of spells known -- yyyy is the offset -- each spell field is broken down into 8 double word lengths -- may have the 0100 0000 fields to indicate subsections of single words and specific purposes -- non-spellcasters will not have this field or those without spells yet
    Breakdown of fields
    First field is the spell -- refer to SpellList.mes for values of spells (Note: spells are listed based on how they are listed in your spell book -- new spells are added at the end (spells may be separated into level groups)
    2nd field -- aaaa 0000 -- indicates type of caster -- values run from 8700 for barbarian through 9000 indicates sorcerer
    3rd field is spell level --
    4th field – unknown
    5th field – unknown
    6th field – unknown
    7th field – unknown
    8th field – unknown

    0200 0000 == Double-word bit block – It has the EBDW
    Purpose – bit count showing the # of spells available 4 spells is 0F00 0000 – it is not sequence oriented.

    01 == EBB

    <<Spell section for spellcasters ends -- only there if has spells>>

    0400 0000 xxxx 0000 yyyy 0000 == Variable length double-word block begins -- feats taken -- refer to feats.mes for values
    Purpose -- feats taken -- This is the ONLY field you need to modify when adding feats -- the game will show them in the character screen the next time you look it on New Game -- View – Feats -- any effects will take place the next time you start the game with that character.

    0200 0000 == Double-word bit block – It has the EBDW
    Purpose – first double-word indicates the# and placement of feats. As they do not need to be in order the value should match the # of feats from xxxx above. However, the values are in bit form so one feat equals 0100 and 2 feats are 0300 and 3 feats are 0700 – this indicates a possible max of 32 feats in the game

    xxxx 0000 == second and final instance of character portrait

    01 == EBB

    0400 0000 xxxx 0000 yyyy 0000 == Variable length double-word block begins -- skills -- refer to skills.mes for values (Note: for a CC skill to be listed here it must have a value of at least 2 -- class skills will always be an even # by a factor of 2 for each point you want in it. Level 1 characters can have a max of 4 points in any field -- Class skill which is a value of 8 -- CC skills will have a max of 4.)
    Skills are listed in this order and must be given values in this order -- Appraise, Bluff, Concentration, Diplomacy, Disable Device, Gather Information, Heal, Hide, Intimidate, Listen, Move Silently, Open Locks, Sleight of Hand, Search, Sense Motive, Spellcraft, Spot, Tumble, Use Magic, Survival, Perform

    0200 0000 == Double-word bit block – It has the EBDW
    Purpose unknown –. The right-most one is for Appraise, the second one from the right for Bluff and so on.

    abcd 0000 == Hair style and color and head/body form. Here is the breakdown in “nibble” form ab cd. Reversing gets cd ba . c is 0, put d and b together to get db -- now break it into 3 parts by bits 00 xxx yyy - xxx is for hair color and yyy is for hair style (each has only 8 options possible), a is head/body form (Sequence follows racial listing from above with the Females first and then followed by the Males – so HUF – human female – is 0000 in bit form and HUM – human male – is 1000 in bit form).

    01 == EBB

    xxxx 0000 == Character name beginning block (second and final time) -- xxxx is the # of characters in the name -- each character is one byte in size ( the word Rogue would appear as 526F 6775 65) -- exactly the same as above

    00 -- EBB

    xxxx 0000 == pc voice -- refer to pcvoice.mes for values

    xxxx 0000 == occasional extra field –
    Purpose unknown – suspect it is for special starting weapon related to the Exotic Weapon, Weapon Focus, Weapon Finesse, and/or Weapon Specialization Feats


    Basic Tutorial on Hex Editing
    The values you see on the left side of the Hex Editor are in Hexadecimal or “Hex” values.
    There are 4 types you need to worry about on the left side of the screen and that is the ONLY place you should be making changes. The right side of the screen is for visual purposes only. Mostly helpful in identifying character strings like your character’s name, or other text.
    These types are the “nibble’, “byte”, “word” and “double-word”.
    A “nibble” is half a byte, or one character.
    A “byte” is the basic unit. It is a pair of the characters you see. When you click in the left side, it will always set the cursor at the beginning a byte, never a nibble.
    The basic structure is shown in pairs of bytes also knows as a “word”. These are the groups of 4 characters you always see with spaces in between and usually alternating colors for easy identification. It is recommended that you adjust the width of your editor’s window so that you have an even number of columns. It makes it easier to count the double-words. However, the editor shows “visual words” not “actual words”. Some values in the file are only a byte in size, like the 01 used to denote the ending of the 0200 0000 block. So, often, the actual word is split on the screen as 00xx xx00. The xxxx is the actual word value.
    The “double-word” is 2 words and is usually denoted like this: 0000 0000

    The left-most column is called the offset. It is in hex values and shows the numerical value of the starting byte in that row. It is mainly there to show you where in the file you are and to find the same place in another file so you can compare values.

    Note: Remember, on word and double-word values, you must always reverse each of the word byte values. 4F01 on the left side of the Hex Editor will be reversed to 014F for its actual Hex value to produce a value of 335 in decimal value. You can then compare this value to the one in your *.mes or *.tab file. It is usually the numerical value on the leftmost column.

    Here is an example: You don’t like your PC’s voice. Say you want to go from the Gruff Warrior voice to the Happy Trickster.
    Open the PCVoice.mes file with Phalzyr’s ProtoEd or WordPad.
    Find the voice file you want to change it to. In this case the Gruff Warrior voice is 9 and the Happy Trickster is 17.
    The second to last double-word in the file is your PC’s voice file.
    9 Decimal becomes 09 Hex byte and 0009 in a Hex word. Now reverse the values to get 0900. You should see that the second to last double-word has a value of 0900 0000. That shows you have the right spot.
    17 Decimal becomes 11 Hex byte and 0011 Hex word. Reversing the values becomes 1100.
    Click just in front of the 09 and you will have a flashing vertical cursor to indicate the beginning of the byte. You will see a corresponding cursor on the right side of the screen also. Type 11 and the value is now 1100 0000. Hit the save button and you’re done.
     
  2. Taluntain

    Taluntain Resident Alpha and Omega Staff Member ★ SPS Account Holder Resourceful Adored Veteran Pillars of Eternity SP Immortalizer (for helping immortalize Sorcerer's Place in the game!) New Server Contributor [2012] (for helping Sorcerer's Place lease a new, more powerful server!) Torment: Tides of Numenera SP Immortalizer (for helping immortalize Sorcerer's Place in the game!) BoM XenForo Migration Contributor [2015] (for helping support the migration to new forum software!)

    Joined:
    Jun 11, 2000
    Messages:
    23,653
    Media:
    494
    Likes Received:
    570
    Gender:
    Male
    [​IMG] It'd make more sense for you to post this at http://www.co8.org/ - pretty much the entire ToEE modding community is gathered there.
     
  3. Da_Ediot Gems: 1/31
    Latest gem: Turquoise


    Joined:
    Aug 29, 2005
    Messages:
    2
    Likes Received:
    0
    Acutally, I posted it there first. But I thought I should post it here also.

    I hope this helps people.
     
  4. Taluntain

    Taluntain Resident Alpha and Omega Staff Member ★ SPS Account Holder Resourceful Adored Veteran Pillars of Eternity SP Immortalizer (for helping immortalize Sorcerer's Place in the game!) New Server Contributor [2012] (for helping Sorcerer's Place lease a new, more powerful server!) Torment: Tides of Numenera SP Immortalizer (for helping immortalize Sorcerer's Place in the game!) BoM XenForo Migration Contributor [2015] (for helping support the migration to new forum software!)

    Joined:
    Jun 11, 2000
    Messages:
    23,653
    Media:
    494
    Likes Received:
    570
    Gender:
    Male
Sorcerer's Place is a project run entirely by fans and for fans. Maintaining Sorcerer's Place and a stable environment for all our hosted sites requires a substantial amount of our time and funds on a regular basis, so please consider supporting us to keep the site up & running smoothly. Thank you!

Sorcerers.net is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to products on amazon.com, amazon.ca and amazon.co.uk. Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.