This is still a thread, yo. Still working on updating the FF7 Crit Indicator script.
Language: lua
function generateCrit(luck, level, foelevel)
sum = mainmemory.read_u8(luck) + mainmemory.read_u8(level) - mainmemory.read_u8(foelevel)
div = math.floor(sum / 4)
return div
end
function generateRNG(addr1, addr2, addr3)
step1 = mainmemory.read_u8((addr2 + mainmemory.read_s32_le(addr3) + 1) % 8)
step2 = mainmemory.read_u8(addr1 + step1)
step3 = mainmemory.read_u8((addr2 + mainmemory.read_s32_le(addr3) + 2) % 8)
step4 = mainmemory.read_u8(addr1 + step3)
step5 = step4 * 256
step6 = step2 + step5
return math.floor((step6*99)/65535)+1
end
while true do
crit1 = generateCrit(0xf83f5, 0xf83e9, 0xf8589)
crit2 = generateCrit(0xf845d, 0xf8451, 0xf8589)
crit3 = generateCrit(0xf84c5, 0xf84b9, 0xf8589)
crit_rng = generateRNG(0x83084, 0x62e10, 0x62e18)
if crit1>=crit_rng then
gui.text(0,50,"Critical Hit from Character 1 on Monster A!")
else
gui.text(0,50,"")
end
if crit2>=crit_rng then
gui.text(0,60,"Critical Hit from Character 2!")
else
gui.text(0,60,"")
end
if crit3>=crit_rng then
gui.text(0,70,"Critical Hit from Character 3!")
else
gui.text(0,70,"")
end
gui.text(0,30,"Enemy 1 crit% = " .. crit1 .. " " .. crit2 .. " " ..crit3)
gui.text(0,40,"crit_rng = " .. crit_rng)
emu.frameadvance()
end
I've got some memory digging to do for the extensions I want to make (using character names instead of "Character 1," supporting multiple targets, ensuring that the addresses I do have are accurate...)