FE_Builder_GBA -- If you have any questions, attach report7z

This was an issue with skill system that I caused, I have fixed it:


https://github.com/sme23/SkillSystem_FE8/blob/DriveSkills/Engine%20Hacks/SkillSystem/Other%20Skills/Boon.dmp

I assume 7743 updating just a single file in the febuilder patch version is simpler than updating the entire thing, so this fix can probably be added quickly.

1 Like

Because the file size has increased, I cannot make a patch.
If make a simple patch, the data behind it will be destroyed.

old boon.dmp 52 byte
new boon.dmp 68 bytes

Maybe we should update SkillSystems…?
However, I think it is just after “Str / Mag Split” is implemented.
In most cases, after a major fix, it often becomes unstable, so I want to see a little until it stabilizes.

The easiest way seems to be to disable the boon hook.
hmm… , to me, the routine hook itself seems dangerous.

//Boon and i guess anything else that may want to mess with status healing in the future
ORG $188F6
BYTE $40 $B4
callHack_r6(Boon)

callHack_r6 consumes 12 bytes.
In other words, this hook consumes 2 + 12 = 14 bytes.

080188F4 D004   beq #0x8018900
    080188F6 0918   lsr r0 ,r3 ,#0x4 <<<<< Hook Point
    080188F8 3801   sub r0, #0x1
    080188FA 0100   lsl r0 ,r0 ,#0x4
    080188FC 4310   orr r0 ,r2
    080188FE 7008   strb r0, [r1, #0x0]
08018900 7809   ldrb r1, [r1, #0x0]

I think that the margin available is only 2 * 5 = 10 bytes.
Will your hook destroy 0x08018900?
In that case, does “080188F4 D004 beq #0x8018900” work correctly?

Looking at the disassembly of the boon hook, it still seems to be a problem.

080188F4 D004   BEQ #0x8018900  >> 
    080188F6 B440   PUSH {r6}
    080188F8 4E01   LDR r6, [PC, #0x4] # pointer:08018900 -> 08B53BE9
    080188FA F0B8 FFED   BL 0x080D18D8   //_call_via_r6
    080188FE E001   B 0x8018904
08018900 3BE9 08B5   //LDRDATA  << !?
08018904 4008   AND r0 ,r1
08018906 2800   CMP r0, #0x0
08018908 D108   BNE #0x801891C
1 Like

Wow.

I have absolutely no idea what you two are talking about lol

BEQ #0x8018900 is preceded by a check for status type 0xA, which is not a valid status (at least in FE8) and does absolutely nothing even when applied; in practice, that will never branch and as such overwriting its destination will not have any side effects.
Boon’s function does return over the second half of the literal for the function location. However, this miraculously seems not to break anything besides making the rest of the function inert and returning one function later will cause all statuses to be healed in a single turn regardless of remaining turns. Since the pointer to the function’s location can be variable, this may not always function properly. The solution to this was as simple as relocating one more instruction to Boon’s routine and pushing the return point back by 1 instruction and changing which register is used to return.
The corrected function is now an additional 2 bytes in length:


https://github.com/sme23/SkillSystem_FE8/blob/DriveSkills/Engine%20Hacks/SkillSystem/Other%20Skills/Boon.dmp

If there is no branching, I would suggest moving the hook point back.
That is, how about hooking from 080188F4 or 080188F2 instead of hooking from 080188F6?

If this is the case, this branch itself disappears, making it safer.

I made a patch to uninstall Boon.
Disable Boon with this patch.

Uninstall SkillSystems Boon

Or change it as follows in the hex editor.
188F6: 18 09 01 38 00 01 10 43 08 70 09 78 60 46

2 Likes

Worked like a charm! Thank you!

How do you make conditional events based on the value of the counter itself [Base_operand] and not on the value the counter is affected [CounterID(bitshift)]?

There is a command that checks [CounterID(bitshift)], but to my knowledge there is no command that checks the value of [Base_operand] only.

For context: I have set an event using the counter. The counter’s value is 4, and it gets subtracted by 1 each time you enter a specific tile with a certain character. Once the counter hits 0, chapter end event is called. You can enter the tiles in any order you want. Now, what I’d like is that each time the counter is subtracted by 1, a conversation event would proc.

For example, when the counter reaches 3, one conversation event would proc. Additionally, when the counter reaches 2, a new different conversation event would proc. However, I have not figured out how to do this, because the COUNTER_CHECK command checks only the value which is added or subtracted from the counter, which in my case is 1. If I use the command COUNTER_CHECK [CounterID(bitshift)] and set the bitshift to 1, I get the same conversation event each time.

My question is, is it possible to create conditional events that are based on the value of the counter and if it is, how do you do it?

I think it’s easier to make a flag than a counter.

Counters are used in vanilla for actions such as reinforcing enemies for 3 turns after certain conditions are met.
Conversely, I think that it is not used for other than that.

I think it is not suitable for counting numbers.

1 Like

What do you mean by boon? what skills would by affected by this?

boon is the name of Skill.
I don’t use SkillSystems, so I’m not sure, but I think it is related to the treatment of bad status.

Boon: Cure bad status effects
at the beginning of each turn.

There is a bug in this routine that prevents the bad status from recovering.
It seems to have been fixed in the new SkillSystems, but there was a bug back then.
Therefore, I created a patch to uninstall Boon.

2 Likes

Can you make an update to give an option to remove all errors because they’re false alarms?

Why can it be a false alarm?
If you want to ignore the error, right click on the error and select Ignore.

In FEBuilderGBA latest version, when adding something, there was a bug report that an error indicating insufficient space was displayed.
However, the problem cannot be reproduced.
If anyone can reproduce the problem, please tell me how to reproduce it.
Please tell us about report7z and the data / patch you tried to add.

Rewinded to ver_20190906.09.

Well at one time I had 151 errors and ignoring them one at a time is tiresome.

I think that it is a serious problem that 151 errors have been pointed out.
Please send report7z.

I want to check if it is a false alarm.

Simply put: I want those errors to be there, but I don’t want the program telling me they’re there, they are errors but nothing I or the game has to really care about.

.

Why can you ignore that error?

Has you install a patch that can ignore this error?
Please let me know if there is a patch that can ignore the error.
If the patch is installed, I can fix it so that the error is not displayed.

I know it’s possible to make range events where tile change is executed if an unit enters the range, but is it possible to make events where tile change reverts when there are no units in the range that was needed to execute the tile change?

Is possible.
Depending on how to make it, the easiest is to make four tiles other than the tile.
111

It is possible to check each time with the IN_AREA instruction, but if you do too much, the process will be slow.
Therefore, it is troublesome, but I think that it is better to install four huge tiles other than the tile.

1 Like