Skip to main content

Gold Increase and Trade Fix

ETHER SAGA ODYSSEY - GOLD LIMITS 20,000 -> 200,000 (hex edit guide)
=====================================================================

The problem
-----------
Out of the box, several places stop gold amounts at 20,000 gold:
  - player-to-player trades
  - taking gold out of mail
  - gold exchange withdrawals
  - player shop (vending) prices

What this guide changes
-----------------------
  gdeliveryd          trades + gold exchange withdrawals   -> 200,000
  gamedbd             mail + saving exchange withdrawals   -> 200,000
  elementclient.exe   player shop prices                   -> 200,000
  gs                  nothing (see "Gold carry cap" below)


How the numbers work
--------------------
The game counts money in copper: 1 gold = 10,000 copper.
The limits are stored as 4 bytes, lowest byte first:

  20,000 gold  = 200,000,000 copper   = 00 C2 EB 0B
  200,000 gold = 2,000,000,000 copper = 00 94 35 77

Every edit in sections 1-3 is the same change:
  00 C2 EB 0B  ->  00 94 35 77


IMPORTANT
---------
- The offsets only fit the same builds we edited (the original ESO
  gdeliveryd, gamedbd and elementclient.exe). Before typing, check
  that 00 C2 EB 0B is really at each offset. If it isn't, STOP: your
  file is a different build.
- Offsets are FILE offsets (what a hex editor's "Go to" uses).
- Type over the bytes (overwrite). Never insert or delete bytes; the
  file size must stay the same.
- Stop the server and back up every file first.

Tools: HxD (Windows) or any hex editor. "Go to" = Ctrl+G in HxD.


=====================================================================
1) gdeliveryd  (server)                             2 spots, 4 bytes
=====================================================================
   0x6774      player-to-player trades
   0x207546    gold exchange withdrawals

   00 C2 EB 0B  ->  00 94 35 77   at both


=====================================================================
2) gamedbd  (server)                                4 spots, 4 bytes
=====================================================================
   0x648A1     taking gold out of mail
   0x648C5     taking gold out of mail
   0x648D2     taking gold out of mail
   0x86FEB     saving gold exchange withdrawals

   00 C2 EB 0B  ->  00 94 35 77   at all four

   gamedbd has one more 20,000 that is only used for log messages.
   Leave it; it doesn't limit anything.


=====================================================================
3) elementclient.exe  (client - every player needs it)
=====================================================================
Player shop (vending) prices                        4 spots, 4 bytes
   0xDDD88
   0xDDDA5
   0xDEADD
   0xDECAB

   00 C2 EB 0B  ->  00 94 35 77   at all four

The server side of player shops needs no change: gs already allows
shop prices up to 200,000 gold.


=====================================================================
4) Gold carry cap (how much gold a character can hold)
=====================================================================
NOT changed, and nothing to edit.

gs already lets a character carry up to 2,000,000,000 copper
= 200,000 gold. That is the game's normal bag money limit, and with
the edits above all the other limits now match it.

It can't usefully go higher: money is stored as a 32-bit number, and
the largest value that fits is about 214,748 gold. Raising it would
mean rewriting how money is stored in gs, the database and the
client, which this guide doesn't do.

What players will notice: if a trade, mail or shop sale would push
someone above 200,000 gold, it fails. That is the carry cap working
normally, not a bug.


=====================================================================
5) Gold exchange account caps  (optional - NOT done on our server)
=====================================================================
The gold exchange (in gdeliveryd) has its own separate limits, which
we left as they are:

   0x2075D1   most gold an exchange account can hold (on deposit)
   0x207D8F   the same cap, checked when a buy order completes
   0x207B72   most gold in a single order (100,000 gold)

The exchange counts in hundredths of a gold, so the account cap
(40 42 0F 00 = 1,000,000) means 10,000 gold.

If you want the account cap at 200,000 gold, change BOTH:
   0x2075D1    40 42 0F 00  ->  00 2D 31 01
   0x207D8F    40 42 0F 00  ->  00 2D 31 01
Changing only one lets players deposit more but blocks their buy
orders (or the other way round). This one has not been tested in
game, so try it on a test server first.


=====================================================================
6) Install
=====================================================================
SERVER
  1. Stop the server.
  2. Back up gdeliveryd and gamedbd.
  3. Copy the edited files over the old ones.
  4. chmod 755 gdeliveryd gamedbd
  5. Start the server.

CLIENT
  Replace elementclient.exe in every player's client folder.


=====================================================================
7) Test checklist
=====================================================================
[ ] Trade more than 20,000 gold between two players
[ ] Mail more than 20,000 gold and take it out of the mail
[ ] Withdraw more than 20,000 gold from the gold exchange
[ ] Price a player shop item above 20,000 gold and buy it
[ ] Log out and back in: the gold amounts are still correct
[ ] Going above 200,000 gold carried is still refused (normal)


=====================================================================
8) Compare your files with the edited ones
=====================================================================
Windows:  fc /b original_file edited_file
Linux:    cmp -l original_file edited_file

Each line is one changed byte. Each 4-byte change shows 3 lines,
because the first byte (00) is the same before and after:
   gdeliveryd          6 lines
   gamedbd            12 lines
   elementclient.exe  12 lines