CON and MOV growth

Before asking, make sure to search! Press the :mag: in the upper right to search.

  • Hacking method: FEBuilder
  • Base Game: Fire Emblem 8

So, exactly as it says on the tin! I’ll start off saying that I’m a bit of an idiot, so basically any ASM will about go over my head. Any progress I’ve made is from stumbling around, previous knowledge from other methods of code and guesswork.

I’ve been playing around with and experimenting with adding growths for these two stats for a bit for fun so I probably won’t be too broken up if I can’t work it out. Apologies for any ramblings, not great with words.

I’ve changed around a few files and added the growth rates for the two and they fundamentally seem to work, they use the 0x46 and 0x47 unknowns in the battle data thing and they DO go up when levelling, were I to guess I’m just missing out how to actually tie it to the level up function.
For reference~


The Con (46) growth is 100, and the Move (47) growth is 255, so those two seem to line up properly, and they do seem to clear properly after the leveling is done.

If I’m missing any key info I’ll be sure to try to dig it but, as noted I’m a bit dumb.

Ah, while it may be obvious I should probably mention that I am using the things from the Skill System to do this.

The level up screen is complicated. Tequila expanded it for Mag, but I think it must have been a lot of work to do so, and would be a lot more work to add Con/Mov to the process of showing the +1 by the stat.

You can see what he did here ^
But making sense of it is another story.

1 Like

Oh! Seem to have missed that. We’ll have to seee if I can actually do anything with this, but from a glance probably not. Still, thank you!

Edit: Aye, as thought I couldn’t really understand a thing about that. Ah well.

Uhhhh… Have some time so may as well write up a bit on how I did this in case anyone else wanted to try and experiment and play around with it. Or what I remember anyways. Again, apologies for any incoherent ramblings. Likely pointless to put this here, but I like sharing knowledge, even if I’m a dumb.

Lots of rambling and stupid stumbling into 'explaining' the process I took.

Starting up, I’d used FEBuilder and installed the Skill System, simple enough, from there throughout testing imported a custom build via the Advanced Editors > Skill Custom Build. It’s apparently inefficient to do it this way, but I know nothing about buildfiles and stuff, so I can’t compare. For reference if you are unfamiliar, this is the skil system I initially used to customised (Well, a quite older version I’ve yet to update)
GitHub - FireEmblemUniverse/SkillSystem_FE8

Of course you’ll need the ASM-related stuff you also need to edit skills, but this is under the assumption you’ve already sorted through all of that.

Now to start the editing! In the Skill System main folder… EngineHacks > Necessary > GrowthGetters there are growth things, naturally! I just copied the ‘Get_Luk_Growth.s’ twice, one is replaces ‘Luk’ with ‘Con’, and the other with ‘Mov’, this is what both of those generally look like.

.thumb
.org 0x0

.equ ClassGrowthOption, Extra_Growth_Boosts+4

