Vesly's ASM

Trap SMS Size Fix

For some reason traps are hardcoded to use size 1 for ballistas and size 0 for everything else (eg. light runes). This fixes everything but ballistas to use whatever size you set in your SMS table. Compatible with or without Sme’s TrapRework (although there’s not really any point in using it without TrapRework).

2 Likes

You’ve been on a tear w/ these hacks dude - great work! Lots of cool stuff in this thread.

2 Likes

Skip Ch Intro List

Vanilla:
mGBA_1estPa28bU

A chapter that I’ve skipped the intro effect for:
mGBA_gl5gtpryMu

Enjoy!

10 Likes

AoE updates

Shows damage/healing numbers now
mGBA_GZZbB8dxJd

Better defaults
mGBA_B2DJ973ZGx

Obtain droppable items
mGBA_1AVK5JE02c

Depletes a customizable amount of uses from items
mGBA_7NTt9e9OFu

Inflict & restore status
AoE inflict status

AoE can now be set by weapon types, eg. all axes get “Cleave” by default.
Can run events on all affected units and/or debuff them, and probably more things I coded and forgot about

Default entries all deal 75% damage compared with regular attacks and use stats from your items so you don’t really need to enter anything. This should make it easy to use, but it is still extremely customizable should you decide to do so.

Enjoy!

15 Likes

I’ve fixed it so it now actually saves the exp gained. It displayed popups perfectly, so I never noticed anything was broken until @Scraiza pointed it out. You can even see in the above gif that Franz’ gained exp is not saved… :sweat_smile:

Shoutout to @Contro for helping me figure out how to fix this.

Edit:
In other news, ShootArrow ASMC no longer hides the active unit.

Also I forgot to show that AoE updates also includes healing numbers:
mGBA_70ZpRkCcCY

9 Likes

NewGame+ Flags

I wrote a little guide yesterday on setting ram that will be used even after a new game via FEBuilder’s EventWriter patch, but I feel that doing it via ASMCs makes it a lot cleaner.

Single Try Events

  1. In your prologue, ASMC InitializeNewGameRamFunc (if you want 32 flags per save file and 32 NewGame+ flags).
  2. Use CheckSaveSlotFlag, SetSaveSlotFlag, and UnsetSaveSlotFlag ASMCs to have things that occur only once per the save slot (even on restart chapter, the flag will already be set).
    Eg.
SVAL s1 32 // Write 32 to Memory Slot 1, which is the highest flag you can use. 
ASMC CheckSaveSlotFlag
BNE 0 sC s0 // If the flag is on, jump to label 0 
// Do stuff only once 
SVAL s1 32 
ASMC SetSaveSlotFlag // So this will not occur again 
LABEL 0 

New Game Unlocks

  1. Use CheckNewGameFlag, SetNewGameFlag, and UnsetNewGameFlag to manage unlocks for the .sav file for new games.
    Eg.
SVAL s1 128 // Highest flag number that can be used is 128 if you are not using SaveSlot flags. 
//If you are using them, then 32 is the highest flag you can use. 
ASMC CheckNewGameFlag
BEQ 0 sC s0 // If the flag is off, skip to label 0. 
// This will only occur if the flag was previously set (eg. by you completing a later chapter) 
SVAL s3 BraveSword
GIVEITEMTO Eirika
LABEL 0 

and in a later chapter

CHECK_TURNS
SVAL s1 8 
BGT 0 sC s1 // If number of turns is greater than 8, no NewGame+ reward. 
SVAL s1 128 
ASMC SetNewGameFlag 
// Eirika will get a BraveSword on NewGame+ 
// after completing this chapter in 8 or fewer turns. 
LABEL 0 

You ultimately don’t need to use these ASMCs for a NewGame+, but if you want to have multiple unlocks, this makes it a lot more convenient. :slightly_smiling_face:

6 Likes

CannotDie

Prevents certain characters / classes from dying in combat until a temp/global flag is turned on by making lethal attacks miss.
mGBA_otCagYGwba

You might want to set the MaximumHitrate patch to 99.
image

Please note that this does not prevent other sources of damage such as poison or traps, so you could still die that way.

And now I present to you the best way to prevent arena abuse: make it impossible to win!

mGBA_IBGpXbI31k

Enjoy. (This is compatible with SkillSys.)

21 Likes

image

mGBA_srvimLoKiE

mGBA_VJtry31f0y

All credits goes to @HyperGammaSpaces. I’ve made these the defaults for each weapon type now. :tada:

I’ve also made it so these animations and damage numbers will appear underneath other popups.
image

You should definitely thank Gamma and check out his Sacred Echoes project if you haven’t yet.

17 Likes

Hey Vesly,

