-- For use with SNES9X-RR (File => Lua Scripting) and FF6 T-Edition -- * Save this text file somewhere as a .lua file -- * Read the instructions below, edit the priorityOrder, -- then load this Lua while running T-Edition -- * File > New Lua Window > run this script -- * It will create inside this .lua file's folder -- * You can then close this Lua window --[[ For player customization * Specify rages (by EXACT name) in the order you want at the top of your rage list * Any rages not listed here will be subject to the normal order * Place rage names in "quote marks" separated by ,commas, using exact names. * Spacing and line breaks are unimportant between entries, but putting two per line can help keep it organized * If you don't want any then set this to { } * If you want some set it like this: EXAMPLE ONLY! | local priorityOrderNames = { DO NOT CHANGE THESE | "Thor", "Cheshire", CHANGE THE BELOW | "Rudra", "SnwPanth", | } A full list of exact rage names/effects is provided a little further below, for your reference. If successful, you will get a "Prioritized" message when running the Lua. --]] local priorityOrderNames = { } --[[ * Full list of rages and their effects are as follows. * Place names from the left column within the {} brackets above to customize your rage order. * Note that "B.Lamia" will show up as "LamiaQen" in-game (as will the other LamiaQen), but will still have the effect displayed here. Aepyorni Special 'Bone Powder' [Inflict Poison] Al Jabr Thundaga Alacran Special 'Paralyze Needle' [Inflict Stop] AlurRide Death Sentence Amduscia Slowga AnglWhis Gravity Anguifor Aqua Breath Ankheg Magnitude 8 Antares Poison Apocryph Level 4 Hold ArmrdWpn Mustard Bomb B.Lamia Level 2 Holy Baalzeph Blizzaga Balloon Self-Destruct Basilisk Break Behemoth Special 'Knockdown' [Deal 3x Damage] Belmodar 10,000 Volts Belzecue Gravity BkLizard Special 'Long Tongue' [Deal 2x Damage] Bld.Fang Drain BldDance Rasp BlkDragn Snowstorm BlkForce Ancient Prayer BloodBat Special 'Blood Suck' [Deal 1x Damage + HP Absorb] BlueFlan Special 'Slip Liquid' [Inflict Poison] Bogey Special 'Grrrrrr' [Deal 2x Damage] Bomb Special 'Small Explosion' [Deal 1.5x Damage] Bonnacon Acid Rain Borghese Holy Brachios Mighty Guard Brainpan 1000 Needles BrnCandy Special 'Sleep Sting' [Inflict Sleep] BrzeBest Blizzaga Bug Stop Cactuar 1000 Needles Cactus 1000 Needles Cartargr Special 'Poison Needle' [Inflict Poison] Cassie Bad Breath Chaser Plasma Cheshire Raccoon Chimera Aqua Breath ChipRabb Raise Chronos Special 'Dark Sword' [100% Deal 1x Damage + HP Absorb] Chs.Drgn Blizzaga CloudWth Death Cockatri Special 'Petrifying Beak' [Inflict Stone] Coco Confuse Coeurl Blaster Commande Break Coolness Wildfire Corporal Special 'Swing' [Deal 2x Damage] Corpse Thundaga Covert Wind Slash Crawler Step Mine Daedalus Diabolic Whistle Dante Special 'Crystal Lance' [Deal 3x Damage] DarkBehe Shadow Flare Darkside Blizzara DdlyHorr X-Zone Deathclw Special 'Death Claw' [Deal 2x Damage] Demiurok Special 'Digestive Juices' [Apply Slow] DemonKht Shockwave DesertSa Special 'Tail Strike' [Deal 1.5x Damage] Devil Thundaga DevilFst Wildfire Devourer Special 'Husk' [Deal 1.5x Damage] DiveEagl Shamshir Doberman Special 'Bite' [Deal 1.5x Damage] Domovoi Special 'Goblin Rush' [Deal 3x Damage] Don Special 'Tackle' [Deal 1.5x Damage] Dragon Revenge Blast DrgnFosl Sandstorm DrgnZomb Death Sentence Dropper Magic Hammer DsrtRabb Cura DsrtSaha Flood Dstroide Special 'Mighty Hit' [Deal 2.5x Damage] DthMachi Level ? Death DuelArmr Diffusion Laser ErthGurd Mighty Guard Exoray Poison Fog Face 1000 Needles Fafnir Step Mine Fawn Special 'Elf Dart' [Deal 2x Damage] Fem.Sold Special 'Smash' [Deal 1.5x Damage] FendDrgn Southern Cross Fidor Special 'Pounce' [Deal 2x Damage] FigaroLz Dischord FlameDog Firaga Fortis Confuser Gamma Diffusion Laser GardLedr Wind Slash Garm Special 'Hell Bite' [Deal 2.5x Damage] Gatlings 1000 Needles General Slow Ghost Thundara Gigantos Magnitude 8 Gigntoad Frog Song GlasyaLa Revenge Blast Goblin Special 'Goblin Punch' [Deal 2x Damage] Goetia Libra GoldBear Special 'Gouge' [Deal 2.5x Damage] Gorgias Special 'Gore' [Deal 2x Damage] Gorgimer Avalanche Graswyrm Berserk Grenade Fireball GrndBehe Meteo GrtMolbo Scourge GtMantis Wind Slash Guard Special 'Full Strength' [Deal 1.5x Damage] Haokah Special 'Teeth Shredder' [Deal 2.5x Damage] Harveste Haste Hedgehog Special 'Needle Launch' [100% Deal 1.5x Damage] HellRidr Special 'Silver Lance' [Deal 3x Damage] HilGigas Magnitude 8 HntHaund Special 'Throat Attack' [Deal 1.5x Damage] Hornet Special 'Iron Sting' [Deal 1.5x Damage] Hundlegs Quake HvyArmor Magitek Laser Illuyank 1,000,000 Volts Imp Thundaga Imp.Sold Fire ImpElite Protect InnoSent Poison Fog Intangir Comet Io Flare Star IronClaw Special 'Iron Claw' [Deal 2.5x Damage] Jam Wind Slash Joker Thundara Junk Magic Hammer Kamui Death Sentence KilrMnts Shrapnel Kum Kum Special 'Breakga' [100% Inflict Stone] Lamia Confuse LamiaQen Special 'Snuggle Up' [100% Deal 1x Damage + Inflict Muddle] LandGril Special 'Beetlejuice' [Inflict Berserk] Landworm Magnitude 8 LeafBunn Special 'Incisor' [Deal 1.5x Damage] LeechFrg Slowga LesLopro Fireball Lilith Special 'Melty Kiss' [100% Deal 1x Damage + Inflict Muddle] LivingDe Special 'Outcast Sword' [Deal 1x Damage + Inflict Poison] Lizard Break Lukhavi Blizzard Luminesc Special 'Backstab' [Deal 2.5x Damage] LunarWlf Break Lunatys Comet Lust Banisher Lycaon Special 'Scratch' [Deal 2.5x Damage] MTekArmr Magitek Laser MagicPot Curaga Mahadeva Scourge Maiden Holy Mandrago Sunbath Mandrake Poison MedsaChk Quake Megalodo Blizzard Mindflre Mind Blast Minity Night Misfit Life Shaver Misty Cura Molboro Bad Breath Mover Tornado MsVampir Drain MtlHitmn Dischord MtrDrive Phoenix Dance Mu Forest Bath Mugbear Special 'Jugular Scratch' [Deal 2.5x Damage] MuudSuud Southern Cross Mykale Meerkat Naughty Special 'Soft Tail' [Inflict Toad] Nautiloi Special 'Ink' [Inflict Blind] NeckHntr Toad Necroman Death Neochu Scourge NetlHopr Berserk NghtHawk Special 'Fatality Claw' [Deal 3.5x Damage] Ninja Leaf Swirl NkcEkans Quake NtWalker Drain NutEater Special 'Nut Throw' [Deal 1.5x Damage] Oceanus Magnitude 8 Ochu Special 'Tentacle' [Deal 1x Damage + Inflict Poison] OldDrago Firaga OniDashr Step Mine Onion Toad Ourobors Quake Outcast Life Shaver Outsider Flare Oversoul Wildfire Pandora Revenge Blast PeepEyes White Wind Phoebe Cure Pineappl Self-Destruct PiscoDmn Bio PlatDrgn Aeroga PlutoAmr Magitek Missile PoisnLch Bio Provoker Toad Punisher Thundaga PurpBava Bio Purusa Cliff Collapse Rafflesi Lullaby RedMarsh Fireball RockSlug Special 'Slime' [Apply Slow] Rudra White Wind SahagChf Special 'Triangle Kick' [Deal 1.5x Damage] Sahagin Special 'Kick' [Deal 1.5x Damage] Samurai Tachi: Dragon Satellit Shamshir Schmidt Mega Berserk Scorpion Poison Sergeant Reflect SkullEtr Flare SkyArmor Magitek Laser Slagworm Sandstorm Slug Aqua Breath SlvrLobo Special 'Tusk' [Deal 1.5x Damage] SnwPanth Snow Bunny Sorath Cave-In SoulEatr Special 'Soul Eater' [100% Deal 2.5x Damage] SoulFlre Mind Blast Spectre Fire Spitfire Absolute Zero Sprinter Aeroga St. Elmo Holy SteelBat Special 'Blood Suck' [Deal 1x Damage + HP Absorb] StrayCat Special 'Kitty Kick' [Deal 2.5x Damage] Stunner Special 'Filthy Incisor' [Inflict Poison] Templar Fira TestRidr Flash Rain Thor Thunder Call Tonberry Everyone's Grudge Trapper Level 3 Flare Twinscyt Shrapnel Tyranosa Galaxy Tzakmaqi Toad VampThrn Drain Vampyr Special 'Zombie Kiss' [Deal 1x Damage + Inflict Zombie] VectChim El Nino VectorHn Special 'Pounce' [Deal 1.5x Damage] VectorLy White Wind VeilDanc Blizzara Vennoben Poison Vivian Special 'Malboro Germs' [Deal 1.5x Damage] Weredrgn Death Wererat Poison WhtJello Blizzaga Wild Cat Special 'Kitty Punch' [Deal 2.5x Damage] Wizard Fira Wyvern Leaf Swirl YellowMo Special 'Gunk' [Apply Slow] Yojimbo Tachi: Tiger Zaghrem Berserk Zeveak Flash Rain --]] --[[ abandon all hope, ye who pass through here --]] --[[ really, turn back, there's nothing for you beyond this point --]] --[[ well, i warned you --]] -- change these if necessary local offsetMonsterNames = 0xCFC400 local nameLength = 8 -- don't touch below unless necessary local offsetRageTable = 0xC26600 local monsterCount = 0x1FF -- idk why this is here it doesn't matter local rageCount = 0xFE -- last one is FF, leave at 1 less than rage count (since 0 is a rage) local rageTable = memory.readbyterange(offsetRageTable,rageCount) -- don't touch below local monsterNames = {} -- stores only names for sorting local monsterNameIDs = {} -- matches names to id so we can re-write the id order local textMap = { [0x60] = "A", [0x61] = "B", [0x62] = "C", [0x63] = "D", [0x64] = "E", [0x65] = "F", [0x66] = "G", [0x67] = "H", [0x68] = "I", [0x69] = "J", [0x6A] = "K", [0x6B] = "L", [0x6C] = "M", [0x6D] = "N", [0x6E] = "O", [0x6F] = "P", [0x70] = "Q", [0x71] = "R", [0x72] = "S", [0x73] = "T", [0x74] = "U", [0x75] = "V", [0x76] = "W", [0x77] = "X", [0x78] = "Y", [0x79] = "Z", [0x7A] = "a", [0x7B] = "b", [0x7C] = "c", [0x7D] = "d", [0x7E] = "e", [0x7F] = "f", [0x80] = "g", [0x81] = "h", [0x82] = "i", [0x83] = "j", [0x84] = "k", [0x85] = "l", [0x86] = "m", [0x87] = "n", [0x88] = "o", [0x89] = "p", [0x8A] = "q", [0x8B] = "r", [0x8C] = "s", [0x8D] = "t", [0x8E] = "u", [0x8F] = "v", [0x90] = "w", [0x91] = "x", [0x92] = "y", [0x93] = "z", [0x53] = "0", [0x54] = "1", [0x55] = "2", [0x56] = "3", [0x57] = "4", [0x58] = "5", [0x59] = "6", [0x5A] = "7", [0x5B] = "8", [0x5C] = "9", [0x94] = "!", [0x95] = "?", [0x97] = "'", [0x98] = "-", [0x99] = ".", [0xFF] = " ", } function translateString(t) local s = "" for i=1,#t do s = s .. (textMap[t[i]] or "?") end s = trim(s) return s end function trim(out) return (out:gsub("^%s*(.-)%s*$", "%1")) end local priorityOrder = {} for i,v in pairs(priorityOrderNames) do priorityOrder[i] = v end local priorityReverse = {} for i,v in pairs(priorityOrder) do priorityReverse[v] = i end for i=0,rageCount do local name = memory.readbyterange(offsetMonsterNames + (i*nameLength),nameLength) name = translateString(name) if (i == 0x88 and name == "LamiaQen") then name = "B.Lamia" end -- fix for lamia queen duplicate if (not priorityReverse[name]) then monsterNameIDs[name] = i monsterNames[#monsterNames + 1] = name else priorityOrder[priorityReverse[name]] = i end --print(string.format("%02x: %s",i,name)) -- uncomment to view each hex/name end table.sort(monsterNames) local hexMapOut = "" for i=1,#monsterNames do hexMapOut = hexMapOut .. string.format("%02x",monsterNameIDs[monsterNames[i]]) .. " " end if (#priorityOrder > 0) then print("If you get an error here, it means one of your monster names was invalid.") end for i=#priorityOrder,1,-1 do if (type(priorityOrder[i]) == "string") then print("Problematic custom monster: "..priorityOrder[i]) end hexMapOut = string.format("%02x",priorityOrder[i]) .. " " .. hexMapOut end if (#priorityOrder > 0) then print("-----------") end hexMapOut = hexMapOut .. "FF " -- drop in the tonberries/nonexistent one last hexMapOut = hexMapOut:upper() hexMapOut = trim(hexMapOut) function string.split(input, sep) sep = sep or "%s" local t = {} for str in string.gmatch(input, "([^"..sep.."]+)") do table.insert(t, str) end return t end local t = hexMapOut:split(" ") t[256] = nil local s = "" for i,v in pairs(t) do t[i] = tonumber(t[i],16) end s = string.char(unpack(t)) local offset = {} offsetRageTable = offsetRageTable - 0xC00000 offset[1] = bit.band(offsetRageTable,0xFF0000) / 0x10000 offset[2] = bit.band(offsetRageTable,0x00FF00) / 0x100 offset[3] = bit.band(offsetRageTable,0x0000FF) local length = rageCount + 1 length = { bit.band(length,0xFF00) / 0x100, bit.band(length,0x00FF) } s = "PATCH"..string.char(offset[1])..string.char(offset[2])..string.char(offset[3])..string.char(length[1])..string.char(length[2])..s.."EOF" file = io.open("ff6_t_rage_order.ips", "wb") file:write(s) file:close() --print(hexMapOut) --print("") --print(string.format("DEBUG INFO: Hex table inside ips shown above, replace at 0x%0x~0x%0x (ends in FF, 0x%0x should be 20).",offsetRageTable,(offsetRageTable + rageCount + 1),(offsetRageTable + rageCount + 2))) if (#priorityOrder > 0) then print("Prioritized the following: "..table.concat(priorityOrderNames,", ")) print("-----------") end print("* ff6_t_rage_order.ips saved to file, apply to rom to sort your rages!") print("\r\nNote: In English patch 2.9.1 there are two LamiaQen. One will be sorted in the Bs 'B.Lamia' and the other will be in the Ls 'LamiaQen', but both will say LamiaQen. This is not a bug with this script.")