Script Assistance - "earning points with characters"

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Satur1n
Newbie
Posts: 5
Joined: Tue Jan 15, 2013 10:54 am
Contact:

Script Assistance - "earning points with characters"

#1 Post by Satur1n » Tue Jan 15, 2013 11:06 am

I had an idea for my first creation with Ren'Py. I've been following a tutorial for the basics and I understand the script from what I've read, so I thought I'd ask for some advice on an idea I came up with last night.
When certain characters ask you a question, your answer would earn you a "point" with them, improving their opinion of you. Then, at certain "checkpoints" for lack of a better word, the game would see how many "points" you have with each character, and a scenario would begin based on that.
So imagine you have three love interests - Girl A, Girl B and Girl C.
At six total stages, they may ask you a question or you may choose to take an action that would grant a "point" to either character. With a maximum of six points for one girl.
Later on, you arrive at a stage where the game checks the points you have with those girls. If you have at least three on one or more of them, they would both appear and ask you to take them out on a date. But the one you have no points on would not appear.
If you have two points with all of them, the scene would be skipped because you would need at least three for them to ask you out.

How would this be implemented with script, if it's at all possible?
My idea is to introduce six potential love interests with varying "difficulties" based on when they appear and the protagonist's predetermined standing with them. Such as a childhood friend already having one point, and an ex-girlfriend having minus one point, but two early-introduced girls having zero points, one who appears later, meaning she would have to receive a lot of attention and thus be more difficult, and one who would only appear after a successful playthrough unlocks extra scenarios, where the sixth girl is a hidden character who needs to be found first.

User avatar
SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: Script Assistance - "earning points with characters"

#2 Post by SundownKid » Tue Jan 15, 2013 12:30 pm

Here's an example of how you can give points and determine what to do based on points. It's the most simple way you can make a dating game or other friendship simulator:

Code: Select all

label start:
	$ fred_points = 10
	$ dave_points = 10
	f "My name is Fred."
	d "And my name is Dave."
	n "And this is the narrator character in the first person."
	menu:
		"I love you, Fred!":
			$ fred_points += 10
			n "I decided to tell Fred how I felt."
			f "I knew she loved me!"
			d "Aw, this sucks."
		
		"I love you, Dave!":
			$ dave_points += 10
			n "I decided to tell Dave how I felt."
			d "You're great too!"
			f "Damn, I'm leaving..."
		
		"I hate you both.":
			$ fred_points -= 10
			$ dave_points -= 10
			n "I told them both to leave, because I loved someone else."
			
	n "And now, the story continues after the menu."
	
	if fred_points >= 20:
		# Fred's date goes here
	if dave_points >= 20:
		# Dave's date goes here
	else:
		# Some other person goes here.

Satur1n
Newbie
Posts: 5
Joined: Tue Jan 15, 2013 10:54 am
Contact:

Re: Script Assistance - "earning points with characters"

#3 Post by Satur1n » Tue Jan 15, 2013 12:34 pm

Thanks a lot; that's great. I'll make sure to credit you for helping. =)

User avatar
SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: Script Assistance - "earning points with characters"

#4 Post by SundownKid » Tue Jan 15, 2013 12:35 pm

No problem. I'm sure there's a way to determine what to do if BOTH people's points are >= 20, it should be in the documentation. However, that's not even necessary if you make the player decide whether to go with this person or that person.

Satur1n
Newbie
Posts: 5
Joined: Tue Jan 15, 2013 10:54 am
Contact:

Re: Script Assistance - "earning points with characters"

#5 Post by Satur1n » Tue Jan 15, 2013 12:41 pm

SundownKid wrote:No problem. I'm sure there's a way to determine what to do if BOTH people's points are >= 20, it should be in the documentation. However, that's not even necessary if you make the player decide whether to go with this person or that person.
Well I'm sure if you put the "if" calls there twice in the same label, it should work the same way. I'd like to make a scene toward the end of part 1 where all girls with enough points ask the player a series of questions each, that further modify their standing.

Zalkyria
Regular
Posts: 36
Joined: Mon Jan 28, 2013 7:39 pm
Contact:

Re: Script Assistance - "earning points with characters"

#6 Post by Zalkyria » Mon Jan 28, 2013 8:49 pm

what if you have multiple bachlorettes, like around 5

User avatar
Ayutac
Regular
Posts: 150
Joined: Thu Oct 18, 2012 2:23 pm
Projects: Pokémon Dating Sim
Organization: A Breeze Of Science
Deviantart: Ubro
Location: Mayence, Germany
Contact:

Re: Script Assistance - "earning points with characters"

#7 Post by Ayutac » Mon Jan 28, 2013 9:58 pm

Zalkyria wrote:what if you have multiple bachlorettes, like around 5
Pretty much this solution? Man, arrays are sure useful =D
(Just make max_points a fixed value.)
Up next: An original, open source, text-based Dating Sim. Stay tuned ;)

Post Reply

Who is online

Users browsing this forum: Google [Bot], _ticlock_