While playing this game, I stumbled upon a glitch. So I TAS'd all the way to that point, but it froze the game. =/
Would this glitch lead to something useful?
.vbm
Edit:
To make finding discoveries easier:
Every map from the game with labels on items:
https://drive.google.com/folderview?id=0B-2O13fpsnI4aWNBZzlxYUtOa1E&usp=sharing
Spreadsheets for cards, combinations, locations, etc
https://docs.google.com/spreadsheets/d/1JqcTqljPon_bStQe32S7LKRxshu37ZybB74w_6WKxuE/edit?usp=sharing
Edit2: For testing purposes, a script that automatically unlocks all cards and combos
Download Cards.luaLanguage: lua
--Get all cards
for i = 0x650A, 0x656E, 1 do
memory.writebyte(i,9,"WRAM")
end
--Get all combos
for i = 0x6570, 0x6575, 1 do
memory.writebyte(i,0xFF,"WRAM")
end
memory.writebyte(0x6576,7,"WRAM")
Just run it once, and it will give all cards x 9 + combinations
Display script
Download Display.luaLanguage: lua
memory.usememorydomain("System Bus")
local Boss = {'Malfoy','Giant Rat v2','Troll','Ogre','Purple Rabbit','Chickens','Rook','Knight Piece','Knight Piece 2','Devils Snare','Quirrell','Voldermort','Giant Rat','Knight','Easy XP'}
local Monster1 = {HP=0xC4B8,X=0xC46A,Y=0xC46D}
local Monster2 = {HP=0xC55A,X=0xC50C,Y=0xC50F}
local Monster3 = {HP=0xC5FC,X=0xC5AE,Y=0xC5B1}
--[[
Monsters in battle are offset 0xA2 of each other
0xC4B8,0xC55A,0xC5FC is HP
0xC46A,0xC50C,0xC5AE is X
0xC46D,0xC50F,0xC5B1 is Y
0xC48A,0xC52C,0xC5CE is Sprite (not ID!)
This is needed since they technically don't have a "fixed" location; monster 1 can appear in top middle or bottom.
All little endian
]]--
local list = {Monster1,Monster2,Monster3}
while true do
local state = memory.readbyte(0xFFD2)
if state%128 >= 25 and state%128 <= 33 then
gui.drawText(0,0,'State: '..state%128,null,null,10,null,null) --Game state for debugging
--Coords only make sense if x1 window size or drawText at the moment
gui.drawText(memory.read_s16_le(Monster1.X),memory.read_s16_le(Monster1.Y),memory.read_s16_le(Monster1.HP),null,null,10,null,null)
gui.drawText(memory.read_s16_le(Monster2.X),memory.read_s16_le(Monster2.Y),memory.read_s16_le(Monster2.HP),null,null,10,null,null)
gui.drawText(memory.read_s16_le(Monster3.X),memory.read_s16_le(Monster3.Y),memory.read_s16_le(Monster3.HP),null,null,10,null,null)
else
gui.drawText(0, 0, 'X: '..memory.read_s16_le(0xCD30)..' Y: '..memory.read_s16_le(0xCD32),null,null,10,null,null)
gui.drawText(0,60, 'Msg: '..memory.readbyte(0xCD12),null,null,10,null,null) -- The player cannot press A to continue until the countdown is finished.
if Boss[memory.readbyte(0xEC05)] ~= nil then
gui.drawText(0,75, 'Boss: '..Boss[memory.readbyte(0xEC05)]..'('..memory.readbyte(0xEC05)..')',null,null,10,null,null)
gui.drawText(0,90,'State: '..memory.readbyte(0xFFD2)%128,null,null,10,null,null) --Game state for debugging
else
gui.drawText(0,75,'State: '..memory.readbyte(0xFFD2)%128,null,null,10,null,null) --Game state for debugging
end
end
--
--[[ Game state for battles:
25 - Battle transit (includes using cards)
26 - Your turn
28 - Spells
29 - Items
30 - Item used
31 - Flee
32 - Enemy attacks
33 - Select enemies and attack
34 - Win screen
42 - Cards (same if you use not in battle)
end]]--
emu.frameadvance()
end
Edit: Enemy HP and stats are mirrored multiple times on WRAM and System Bus. It appears the ones in 0x541E, 0x5437, 0x5450 in WRAM are the ones that are responsible for HP (ie, editing them has an effect).