Vesly's ASM

Hi. I’ve been using this feature in my hack and a player recently provided some feedback I thought you would like to hear.

Apparently, yellow/green is not a good combination for colorblind people, so maybe it would be better to use one of the colors they suggested? Not imposing or anything, just relaying the info.

1 Like

It’d probably be ideal to have an artist create alternate graphics for the icons instead of just a recolour.

Your system icon uses this palette:
image

Here’s a simple recolour:
SystemIcon2

You can edit it here:

Hope that helps.

3 Likes

I’ve added a 2nd ASMC for the Draw Anim patch. This version does not pause your event while the animation plays, so it should be useful for some cases.

7743’s port loads the unit the frame after the animation ends, causing it to look like the unit has disappeared for a frame or two. But by loading the unit 23 frames after the animation has started, it now looks smooth.

mGBA_f3S2sMecWm

mGBA_V3Ue1Bwi0p

7 Likes

@Contro never got around to releasing his ai3 fix to make it account for doubling, so I made my own inline edit. It turns out the AI does account for doubling when granting a bonus for lethal damage and for bonus points when getting the opponent below 20 hp, but not for regular damage. Since opponent’s remaining hp is already calculated as part of a simulated battle which includes doubling, this fix uses that data to determine total damage dealt. (Eg. Opponent’s Initial HP - Opponent’s Expected HP After Battle). This is only multiplied by accuracy % once regardless of doubling, but it is an improvement at least.

// AI to account for doubling 
PUSH 
ORG $3DF4A
BYTE $72 $22 $D2 $18 $12 $78 $D8 $7C $12 $1A $C0 $46 $C0 $46 $C0 $46 $C0 $46
POP 
/*
mov r2, #0x72; add r2, r3 @ dfdr + 0x72 (initial hp) 
ldrb r2, [r2]; ldrb r0, [r3, #0x13] @ curr hp after battle 
sub r2, r0 @ dmg dealt; nop; nop; nop; nop 
*/
4 Likes

make prep screen scroll right instead of left (idk if it affects anything else)

// Make things that normally scroll left instead scroll right (such as the prep screen bg) 
ORG $86B84 
SHORT $3801 
ORG $86B8C
SHORT $46c0 $46c0 $46c0 
ORG $86BA2 
SHORT $46C0 $46c0 $46c0 

mGBA_orqUDpuADC

9 Likes

image
thanks to decomp goal window src

// make goal window text slightly longer 
ORG $8D2A6 
BYTE 10 // Width of line 1 (Vanilla is 8)
ORG $8D2B2 
BYTE 10 // Width of line 2 (Vanilla is 8)
ORG $8D2F6 
BYTE $48 // length in pixels for centering? (Vanilla is 0x40)
ORG $8D3E8 
BYTE $48 // length in pixels for "Last turn" (Vanilla is 0x40)
3 Likes

Hi, I’m struggling to make this work. I installed it via EA, but I don’t see where I can edit events for specific items. Where do I do this?

This is available as a patch within builder, I feel that would be easier than trying to modify the EA installer.

2 Likes

Thank you i managed to find it.

Hi. I’m trying to install the modular summoning, but it says there’s a .txt file missing?

https://github.com/FireEmblemUniverse/SkillSystem_FE8/blob/master/EventAssembler/Extensions/ProcDefinitions.txt

Feb folder includes this file but with a space iirc “Proc Definitions.txt”

1 Like

Ok, I managed to get it installed. As per your instructions, I still need to create a menu entry for it. I assume this is done from here, right?


What exactly do I type in “Usability routine” and “Effect when selected”?

Use the info from the .sym file febuilder made

Fix for the vanilla bug where the ai basically always targets the last deployed unit of yours with sleep/berserk:

https://github.com/FireEmblemUniverse/fireemblem8u/blob/master/src/cp_staff.c#L636-L645 has a line of
best = unit->level;
while they obviously meant to do
best = unit->level + accuracy;

Inline ea edit
PUSH
ORG $405B4 
SHORT $2804 // cmp r0, #4 
SHORT $D92C // bls 0x8040612 
SHORT $2108 // mov r1, #8 
SHORT $5671 // ldsb r1, [r6, r1] 
SHORT $1809 // add r1, r0 
SHORT $4551 // cmp r1, r10 
SHORT $DB27 // blt 0x8040612 
SHORT $B401 // push {r0} 
SHORT $46c0 // nop 

ORG $405F2 
SHORT $BC02 // pop {r1} 
ORG $405F8 
SHORT $7A33 // ldrb r3, [r6, #8] 
SHORT $185B // add r3, r1 
ORG $40606
SHORT $5E22 // ldsh r2, [r4, r0] 
SHORT $9206 // str r2, [sp, #0x18] 
SHORT $7Af6 // ldrb r6, [r6, #0xB] 
SHORT $469A // mov r10, r3 
SHORT $46C0 // nop 
POP 
5 Likes

