FE6 SkillSystem Source Code at Here
Important update 2023.01.27
- Rewrite the total project to be compatible for fe6-decomp, including makefile and c files.
- Introduce linux-style config file to setup build options.
- By putting debug-text data to Free-SRAM-Space (
0x0E008000
), we can getFree-RAM-Space
withsize = 0x2028
, which is also defined in config file. - Save data has also been expanded, and BWL table has been free to use by disabling all BWL entry access.
- Add hooks to pre-battle-calc, unit status-getter, battle-2-unit-hook, chapter-init hook⦠for further hacking.
It is @MisakaMikoto that remind me working on FE6 may result in a more freely space control operation.
Based on FE6-Decomp and FE6-Wizardry work by genius @StanH , and refer to construction on FE8U-SkillSystem and SkillLite, I made this FE6 SkillSystem-proto.
Advantage on FE6:
-
Only 8MB occupied by Vanilla and result in a more flexible space control.
-
Succinct system without any check on Nightmare or eggs.
-
Scalability on system design with lots of free-space on item/unit/class attr and others.
Toturials & DOCs
1. Wizardry to-do list
FE6-SkillSys
βββ [β] skill-system
β βββ [β] skill infos
β βββ [β] skill infos
β βββ [β] skill stat-screen
β βββ [β] skill ROM list
β βββ [β] skill RAM list
β βββ [β] skill fast list
β
βββ [ ] status-getter
β βββ [β] modular status getter
β βββ [ ] mov & con getter
β
βββ [ ] battle-system
β βββ [β] battle-unit hook
β βββ [β] pre-battle calculation
β βββ [ ] battle order
β βββ [β] battle can-counter
β βββ [β] weapon tri-angle
β βββ [β] effective judgement
β βββ [ ] battle preview
β
βββ [ ] weapon range
β βββ [ ] weapon-range getter
β βββ [ ] draw-string
β βββ [ ] fill-map functions rework
β βββ [ ] check can cover range
β βββ [ ] staff range rework
β
βββ [β] chapter-based random-number system
β
βββ [ ] stat-screen
β βββ [β] UI rework
β βββ [ ] negative stat boosts UI
β
βββ [ ] str / mag split
β βββ [ ] combat hack
β βββ [ ] unit magic power getter
β βββ [ ] check cap
β βββ [ ] auto-level
β βββ [ ] level-up screen (map-anim)
β βββ [ ] level-up screen (banim)
β βββ [ ] magic booster item
β
βββ [ ] promotion list
β
βββ [ ] buff & debuff rework
β βββ [ ] unit-status rework
β βββ [ ] unit-status UI
β βββ [ ] HP bars
β
βββ [ ] item effect rework
β βββ [ ] bm effect
β βββ [ ] prep-screen effect
β
βββ [β] save-data
β βββ [β] expanded modular save
β βββ [β] null-bwl
β βββ [β] bwl-support
β
βββ [ ] combat-arts
β βββ [ ] combat-art infos
β βββ [ ] combat-art tester
β βββ [ ] combat-art prep-screen selection
β βββ [ ] combat-art battle-forcast selection
β
βββ [ ] prep-screen rework
β βββ [ ] prep-screen menu-items reorder
β βββ [ ] skill prep-screen selection
β βββ [ ] combat-art prep-screen selection
β
βββ [ ] combat anims
β βββ [ ] skill & combat-art activation animations
β βββ [ ] map banim item effects
β
βββ [β] unit-menu
βββ [β] unit-action
βββ [β] icon-rework
βββ [ ] popup-rework
βββ [β] load unit hook
βββ [β] game init hook
βββ [β] chapter init hook
βββ [ ] level-up rework
β βββ [ ] Switch & 3DS style level up
β βββ [ ] level-up hook
β βββ [ ] promotion hook
β βββ [ ] modular growth getter
β
βββ [ ] post-action procs
β
βββ [β] debug system
β βββ [β] fail-screen (by StanH)
β βββ [β] debug-text move to SRAM free-space
2. battle-system overview
DoCombatAction
βββ InitObstacleBattleUnit
βββ BattleGenerateReal
β βββ BattleGenerateRealInternal
β βββ InitBattleUnit ==> battle 2 unit hook
β βββ SetBattleUnitWeapon
β βββ BattleInitTargetCanCounter ==> check can counter
β βββ BattleApplyWeaponTriangleEffect ==> WTA bonus
β βββ BattleGenerate
β β βββ ComputeBattleUnitStats ==> pre battle calc
β β β βββ ...
β β β βββ ComputeBattleUnitAttack
β β β β βββ IsItemEffectiveAgainst ==> effective attack
β β β βββ ...
β β βββ ComputeBattleUnitEffectiveStats
β β βββ ComputeBattleObstacleStats
β β βββ BattleUnwind
β β βββ BattleGetFollowUpOrder
β β βββ BattleGenerateRoundHits
β β βββ GetBattleUnitHitCount
β β βββ BattleGenerateHit
β βββ BattleUnitTargetCheckCanCounter
βββ ProcScr_CombatAction
βββ BattleApplyGameStateUpdates
βββ BattleApplyUnitUpdates
βββ UpdateUnitFromBattle ==> battle 2 unit hook
3. How to add to expanded-modular-save
Suppose we need to save a 8 Bytes from 0x03000000 space in save data:
- Get into wizardry/save-data/src/ms-memmap.h, and define this size at the head of the file:
// wizardry/save-data/src/ms-memmap.h
#define MSA_SIZE_EXAMPLE 8
- Modify in
msa_memmap
:
-- MSA_MEMMAP_RSV = MSA_MEMMAP_UNIT + MSA_SIZE_UNIT,
++ MSA_MEMMAP_EXAMPLE = MSA_MEMMAP_UNIT + MSA_SIZE_UNIT,
++ MSA_MEMMAP_RSV = MSA_MEMMAP_EXAMPLE + MSA_SIZE_EXAMPLE,
- Get into wizardry/save-data/src/msa.c, and define the
.load
and.save
function:
// wizardry/save-data/src/msa.c
void MSA_SaveExample(u8 *dst, const u32 size)
{
if (size < MSA_SIZE_EXAMPLE)
ModSaveErrLog("MSA_SaveExample: size\n");
WriteAndVerifySramFast(
(u8 *)0x03000000,
dst + MSA_MEMMAP_EXAMPLE,
MSA_SIZE_EXAMPLE);
}
void MSA_LoadExample(u8 *src, const u32 size)
{
if (size < MSA_SIZE_EXAMPLE)
ModSaveErrLog("MSA_LoadExample: size\n");
ReadSramFast(
src + MSA_MEMMAP_EXAMPLE,
(u8 *)0x03000000,
MSA_SIZE_EXAMPLE);
}
- Add your save-chunk to
EmsChunkSa
:
// wizardry/save-data/src/msa.c
{
.off = MSA_MEMMAP_EXAMPLE,
.size = MSA_SIZE_EXAMPLE,
.save = MSA_SaveExample,
.load = MSA_LoadExample,
},
- Rebuild the project and test your rom
Try to start a new game. If the size or offset is overflow, the debug system (needCONFIG_USE_DEBUG_TEXT
defined) will show you the message.
More information can be gotten on readme of Git.