@r0=battle struct or char data ptr
ldr		r1,[r0]
add		r1,#35
ldrb	r1,[r1]		@con growth
ldr 	r2,ClassGrowthOption
cmp		r2,#0
beq		GetExtraGrowthBoost
ldr 	r2,[r0,#4]
add		r2,#34
ldrb	r2,[r2]
add 	r1,r2

GetExtraGrowthBoost:
mov		r2,#17		@index of misc boost
ldr		r3,Extra_Growth_Boosts
bx		r3

.align
Extra_Growth_Boosts:
@

Comparing that with the ‘Luk’ one, not too much different, the first ‘add’ bit replaces the #34 with #35, and the one lower down replaces the #33 with #34, then assuming you get what’s happening here, the ‘Mov’ file instead shifts up by +2 instead of +1, so the #35 would instead be #36. I’m not doubting there’ll be glitches somewhere doing this, but this is just fun experimentation, I’m not expecting it to be 100%, hehehe.

As for the #17 you see here, that was just so it didn’t conflict with the proper luck growth things, probably would’ve changed to like #37/38 instead.

Here’s where those two tie into in the Character editor for visual reference~

Then from there, drag your two .s files into the AssembleARM file that should be there, that’ll make .dmp files the skill system’ll actually read.

After the the ‘GrowthGetters.event’ file will have more Growth stuff don’t actually know what it does, but I assume it makes the game actually read the growths. Here you’ll just need to add the new growth files you made.

  //Growth Bonuses from skills are located in the GrowthSkills folder
  #include "GrowthBonuses/GrowthBonuses.event"

  
  ALIGN 4
  Growth_Bonus_CalcLoop:
  POIN BlossomGrowthModifier AptitudeGrowthModifier MetisTomeCheck ScrollsCheck
  WORD 0 //Terminator

  #ifndef USE_STRMAG_SPLIT
  ALIGN 4
  Growth_Getter_Table:
    POIN Get_Hp_Growth Get_Str_Growth Get_Skl_Growth Get_Spd_Growth Get_Luk_Growth Get_Def_Growth Get_Res_Growth Get_Con_Growth Get_Mov_Growth
  
  #else  //USE_STRMAG_SPLIT
    ALIGN 4
	Growth_Getter_Table:
	POIN Get_Hp_Growth Get_Str_Growth Get_Mag_Growth Get_Skl_Growth Get_Spd_Growth Get_Luk_Growth Get_Def_Growth Get_Res_Growth Get_Con_Growth Get_Mov_Growth
  
  #endif //USE_STRMAG_SPLIT

  ALIGN 4
  Get_Hp_Growth:
    #incbin "Get_Hp_Growth.dmp"
    POIN Extra_Growth_Boosts|1
	WORD USE_CHAR_AND_CLASS_GROWTHS

  ALIGN 4
  Get_Str_Growth:
    #incbin "Get_Str_Growth.dmp"
    POIN Extra_Growth_Boosts|1
	WORD USE_CHAR_AND_CLASS_GROWTHS

  #ifdef USE_STRMAG_SPLIT
  ALIGN 4
  Get_Mag_Growth:
	#incbin "Get_Mag_Growth.dmp"
	POIN Extra_Growth_Boosts|1
	POIN MagCharTable
	POIN MagClassTable
	WORD USE_CHAR_AND_CLASS_GROWTHS
  #endif
	
  ALIGN 4
  Get_Skl_Growth:
    #incbin "Get_Skl_Growth.dmp"
    POIN Extra_Growth_Boosts|1
	WORD USE_CHAR_AND_CLASS_GROWTHS

  ALIGN 4
  Get_Spd_Growth:
    #incbin "Get_Spd_Growth.dmp"
    POIN Extra_Growth_Boosts|1
	WORD USE_CHAR_AND_CLASS_GROWTHS

  ALIGN 4
  Get_Def_Growth:
    #incbin "Get_Def_Growth.dmp"
    POIN Extra_Growth_Boosts|1
	WORD USE_CHAR_AND_CLASS_GROWTHS

  ALIGN 4
  Get_Res_Growth:
    #incbin "Get_Res_Growth.dmp"
    POIN Extra_Growth_Boosts|1
	WORD USE_CHAR_AND_CLASS_GROWTHS

  ALIGN 4
  Get_Luk_Growth:
    #incbin "Get_Luk_Growth.dmp"
    POIN Extra_Growth_Boosts|1
	WORD USE_CHAR_AND_CLASS_GROWTHS

  ALIGN 4
  Get_Con_Growth:
    #incbin "Get_Con_Growth.dmp"
    POIN Extra_Growth_Boosts|1
	WORD USE_CHAR_AND_CLASS_GROWTHS

  ALIGN 4
  Get_Mov_Growth:
    #incbin "Get_Mov_Growth.dmp"
    POIN Extra_Growth_Boosts|1
	WORD USE_CHAR_AND_CLASS_GROWTHS
  
  ALIGN 4
  Extra_Growth_Boosts:
    #incbin "Extra_Growth_Boosts.dmp"
    WORD Growth_Options
	POIN Growth_Bonus_CalcLoop

Congrats, growth rates exist. Not that they actually do anything yet! You’ll need to do the first bit with Get_Luk/Con/Mov_Growth again later, but I’ll get to that.

I doubt this next bit is properly ‘necessary’ in itself, but it’s nice to just cover everything. I think this this all just for the menu stuff but it’s not impossible it somehow deals with actual growths. Back out from the ‘GrowthGetters’ and into the ‘ModularStatScreen’ folder, from there open the ‘ModularStatScreen.event’, near the bottom you’ll see the same growth stuff as right up there from the previous event file, just add th growths in there again and that’s it for here. Into the ‘asm’ folder, and the ‘Write_Growths_To_Battle_Struct.asm’ here.

At the top you’ll see a table of growth stuff, here’s what I did with it~

.thumb		@if you don't put this, the assembler assuming it's in ARM mode, which would be a Bad Thing
.org 0x0	@not necessary if 0, but I put it anyway out of habit

@setting up the literal pool
.equ Get_Hp_Growth, Class_Level_Cap_Table+4
.equ Get_Str_Growth, Class_Level_Cap_Table+8
.equ Get_Mag_Growth, Class_Level_Cap_Table+12 @ If strmag split isn't installed, this will be 0, and code inserted in here will do nothing.
.equ Get_Skl_Growth, Class_Level_Cap_Table+16
.equ Get_Spd_Growth, Class_Level_Cap_Table+20
.equ Get_Def_Growth, Class_Level_Cap_Table+24
.equ Get_Res_Growth, Class_Level_Cap_Table+28
.equ Get_Luk_Growth, Class_Level_Cap_Table+32
.equ Get_Con_Growth, Class_Level_Cap_Table+36
.equ Get_Mov_Growth, Class_Level_Cap_Table+40
.equ Growth_Options, Class_Level_Cap_Table+44

'Course that’s not all. Moving down you’ll find growth functions. The last of this group will be the Luk growth, I just copied the Res bit twice, changed the first copy to the Luk bit, then the second to Con and the existing Luk to Mov, like so.

ResGrowth:
ldr		r0,Get_Res_Growth
mov		r14,r0
mov		r0,r7
.short	0xF800
mov		r14,r6
.short	0xF800
mov		r1,r7
add		r1,#0x78
strb	r0,[r1]
add		r5,r0
cmp		r4,#0x0
beq		LukGrowth
cmp		r5,#0x0
beq		LukGrowth
b		CheckCaps

LukGrowth:
ldr		r0,Get_Luk_Growth
mov		r14,r0
mov		r0,r7
.short	0xF800
mov		r14,r6
.short	0xF800
mov		r1,r7
add		r1,#0x79
strb	r0,[r1]
add		r5,r0
cmp		r4,#0x0
beq		ConGrowth
cmp		r5,#0x0
beq		ConGrowth
b		CheckCaps

ConGrowth:
ldr		r0,Get_Con_Growth
mov		r14,r0
mov		r0,r7
.short	0xF800
mov		r14,r6
.short	0xF800
mov		r1,r7
add		r1,#0x46
strb	r0,[r1]
add		r5,r0
cmp		r4,#0x0
beq		MovGrowth
cmp		r5,#0x0
beq		MovGrowth
b		CheckCaps

MovGrowth:
ldr		r0,Get_Mov_Growth
mov		r14,r0
mov		r0,r7
.short	0xF800
mov		r14,r6
.short	0xF800
mov		r1,r7
add		r1,#0x47
strb	r0,[r1]
add		r5,r0
cmp		r5,#0x0
bne		CheckCapsLadder
cmp		r4,#0x0
bne		CheckCapsLadder
mov		r4,#0x1
b		HpGrowth

I’m going to take note of the ‘add’ function here as well, the Res one has #0x78, while Luk has #0x79, I changed the Con one to #0x46 and Mov to #0x47, both of these things are unknowns but apparently 0x46 is used for AI, while I assume there’ll be no actual conflict since actual statups are used for playables and not NPCs/Enemies if you want to change it to be safe 0x3B seems to also be unused, I hope.

Lower down there’ll be a second set of these growths for fixed growths, it’s near enough in how the previous were done, copy stuff, change names, change the IDs they read from. Aaaand that’s all I know from here, I assume the bottom pointers arehandy to know about, but y’know dumb so I don’t understand the data they point to at all. Save, drag the file to the ‘AssembleARM’ batch file again, and that’s that for this.

From here back out from those folders, instead into EngineHacks > ExternalHacks > StrMagSplit

Here you’ll see… GrowthGetters folder again! Just do the same stuff as was done the first time, simple! You might be able to just copy the previous files buuuut I dunno, maybe just redo stuff to be safe.

Back into the main StrMagSplit is the _MasterAsmInstaller.event file, you’ll near immediately see ‘//#define ExpandedLevelUpScreen’. Just remove the two slashes and that’s it, this’ll make the level up popup show CON and MOV.

Aaaand that’s as far I know/think I know so far. I won’t be surprised if this is all totally wrong, but it was fun to play with anyways.

Hmmmmm… May as well update with progress, maybe? Even if a tad pointless.
00Fire Emblem - the Sacred Stones - Copy.emulator.emulator.emulator
Progress! Now the stats go up… In the level up screen. It’s still not reflected in their actual stats (So Seth here still only has 11 CON/8 MOV despite what it says up there. Still, a step closer I s’pose!

I will note that I found Blademaster released his things for this stuff, so ordinarily that render what I’m doing totally moot. Oops. But for some reason that just made me double down on this, haha. I did end up using a few of his things as reference to make this progress, so thanks to him for that. Maybe I’ll actually be able to learn something for once.

Welp, it works now, neat.
l1l2

Thanks again Vesly for pointing me in the right direction as well as Blademaster’s work on it initially that I referenced the heck out of and uh. borrowed stuff from!

If there’s any interest in this I might just toss my custom skill system build since I don’t remember a bit of the process of the things that were changed since last time.

6 Likes

Just keep in mind that my version of the fix doesn’t work 100% when map animations are on. For whatever reason, that level up screen isn’t as straightforward to work with.

2 Likes

Aye, it’s a bit odd! But as long as it highlights when a change to a stat happens that should often be good enough, danke!

1 Like

Yeah you should share your build. Maybe it could be added as a skillsys config option

4 Likes

Not sure where else to put this, and github has never not confused the hell out of me with its inconveniences, but here~

Has a bunch of unfinished skills and stuff as well. To note which folders are the ones I’m certain are related to the new growths so you don’t have to search everywhere…

Summary

EngineHacks/ExternalHacks/StrMagSplit

_MasterAsmInstaller.event

EngineHacks/ExternalHacks/StrMagSplit/GrowthGetters (Basically everything in here)

EngineHacks/ExternalHacks/StrMagSplit/StrMagSplit/LevelUp

LevelUp.event
LevelUpCon.dmp
LevelUpCon.s
LevelUpMov.dmp
LevelUpMov.s
WriteGrowthtoRamAnimOn.dmp
WriteGrowthtoRamAnimOn.s

EngineHacks/Necessary/GrowthGetters (Basically everything here again)

EngineHacks/Necessary/ModularStatScreen

ModularStatScreen.event (Unsure if necessary)

EngineHacks/Necessary/ModularStatScreen/asm

Write_Growths_To_Battle_Struct.asm
Write_Growths_To_Battle_Struct.dmp

1 Like

Seems after testing more that there is a very annoying issue of the two stats going up for other characters that weren’t the ones who leveled the two stats. …It seems they’re going up at random, but I’m likely just not seeing the pattern here if so. Well, that’s annoying. Back to pawing at it I guess.

1 Like

Check in febuilder’s debugger for the ram address of the two stats that go up. Then use these addresses as break points in no$gba and you will immediately find the culpret of when/where these stats are going up. Eg. [202d4bc]! - break on a value being written to the ram address of 0x202d4bc

1 Like

Don’t know if it’s apt to update on progress, but uh… Seems that the two parts used to denote when CON/MOV go up don’t clear after battle, which in turn made the game assume that ‘Hey the defender in this battle got +1 CON!’ for every single battle 'till a level up that doesn’t make the stat go up occured. How messy.
Time to figure out how to make those two clear after battle, I s’pose.

Aaaaaaand another update. I wonder if this has become the weirdest ‘Question’ thread now?
I seem to have solved that issue by adding this abomination to the end bit of Necessary/CalcLoops/PostBattleCalcLoops/post_loop

End:
ldr     r0,=0x203A545       @Move attacker data into r0.
ldrh    r3,[r0]     @Load the attacker's CON statup into r3.
mov 	r3, #0	    @Set statup to 0.
strh    r3,[r0]     @Store attacker CON stat up.

ldr     r0,=0x203A56B       @Move attacker data into r0.
ldrh    r3,[r0]     @Load the attacker's MOV statup into r3.
mov 	r3, #0	    @Set statup to 0.
strh    r3,[r0]     @Store attacker MOV stat up.

ldr     r0,=0x203A5C5       @Move defender data into r0.
ldrh    r3,[r0]     @Load the defender's CON statup into r3.
mov 	r3, #0	    @Set statup to 0.
strh    r3,[r0]     @Store attacker CON stat up.

ldr     r0,=0x203A5EB       @Move defender data into r0.
ldrh    r3,[r0]     @Load the defender's MOV statup into r3.
mov 	r3, #0	    @Set statup to 0.
strh    r3,[r0]     @Store attacker MOV stat up.

ldr	r0,=#0x203A4D4

As you see it’s a stupid little hacky way of just setting the statups to 0 manually after every battle, take that, Sacred Stones!! …Or that’s how I understand it anyway, I’m still a bit of an idiot with ASM, but as usual just throwing myself into the deep end and just pawing at something seems to be a way to learn it. As frustrating as it is, this is kind of fun to keep playing whack-a-mole with.

Hopefully this update doesn’t have some other dumb little issue that I find after tossing it up, but as with the previous please do as you will with this!

2 Likes