Jump to content

Question

Posted

A game data read type is bytes, the maximum can only be modified to 255, I want to modify this data to 999, someone can teach me? I would really appreciate everyone's help, in fact, this game is GBA Pokmon

Screenshot_20240826_173911.jpg

5 answers to this question

Recommended Posts

  • 1
Posted

The value of one byte can be from 0 to 255 decimal numbers. (0x00 - 0xFF)
If the decimal number is greater than 255, then it is already two or more bytes.
256 - 0x01 & 0x00
257 - 0x01 & 0x01
999 - 0x03 & 0xE7

  • 0
Posted

You're explaining how decimal numbers are represented in bytes.

 

In computing, a byte is a unit of digital information that can store a value ranging from 0 to 255 (decimal). This is because a byte is made up of 8 binary digits (bits), and 2^8 (2 to the power of 😎 equals 256 possible values.

 

When a decimal number is greater than 255, it requires more than one byte to represent it. You've provided some examples:

 

- 256: 0x01 0x00 (two bytes)

- 257: 0x01 0x01 (two bytes)

- 999: 0x03 0xE7 (two bytes)

 

In each case, the decimal number is split into two bytes using a process called byte splitting or byte encoding. The first byte (most significant byte, or MSB) represents the high-order bits, while the second byte (least significant byte, or LSB) represents the low-order bits.

 

For example, the decimal number 999 can be broken down into:

 

- High-order bits (MSB): 0x03

- Low-order bits (LSB): 0xE7

 

When combined, these two bytes represent the decimal value 999.

 

I hope this clarifies the concept! Let me know if you have any further questions.

  • 0
Posted
15 minutes ago, Hamzabbas said:

您正在解释如何用字节表示十进制数。

 

在计算中,字节是数字信息的单位,可以存储从 0 到 255(十进制)的值。这是因为一个字节由 8 个二进制数字(位)组成,而 2^8(2 的幂等于😎256 个可能的值)。

 

当十进制数大于 255 时,需要多个字节来表示它。您提供了一些示例:

 

- 256: 0x01 0x00 (两个字节)

- 257: 0x01 0x01 (两个字节)

- 999:0x03 0xE7(两个字节)

 

在每种情况下,十进制数都会使用称为字节拆分或字节编码的过程拆分为两个字节。第一个字节(最高有效字节,即 MSB)表示高位,而第二个字节(最低有效字节,即 LSB)表示低位。

 

例如十进制数 999 可以分解为:

 

- 高位(MSB):0x03

- 低位(LSB):0xE7

 

这两个字节组合起来代表十进制值 999。

 

我希望这能澄清这个概念!如果您还有其他问题,请告诉我。

Ok, thank you very much for your help, do you mean I can't use gameguardian to change a byte of data to 999, this address only has a byte type,I was wondering if I could use gameguardian to change this address from one byte to two bytes,Although this address is now only one byte,I hope I can get yourhelp.Thank you very much.

  • 0
Posted
6 小时前,Count_Nosferatu 说:

一个字节的值可以是0到255个十个步行数。(0x00-0xFF)
如果十个步行数大于255,那么它已经是两个或多个字节。256
- 0x01 & 0x00
257 - 0x01 & 0x01
999 - 0x03 &0xE7

Ok, thank you very much for your help,I got a similar answer,do you mean I can't use gameguardian to change a byte of data to 999, I was wondering if I could use gameguardian to change this address from one byte to two bytes,Although this address is now only one byte,I hope I can get yourhelp.Thank you very much.

  • 1
Posted

@Xwl522How did you get this value? Depending on how it was obtained, it may actually be a different data type and that is just the first byte. Try editing the value as dword instead of byte (click the value, hit goto address, then hit it again and select edit - this type it should ask you which data type you want to edit it as).
However, if that byte does reflect the value in the game and editing is as dword doesn't work, then it is indeed of byte type. If this is the case, then you simply cannot exceed 255. Just like you can't edit a dword value past the integer limit.

Instead of asking how, you should be asking why. If a value is of byte type, that means the game will never need it to be greater than 255. So why do you need it to be? For example, currency will never be stored as byte (unless that type of currency happens to be extremely rare, and in that case, editing it to 255 should be more than enough of it).

So if it is of byte type, then no, you can't make the value greater than 255 - but you shouldn't need to.

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
×
×
  • 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.