Designated Tutorial on How to Edit Skills?

They’re probably for the same purpose, but MAKEHACK_FULL.cmd is used to apply the changes written in the buildfile to the ROM. It’s this file in the skillsys repo, https://github.com/FireEmblemUniverse/SkillSystem_FE8/blob/aadb8f54ad079544260601185a6fd915bf2e648d/MAKE_HACK_full.cmd

The error you’re getting might be due to not applying textprocess. You might want to run AssembleText.cmd https://github.com/FireEmblemUniverse/SkillSystem_FE8/blob/aadb8f54ad079544260601185a6fd915bf2e648d/Text/AssembleText.cmd
if you have it or an equivalent in your buildfile, before running any MAKE....cmd files.

Yeah, it seems to be the same executable. I copied it into the folder I’m working with and it gave the same error.

I tried to run AssembleText and it just said “The system cannot find the path specified.”

Hey, not sure where the best place to ask about skill editing is, whether there’s a designated thread or discord, but I’m trying to figure something out. I’ve modified the Short Shield skill to negate all close ranged damage. What I did was basically copy to set attackers damage to 0 code from the existing Tower Shield+ skill. And it works! Units with the skill receive 0 damage when attacked at range. The issue is, they also deal zero damage when attacking at range, which is not intended. Essentially the skill makes it so whomever initiates the combat, regardless of which of the two combatants has the skill, deals zero damage. The battle forecast says they’ll do damage but then in combat their damage is just zero. Why is this happening? Here is the code I have.

.thumb
.align

.equ ShortShieldID,SkillTester+4

push {r4-r7,lr}
@goes in the battle loop.
@r0 is the attacker
@r1 is the defender
mov r4, r0
mov r5, r1

@check range
ldr r0,=#0x203A4D4 @battle stats
ldrb r0,[r0,#2] @range
cmp r0,#1
bgt GoBack

@check for skill
ldr r0, SkillTester
mov lr, r0
mov r0, r4
ldr r1, ShortShieldID
.short 0xf800
cmp r0, #0
beq GoBack

@set defender attack to 0
mov r0, r5
add r0,#0x5A
mov r3,#0
strh r3,[r0]

GoBack:
pop {r4-r7}
pop {r0}
bx r0

.ltorg
.align

SkillTester:
@POIN SkillTester
@WORD ShortShieldID

You can trace through your code in a debugger like no$gba. That way you can see what exactly is happening.

I have No$GBA Debugger, but I don’t know nearly enough about Assembly to even begin to understand what it’s telling me when I run the game through it.

There’s a guide on no$gba and asm over here:

1 Like

Still trying to get my head around what assembly commands mean.

@make sure the enemy is a mage
ldr r0,[r5,#0x4]
mov r1,#0x30
ldr r0,[r0,r1] @so this loads the unit’s staff/anima/light/dark prof
cmp r0,#0x0
beq End @if they’re all 0 the enemy is not a mage

What in the above code is checking the staff/anima/light/dark weapon ranks? I want to edit the skill so it only works with light magic, but I don’t really get what data is being checked for.

r5 contains the defender’s battle struct. This command loads the content of the bytes 0x4-0x7 of said struct, which happens to be a pointer to the class data of the defender.

Here we load bytes 0x30-0x33 of the defender’s class data, which contain the base weapon ranks of the class for Staff, Anima, Light and Dark (in that order).

If the class doesn’t have any weapon rank experience for those weapon types, we skip to the end.

So, to check for Light magic specifically, instead of loading bytes 0x30-0x33, you’d need to load only byte 0x32.

In other words, replace

mov r1,#0x30
ldr r0,[r0,r1]

with

mov r1,#0x32
ldrb r0,[r0,r1]

That’s very good for me getting my desired result, but I’d like to understand a bit more. How is #0x30 loading bytes 30-33 and not just byte 33, while loading #032 loads just 32? I’d guess it’s because you’re using a different command of ldrb vs ldr, but I’m not sure what that has on loading byte data in either direction.

The B in LDRB stands for byte. So, it only loads one byte. LDRH loads a halfword, which is 2 bytes. LDR loads a word, which is 4 bytes.

Ah, that makes sense. So in the first instances it was saying load data from this address to fill 4 bytes, while in the second it’s load data to fill just one byte and one weapon rank. What if I happened to want to have five weapon ranks loaded (I don’t, just trying to understand the system better)? Is there a command for five bytes or would you just LDR first and then LDRB afterwards?

You cannot load that much into a register. Each register is 32 bits, or 4 bytes. Have you read this guide: GBAFE Assembly for Dummies, by Dummies? It covers some of these more basic ASM things.

I did skim it looking for specific information to accomplish specific tasks. There’s a lot in this. Though deep at the back of my mind the notion that 4bytes is the most you can load does resonate with ancient knowledge from my university days. I suppose the question remains then, if you did want something like this to cover five weapon types, how would one go about it?

Something like this, for example:

ldr r3,[r5,#0x4]

mov r1,#0x29
ldrb r0,[r3,r1] @Bows
cmp r0,#0x0
bne ApplyEffect

mov r1,#0x30
ldr r0,[r3,r1] @Staff/anima/light/dark
cmp r0,#0x0
beq End

Ah, so you can apply the effects and then just load the register with more bytes. I was worried you’d have to basically make the whole skill twice. Good to know.

Hey. IDK what buildfile you’re using. But if you’re struggling, maybe you should use the more up to date FEU Skillsystems buildfile:

Alternatively, you can also use my buildfile, which has some custom skills added

I’ve tried using the most up to date build file but importing it into FEBuilder has some issues. I’m largely finished with the current project though so what I have is fine. When I start my next project I’ll probably try and use the most modern version of skill systems right away.

How are you importing it into FEBuilder, exactly?

Via the Custom Skill Build imported featured in FeBuilderGBA.

See, that’s where you’re doing it wrong. You have to have your buildfile reade, and then run MAKE_HACK_FULL. And after that, you open the new ROM with FEBuilder