Getting best option (DSE)

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
baylor
Newbie
Posts: 7
Joined: Thu Dec 18, 2014 9:06 pm
Contact:

Getting best option (DSE)

#1 Post by baylor »

This is probably a trivial question but i can't think of how to Google it

Person A likes you 50, B likes you 70, C likes you 20. It's afternoon on day 7 and the event that plays should be on the story arc for B because B has the highest score.

In the DSE event definition i can state a criteria such as "intelligence >= 50" but i don't know how to say "B has highest score".

i've read the FAQ and whatever i could Google but this is surprisingly hard to phrase as a Google search.

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: Getting best option (DSE)

#2 Post by SundownKid »

I'm pretty sure there is something like this in the variables tutorial thing: http://renpy.org/wiki/renpy/doc/tutoria ... er_Choices

More specifically the very last code example. It has options for having the highest points in variable a,b and c as well as potential ties between a-b, b-c, a-c and a-b-c.

baylor
Newbie
Posts: 7
Joined: Thu Dec 18, 2014 9:06 pm
Contact:

Re: Getting best option (DSE)

#3 Post by baylor »

Did a quick test based on what SundownKid posted and it worked like a charm.

i've now learned that in DSE i can define events like this:

Code: Select all

$ event("cuter", "charisma > max(intelligence, strength)", priority=300)

Post Reply

Who is online

Users browsing this forum: No registered users