Vesly's ASM

I think you can replace these files in the patches folder:
image

FEBuilderGBA\config\patch2\FE8U\SplitPromoItems

Note that updating FEBuilder will overwrite these files.

Maybe it’s best to contact 7743 about the issue then.

Conversation Viewer

mGBA_GnOSNEV3dM

This replaces the Support Conversations menu (which shows C/B/A supports) with a custom one that shows as many events/conversations as you’d like per chapter. It automatically loads unit id 0x01 for [LoadActive] and it does a TextCont at the end of the conversation in case you used [LoadOverworldFaces].

Please edit the Installer.event file as desired to have the conversations you’d like. The format of each entry is as such:

ALIGN 4 
ChapterOneConversations:
POIN 0; // Leave as 0 to use the generic event I made that works for whichever text ID you provide. Or put in the address/label of an event here. 
SHORT 0x9DE; // Text ID of the conversation. 
BYTE 0xFF // BG to use. 0xFF = random. 
BYTE 0; // Chapter ID (for the name of the chapter) 
SHORT 0x354 // Text ID of the title for the conversation (eg. the menu on the right). 
SHORT 0 // BGM to play

Thanks to Retina and Vyland for commissioning this and making it free to use.

Edit: Figured out a way to have fewer than 6 entries.


The box still shows up as the full size, though.

More edit:
Changed the padding into BGM and fixed a couple of sound-related things that I hadn’t noticed.

I’ve now added the option to boot directly to this menu by uncommenting //#define ImmediateConversationViewer
mGBA_3RMviIibwj
It has a little graphical glitch when exiting the menu this way, but whatever lol.
Since it can run events, it might be useful for debugging things other than conversations.

20 Likes

Replace Weps by Difficulty

Have you ever wanted to have hard-mode exclusive weapons such as Hammers, Horseslayers, and Lancereavers, but didn’t want to bother with separate unit groups for each difficulty?

This patch is purely for your convenience, then.

ReplaceWepList:
BYTE Hammer IronAxe SteelAxe Hammer // I built my game around HardMode 

Search all enemies for the Hammer item.

  • On easy, replace with IronAxe.
  • On normal, replace with SteelAxe.
  • On Hard, replace with Hammer.

This is an asmc / event command, so you simply run it at the start of your chapter after loading units. Eg. ASMC ReplaceWeaponsByDifficulty

This also autolevels their WExp so that the enemies can use their newly acquired weapons.

Come to think of it, you could also replace other items like Elixirs with Vulneraries. I think it’ll mostly be used for weapons, though.

Enjoy!

8 Likes

The meaning is slightly different.
The “skip the title screen and go directly to the display” part is the correct interpretation.
The problem is what comes after that.
I want to display a specific conversation event without also displaying that menu.
For example, I want to display the conversation 0x1234.
In other words, when I start the ROM, I want to display conversation 0x1234 directly, without even showing the title screen.

If we could implement this, we would be able to preview the text directly, just like the Sappy button.
In other words, add a button to the TextEditor of the FEBuilderGBA, and when you click on it, it will play the conversation ID and the code to display it embedded in the temporary ROM.
It would make debugging even easier.

1 Like

I think you should hijack this function to execute an event you inject into ram:

You could hook the code to check if the ram at a certain address is set, and if so, execute your debug event. If not, run the game as normal.

I hijacked it here to immediately go to the conversation menu.

Make Berserk not attack the same allegiance

PUSH 
ORG $39722 
SHORT $2100 
POP 

mGBA_lU3ib60mpQ
Note: Eirika moves towards enemies while O’Neill does not (because his ai2 is “do not attack” in the LOAD). Enemies no longer attack each other, too.

mGBA_FTdKn0lKb7

AiData 0x203AA04 + 0x7B u8 aiConfig; is normally set to 4 for Berserk phase and the 2 bitflag is removed partway through. All I did was change it to 0 instead of 4 and it seems to work so far. I’m not sure what the bitflags for aiConfig do.

Enjoy.

Edit: As a bonus, this treats all units that haven’t acted as Berserked:

PUSH 
ORG $397F6
SHORT $46C0 
POP 

You could make a turn event where if there are enemies alive, then automatically end the turn (so all units will be AI-controlled that turn). It can be called by doing ASMC 0x8022739

6 Likes

AI for Canto+

After attacking, use remaining movement to go to the safest tile.

mGBA_4hdc7GLZXM

This was a pain to do. I’ve made a PR for skill sys master to include this.

31 Likes

Does this work only with the skillsys version of canto+, or can it work with other versions of canto+ implemented without skills?

Oh this is cool…wait, does this mean that enemy units that survive combat will Canto away if they can?Does this mean the new skills you’ve designed have been merged into the master version of Skill System? I’ve noticed the master version has them listed now

Yes. It requires movement to be able to be debuffed so that enemies don’t canto their max movement away. If you don’t care about that part, you could probably copy the rest. But that’d be up to you.

