Search found 51 matches

by Valmoer
Wed Apr 18, 2012 10:41 am
Forum: Ren'Py Questions and Announcements
Topic: Point-based games and deciding tiebreakers
Replies: 29
Views: 5051

Re: Point-based games and deciding tiebreakers

Warning : long post incoming define e = Character('Eileen', color="#c8ffc8") # The game starts here. label start: $ drink_points = 0 $ hunger_points = 0 $ social_points = 0 e "You've created a new Ren'Py game." e "Once you add a story, pictures, and music, you can release i...
by Valmoer
Wed Apr 18, 2012 4:54 am
Forum: Ren'Py Questions and Announcements
Topic: Can't import python module calendar
Replies: 6
Views: 3068

Re: Can't import python module calendar

I had noticed the same thing with the decimal module, which is part of the 2.6 distribution. And I have the same "calendar exists but locale doesn't" problem as CodeMonkey does. Just to check - I've tried declaring all the modules in the python standard library , and so far, I've noticed t...
by Valmoer
Tue Apr 17, 2012 6:59 pm
Forum: Ren'Py Questions and Announcements
Topic: Point-based games and deciding tiebreakers
Replies: 29
Views: 5051

Re: Point-based games and deciding tiebreakers

First part : good. Edit : as we got over to the second page, i'll reprovide a bit of context by quoting the previous message. My Question : explain those two lines in natural language. $ menuitems = [ ("The Number Five", 5), ("The Word 'blue'", "blue") ] $ result = renp...
by Valmoer
Tue Apr 17, 2012 5:58 pm
Forum: Ren'Py Questions and Announcements
Topic: Point-based games and deciding tiebreakers
Replies: 29
Views: 5051

Re: Point-based games and deciding tiebreakers

Argh, I also got confused as to which parts in the first bit of code I should be changing, based on what items have points allocated to them. :c I left them as 'Person A,' etc. since I wasn't quite sure about it. Would I be changing the 'Person A,' etc. parts and the 'person_a_points' parts to some...
by Valmoer
Tue Apr 17, 2012 4:06 pm
Forum: Ren'Py Questions and Announcements
Topic: Point-based games and deciding tiebreakers
Replies: 29
Views: 5051

Re: Point-based games and deciding tiebreakers

Am I on the right track here? You're mostly right, but your code needs proper indentation : hunger = 0 $ drink = 0 $ social = 0 label start: e "I wonder what I should do today!" "She thought about her choices for a moment." menu: "Get something to eat.": $ hunger += 1 ...
by Valmoer
Tue Apr 17, 2012 1:31 pm
Forum: Ren'Py Questions and Announcements
Topic: Point-based games and deciding tiebreakers
Replies: 29
Views: 5051

Re: Point-based games and deciding tiebreakers

You misundertood the highest_points = max(points.values()) line. It doesn't return the 'maximum possible' (there's no such thing in computing (except if you go over the max value for an integer, which is 2^63 = 9.22337204 × 10^18 ** - so not gonna happen soon.)) It returns 'the maximum of the values...
by Valmoer
Tue Apr 17, 2012 12:44 pm
Forum: Ren'Py Questions and Announcements
Topic: Point-based games and deciding tiebreakers
Replies: 29
Views: 5051

Re: Point-based games and deciding tiebreakers

Well, points is a dictionary : a dictionary is a collection whose access is handled by keys. Each item in a dictionary thus has two parts : the key -> it identifies the wanted value. the value -> pretty self explanatory. In SleepKirby's example points = { 'Person A': person_a_points, ... 'Person G':...
by Valmoer
Tue Apr 17, 2012 12:09 pm
Forum: Ren'Py Questions and Announcements
Topic: Point-based games and deciding tiebreakers
Replies: 29
Views: 5051

Re: Point-based games and deciding tiebreakers

len is short for length : it is a function that return the length of the list that is passed as a parameter (here, the length of the lists of persons with the highest number of points. points.iteritems() is an iterator . An iterator is an element that let you, as the name says, iterate over a colle...
by Valmoer
Tue Apr 17, 2012 11:42 am
Forum: Ren'Py Questions and Announcements
Topic: If value
Replies: 3
Views: 772

Re: If value

One: Wrong forum. It was Ren'Py Questions and Announcements . Two: The key concept to understand is 'what a variable is' : it is storage for data. Once data is put in a variable, you can access and check it as you wish. menu chara_pick: "Pick a character" "John": $ chara = "...
by Valmoer
Tue Apr 17, 2012 10:51 am
Forum: Ren'Py Questions and Announcements
Topic: Video format that works in most computers
Replies: 5
Views: 731

Re: Video format that works in most computers

You wanna be careful : if you put MPEG-2 videos in your software, you theorically have to pay up . (Here is relevant legal mumbo-jumbo). I would nonetheless agree with sciencewarrior that most users should be able to see it, as it is a commonplace codec (it's used in 'DVD-Video', the leader format f...
by Valmoer
Tue Apr 17, 2012 10:16 am
Forum: Ren'Py Questions and Announcements
Topic: Auto-tracking of the variable
Replies: 1
Views: 550

Re: Auto-tracking of the variable

You can't "auto-check" a variable in the sense there is no* renpy or python way of checking a variable each time it is modified and/or acted upon. You must manually check each variable each time you want to check if they have changed / reached a treshold. Your best bet, considering what yo...
by Valmoer
Mon Apr 16, 2012 7:30 am
Forum: General Discussion
Topic: Titanic
Replies: 1
Views: 500

Re: Titanic

I beg to differ. Not that I think that it isn't an awesome comemoration, or that I'm unhappy that lives were saved (quite the contrary, actually). But the message has been updated : It's a Spanish sailboat :roll: :lol: (To be fair, the pre-update message did say it was a french sailboat - the confus...
by Valmoer
Sun Apr 15, 2012 2:13 pm
Forum: Ren'Py Questions and Announcements
Topic: Multiple Ending scripting
Replies: 27
Views: 4071

Re: Multiple Ending scripting

You can also use the and and or keywords if you have different variables that track different kind of events label start: $ i_have_been_nice = False $ i_have_been_helpful = False menu: "Do something nice": $ i_have_been_nice = True "Do nothing" menu: "Do something helpful&qu...
by Valmoer
Fri Apr 13, 2012 5:26 pm
Forum: Ren'Py Questions and Announcements
Topic: Transferring save games between different games
Replies: 12
Views: 3305

Re: Transferring save games between different games

When the Multipersistant object is created at init time, isn't its data loaded in memory, though ? It could be costly to have multiple game-status-heavy object in memory at all times just for initialising a new game (Not that much costly, I agree, but I'd rather keep it in the ROM for as long as I c...
by Valmoer
Fri Apr 13, 2012 4:52 pm
Forum: Ren'Py Questions and Announcements
Topic: Transferring save games between different games
Replies: 12
Views: 3305

Re: Transferring save games between different games

If I understand what you ask for, you want to generate your second game data from the first game endgame status, and that the player can choose from multiples endgames saves (Mass Effect-style). It should be possible, but complex, and it would need python coding at the very least, and maybe engine p...