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.)

Could Someone Help me Hex-Edit some gold for myself?

Discussion in 'The Temple of Elemental Evil' started by TOEE Novice_, Dec 10, 2004.

  1. TOEE Novice_ Gems: 1/31
    Latest gem: Turquoise


    Joined:
    Dec 8, 2004
    Messages:
    7
    Likes Received:
    0
    i really need some help getting gold .. i cant get the trainers to work .. so i guess i should use a hex editor .. could someone give me some info on which string contains the gold value for my character and also which file to open with the hex editor . .. thanx
     
  2. ejsmith Gems: 25/31
    Latest gem: Moonbar


    Joined:
    Oct 6, 2001
    Messages:
    2,238
    Likes Received:
    0
    Hex editing your gold is very easy.

    There are four fields, each 8 bytes long. Write down the amount of everything that you have. Platinum, gold, silver, copper. Save the game, and make a "backup" copy into another folder.

    Then hex edit the file. You'll have to convert the decimal number into hexadecimal. For example, 500 gold will look like this:
    ---------------------------------------------------------------
    platinum | gold | silver | copper |
    0000 0000 F401 0000 0000 0000 0000 0000

    The 500 gold converts into 01F4. But everything is "backward". To give yourself 1,000,000 platinum and 2,000,000 gold, it would look like this.

    0024 F400 8084 1E00 0000 0000 0000 0000

    ---------
    0024 F400 == 1,000,000 platinum
    8084 1E00 == 2,000,000 gold

    It's been a little while since I've edited. To be honest, each field may be 16 bytes in length, but the general idea still holds. You'll have to do a search for the gold amounts, and the "stranger" the amount of platinum/gold/silver/copper you have, the more likely it will come up with a single match.
    If they are 16 bytes long, then to search for 500 gold, it would appear like this.

    platinum | gold |
    0000 0000 0000 0000 F401 0000 0000 0000

    silver | copper |
    0000 0000 0000 0000 0000 0000 0000 0000

    [edit: Oh. The savegame files are in your save folder. Something like tToEE/modules/tToEE/saves. It's the .tfaf file; they are saved in numerical order, so if it's your 5th save in the game, it'll be 00005.tfaf or something.
     
  3. TOEE Novice_ Gems: 1/31
    Latest gem: Turquoise


    Joined:
    Dec 8, 2004
    Messages:
    7
    Likes Received:
    0
    Awesome d00d thanx !! first, what would the string be if i had 71 platinum 2 gold 5 silver and 9 copper ?? and second, how do you convert the values to hex or binary or whatever ... i know you said that they are backwards once you convert them but could explain briefly how to convert ?? thanx ..
     
  4. ejsmith Gems: 25/31
    Latest gem: Moonbar


    Joined:
    Oct 6, 2001
    Messages:
    2,238
    Likes Received:
    0
    I use Hex Workshop (a really old version, but still works). Any hex editor is a good hex editor, so head to www.download.com and get you one.

    For my starting party, using the "autosave". I'm editing d:/games/ttoee/modules/toee/save/slotauto.tfaf

    Now, you use the windows calculator, set to "scientific". Type in "500" decimal, and click the hex selector, and it now reads "1F4". That means 01F4, or in the case of tToEE, 000001F4. Then I do a search, in my hex editor, for a string of "0000F4010000". It pulls back address 00004CA8 (this location will change with every save). I go to that location, and I see this (using periods to denote spaces for purposes of posting on this board):

    0000.0000.0000.0000.0000.F401.0000.0000.0000.0100

    I know my gold is 500, and that's denoted by "F401". I know that the full gold "field" is 8 bytes long, so the gold is actually "F4010000". This means I could put "FFFFFFFF" and have 4.294 billion (in decimal numbers) in gold bullion, Which would likely lock the game up. So I'm going to give myself 2,000,000 platinum, and 1,000,000 in gold. I'm giving myself gold because in the past when I went to craft items and only had platinum, it wouldn't let me craft; I'm still scarred from the experience.

    So.

    The order goes copper, silver, gold, platinum. Each being 8 bytes in length. I convert 2,000,000 into hex, giving me "1E8480" in the windows calculator. I have to turn this around to "80841E" when I insert it into the save file, and I need to add an extra pair of zeros at the end, so it looks like this "80841E00". The zeros should already be there on this particular hex, but you might one day come across a place where you need to reduce the number from 1,000,000 to 500, and you'll need to remember those trailing zeroes.

    Anyway, with 1 million gold and 2 million platnium, here is what the field should look like in comparison to the original (with decimals indicative of grouping which is normally shown in most hex editors).

    Orig - 0000.0000.0000.0000.0000.F401.0000.0000.0000.0100
    edit - 0000.0000.0000.0000.0000.4042.0F00.8084.1E00.0100

    Use the "F401" as your reference point. The next four fields are also part of gold, and then the eight (an "unsigned long") after that are for platinum. Remember to "turn the number around" when you go to put the amount (in hexadecimal format). Loading up the game, verifies my results. 2M platinum, 1M gold.

    You can also edit your stats. Experience points, charisma, strength, wisdom. It's easier to use the player editor for that stuff, though.
     
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.