[FE8] Skill System v1.0 - 404 skills done, more on the way

I’m not sure if this is a known issue or not. I’ve downloaded a fresh version of Skill Systems buildfile to see if it works and I’ve been able to replicate it 3x.
There seems to be something wrong with Mag growth, the only changes I’ve done is uncomment to allow Str/Mag split. I’ve then changed Eirika’s Mag growth to 100 and haven’t been able to get 1 Mag level up.

Hey thanks for catching that! I was able to replicate it. Today I’ll see if I can find the issue. Let’s see if it was my fault or someone else’s

1 Like

Bad news: Autoleveling is still not working, and I’m unsure why.
SkillsTest-0
That’s something to investigate for today.
Good news: Level ups are functional :tada:
SkillsTest-1
It looks like this was caused by MSS reorganization not incorporating magic in a couple places. Something like that is to be expected for such a big reorganization. Once I find the autolevelling culprit, I should have the changes pushed soon.

EDIT: It was a simple mistake on my end. All functional for me now, so I’ve pushed the changes. Just waiting on PR approval. Hm I should have noticed Eirika maxing strength in that screenshot… :thinking:

EDIT 2: Sme’s a speedster - Already merged!

5 Likes

Heya, CannotCrit seems to not ensure battle crit is 0 when the one receiving the attack from the 255 crit weapon has negative dodge (which can happen due to anathema, and maybe some other things as well). If you hook this with a callHack_r3 at 0x2ACA0 it should ensure that battle crit will be 0 again when the weapon has 255 crit:

@ Ensure Compute Crit leaves battle crit at 0
@ even when dodge is <0. Hooked at 0x2ACA0
@   r0: defender's dodge address.
@   r1: attacker's crit. Turns into battle crit.
@   r2: attacker battlestruct.
@   r3: unused.
@   r4: unused.
@   r5: unused.
@   r6: defender battlestruct.
.thumb


mov   r3, #0x0
ldsh  r0, [r0, r3]
sub   r1, r0                        @ Battle crit.

@ Check if item can crit.
mov   r3, #0x4A
ldrh  r3, [r2, r3]
lsl   r3, #0x18
lsr   r4, r3, #0x13
lsr   r3, #0x16
add   r3, r4
add   r3, #0x18
ldr   r4, =ItemTable
ldrb  r3, [r4, r3]                  @ Item crit.
cmp   r3, #0xFF
bne   L1

  @ item can't crit.
  mov   r1, #0x0                    @ Battle crit.


@ vanilla stuff overwritten by hook.
L1:
mov   r5, r2
add   r5, #0x6A
mov   r4, #0x0
strh  r1, [r5]
bx    r14

Mind you that ItemTable needs to be defined of course.

Edit: I also made an edit to NegativeDisplay.s to draw a dash to the item helpbox crit value if crit is equal to -1.


	.thumb

	@ the old hack made hit (actually many things but hit was most noticeable) display as signed
	@ so this time, we only make it draw weapon stats as signed by hooking into the weapon stats drawing func

	@ Vanilla functions definitions

	Text_SetParams = 0x08003E68+1
	Text_DrawCharacter = 0x08004180+1

	GetItemMight = 0x080175DC+1
	GetItemHit = 0x080175F4+1
	GetItemWeight = 0x0801760C+1
	GetItemCrit = 0x08017624+1

	.global DrawHelpBoxWeaponStats_Hook
	.type   DrawHelpBoxWeaponStats_Hook, function

