Vesly's ASM

Cool stuff - thanks!

Generate Map

Given .tmx files for each map piece you want to place randomly onto the map, this places them randomly when the map is loaded.

It has a border of grass around each thing it places to avoid blocking units.

For example, @RandomWizard made this cliff (and all the rest):
image

Which gets placed on this map at random when starting the chapter:

mGBA_r9NQnyu2bQ

This is done entirely in game. Each time you restart or resume a chapter, it is remade. You could save the map via EMS if you didn’t want this, or maybe I’ll seed the randomly generated map in the future to make suspend+resume not create a new one, lol.
generate map

I don’t really expect anyone to use this and it was just for fun, but I thought someone might get a kick out of it in any case, so here it is! :slight_smile:

Also credits to N426, Zoramine, and Venno for the updated village tileset I used here.

16 Likes

Hey. I wanted to ask if you could make it so that the special effect can also be used on the world map and preparations screen. Currently, you can’t, because the Use menu is greyed out.

Not possible, as the event proc is blocked by stuff like the preparations screen. Sorry. You cannot run events during prep, as these events will be paused until the prep screen is done.

If events weren’t blocked during prep, then the rest of your start event would immediately occur and turn 1 of player phase would start.

Allegiance Palette

When X flag is on in chapter ID Y, sprites for Z allegiance will use the given palette.

By default, I’ve set it up so that flag ID 0x25 turns players into the enemy palette and flag 0x26 turns enemies into the player palette. Setting the flag will not automatically refresh the palette. While it is updated frequently, you can immediately call ASMC 0x8026629 to update palettes anytime.

mGBA_1O4SQts8aQ

You could also use this to have units use a darker palette for a nighttime map, for example.

image
I’m no artist, so you’ll have to figure out your own custom palettes, lol.

Enjoy!

13 Likes

Generate Mines

Whenever you select somewhere to walk to, mines will spawn at random on traversable tiles. They are deleted after you move somewhere such that it will almost never hit enemies.

They spawn at a rate of X% of tiles in the map. I put it to only 2% here, for which this hack was made: Feature (Not a Bug)
It is pretty annoying at 2%, so I don’t recommend much higher.

FEBuilderGBA_c8XFS1AWlK

This is more of an unquality of life feature, and probably won’t be enjoyed, lol.

Nonetheless, enjoy!

4 Likes

GroupAI v2

PhantomSentine’s GroupAI made it so if you attack or are attacked by a unit that is part of a group (using AI4 for groups), it would aggro all of them.

However, this doesn’t stop you from abusing the AI. You could still lure or split up enemies and nothing would aggro until you or the opponent attacked.

Therefore, I’ve hooked AiSetDecision just after FillAiDangerMap is done and coordinates are decided on to see if the Ai will walk somewhere dangerous, and if so, aggro the group. This makes group AI a bit more aggressive and seemingly more coordinated. Previously, one unit from the group would usually charge ahead “Leeroy Jenkins” style while the rest of the party would follow next turn.

You may also want to consider your ai3 settings and whether they have a penalty to avoid dangerous tiles, unlike one of the defaults below:

Zoning ai is also worth a mention here.

Additionally I fixed a small bug in GroupAI: error handling for lack of unit added (it had a very miniscule chance of game crashes etc.)

5 Likes

Is this game crashing bug present in vanilla or GroupAI 1?

The bug was in group ai. Vanilla does not have group ai: it has leader ai, which only stops units from attacking unless a unit is in range of the commander. Group ai leaves the leader ai untouched.

1 Like

DecideOnDangerMap

FillAiDangerMap is an expensive function called before each enemy moves. Gamma, StanH, and 7743 have all worked on optimizing it.

This hack stops the function from being called when the results aren’t actually used.

FEBuilderGBA_XByzwVfARG

The above ai3 defaults do not care about the danger map, so if you use any of these, this hack will reduce ai lag by about ~3 - 12 frames per enemy. The amount of lag saved depends largely on the map size, number of units, and whether or not you are using the latest AiFillDangerMapFix patch.

Edit: Fixed a bug 3 hours after posting this.
7743’s testing benchmarks this as saving about 4 frames per enemy (with the AiFillDangerMapFix patch) which equates to about 7 frames per enemy in vanilla.

