This page is only an old draft and will be updated and cleaned eventually.
Random Number Generator (RNG)
You can calculate the next RNG state with the following lua script.
function getNextRNG(lowRNG, upRNG)
local temp = upRNG + ((2^0x2 * upRNG) % 2^0x10)
lowRNG = lowRNG * 2 + math.floor(temp / 2^0x10) + upRNG + math.floor((lowRNG * 2 + math.floor(temp / 2^0x10)) / 2^0x10)
return lowRNG % 0x10000, temp % 0x10000 -- return RNG L, RNG U
|0x2063760||16-bit||RNG Lower 2 bytes|
|0x2063762||16-bit||RNG Upper 2 bytes|
A 16-bit value is passed to the function in register 0. The function then returns a value between 0 (inclusive) and the passed value (exclusive).
r0 = (r0 * lowRNG) >> 0x10 // lowRNG is after the calculation for the next state
Item Drop Test
Return address (r14): 0x020BB710
Passed Value: 0x2710 (10,000)
The item's drop rate is multiplied by the drop rate multiplier and stored in register 8 during the RNG execution. If the returned value is less than the value in register 8, the test is passed and the item is dropped. Else, the drop test is considered failed and continues to the next item in the table.
|0x207415C||32-bit||Current X Coordinate|
|0x2074160||32-bit||Current Y Coordinate|
Light Puck (Puck)
The Puck begins moving to the next partner two frames after the character holding the Puck (either character if the Puck is not in play) damages an enemy with a combo finisher. The value is set, when the Puck begins moving, to the base value of 89 and is reduced by 1 every frame until 0.
Upon turning 0 from traveling, the value becomes 1 the next frame and the pass is considered complete. The value becomes 0 afterwards. Attempting to change this value directly to 0 will cause the game to reset the value to the base value.
This value is signed. All negative values are treated like 1 and will turn to 0 on the next frame to complete the pass normally.
The Puck can only be held for a limited amount of time before disappearing from play. The value is reset, when passing the Puck, to the base value of 930 and reduced by 30 for every pass. This includes the pass the puck is created so maximum base value without clothes is 900. The value is reduced by 1 every frame until 0.
This value is signed. All negative values are treated like 1 and will turn to 0 on the next frame for the Puck to disappear from play normally.
This value is used the frame before a combo finisher by the character holding the Puck deals damage to determine the increase/decrease of the Puck's Damage Multiplier.
|Value/Max Value||Multiplier Change|
The Puck multiplies the damage dealt by a combo finisher if the character is currently holding it. The value is reset, when the Puck is created by the first pass, to the base value of 200. The value is then increased or decreased, when passing the Puck, based on the Puck Hold Time value. The value is a percentage so the value must be divided by 100 to get the true multiplier.
The minimum value is 200 (x2) and maximum is 500 (x5). Any values beyond this range will be set to the minimum (if under) or the maximum (if over). This value is signed and all negative values will be set to 200.
The Damage Multiplier applied to damage is after the increase or decrease. This must be noted because the Damage Multiplier in RAM is updated after the affected damage is dealt.
Useful Puck Addresses
All Puck addresses are stored in the Battle GUI Linked List except the following:
|0x23918CD||8-bit||Current Puck Pass Count|
A single address contains the current amount of Hit Points despite the two characters seeming to have their own Hit Point bars. The game only uses the current Hit Points. The damage received by the characters is only for graphical purposes and specific clothing abilities.
|0x23918B4||16-bit||Damage Received on Top Screen|
|0x23918B6||16-bit||Damage Received on Bottom Screen|
Drop Rate Multiplier (for Battles)
The Drop Rate Multiplier can be temporarily multiplied by the amount of chained battles. This value is moved to a new address after the chain is finalized for use in battle.
Item Drop Table
Each enemy has an item drop table containing one item and drop rate for each difficulty. Starting at the item for the current difficulty, a drop test is executed. If the test is successful, the item is dropped. If the test is unsuccessful, the game moves down a difficulty and tries again. If the game reaches the end of the enemy's drop table without dropping an item, no item is dropped.
|0x2071D24||16-bit||Drop Rate Multiplier|
|0x2391872||16-bit||Drop Rate Multiplier for Battle(s)|
Battle Field Object/GUI Linked Lists
All GUI elements and Field Objects are stored within Linked Lists during battles.
Known heads and tails of these linked lists are listed below:
|Head Address||Tail Address||Description|
|0x235406C||0x235408C||Field Objects, Bottom Screen|
|0x235C0F8||0x235C118||Field Objects, Top Screen|
This is used by all following structs, which are extended from this struct.
0x08 maybe be used to point to where the assets for the object are located.
0x51342403 if Valid Object
|0x04||32-bit||Pointer to Data Name|
|0x08||32-bit||Size of Object|
|0x0C||32-bit||End of List if 0xFFFFFFFF|
Additional Objects if 0x0
|0x10||32-bit||Pointer to Head if Tail|
|0x14||32-bit||Pointer to Tail if Head|
|0x18||32-bit||Pointer to Next Object|
|0x1C||32-bit||Pointer to Previous Object|
Puck Data Struct
Found in the GUI Linked List.
This is available when a partner is present. This struct contains a preallocated linked list which is consistent enough for the following addresses to be static.
The value of 0x08 is usually 0x7E0.
Random 1: Set at beginning of battle. Unknown purpose
Rebootable Pin Struct
Found in the GUI Linked List.
This is used by most pins that are able to reboot.
The value of 0x08 is usually 0x2C0. Occasionally, a newly created GUI Object would share this value during battle.
Not set until after a boot
|0x68||16-bit||Boot Time Left|
0x0 if never booted yet
0xFFFF after a complete boot
Found in the Field Object Linked List.
This is used by all enemies.
|0x98||32-bit||Pointer to Mirrored Enemy|
Found in the Field Object Linked List.
This is used by Item Drops that float to a character and is collected.
|0x8C||16-bit||Prize Collect Time|
Collect Prize on 0
Static enemy data
You can find the starting address of an enemy's data at 0x20E0E24 + (0x2670 * Enemy Id). The enemy id is their noise report number minus one.
|0x2C||16-bit||Item Id for the "Easy Drop"|
|0x2E||16-bit||Item Id for the "Normal Drop"|
|0x30||16-bit||Item Id for the "Hard Drop"|
|0x32||16-bit||Item Id for the "Ultimate Drop"|
|0x34||16-bit||Drop rate for the "Easy Drop"|
|0x36||16-bit||Drop rate for the "Normal Drop"|
|0x38||16-bit||Drop rate for the "Hard Drop"|
|0x3A||16-bit||Drop rate for the "Ultimate Drop"|
Other Useful Addresses
|0x2066A44||32-bit||Total Session Time (In frames)|
0 = Easy
1 = Normal
2 = Hard
3 = Ultimate
0 = Manual
1 = Slow
2 = Mid
3 = Fast
|0x2071D29.4||2-bit||Current Pin Deck|
0 = Deck 1
1 = Deck 2
2 = Deck 3
3 = Deck 4
|0x2071D29.6||1-bit||Quick Buy Items|
|0x2071D29.7||1-bit||Quick Sell Pins|
|0x2073AA4||32-bit||Gameplay Time (In frames)|
|0x2074E7C||8-bit||Current Level (Max)|
|0x2074E80||16-bit||Xp until Next Level|
|0x2074E98||32-bit||Battle Time (In frames)|
|0x23A22D4||8-bit||Current Level (Reduced)|