Scripting ‐ Resident Evil Code Veronica - biorand/biohazard-utils GitHub Wiki
Scripting - Resident Evil Code Veronica
Instructions
0x00: end(u8)
Exits the current routine.
0x01: if(u8 endif_offset)
Begins an IF statement. endif_offset
should be the offset of the next instruction to execute if the following conditions fail subtracted by the next instruction's offset.
E.g.
0158: 01 18 (if)
015A: 04 0A 17 00 0B 00 (condition)
0160: 05 0A 1B 00 00 00
0166: 08 08 0C 00
016A: 05 0A 17 00 0B 01
0170: 03 00 (endif)
0172: 02 0C
0x03: endif(u8)
Usually at the end of an IF statement.
0x04: ck(u8 group, u16 index, u8 unknown2, u8 value)
Condition that comes after an IF statement.
0x05: set(u8 group, u16 index, u8 unknown2, u8 value)
05 0A 1B 00 00 00
- Begin inventory for pickup05 0A 17 00 0B 01
- End inventory for pickup
0x08: set_item_pickup(u8 unknown, u16 type)
Gives player an item of the given type. Unknown is usually 0x08.
0x0D: enemy_set_global_flag(u8 item_id, u16 flag)
Sets the global flag for an enemy that states whether it has been killed or not. If an enemy has no global flag set for it, it will respawn next time you reload the room.
0x0E: item_set_global_flag(u8 item_id, u16 flag, u16 unknown)
Sets the global flag for an item that states whether it has been picked up or not. If an item has no global flag set for it, you will be able to pick up the item unlimited times.
0x20: derender_players(u8 pad)
0x3A:
???? is used in battle mode no visible change - probably setup game mode or flag someway.
0x40: Look at Target followed by 000000 for input target xyz cordenates.
0x95: play_bgm(u8 track)
Play BGM last 2 bits select song, range 00 to 78 hex for both discs.
0xCB: gas_setup(u8)
Albinoid gas trap setup - This single opcode sets up a 45 seconds timer and calls all the necessary effects and animations for the gas trap to work and kill claire after time runs up (very awesome in fact) you need to input this opcode in every room for it to start over again, if you only input this code in one room the time keep running even after you swap rooms.
0xCD: main_menu(u8)
Jump to main menu - good for a gameplay mod trial release, to be used in the following room you will swap, when you enter that room game will send you to main menu screen.
0xCE: set_first_person_view(u8)
Set first person view as soon you enter the room holding this opcode.- opcode to do the opposite still not found but i already think i know where to find it. (Cough.. the room whit the crane and box puzzle in airport...)
0xCF: battle_set_inventory(u8)
Set the battle game inventory for your actual character (the same opcode is used for all the characters since you can only play whit one character at time).
0xA0: map_screen(u8 time)
Cannot exit the map screen unless the opcode to cancel the force map screen is called or maybe a quantity of time in the next or following bits, not experimented whit this code at all to be honest.
0x65: disable_input(u8)
Diables player input exept menu callers, recover movement after exit the menu screens, if you wait too much before to enter any menu all inputs gets disbled permanently.
A100 Reduces health gradually while you are in the room, stops reaching danger status.
0xA2: render_lighter_flame(u8 body_part)
Renders lighter flame on:
- 0x00: claire right hand
- 0x01: claire left forearm
- 0x02: claire head
0xA3: attach_object(u8 id)
Attaches a room item to claire's feet.
0xA4: animation(u8 kind)
kind:
- 0x00 - Triggers climb up stairs animation.
- 0x10 - stuck claire visual body to 0,0,0, you can move around whit physical invisible body, permanent.
- 0x01 - step sound + claire turn around and walk if the next bits are modified, probably a "GOTO" opcode.
- 0x02 - same as 01 this continues until 05.
0xA6: play_bgm(u8)
Play BGM, select song 00-78
0xA7: play_bgm(u8)
Play BGM, select song 00-78
0xCB: countdown(u8 kind)
kind:
- 0x01: 5 minutes until detonation (really cool what happens if you wait till count finishes!)
- 0x02: 5 minutes until detonation + countdown voice last 10 seconds (really cool what happens if you wait till count finishes!)
Flags
Flag groups
- 03 - Enemy
- 04 - Item