GroupAI v2 has a conflict with this hack.
Therefore I’ve edited GroupAI v2 slightly to not always trigger when using DecideOnDangerMap. I’ve made it so that if you’re using an ai3 that does not care about the penalty for the attack power of opponents, it will not aggro the group.

Edit: I hate to keep bumping my post, but 7743 found a game crashing bug with this hack this morning and I’ve since redone the hack to avoid this bug.

4 Likes

Frames for AI to display targetting cursor

PUSH 
ORG $39EAE 
BYTE 45 // Vanilla default 
POP 

16 frames example
mGBA_agY6MFIDvB

Vanilla 45 frames example
mGBA_F38VIjtTaN

Enjoy!

13 Likes

BattleStatsWithAnimsOff v2

Original v1 by @Tequila


I added weapons and WTA arrows below what Teq had set up. This can be installed even if you have v1 already.

UseWeaponTriangleForArrowsDef can be defined as False if you prefer to have arrows appear based on dealing a greater % of hp than the opponent.

:confetti_ball: :tada:

Edit: Improved aesthetics a little.

15 Likes

Steal with full inventory

mGBA_mGi5cTAArp

What was meant to be a quick and easy quality of life hack ended up taking hours. Oh well.

This is a minor convenience for thieves I guess. :man_shrugging:

35 Likes

As man who once wanted to create HeistEmblemTM this is one of the best things ever. ( I still kinda want to make it tbh)

4 Likes

:crown: you dropped this

3 Likes

It’s actually really nice for romhacks with more weapon variety and held items, since only having 5 slots and needing to leave 1 or more open really hurts thieves in those, so don’t sell yourself short, great work!

1 Like

This is going to be a “for a friend” post but actually for real since I’m not using it, but as a heads up the space you’re inserting the proc into is completely skipped by popup rework (and thus skillsys)

	// A re-do of my first ever hook into proc code :)
	ORG 0x9A3600
		// Replace the weapon broke/wrank got popup calls with construction of the anims off popup loop
		PROC_NEW_CHILD_BLOCKING(gProc_PopR_AnimsOnWrapper)
		PROC_JUMP(0x9A3620)

3 Likes

Thanks, @Pikmin1211! I should’ve tested it with skill sys, too.

To anyone who already installed it: don’t worry, you don’t need to revert to a backup or undo anything. You can re-install the patch or change the ProcJump to 0x9A3618:

It now has #ifdefs based on if you’re using skill sys or not, so this should be installed after skill sys.

3 Likes

Did some work getting @StanH’s incomplete TruePartySplit hack to a semi-usable state, as it sadly hasn’t been touched in over a year, I think. It’s really cool though, so I thought I’d share what it can do and what was planned.

The idea is to have up to 8 parties and freely manage your units. I debugged it and made it so pressing start ends the menu and actually sends units to their respective parties.
ezgif.com-gif-maker (4)

It was intended to also have units that are forced to one party or another, but I couldn’t get it to work properly. Here I have Eirika and Ephraim as forced to party A/B respectively, but nobody is able to be moved now for some reason. I don’t think whether a unit is forced into their party or not is being initialized at all, which breaks things down the line. When I have no units forced to a party, it works fine.
image
It probably ignores dead units, and as lords dying causes a game over, you could probably just set them as dead via the UNCM patch and revive them after the menu. This won’t cause a game over - don’t worry.

Additionally, it doesn’t care if you send all your units to one party or another. lol
you may also need a way to stop the player from sending all their good units to one side and softlocking themselves :sweat_smile:
mGBA_qiaKpoZJNN

It would also be nice to be able to press R on a unit to view their stats, or have a way to manage their items. But it’s already a pretty complex hack, so I’m just grateful Stan made this at all.

Please note that this hack requires 39 bytes of ram allocated, with your custom address defined in the installer. Without this, parties won’t be saved between chapters, although with only 2 parties and some convoluted eventing, it might be usable…
I recommend editing EMS to save those 39 bytes. You’ll have to choose your ram location yourself.

Please enjoy Stan’s work :smile:

18 Likes

yo thanks for doing this and sorry about the mess I left you with '=)

4 Likes