I think I discovered a humorous bug involving BattleStatsWithAnimsOff v2 hack.

I grabbed the latest version from Github and applied it to my own hack with the only customization being that I used my own tiles instead of the vanilla-style included ones. Everything seemed to be working just fine, until I tried to heal a unit with a Mend:

funny_bug

There seems to be something funky going on with palettes here as the weapon icons are taking on the palette for the Mend map animation. Have you seen this before/any tips on how I might try to fix it?

1 Like

Can you try out the febuilder patch? I think 7743 made it into a patch and possibly fixed this? I probably just forgot to merge his fix into my github.

1 Like

Yup, adapting the Builder version instead of the one from your Github seems to fix this issue, thanks!

1 Like

default # of frames for a couple popups

ORG $114FA // frames to show "got item" popup 
BYTE 45 //96 is vanilla 
ORG $1166C // frames to show "got gold" popup 
BYTE 45 //96 is vanilla

also popup rework (bundled with skillsys) seems to kill your ability to press A to close these faster. epic hack but will need to be fixed

and here’s faster map battle round animations or something
I think it makes the hp bar not stay on the screen so dang long when healing
should probably use it in conjunction with 7743’s faster vulnerary animation patch
mGBA_eMHLNhnWWp

// speed for battle map anim rounds 
// just from the proc MapAnimBattle 9A49FC
// vanilla is 30 30 30 10 30 
ORG $9A4A06 
BYTE 10 
ORG $9A4A16 
BYTE 15 
ORG $9A4A26 
BYTE 10 
ORG $9A4A36
BYTE 5 
ORG $9A4A46
BYTE 15  
//ORG $7BCE2 // double speed of vuln animation by 7743 
//BYTE 0x08 0x34 0x24 0x04 0x24 0x0c 0x00 0x00 0x00 0x00 0x8c 0x42 0x09 0xda

2 Likes

I had an issue with @UltraxBlade’s save file in Pokemblem being wiped, so I had a look into save data to make it a bit safer, I hope.

PUSH
ORG $A644C // makes it so if checksum for a save file is bad, it will still load the save file 
SHORT $2001 // mov r0, #1 

ORG $A2D9C // makes it so if your metadata is bad, it will still load your resume data 
SHORT $2001 // mov r0, #1 
POP

This is a bandaid :adhesive_bandage: on the problem. But this should stop save files from being erased most of the time, I think. This way in the future we can analyze the corrupt save file and possibly fix that. As it is, if you write a random value to the first $D4 bytes of the savefile, the whole save file will be deleted.

This is useful to anyone who gets a report of save files being deleted for their hack.

Enjoy.

Edit: Since this I’ve had 3 people report their save file being wiped on v1.00 and nobody reporting it occurring on v1.01 or later, which released 10 days ago. So it’s probably safe to say that this fix worked! Still no idea what was causing the problem in the first place lmao

4 Likes

This is actually amazing though??? Being able to link events with items has kinda blossomed my mind with ideas to implement, thank you so much for your work!

4 Likes

Pokemblem_Titlescreen

Redppr did a new epic title screen for pokemblem, so I needed to move the Press Start text down.

// C5496 is X pos
ORG $C5498 // Press start Y position 
BYTE $8C // vanilla is #0x7C

I also moved my chapter menu over a little bit so it could be wider (there’s already a patch for the width).

ORG $1CA86 
BYTE ChMenuRight // 0x17 default
5 Likes

Autosave Do-over

ezgif.com-gif-maker (7)

This is a rework of an febuilder patch.

I made it so it’ll only autosave at the start of your turn if you have the same number (or more) units as you did last turn. This way if a player is late to reset, they can still resume to the previous turn.

This uses a byte in ram. I’ve made the default 0x202bd33 which is padding in gChapterData.

8 Likes

So not all hacks end up working, and I’ve decided to throw in the towel for line of sight, where certain terrain blocks you from attacking through it.

ezgif.com-gif-maker_8

The idea was to draw range normally and then erase the obstructed tiles. I think this was the wrong way to go about it, as a tile can be obstructed from 1 direction but still be targetable from another. Therefore the preview does not display correctly. This was bl’d to in AllMoveableSquares, AllWeaponsOneSquare, and ItemTURange.

Oh well :pensive:

5 Likes

Ok, this is hype. Now we can have accurate Tellius Bows

Enemies can’t die either…
SkillsTest.emulator_01

If you have only one ally unit and it reaches the avoid-everything threshold the enemy can’t be hit.

Here’s the list:

CannotDieList: 
BYTE Sora 0; SHORT 0x00FF
WORD 0xFFFFFFFF
2 Likes

Thanks, fixed and re-tested this to make sure it works properly now. Sorry, I should’ve caught this to begin with.

1 Like