Jump to content
  • 0

Problem getting the right value (Byte, Word)


YeetMeister
 Share

Question

I'm Modifying a game and the value I'm trying to modify is split up into two Bytes, so generally I should modify the word, but I want to have an exact value like 10000

what I have found out is that 64 00 = 100 Currency. and the word for it is 25600

now I need an math equation to exactly find out what word value I should put so I can have 10000 Currency. any Help?

im not very good at math, but if someone could help me get this right I would very much appreciate that

Link to comment
Share on other sites

Recommended Posts

  • 0
On 4/29/2021 at 7:20 PM, CmP said:

Byte value of 0xB8 is -72 in decimal if you interpret it as signed byte and 184 if you interpret is as unsigned byte, so these are just different interpretations of the same value.

Just convert them to hexadecimal and extract byte values from the result. I have no idea why it is so hard to understand.

Example: convert 12345 decimal value to bytes.
1. 12345 = 0x3039
2. Byte values are 0x30 and 0x39 (to be searched in this order) or 48 and 57 in decimal.

Thank you so much, I think I got it now😅 sorry I'm not clear minded at the moment xD

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.