The “cmp r1, #0x4” in 080405B8 is known as the lowest hit rate for staff.
Is there any way to avoid overwriting this?
It conflicts with the patch and is difficult to use as is.

080405B4 0600   lsl r0 ,r0 ,#0x18
080405B6 0E01   lsr r1 ,r0 ,#0x18
080405B8 2904   cmp r1, #0x4   //敵の杖の最低命中率@ADDRESS
080405BA D92A   bls #0x8040612
    080405BC 2008   mov r0, #0x8
    080405BE 5630   ldsb r0, [r6, r0] # r6=RAM
    080405C0 1808   add r0 ,r1, r0
    080405C2 4550   cmp r0, r10
    080405C4 DB25   blt #0x8040612
1 Like

I needed to move a few lines around to keep it inline. Feel free to try tweaking it to your purposes.

Unit Expansion

After pulling my hair out for a couple dozen hours, I did it! This allows for an extra 97 saved player units than before by killing the link arena, or an extra 51 if leaving the link arena alone.

ezgif.com-optimize (1)

When the player has >45 units in their party, additional units are sent to storage upon saving. They can be accessed through the preparations menu. This is compatible with or without SkillSys, and it does not touch your EMS configuration. (Conveniently, EMS does not touch the last 5,860 bytes of SRAM.) It also uses the 0x2028 bytes in the debug printing buffer at 0x2026E30 during the prep screen.

This uses global flag 0xEB to init SRAM used. This way I can ensure old save files won’t try and show any junk data as units. I also added an ASMC: EnsureUnitInParty(unitID). This needs to be used in your cutscenes that use that unit ID once your party has >45 units, as otherwise they could be hidden away in storage and common commands like GetUnitStatus or LOAD wouldn’t find them.

Shoutouts to @Eebit, @Mokha, and anyone else who helped decompile various preparations menu functions. I couldn’t have done this without their amazing work.

Enjoy.

39 Likes

Do I need to use it with other patches? After I import it, I can’t achieve 97 people

@wzdret You need to do it in increments.

image

When you leave preparations, it should look like this. You can then load up to 62 units at a time and whenever you save, units past the 45th slot will be saved separately. There’s space for an extra 97 units to be saved this way and they are accessible via preparations.

@ everyone else - I added a global flag to be used to init sram to 0. I’ve set 0xEB as the default. This way I can ensure old save files won’t try and show any junk data as units.

I also added an ASMC: EnsureUnitInParty(unitID). This needs to be used in your cutscenes that use that unit ID once your party has >45 units, as otherwise they could be hidden away in storage and common commands like GetUnitStatus or LOAD wouldn’t find them.

3 Likes

I did these purely for my own convenience and forgot to share. You can do both of these things in FEBuilder in 20 mins, but it’s a pain.

Infinite durability

Note: items will not be displayed as having – durability.

PUSH
ORG $16B06
SHORT $E003 // items always have the unbreakable bitflag 
ORG $17574
jumpToHack(GetItemAttributesWithUnbreakable)
POP

ALIGN 4 
GetItemAttributesWithUnbreakable: 
BYTE $89 $00 $03 $48 $00 $68 $09 $18 $88 $68 $08 $21 $08 $43 $70 $47 $80 $75 $01 $08

100% growths

Note: Leveling up via non-combat methods like stealing or healing will not be 100% growths.

#ifndef callHackNew 
    #define callHackNew(offset)         "BYTE $01 $4B $9E $46 $00 $F8 $01 $E0; POIN (offset|0x1)"
#endif 
PUSH
ORG $2A2D8 // this is right after check for lvl up 
callHackNew(OneHundredGrowth)
POP 

ALIGN 4 
OneHundredGrowth:
BYTE $00 $B5 $30 $1C $16 $4B $9E $46 $00 $F8 $38 $1C $14 $4B $9E $46 $00 $F8 $14 $4B $18 $7A $70 $21 $C9 $18 $09 $78 $88 $42 $0A $DD $73 $22 $9B $18 $01 $20 $18 $70 $58 $70 $98 $70 $D8 $70 $18 $71 $58 $71 $98 $71 $D8 $71 $0C $4B $18 $7A $70 $21 $C9 $18 $09 $78 $88 $42 $0A $DD $73 $22 $9B $18 $01 $20 $18 $70 $58 $70 $98 $70 $D8 $70 $18 $71 $58 $71 $98 $71 $D8 $71 $01 $BC $00 $47 $00 $00 $C8 $44 $0A $08 $EC $A4 $03 $02 $6C $A5 $03 $02
8 Likes