Vesly's ASM

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

Hoy there! While absolutely stellar, there is a bit of a weird thing with the unit expansion thing, it seems if you hide a character from the party with the ‘REMU’ command or just use the party swap thing it’ll end up ignoring that so you can still just use them anyway.

2
Lily was hidden with REMU, Max, Kiri and Adil are ‘Ephraim’s party’

3
This also ended up happening when scrolling to those four as well in the item management menu.

2 Likes

Where can I find the fixed patch ??

@VelvetKitsune Thanks, I’ll look into fixing it to work with REMU.

First post has the link to my asm github.

2 Likes

I think I’ve fixed it to properly handle REMU’d units now. It seems to work from a quick test skipping through fe8 chapters up to around the route split.

I’m travelling currently and I don’t have as much time for debugging, so I’d appreciate it if you could try it again and let me know if you find any issues.

1 Like

Maybe tomorrow I’ll have proper time to? I’ll let you know whenever I may!

huh neat got a bit of time today.
So if you kill characters (And don’t clear them) you’re they can also appear in the item management and when picking units. I had three dead characters and it seemed to only show one at a time, with whichever it showed cycling after selecting the currently visible one which’d also make that one disappear.
This also happens with Innes for whatever reason.

1 Like

Could you please send me the .sav file where a dead unit was being shown?

Edit: I’ve fixed another bug I found where it allowed you to deploy more units than you should be able to.

1 Like

Hey, just thought I’d let you know that after trying this patch, it seems that it causes enemy status staff users to go crazy and run all across the map to get right next to your unit (presumably to achieve the highest accuracy condition). They moved way beyond their movement range through impassable terrain (peaks) and even went to occupy the space taken up by another enemy.

@Jack_G Can you send me a report7z or a .ups + sav file? Preferably a version for testing it without the ea I shared inserted.

Pressing B on a unit will open their status screen

Too many people playing pokemblem never find their R button, so I’ve made it so that pressing B will also open the status screen (R still opens it, too). These same people complain that they cannot see the damage they will deal, or that they cannot see the opponent’s HP, so there are some things I just cannot make easier for them.

PUSH 
ORG $1C998 
BYTE $81 
//BYTE $84 // Start instead of B 
POP 
2 Likes

btw I accept commissions (and if something interests me enough, I’ll sometimes do it for free)

Price is around minimum wage for my time and is negotiated beforehand based on my estimate of how long it’ll take to do what you want

7 Likes

Just noting that since releasing this, pokemblem playtesting has helped me catch a few bugs with this hack. I just fixed a serious one this morning that can lead to an eventual game crash. For me, it was after changing an enemy to a player and acting with it, but it might have happened elsewhere, too. It was because I used memset instead of InitUnits which led to some new units having no deployment id. In any case, you should update to the latest version of this hack if you’re using it.

1 Like

Speedup

Makes a variety of things faster if you are holding A/B or if you have flag 0xEA on.

mGBA_yPDUtdkQmY

The following is sped up: LevelUps, GotItem, GotGold, Poison, Vuln Animation, Ai Target Cursor, Summon Anim, LightRuneSpawn Anim, Exp Bar, Various delays between rounds, Movement, and “BMX Fade” (apparently fog related, but it takes 16 frames after every action).

Note that the faster ai decision making part is not included. It makes the ai prefer closer targets over dealing the highest dmg and is only for pokemblem, as it conflicts with barricade, shade+, and steal+ and has ballistas & stealing turned off atm. If you want to use that part anyway, you’ll have to deal with those things yourself.

Also the added option “Turbo” is not included, either. You can grab it from pokemblem/patches/gameoptions if you want. Or you can just have an event that sets the flag if the player wants things sped up.

Enjoy.

This patch does a lot of stuff, so use it at your own risk for now.

12 Likes

apparently this also extends your skill / item description box to 5 lines

I never tested that because I assumed it wouldn’t work and I was tired of working on it

uh oh

14 Likes

Ah, right, it also works for character/class descriptions. Pretty neat what can happen by accident when stuff happens, ahaha.

6 Likes