DrawHelpBoxWeaponStats_Hook:

	@ function is at 08089CD4, but we don't need to change all of it
	@ hook at 08089CFC (jumpToHack works), known state:
	@ - r4 is address of texts (there is 2 lines, r4+8 is the second one)
	@ - r5 is our item
	@ - everything else is whatever

	.macro draw_from_function function, x, y

		@ Defining macro because this is repeated 4 times

		ldr r3, =\function

		mov r0, r5 @ arg r0 = item

		bl call_via_r3

		@ Convert result to signed number
		lsl r0, r0, #24
		asr r3, r0, #24
    
    mov r0, \y
    mov r12, r0
    
		mov r0, r4 @ arg r0 = text
		mov r1, \x @ arg r1 = x
		mov r2, #7 @ arg r2 = color
		@ implied  @ arg r3 = number

		bl Text_InsertDrawSignedNumber

	.endm

	@ First line (there's already stuff drawn there from before we hooked)

	draw_from_function GetItemWeight, #129, #0

	@ Second line
	add r4, #8

	draw_from_function GetItemMight, #32, #0
	draw_from_function GetItemHit, #81, #0
	draw_from_function GetItemCrit, #129, #1

	@ epilogue

	pop {r4-r5}
	pop {r3}

call_via_r3:
	bx r3

	.pool

	.global Text_InsertDrawSignedNumber
	.type   Text_InsertDrawSignedNumber, function

Text_InsertDrawSignedNumber:
	@ this is our new function that replaces Text_InsertDrawNumberOrBlank

	@ arg r0 = text
	@ arg r1 = x
	@ arg r2 = color
	@ arg r3 = signed number

	push {r0, r4-r6, lr} @ pushing r0 is to make 4byte space on the stack

	mov r4, r0 @ var r4 = text
	mov r5, r3 @ var r5 = number
  mov r6, r12 @ Dash-flag

	ldr r3, =Text_SetParams

	@ implied @ arg r1 = cursor
	@ implied @ arg r2 = color

	bl call_via_r3

	cmp r5, #0
	beq Text_InsertDrawSignedNumber.draw_zero
  cmp r6, #0
  beq L1
    mov r6, #1
    lsl r6, #31
    asr r6, #31
    cmp r5, r6
    beq Text_InsertDrawSignedNumber.draw_dash
  L1:

	@ r6 = 1 if number is negative, r5 = abs(number)
	@ it's surprise tools that will help us later

	lsr r6, r5, #31
	beq Text_InsertDrawSignedNumber.lop

	neg r5, r5

Text_InsertDrawSignedNumber.lop:
	mov r0, r5  @ arg r0 = num
	mov r1, #10 @ arg r1 = denom

	swi 6 @ div!

	@ r0 = number / 10
	@ r1 = number % 10

	mov r5, r0 @ number = number / 10

	add r1, #0x30
	str r1, [sp] @ [sp] = ['0' + number % 10, 0, 0, 0]

	ldr r3, =Text_DrawCharacter

	mov r0, r4 @ arg r0 = text
	mov r1, sp @ arg r1 = string

	bl call_via_r3

	ldrb r0, [r4, #2]
	sub  r0, #15
	strb r0, [r4, #2]

	cmp r5, #0
	bne Text_InsertDrawSignedNumber.lop

	@ Draw dash if number was negative

	cmp r6, #0
	beq Text_InsertDrawSignedNumber.end

	ldrb r0, [r4, #2]
	add  r0, #3
	strb r0, [r4, #2]

	mov r0, #0x2D
	str r0, [sp] @ [sp] = ['-', 0, 0, 0]

	ldr r3, =Text_DrawCharacter

	mov r0, r4 @ arg r0 = text
	mov r1, sp @ arg r1 = string

	bl call_via_r3

Text_InsertDrawSignedNumber.end:
	pop {r0, r4-r6}

	pop {r0}
	bx r0

Text_InsertDrawSignedNumber.draw_zero:
	ldr r3, =Text_DrawCharacter

	mov r0, r4      @ arg r0 = text
	adr r1, strZero @ arg r1 = string

	bl call_via_r3

	b Text_InsertDrawSignedNumber.end

	.pool

strZero:
	.asciz "0"

Text_InsertDrawSignedNumber.draw_dash:
	ldr r3, =Text_DrawCharacter

	mov r0, r4      @ arg r0 = text
	adr r1, strDash @ arg r1 = string

	bl call_via_r3

	b Text_InsertDrawSignedNumber.end

	.pool

strDash:
	.short 0x7F
3 Likes

Are skills on items only useable with equipped weapons? I want to implement something like Mystery of the Emblem’s life orb. Ie create an item that just sits in the player’s inventory but just by having it they get the renewal skill.

Passive skill granting items work (you just need to set the passive booster bit on the item, in addition to the skill). Note that this doesn’t work properly in febuilder’s skillsys installation.

You know, now that I read this answer, I think I’ve asked this exact question before XD

That’s unfortunate. I tried that a week or two ago to see if it would work. I thought it wasn’t possible, not that it was an FEBuilder issue.

1 Like

The febuilder patch is based on skill system github from Feb 2020, or about a year and a half ago. It’s received a few minor bug fixes or specific features since then, but it has not been sync’d in quite a while.

7743 cares most about the stability of the system. The febuilder patch has very few bugs, so that is ideal for him, as he does not want to debug people’s skillsys issues. Which is totally fair. It’s amazing that he debugs so many report7z’s as it is!

3 Likes

Yeah he’s usually been pretty prompt and helpful on the discord in my experience. And he seems to use a translator for most English, making his dedication all the more impressive. Still, I can’t help but be greedy and want more nice things XD

Hello. I’m using the FEbuilder version of skillsystem and i’m wondering if an issue i’ve encountered has since been fixed in the Github. When i use Skillsystem’s Seal Strength (seems to be auto-included on Franz) on an enemy with 5 or less STR, it underflows and causes the enemy to deal 255 damage.

1 Like

//Cultured: If unit attacks next to a unit with Nice Thighs, move again. -50 hit against units with Nice Thighs.
//By Sme

LMAO

1 Like

happened to me as well. Went through the “issues” page and it says it’s been resolved, but most recent SkillSystems patch on FEBuilderGBA still has the underflow bug.

rip Saleh the revenant

edit: just read up and saw the patch on FEBuilder is outdated. Makes sense now to see that it’s ticked as “resolved” but the newest patch where that bug was fixed isn’t on there.

Hey, i tried giving skills to some weapons the spur skills but they don’t seem to work

Another batch of skills.

Notes:
Bibliophile counts any Anima, Light, or Dark weapon types as books. Also, the books are counted even if the unit can’t use them.
Bold and Wise Turtle compare byte 0x1D for movement, in the disassembler the byte 0x1D returned Class Mov.+Mov. Bonus, but in @Tequila’s notes says it should be calculated like Con… The skills worked like intended when I tested them.
For Entropy swords, lances, axes and bows are counted as physical weapons.
Winged Rider uses the Effectiveness Rework hack.
Witch’s Brew activates anytime you use the command [Wait], even if you did an action before (Like trade, using the convoy, etc.)
Vulnerary, Pure Water, Antitoxin and Elixir can be obtained with Witch’s Brew, you can edit the WitchsBrewEvent.event file to change what items you can get.

Download

Icons by @MeatOfJustice were included in the download, but 6 skills still need an Icon.

12 Likes

This is probably a stupid question but Bold and Wise Turtle make me think it’d be interesting if there was a skill that affected your damage output/damage received depending on the amount of tiles you moved in that turn compared to the enemy’s Mov stat.

But it’s very easy to move fewer tiles than enemy Move, while it’s a little tough to consistently use full movement range to exceed enemy Move.

Why not use Charge?
& we could make its inverse, Inevitable Stalk, or some name lol. Gain +1 damage for each tile you don’t move under max movement.

Gain +1 damage for each unused movement range.
Idk how to word it best.

This would probably be given to knights or something with low move.

1 Like

I think making non-blue units able to benefit from Charge (they currently cannot because “tiles moved” is only saved for blue units) should be a higher priority than adding more skills that use this mechanic

3 Likes

Have we tried something like this yet?

ldr r2, =CurrentUnit
ldr r2, [r2]
ldr r3, =0x203AA96 @ AI decision +0x92 (XX) 
ldrb r0, [r3, #0x0] @ XX 
ldrb r1, [r3, #0x1] @ YY 
ldrb r3, [r2, #0x11] 
ldrb r2, [r2, #0x10] 

sub r0, r2 
sub r1, r3 
@ get absolute 
asr r3, r0, #31
add r0, r3
eor r0, r3 @ r0 now # of X tiles difference 
asr r3, r1, #31 
add r1, r3 
eor r1, r3 @ r1 now # of Y tiles difference 

add r0, r1 @ tiles moved 

Hello! The Skill System has, frankly, become very bloated over time, and as its primary maintainer, I would like to get feedback on a plan to deal with this.


1) Quality of Life Hacks

There are a large number of QoL hacks included with the skill system that have no effect on anything outside of themselves and are only included because they have been so from the beginning. This would be things like semitransparent menus, HP bars, danger zone, etc. Most, if not all, of these are enabled by default. Removing these would be a significant chip out of the bloated buildfile.

  • No Change; Included, Enabled by Default
  • Included, Disabled by Default
  • Not Included
  • Other; Please specify in a reply

0 voters


2) External Hacks

This refers to the group of 20 or so hacks that have some overlap with necessary skill system components; of these, only 2 have functionality directly tied to skills, the rest only have overlap with shared hooks. Removing most or all of these would account for roughly half the present bloat.

  • No Change; All Included, Enabled by Default
  • All Included, Disabled by Default
  • Only Skill-Related Included, Enabled by Default
  • Only Skill-Related Included, Disabled by Default
  • Other; Please specify in a reply

0 voters


3) Merge Policy

Currently, my policy on merging new pull requests into the skill system are generally the following requirements:

  • Adds skills or skill-related systems
  • Fixes bugs or errors
  • Adds hacks that share existing hooks

Moving forwards, I would like to drop the third criteria, to avoid adding further bloat. Instead, only hacks that directly rely on skill system components with no independent release (mainly Modular Stat Screen) would be acceptable for adding.

  • No Change; Keep Criteria As-Is
  • Drop 3rd Criteria
  • Other; Please specify in a reply

0 voters


If all of these changes were to be enacted as presented, all external and quality of life hacks would be removed save for ones that tie into skills (Dragon Veins, Str/Mag Split) or the Modular Stat Screen (Stat Screen Ballista, Personal Info + Narrow Font). I look forward to reviewing your feedback.

4 Likes