Heh, I'm fine even if it isn't in hex format. Fact is, you got a bunch of numbers for me to crunch through, so I went and processed them. Even if you recorded them as cats, flying spaceships, negative Q, etc, I'd still be able to process them (
and wonder what in the world made you record them as such), so long as equal entries were given the same keywords, and I knew the relative values of each keyword, like ninja > flying spaceship or something.
I've also launched my plan to implement the master table (
after the above processing) in the mutant growth. It should be
absolutely precise in identifying the basic growth types and what abilities show up, and
mostly precise in finding the exact numbers for growth and where the ability is placed.
So basically... My masterful code, it
lives!! I trust that you can break it several dozen times on your next stroll through a (
monster-infested) park.
local range= 16
local SuperRNGTable={
0x3C,0x97,0x97,0x8B,0x13,0xE0,0x4F,0x93,0x69,0xA9,0xB5,0x1C,0xBA,0x0D,0x9C,0xD7,
0x9C,0xB5,0x06,0x4F,0x71,0xFE,0xED,0x46,0xCB,0xC6,0xA4,0xC2,0x57,0x10,0xBE,0x45,
0xFA,0xD7,0xA4,0xCB,0xD3,0xDC,0x6F,0xD5,0xD3,0xE9,0x08,0x5C,0x04,0x31,0x20,0x97,
0xA2,0xF7,0xB5,0x10,0xCB,0xBE,0x2D,0x09,0x71,0xF5,0x97,0x82,0x64,0x4F,0x7F,0x82,
0x42,0xE6,0x17,0xF1,0x69,0x9C,0xCF,0xE9,0x13,0xD5,0xC6,0x9C,0xC4,0x71,0xE0,0x57,
0x1C,0xC6,0x87,0x2D,0x0B,0x7E,0x8F,0x35,0x4B,0xB5,0x24,0x42,0xD7,0x91,0x40,0xC4,
0x7A,0xA4,0xD7,0xB1,0x53,0x5E,0x0F,0xA9,0xA9,0x93,0x75,0xDC,0x7A,0xB1,0x5E,0x1A,
0xDC,0x86,0x35,0x6D,0xB3,0x3E,0xAD,0x75,0xF1,0x75,0xE6,0x02,0x1A,0xCF,0xFE,0xFA,
0xC2,0x64,0x64,0x71,0xE9,0x1C,0xAD,0x69,0x93,0x53,0x46,0xE0,0x42,0xF1,0x60,0x24,
0x63,0x46,0xF7,0xAD,0x8B,0x00,0x10,0xB5,0x31,0x35,0x57,0x3C,0xA4,0xED,0x3E,0xBA,
0x02,0x24,0x57,0x31,0x2B,0x20,0x8F,0x29,0x2B,0x15,0xF7,0xA2,0xFA,0xCB,0xDC,0x64,
0x5C,0x06,0x46,0xED,0x31,0x40,0xCF,0xF5,0x8B,0x09,0x64,0x7A,0x97,0xAD,0x80,0x7A,
0xBA,0x17,0xE6,0x0D,0x93,0x60,0x2D,0x15,0xE9,0x29,0x35,0x60,0x3A,0x8B,0x1C,0xA4,
0xE0,0x35,0x75,0xCF,0xF1,0x80,0x6F,0xC6,0xB3,0x46,0xD7,0xBA,0x24,0x6D,0xBE,0x3A,
0x82,0x57,0x24,0x4D,0xA9,0xA0,0xED,0x53,0x53,0x69,0x87,0x20,0x82,0x4D,0xA0,0xE5,
0x23,0x75,0xC6,0x91,0x4B,0xBE,0x4F,0x87,0x0B,0x87,0x17,0xFA,0xE4,0x2D,0x00,0x05
}
local mutRNG= {}
local mutAddr= {0xC30B,0xC34B,0xC309,0xC36F,0xC30E}
local mutName= {"main","plus","HP" ,"pos" ,"shfl"}
--*****************************************************************************
local function RefreshMutantRNG()
--*****************************************************************************
local T= false
for i= 1, #mutAddr do
local val= memory.readbyte(mutAddr[i])
T= T or (val ~= mutRNG[mutName[i]]) -- I'm searching for any change
mutRNG[mutName[i]]= val
end
return T
end
-- After calling the above function, I can refer to the following:
-- mutRNG.main Main mutant RNG. Determines what we get.
-- mutRNG.plus For what ability and most stat growths
-- mutRNG.HP Specifically for HP growth
-- mutRNG.pos Picks what slot an ability goes into
-- mutRNG.shfl For the Uses Shuffler
local AbilityList={
"ESP", "BARRIER","FORSEEN","ELECTRO",
"STENCH", "FLAME", "MIRROR 10","ARMOR",
"ICE", "STEALTH","KINESIS","THUNDER",
"POWER", "HEAL", "GAS", "xFIRE",
"oFIRE", "BURNING","SL-GAZE","TELEPOR",
"P-FANGS","HYPNOS", "LEECH", "P-BLAST",
"oPAR/WP","MIRROR 3","GAZE(s)","GAZE(c)",
"QUAKE", "GAZE(d)","oDAMAGE","oCHANGE",
}
--*****************************************************************************
local function Inc(A) return (A%256)+1 end
--*****************************************************************************
--*****************************************************************************
local function GenRange(R,D)
--*****************************************************************************
-- Returns an integer from 0 to D.
-- Might be imprecise. If so, we'll come up with something different!
return math.floor((SuperRNGTable[R]*(D)/255)+.5)
end
local MutantTable={}
--*****************************************************************************
local function CompleteMutantGrowth()
--*****************************************************************************
if not RefreshMutantRNG() then return end
local main= mutRNG.main
local plus= mutRNG.plus
local HP = mutRNG.HP
local pos = mutRNG.pos
local shfl= mutRNG.shfl
for i= 1, range do -- range is set at top of file
main= Inc(main)
local Str= ""
local test= SuperRNGTable[main]
if test <= 34 then -- Ability
Str= "AB "
pos= Inc(pos)
Str= Str .. GenRange(pos,3)+1
local AB= 1
while true do
plus= Inc(plus)
if SuperRNGTable[plus] >= 0xE5 then break end
AB= (AB%32)+1
end
Str= Str .. " " .. AbilityList[AB]
elseif test <= 68 then -- HP
HP= Inc(HP)
Str= "hp+" .. GenRange(HP,5)+10
elseif test <= 98 then -- Mana
plus= Inc(plus)
Str= "mn+" .. GenRange(plus,4)+1
elseif test <= 116 then -- Agility
plus= Inc(plus)
Str= "ag+" .. GenRange(plus,4)+1
elseif test <= 134 then -- Strength
plus= Inc(plus)
Str= "st+" .. GenRange(plus,4)+1
elseif test <= 142 then -- Defense
plus= Inc(plus)
Str= "df+" .. GenRange(plus,2)+1
elseif test <= 146 then -- Shuffle uses
Str= "!!"
-- ... Uh, To Be Determined...
else -- No effect
Str= "__"
end
MutantTable[i]= Str
end
end
local function Disp()
for i= 1, range do
gui.text(1, 9*i - 8 ,MutantTable[i])
end
end
gui.register(Disp)
while true do
CompleteMutantGrowth()
emu.frameadvance()
end
EDIT: Removed an erroneous -1 from my GenRange.
EDIT2: Updated SuperRNGTable