Hello! I'm not sure if this blog is still active, but it's worth a shot. When doing something with multiple endings, how would you do a dating sim with multiple endings for each character, like a Good one and a Bad one?
Heya Isaacie! Better late than never I hope?
I did an initial treatment of the idea of multiple endings here. Iâd go about it a little differently now, so Iâll give more detail about architecture for a game below.
The basic substance of your question is âhow do I make the game interpret the difference between different states?â. If youâre using variables to keep track of things, all you need to do is have the game test if the player has met certain conditions in order to determine an outcome.Â
For a game with multiple romance-ables, it might work best to separate the romance paths into different files. Then, at the end of each romance file, have the conditionals for if something is a good or bad end. You can bring the player back into the MAIN file for things that are the same across all runs, and then have the game check to see which character they are romancing to go decide where to go.Â
This would work something like:Main story line ~> romance path chosen ~> go to characterâs romance file ~> romance interaction #1 ~> back to main file ~> romance interaction #2 ~> ect.
In that case, it would be simplest to CALL the new fileâs first label, then RETURN at the end of the romance scene after choices are made. This will put you back into the main script right where you last left off to do general same story line things. Then you can call the next label in from the romance file and return back, ect.
If the story never intersects again once a main love interest is chosen(think something like Katawa Shoujo) then you can just continue the story in those romance files. (Youâll probably want to set a variable like Romance_X = True in your files too if it affect the main plotline minimally, but you still want ppl to reference it in dialogue or something!)
At the end of the romance files you need some way to determine if theyâve done âgoodâ or âbadâ to see what ending they should get. You can do this by keeping track of how many âaffection pointsâ they got and deciding if they have below a certain value they get a âBad Endâ.Â
Example:
label determine_ending:     if Leo_love <= 10:    jump bad_ending  elif Leo_love ....    .....
Ect for each scenario. This only works if they can only romance one person at a time. They get locked into a romance path(whether or not the rest of the game has story beats in common between routes) and so only one person needs to be checked.
But what if you wanna let them romance multiple ppl at once and see which one they got the farthest with?
For something like that youâll need to put the affections in a dictionary, determine which one is the largest and then do the good/bad ending logic above.The logic would look something like this:
init python:Â Â John_love = 0Â Â Mike_love = 0Â Â Jimmy_love = 0Â Â Sasha_love = 0(game play where you add affection with variable_name += number amount)(then a python block right before the end of the game)python:Â Â affection_dict = {"John": John_love, "Mike": Mike_love, "Jim": Jimmy_love, "Sasha": Sasha_love}Â Â love_holder = []Â Â winner = None
  for x in affection_dict.values():    love_holder.append(x)  love_max = max(love_holder)  for x in affection_dict:      if affection_dict[x] == love_max:        winner = x
Then at the end of your main file youâd type something like this:
if winner == âSashaâ:  jump Sasha_endingselif winner == âMikeâ:  jump Mike_endings  ....
Ect for each romanceable. Then you once again determine if they got a good or bad ending with them or not based on affection, which is separate from who they had the most affection with.(they could theoretically have 0, 0, 5, 9 and need a minimum of 10 for any non-bad end, if can even check to see if the max of the list is bigger than 10 and if not just have them giga fail with an ultimate bad end or something. Youâd just add a line after love_max = max(love_holder) to say:
if love_max < 10:Â Â jump ultra_fail
They wonât even get to the rest of the code to pick the winner because it doesnât matter lol.)
All that being said, the basic principals are:-have conditions that are failable-figure out what level of failure justifies a bad ending based on how your game plays-test the state of the game based on those conditions-use the result of that state testing to produce an end state result
I know this was long, and a very delayed answer, but I hope this helps you and others! Remember: If your code wonât compile and you donât know why; who ya gonna call? The RenâPy Help Desk!















