Rance IV:Notes

This is a Notes page for Rance IV. It is intended to document information useful to programmers and data-miners.

Variable Lists
VAR0292: Floor VAR0293: Room ID VAR0383: Player map icon x-coord VAR0384: Player map icon y-coord VAR0372: North room ID VAR0373: East room ID VAR0374: South room ID VAR0375: West room ID VAR0376: North special event VAR0377: South special event

Character IDs 1 Rance 2 Sill 3 Io 4  Merim 5 Rick 6 Leila 7 Julia 8 Kanami 9 Maria 10 Shizuka 11 Athena 2.0 12 Hubert 13 Freak

Auto-Combat Overview
Auto-combat is determined by the status of the variable VAR0617, which is loaded into memory when a character's turn begins. If VAR0617 is 0, a character is manually controlled. Auto-combat begins in FIGHT_EX.adv, ln3764, which a decompile (based on the English patch and not the fan-patch) calls *lbl6ED3. The character's stats are displayed, there is a short delay, and then the AI begins. If a character is full auto (VAR0617==1), the code proceeds down a different branch, ln3797 to ln4215. All branches of this code end with jumps to other parts of the code, so ln4216 can only be reached by characters with VAR0617==2, Special Auto.

Special auto rolls a random number from 1-100. If the number is 1-39 (39% chance), then the player-selected, special auto attack #1 is selected. If the number is 40-69 (30% chance), special attack #2 is selected. 70-89 (20%): special attack #3; 90-100 (11%): special attack #4. Attack IDs are stored in VARs 0164-0167. There are no convenient lists of the attack IDs, so they can only be found by exploring the special auto setup menu code, such as in FIGHT_SS.adv ln510 and below.

If the chosen attack is "Rest" (attack id 200) or "Attack" (attack id 0), it will be processed immediately and directly (lbl9398 or lbl948B respectively). If not, the game will check the attack's cooldown. A character's four available special attacks are stored in VARs 0156, 0158, 0160, and 0162, and the adjoining numbers are the cooldown timers, ie the attack in VAR0156 has its cooldown timer in VAR0157, 0158 in 0159, and so on (note that these variables seem to be used for other purposes in other parts of the code). If the cooldown timer is higher than 0, the character will use "Attack," instead. If this does not happen, the game processes the command. As an error catch, the code will then send any character that made it past all the above checks to the "Attack" command.