Multiple ending choices?

So I wanted my game to have a multiple endings feature, where depending on who you maxed friendship with, you can choose a different ending, ex:

If you maxed friendship with the following: Love interest, friendly rival, and best friend, you can choose from one of those endings.

I got it down on having an ending play on it's own depending on the variables, however, if your friendship is maxed with 2 or more characters, the game crashes brcause it's trying to run 2 different endings at once, can anyone help?
I guess you can set up conditional branches to prioritize which ending to show if more than one of the variables have been maxed.
It all comes down to variables and calling them when your ready to end your game.

Make multiple events that have dialog and choices that raise your "relationship level", and when you reach a specific relationship level, you add a self switch to that character event.

Do this a few times based on how far you want to go, and when you reach whatever level you need to get a specific ending, you save it as a global variable (If relationship level on Steve = 2: end1 = 1/true). Or you can write it as (If Selfswitch Steve A, B, and C (relationship 3) is true, end1 = 1/true).

Then just make a event thats based on calling all of the variables you collected throughout the game, and have whatever endings you want!

Thats something you probably have in your program, now you just need to call the specific ending you want right?

You need to call every specific variable, and then have a shut off just in case to prevent multiple endings from happening at the same time. If you do it correctly, you really dont need the shut off part, but its something you should test in your game to see if it works.

I think you should do something like this; Im using "ending 2" as an example, with three different endings.

In the perfect world, this is how your final statement should look:

Variables: end1= false, end2 = true, end3 = false, shutoff = false

(If end1 = false, end2 = true, end3 = false, shutoff = false)
(Final ending 2 plays.)
shutoff = true
end

Result: Final ending 2 plays, no repeated events

But somewhere in your code, this would probably happen since its possible to make relationships with all of your characters:

Both end1 and end2 are true, rest are false

(If end1 = false, end2 = true, end3 = false, shutoff = false)
(Final ending 2 plays.)
shutoff = true
end

Result: Final ending 2 does not play, but if other events are true, you can play another final event IF the conditions are correct.

So there's two fixes to this current fix, in order to run things smoothly (sorry for making it complicated)

1: Prioritize a ending you would rather have in your program, (ending 3 over ending 1 and 2, if 3 is true). You would have to do a checker statement before the final event plays, and make it where you make your end1 and end2 false, and then the final choice event plays.

In this example, the order you would want your ending to play in, is 3, 2, and 1.

If 1 and 3 are true, 3 plays over 1.

(If end3 = true)
end1 = false
end2 = false
(If end2 = true, end3 = false)
end 1 = false

end
(Final event from above plays)

2: Make a new event and situation, where the player needs to manually choose one person in the end. This way, the player has input on what kind of ending they want, and ontop of a smooth fix your problem.

Make sure you dont replace this with your current code, but write a new one. Since you said if one player only does one relationship, it works.

(if end 1 and end 2 = true, OR end 2 and end 3 = true, OR end 1 and end 3 = true)

"What should i do? Who should i pick?

(If end1 = true)
Choice 1
end2 = false
end3 = false

(If end2 = true)
Choice 2
end1 = false
end3 = false

(If end3 = true)
Choice 3
end 1 = false
end 2 = false

end

(Final event from above plays)

Whatever the result of the player is, you turn off, or make all other endings false, and then you transition into your final event ending.

(Player chooses ending 1 over ending 3, turn off all other endings before final event ending plays.)

You'll have to play around with the logic with the program, but im sure something like this can be done with alittle bit of testing!

I hope this helps! Frank
One thing you could do is put in a tie breaker choice somewhere in the game for situations where the player has more than one maxed out relationship. It could be something totally innocuous but makes the player make a decision that determines who gets that +1 over max and guarantees that there is only one.
I guess you can set up conditional branches to prioritize which ending to show if more than one of the variables have been maxed.

I mean I want the game to ask the player what ending they want then show the options but the only ones you can pick are ones with maxed friendship
I mean I want the game to ask the player what ending they want then show the options but the only ones you can pick are ones with maxed friendship

(cough) lol
(cough) lol

Ummm ok?
@Lyseth Do I get this right, your actual question is, how to make selection box which only has the maxed endings as options?
@Lyseth Do I get this right, your actual question is, how to make selection box which only has the maxed endings as options?

Yeah, but with the box towards one side of the screen while the character's picture is displayed as well towards the other side, ex:

When you have a name highlighted for selection it displays the corresponding character's picture, however, if the player cleared all requirements for true ending, it plays the true ending without giving the player the option, any chance this is possible?

Original thread: https://forums.rpgmakerweb.com/threads/multiple-ending-choices.93875/