Advertisement
SerityW

Untitled

Oct 20th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.60 KB | None | 0 0
  1. --- === Leave Hooks near bottom, otherwise it can't detect the functions that will be declared afterwards
  2. -- always on
  3. local PersistentSceneHooks = {
  4.     { 0xC5050A, switchingBGMTrack },
  5.     { 0x43050A, switchingJingleTrack },
  6.     { 0xC20EE4, lockeAlwaysDualWield }, -- needed in combat, menu, field (cutscene auto-optimize)
  7. }
  8.  
  9. local SceneHooks = {
  10.     [GameScenes.Cinematic] = {
  11.    
  12.     },
  13.     [GameScenes.Field] = {
  14.         { 0xC081BE, readText }, -- overrides printing character
  15.         { 0xC031BE, function() setFieldBank(nil) end }, -- closing dialog box
  16.         { 0xC07FC7, function() setFieldBank(1) end }, -- reading from Field.bank 1
  17.         { 0xC0EE3B, function() setFieldBank(2) end }, -- reading from Field.bank 2
  18.         { 0xC0A3B1, updateDialogIndexAcc }, -- some more bank 1 stuff i dunno
  19.         { 0xC0A3F8, updateDialogIndexAcc }, -- bank 1
  20.         { 0xC0FF27, updateDialogIndexAcc }, -- bank 2
  21.         { 0xC08014, updateDialogIndexMapHeader }, -- reading map name for header
  22.         { 0xC08034, centerMapName },
  23.         { 0xC08453, fixEndOfLineChoppedOff },
  24.         { 0xC04E24, checkPermaSprint, allowToggleSprint },
  25.         { 0xC04E31, adjustPermaSprint, allowToggleSprint },
  26.     },
  27.     [GameScenes.Battle] = {
  28.         { 0xC16698, fixBattleEidolonName }, -- overrides the eidolon text string as its being read
  29.         { 0xC196F9, handleEnemySpecialName },
  30.         { 0xC19674, configBattleText }, -- (event) display text at bottom
  31.         { 0xC196BF, configBattleText }, -- (event) display text at top as part of bottom event (e.g. "Blizzard Fist!")
  32.         { 0xC197F2, function() startingToLoadTopBattleDialog(1) end }, -- enemy dialog
  33.         { 0xC198B8, function() startingToLoadTopBattleDialog(2) end }, -- system message
  34.         { 0x4E0B3A, battleFixTopItemName }, -- Used if you don't have an item (Quantity -> 1)
  35.         { 0x4E0BBB, battleFixTopItemName }, -- Used if you already have an item (Quantity -> 2+)
  36.     -- memory.registerexec(0x4E0ACE,battleFixTopItemName) -- ? unknown        
  37.         { 0xC1982B, concludeTopBattleDialog }, -- enemy dialog
  38.         { 0xC1981E, concludeTopBattleDialog }, -- system message
  39.         { 0xC219BF, handleSpell }, -- mmmmmmagic
  40.         { 0xC21DD1, handleSpell }, -- sketch and other stuff
  41.         { 0xC23691, handleSpell }, -- gp rain
  42.         { 0x476789, function() Combat.isBless = true end }, -- bless (it is read as Magic:Psychic Waves by game, so we'll do a little tweak here..)
  43.     -- memory.registerexec(0xc23300,function() handleEnemySpecial() end) -- enemy-unique custom moves --
  44.         { 0xC196AD, function() Combat.line = nil end }, -- (event) close text at bottom? (called a LOT on close. could be closing box anim)
  45.         { 0xc15DCA, overrideBattleText }, -- immediately checks for 0 and bails if it is x_x
  46.         { 0xC15FFC, overrideBattleText }, -- processing for item multibyte / compare func, can be a'd?
  47.         { 0xC15E90, overrideBattleText }, -- processing for character multibyte / may be a'd at /5E95?
  48.         { 0xC15F9A, overrideBattleText }, -- processing for spell multibyte / compare func, can be a'd?
  49.         { 0xC15EBC, updateBattleChar }, -- character
  50.         { 0xC15F16, updateBattleChar }, -- attack [special attacks skean and up]
  51.         { 0xC15FC1, updateBattleChar }, -- esper
  52.         { 0xC15FEB, updateBattleChar }, -- spell
  53.         { 0xC16023, updateBattleChar }, -- item
  54.         { 0xC16221, combatVWFHandler },
  55.         { 0x4E01BD, fix256left },
  56.         { 0x4E01C2, fix256right },
  57.         { 0xC184D3, displayBattleRageEffect, displayBattleRage },
  58.         { 0xC18599, displayBattleDanceEffect, displayBattleDance },
  59.         { 0xC2BD5D, overrideDefaultBattleMusic, allowSpecifyBattleBGM or fixColiseumMusic },
  60.         { 0xC20CE1, lockePartialDefensePiercing },
  61.         { 0xC16D54, cheatStealPreview, allowCheats and cheatEnableStealPreview }, -- idk somewhere in the 'hover over a monster' code. i wasn't super picky    
  62.        
  63.     },
  64.     [GameScenes.Menu] = {
  65.         { 0xC301CA, doItemDesc },
  66.         { 0xC3909A, fixItemElementText },
  67.         { 0xC3B0C6, incIaidoCounter },
  68.         { 0xC3B0CC, fixMenuIaidoNames },
  69.         { 0xC35D9D, storeItemID },
  70.         { 0xC35DA2, handleGuiItemDescription },
  71.         { 0xC38A84, doColiseumBetUI }, -- part of the 'display number' code, technically shouldn't display number in this situation but whatever.
  72.         { 0xC366E9, writeAchievementStatus },
  73.         { 0xC3BE42, displayRandomSongHint, allowRandomBGMPlayer or allowSpecifyBattleBGM },
  74.         { 0xC3BE4A, randomSong, allowRandomBGMPlayer },
  75.         { 0xC0DE7D, fix256Sort },
  76.         { 0xC32366, drawToggleSprintOption },
  77.         { 0xC3968E, putEidolonInReviewMenu, displayEidolonOnAllEquipmentMenu }, -- 0xC3968B wipes BG3 so we have to do it afterwards
  78.         { 0xC3A828, sortRelicsToEquipByName, sortRelicsByName },
  79.         { 0xC3A090, sortGearToEquipWeaponsFirst, sortGearByWeaponsFirst },
  80.         { 0xC35BB0, displayEidolonProgress, showEidolonProgress }, -- when about to end esper name string
  81.         { 0xC35BC7, displayEidolonProgress, showEidolonProgress }, -- when about to end no-esper name string
  82.         { 0xC30CEF, mainMenuEidolonProgress, showEidolonProgressOnMainMenu }, -- immediately after lv draw function
  83.         { 0xC326F8, itemSortFavoritesFirst, allowItemFavorites },
  84.         { 0xC322A4, statusMenuSustain }, -- sustain for status window ("B" check) - balance tweaks
  85.     },
  86.     [GameScenes.WorldFlight] = {
  87.         { 0xEE6EEB, cheatDeathgazeFinder, allowCheats and cheatEnableShowDeathgaze } -- called during the 'pressing A?' check of the dg check airship flight code
  88.     },
  89.     [GameScenes.World] = {
  90.    
  91.     },
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement