Guarii

Villager
Member
Joined
Dec 31, 2021
Messages
25
Reaction score
11
First Language
Italia
Primarily Uses
RMMV
Hello brothers! I wanted to ask you about a fairly simple way to create various game endings. That is, that if you do actions during the game at the end it can change the fate of the story. How does this work with variables or switches? Could someone explain it to me? Thanks and sorry for my English. ;)
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
932
Reaction score
953
First Language
german
Primarily Uses
RMMZ
I think Switches and Variables are the only things you need to know. Anything else is pure practice.

Just a Short Example:

Code:
Conditional Branch: If Switch: Princess rescued
  Conditional Branch: If Switch: Dragon slayed
    Transfer to Map: Happy End
  Else
    Transfer to Map: The princess leaves you, but the dragon becomes your friend
  End
Else
  Conditional Branch: If Switch: Dragon slayed
    Transfer to Map: You live peacefully, but alone
  Else
    Transfer to Map: The princess now calls herself Daenerys Targaryen and pets the dragon
  End
End
 

SGHarlekin

Orc Jester
Veteran
Joined
Jun 29, 2020
Messages
1,123
Reaction score
1,368
First Language
German
Primarily Uses
RMMV
What @Aerosys said pretty much. You can make pretty complex paths and endings with these alone, depending on how many conditions there are but it all boils down to his example.
 

Spaske

Veteran
Veteran
Joined
Nov 6, 2021
Messages
276
Reaction score
143
First Language
German
Primarily Uses
RMMZ
Hello brothers! I wanted to ask you about a fairly simple way to create various game endings. That is, that if you do actions during the game at the end it can change the fate of the story. How does this work with variables or switches? Could someone explain it to me? Thanks and sorry for my English. ;)
A fairly simple method for (GOOD - BAD) would be to create a variable and increase or decrease its value based on choices, like you kill the cat = -1, safe the cat = +1 and so on....

At the end then a simple if...
if var 1 = > 0 then good ending
if var 1 = < 0 then bad ending

You chose the numbers ofc, you cann different good, endings, like good, really good... ect...
Or add neutral inside...

The rest is already explained by Aerosys.
 

JohnDoeNews

Mod on Steam (MV/MZ)
Veteran
Joined
Apr 25, 2017
Messages
1,670
Reaction score
1,229
First Language
Dutch
Primarily Uses
RMMV
I like to give the player certain items when they did things one way or another.

Lets say your helped Pete grow his carrots, at the end of the quest there might be a scene, which shows Pete saying: "Thank you so much! Here, this carrot is for you. I thought you liked it, because if you look close enough, it kind of looks like you."

Then you get the item, which will always stay in your inventory and can not be used, dropped or sold in any way.

At the end of the game, you will still have the carrot that kinda looks like you. And you would not have had that carrot if you did not help Pete grow any carrots. So, now this carrot can slightly change how the ending will be.

When you are near the end of the game, you can have a scene where all the collected items, like Petes sentimentally valued carrot, each trigger a small scene recalling the memory behind it.

This means, the more unique items you collect, the longer the ending will be. This is different than the other alternative endings, where you can get different scenes, but only one depending on all the choices combined.
 

Guarii

Villager
Member
Joined
Dec 31, 2021
Messages
25
Reaction score
11
First Language
Italia
Primarily Uses
RMMV
I think Switches and Variables are the only things you need to know. Anything else is pure practice.

Just a Short Example:

Code:
Conditional Branch: If Switch: Princess rescued
  Conditional Branch: If Switch: Dragon slayed
    Transfer to Map: Happy End
  Else
    Transfer to Map: The princess leaves you, but the dragon becomes your friend
  End
Else
  Conditional Branch: If Switch: Dragon slayed
    Transfer to Map: You live peacefully, but alone
  Else
    Transfer to Map: The princess now calls herself Daenerys Targaryen and pets the dragon
  End
End
Thank you so much for the response!
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
14,506
Reaction score
15,811
First Language
English
Primarily Uses
RMVXA
This should be under the support for the engine you are using. I'll move it to MV support as that is what you list as your engine of use, if you are asking for another engine let us know.
 

Latest Threads

Latest Profile Posts

First order of polish today was doing icons.
Next one is latvian.
IconSet.png
Oh wow I made a mistake taking on four full classes at once. Now game dev isn't the only thing that can do this to me:

no-sleep-spongebob.gif
Oh hey, let me write down a quick explaination how to do something... 1000 words later.
Hey folks, if you post about a problem you're having, and people give you suggestions to fix it, and one of those suggestions works, don't forget to come back and let them know. And it wouldn't hurt to say thanks while you're at it ;)
dV9O5Z.png


Continuing our countdown with Capsule Monster #14 Plug-Go! Plug-Go was originally meant to be the design of a gameboy game I wanted to make that was inspired by Megaman Battle Network! While that hasn’t worked out I’m happy I was able to recycle his design!

Forum statistics

Threads
131,522
Messages
1,220,465
Members
173,224
Latest member
ZecaVn
Top