TheByteSize wrote: ↑Thu Jul 04, 2019 7:49 pm
I can only glitch DEX right now. Here are some samples
Here's the full set of parameters. The game handles things by bits, not full bytes, because its originally a handheld console game and memory was very much at a premium. Each item would be 15-16 bytes, at least, in a PC game, but its 8 bytes here because they needed all the room they could get. Here's a mapping of the struct for weapons - items, armor, and accessories use the same 8 byte-size struct, but their structs are laid out differently, and the bits mean different things.
1st byte (8 bits)
Weapon Type - 4 bit - values: 0-15 - error, sword, rapier, greatsword, scimitar, katana, dagger, error, axe, club, error, spear, error, error, error, error
Stat boosted - 4 bit - values: 0-15 - error, str, dex, agi, error, error, attack, defense, acc, eva, crt, error, error, error, error
2nd byte
No clue. Has something to do with the dynamic naming the game uses, but I wasn't able to make much sense of it
3rd byte
Status Effect - 3 bits - values: 0-7 - nothing, poison, paralysis, bleeding, stun, seal, absorb, error
Name bits - 5 bits - values don't really matter here, since they're not used as numbers - Determines whether the item is a unique weapon, and what unique weapon it is. I wasn't able to make heads or tails of which values determined which item was which, and didn't want to build up a list of 2^13 (5 for this entry and 8 for the 4th byte) names for each weapon type, most of which were duplicates.
4th byte
Name bits (cont.) - 8 bits - continuation of the previous "name bits"
5th byte
Miscellaneous effect - 3 bits - values: 0-7 - nothing, ???, ???, skill charge time, item usage time, drop rate, exp, error
Uniqueness? - 1 bit - values: 0-1 - Not really sure. If you have only one of the item, this is set to 1, otherwise it's set to 0. It's definitely not a quantity counter, it's also 0 if you have more than 1....
No clue - 3 bits - Don't know. Don't remember if changing these did anything.
Small stat bit 1 - 1 bit - the first, and tied for the lowest-value, bit that determines the strength of the "stat boosted" effect from the first byte. These 5 bits are the real reason I wanted to make this post, because they confuse the hell out of me. For each stat, each combination of these five bits gives a different value, and that value never really makes much sense. For example, for STR, the bits 00111 give +85, and 10111 gives +100, but 11111 gives +25. Yes - a higher bit configuration gives a lower value. I don't know why. It does this for all stats except DEX and CRT, for which 11111 gives +624 (the source of TheByteSize's "DEX glitch"). Note that those bit configurations are little-endian - so, Small stat bit 1 comes first.
6th-8th bytes
Larger stat bits - 4 bits - see "small stat bit 1"s description
Status Power - 5 bits - values: 0-31 - Power of the Status Effect. The base game doesn't go above 30, but I never saw an immediate reason why 31 wouldn't function properly.
Miscellaneous Power - 5 bits - values: 0-31 - Power of the Miscellaneous effect. Again, base game doesn't go above 30, but 31 should work.
Enhance Limit - 6 bits - values: 0-63 - Number of forges remaining at Liz's shop for this weapon before it needs to be restored. 2^6 is 64, so the acceptable values are 0-63, which is why the maximum number is 63.
Enhance Level - 4 bits - values: 0-15 - The weapon modifier value. Directly increases the Damage value of the weapon. Like the Enhance Limit, cannot go higher than 15 because 2^4 is 16 so there's no place to store a bit to allow the value to go higher.
I put this info together using the equipment editor in the table provided by TheByteSize in
this post. The screenshot above is from my table, but it's messy and I've given all the info needed to recreate it if someone wants to. I might upload it at some point if anyone still plays this game.