Complex recruitment issues

Before asking, make sure to search! Press the :magnifying_glass_tilted_left: in the upper right to search.

Hacking method: FEbuilder

Base Game: FE8

So I’m trying to create a recruitment where a character needs to have one of three items to be fully recruited into the army. So basically you have a unit show up with none of the ideal items and the next turn a new unit appears with an item that can have her fully recruited. Said items to fully recruited are a Fire, Thunder or a new anima tome called a book which is a one-range physical tome. I’ve installed a patch to check if a character has an item in there inventory after the chapter. However, that patch can’t check if a character has either one item or multiple of the preferred items So how should I fully figure out this issue.

Could you run the check multiple times to get around this issue? 3 for each item. Like it could be like
if fire yes
player
if fire no
enemy

and keep doing smth like that to refresh just in case.

Might not be the best way to go about it, but you could do something like:

Check if item (Fire) is in inventory/possession - Set flag on (global if end of a chapter, temp if in same chapter)
(If not) Go to label 0x1
Goto Label 0x2
Label 0x1
Checks if other item (Thunder) is in inventory - If yes set flag on
If no go to label 0x2
Label 0x2
End event

Then check if flags are set in talk convo with unit.

Could also do the checks in the talk conversation rather than at the end of a chapter or during a chapter. Could make it a bit easier to read what is going on as you event it out. Many potential ways to get the result, mainly a matter of how you intend to set things up I think.

I intend on her starting the map as a blue unit so…

So something like if the unit doesn’t have the item at the end of the chapter they leave?

This won’t be perfect, but might give you some ideas.

End of chapter could check if item exists in the character’s inventory (and/or supply/all inventories), if item 1 exists, set counter add 1 and jump to a check for the 2nd item. If that exists set add 1 and go to next check for the last item, if yes set counter add 1.

Next check counter.
If counter = 0, go to a label with event that will make the character leave.
If counter = 1, go to label event for only the one item
If counter = 2, event involving having two of the items
If counter = 3, event involving having all of the items.

EDIT: Basically like how the FE7 chapter with Lucius/Raven handles giving items depending on how many of the green soldiers you save.

So I’ve tried the result were she doesn’t has a tome and it did what I wanted, now I’ll check if the other options worked.

Update: First tome, didn’t work

So I rearranged the code and it gave me the same result as before…

Here’s a simplified version just checking for items (didn’t want to play with counter).

Basically if item 1 exists do the line with “beep boop bop” and jumps to the rest of the end event.

If no, check if item 2 exists. If yes it says “jumped to end” (it’s old placeholder text I used for testing stuff a while back) and jumps to the rest of the end event.

If neither item is found it removes Arlo from party and continues the end event.

EDIT: Doing it this way you could have it set flags for a more complicated setup. Say temp flags A and B instead of those dialogues I put. Have it go to another conditional ID that checks which flags are set. If A is set it does one thing, if B is set it does another, if neither it does something else, and if both are set it does yet another event.

So here is a bit of messed up code that i’ll try to fix up.

Update: Turns out the first event was looping, it should not loop, it should only do the event once and then go to chapter 5

Have each of the items been tested and are working now? Glancing at the screenshot, the way the Book and Thunder are set up may not work properly if fire is never obtained.

Here’s an example of how you can do it with the format you had above, but with the alive check at the start to avoid running the item checks if the character is dead.

I confirmed each of the items works. The I am alive dialog line was just a sanity check for me. Added comments to make things easier to read what it is doing.

So I have tried that. So far only with the fire tome and it works perfectly good! Time to check the other options.

Update: Book caused the fire tome dialogue, same without a tome, and she’s even still in the party.

Book caused the fire tome dialogue, same without a tome, and she’s even still in the party.

I’ll be going off the one screenshot you provided, so your event has probably changed since that post:

This is due to how your event is structured. It is correctly made at the beginning with the fire tome item check, but subsequent lines are out of order.

For the fire tome it goes item check → BEQ → conversation
For book and thunder this is reversed, so the BEQ basically does nothing for them.

The labels you’re doing also makes it a bit harder to tell what’s going on. For the fire BEQ you have it pointing to label 0x1, which is the next line of the event. This means no matter what, if the fire tome exists it will play that line of dialogue rather than going to check the thunder item. Plus you have some extra labels placed about, some duplicated.

Take a look at the order of things in the most recent screenshot I posted.
Check character → if alive it executes the line immediately after it, if dead it jumps to ID 0x9000.
Checks iron sword → if it exists it executes the following line (dialogue then jump to end), if it doesn’t exist it jumps to 0x0 to check for the next item.

The order of everything matters a lot, and making the overall event in smaller chunks to test it will make it far less confusing to troubleshoot. When I made that most recent one I first made sure it did what I wanted if the character existed, once I confirmed that I started doing the items. Made sure iron sword worked, moved onto steel sword. Etc etc.

Using one of the premade templates in FEBuilder will help get things organized properly too. To see the templates there’s a button under the Command button when you double click on an event. They’re also listed in that Command window under event template.

Here’s the updated code from last night before you replied. Yeah I see there is an issue between fire and the rest even in this code.

I made it a lot more simpler but it works!