Yes (with canto+) and yes

1 Like

Always accept healing

mGBA_ndcKOrkWSe

The gAI3HealingThreshold table at 0x85A8390 seems to be:

% of health to exit recovery mode at? something to do with vulneraries? 
% of health to want healing at 
padding
padding

By changing the Not In Recovery Mode entry to want healing, it seems to not go into recovery mode but accept staff healing.

PUSH 
ORG $5A83A1
BYTE 99 // Percentage of health to accept staff healing at when not in recovery mode, I guess 
POP 

Enjoy!

9 Likes

As a coding laymen, what does this do in game?

By default enemies that do not go into recovery mode refuse to be healed by staff users. So you can either have enemies run away at low hp and accept staff healing, or you can have enemies that never run away that also cannot be healed by staff users.

Arena ASMC

This 10 min hack just lets you start the arena in events (for the active unit). If you use the vanilla unit menu arena effect, then your events keep running, leading to some amusing glitches.

mGBA_86EzzhpfQk

.macro blh to, reg=r3
  ldr \reg, =\to
  mov lr, \reg
  .short 0xf800
.endm
.thumb 
push {r4, lr} 
mov r4, r0 @ proc 
ldr r0, =0x3004E50 
ldr r0, [r0] 
blh 0x8031874 @ prepare Arena 
ldr r0, =0x8A394DC 
mov r1, r4 @ parent 
blh 0x8002CE0 @ proc start blocking 
pop {r4} 
pop {r0} 
bx r0 
.ltorg 

Note that the player can just exit the arena. You can loop this by giving the arena enemy 0xFD a battle quote flag and/or a defeat quote flag - when the flag is on, you know that the player actually fought / defeated the arena enemy. If the flags are off, then show a message like “C’mon, let’s fight!” and goto to start of your event again.

6 Likes

Here’s one for you. Can you make it so Rally skills give EXP when used? You are using a turn to buff an ally afterall, much like the Nills Grace of Thor’s Ire items from dancers. Shouldn’t it work like that or a staff?

Also could you take a look at Vengeance and Skybreaker? The first is always misfiring. I either get the animation trigger with no bonus damage or in the next turn i get a massive damage number on my screen that doesn’t translate to reality. And then Skybreaker straight up doesn’t work. I’ve seen this happen in two distinct hacks that had these skills.

Rally skills giving exp would be stupid busted since you can just do it every turn, you dont even need to leave enemies alive like with phantoms

just start the event engine with an event to give the active unit exp in the relevant part of the rally skill

Summary
	.equ EventEngine, 0x800D07C
RallyCommandEffect:
	push {lr}

	ldr r0, =gActiveUnit
	ldr r0, [r0] @ arg r0 = active unit

	bl GetUnitRallyBits

	mov r1, r0 @ arg r1 = user argument

	adr r0, RallyCommandEffect_apply
	add r0, #1 @ arg r0 = function
	ldr r2, =gActiveUnit
	ldr r2, [r2] @ arg r2 = active unit
	bl ForEachRalliedUnit

	ldr r3, =StartRallyFx
	bl  BXR3

ldr r0, =MyEvent @ these 
mov r1, #1 @ three
blh EventEngine @ lines  

	ldr  r0, =gActionData
	mov  r1, #1
	strb r1, [r0, #0x11]

	mov r0, #0x17

	pop {r1}
	bx r1

I’m not interested in fixing bugs for skills I didn’t write unless I actually want to use the skills myself, sorry. Please report bugs to the skill system thread instead.

It’s the same principle as a staff use or a Dancer ring use. Both give EXP without the need to kill an enemy.

Display Obtainable Item

Building off of the work by @Mkol and @Huichelaar, this adds an icon to display over units that you can steal from (the previous version was only for droppable items).

mGBA_Tdkf09xBXR

Additional Details

It turns out searching through every unit’s inventory for stealable items every frame lags the game, so I had to complicate things and use 8 bytes of ram as a cache to avoid any lag. By default, I’ve used 0x203B1F0 which is also used by the Unit SFX patch:
image

If you use that patch, please find a different ram address to use for this hack. Additionally, if you use Huichelaar’s Danger Radius hack then you’ll want to change this part:
image

The cache is refreshed each phase and after stealing. If you’re loading units and the icon doesn’t show up immediately, you can ASMC SetupCacheForStealableItems to fix it, or just wait until the next phase. The cache is not saved on suspend, so resetting will turn it off for that phase.

Note that the SystemIcon used is based on the current SkillSys default.
image

Enjoy!

Edit: Emmett brought it to my attention that this wasn’t working with non-skill sys. The issue is that most builds of SkillSys change the function IsItemStealable to be given r0 = unit, r1 = item slot instead of r0 = item id.

My solution is to check if the bytes at 0x8017054 are the vanilla ones of 0x1C01B500 and if not, give the function the skillsys parameters. This feels very much like a cursed solution. Oh well, if it works, it works.

14 Likes