the 2-byte limit glitch

Post » Mon Nov 24, 2014 11:33 pm

Known bug:

"Rarely, when you sell items to a merchant, you do not receive any gold, only Speech experience. This glitch is more likely to trigger if you buy a lot of items from the merchant before selling your goods, mostly from the apparel tab. This occurs when the vendor's gold goes above 32767 which is above the 2-byte limit."

I am not even sure how much gold I lost doing transactions with out noticing I was not getting any gold from the merchant with this. Could have been weeks of game play. :ohmy:

So, I just got bitten by this. Any chance there is a mod out there that either fixes this or prevents any further transactions with the player once they hit say 30000 gold?

User avatar
darnell waddington
 
Posts: 3448
Joined: Wed Oct 17, 2007 10:43 pm

Post » Mon Nov 24, 2014 5:43 pm

Don't know of any mods, but the first thing that comes to mind is the shopkeeper container that is linked to the NPC's inventory. In Oblivion anyway, anything in that container would also appear in the seller's inventory.

It should be easy to add a script on some dialogue-related event that tracks onitemadded to the NPC, and counts their gold. Then offload the overlap above 30k to the container. That would at least give another 2 bytes, assuming the container has the same limit.

EDIT: You could also count the gold in the target container, and add an invisible token each time the container reached 30k. I doubt anyone has logged enough hours to have over 30k x 30k so I don't think you'd ever overstack the tokens. ;)
User avatar
Wanda Maximoff
 
Posts: 3493
Joined: Mon Jun 12, 2006 7:05 am


Return to V - Skyrim