[FE8][c/EA] Str/Mag Split Rework (fix on Expand-Levelup-Screen, fit to CHAX)

FE8-CHAX-02
43

Source Code at here

a decomp-based, Skill-Lite style C-HAX builfile

Compare to existing Str/Mag patch on FE7U or SkillSystem-integrated version, this patch alse use Unit+0x3A byte as unit magic status, and BattleUnit+0x7F byte as level-up magic status change. the main progress of this rework are:

  • Fix on expand-levelup-screen:
    It can not be applied on existing str/mag patch to use expanded-screen. Although we can make a window on the screen, it still lies bugs when level up. Here we made it. BTW, it’s now able to expand to even more unit status up, such as Three House style unit’s charm or others. If you want to do so, read the source code inside Wizardry/CoreHacks/LevelUpRework/LevelUpScreen/src

  • Decomp-based and fit to Skill-Lite construction:
    Fit to core-support system of Skill-Lite, includeing Battle-to-Unit-Hook, Load-Unit-Hook and Modular-Level-Up, etc. BTW, all of these base supports are all re-writed in c based on decomp project.
    Expanded-modular-save has also been included.

  • Fix on Other bugs
    Including auto-level, check-cap, etc. I did not work on BattleSystem anymore, since both unit attack calc and weapon attack range will all be re-write on construction of Skill-System, so it’s pointless to spend too much time on these issues.

How to build this file

For Windows users( no idea how it works on mac…), you can simply assemble Main.event through EventAssembler, just refer to Ultimate Tutorial 2.0. Or, put FE8U clean rom named FE8U.gba in current folder, opne WSL or Msys2(which are inside DevKitPro) at this folder, and types sh MakeHack.sh quick, then you will get a FE8-CHAX.gba, which are our hacked rom.

For compiling Wizardry, you are recommended to refer to setup-tips on Skill-Lite:

  1. Type git submodule update --init --recursive to clone FE-CLib and FE-CLib-Decompatible repos in Tools/;

  2. Create a folder under Tools/ named EventAssembler (no space!) and put EA file and ColorzCore in this Tools/EventAssembler;

  3. Put lyn.exe at Tools/EventAssembler/Tools.

  4. Put a FE8U clean rom and open Msys2, type sh MakeHack.sh all

Main ideas on expand levelup screen

  1. For vanilla, gLevelUpStatsBase(start from 0x2020110, free up to 0x2020132) are used to store both unit base and unit status change on case of Anim-on. Here we just store status-up there, and unit base status are directly loaded from BattleUnit struct.

  2. TextHandle struct are not enough for expansion, so I use gStatScreen.texts[] for displaying level-up texts.

  3. Further reaserach can refer to my thread and my c-style study on level up screen.

System Structure

  • CoreSupport
    • Battle Unit Hook
    • Load Unit Hook
    • Expanded Modular Save
  • CoreHacks
    • Modular Status Getter
    • Status Screen
      • Draw Pages (Page Unit)
      • Help Box (Page Unit)
    • Level Up Rework
      • ModLU: CheckBattleUnitLevelUp
      • Level up Screen
      • Promotion: ApplyUnitPromotion/ promo-diff
      • Auto Level (add unit mag auto-level)
      • Check Cap (add check cap for unit mag level up)
      • Growth Getter
    • Str/Mag Split core
      • combat (not change this file)
      • Misc Getter (get class mag cap, get unit mag growth, etc)
      • SRAM functions for Mod-Exp-Save
      • Other HookList functions

Issues

  1. There are problems on class name change process when promoting, currently no idea to fix.

To do

  1. Magic Booster
  2. Magic Sword rework
  3. Weapon bonus of unit mag-status

Credits

14 Likes

How’s the code for the level up screen? Is there a version that swaps con for mag instead of extending the screen?

I did not work on non-expansion version, since there seems to be not any bugs in existing patch integrated in SkillSystem.
Levelup screen hack is in Wizardry/CoreHacks/LevelupRework/LevelUpScreen

1 Like

Download the folder from Github. If using FeBuilder, choose one of the advanced options in the bottom left corner called “insert EA,” then select the “Main.event” from the folder.