Search found 1320 matches

by philat
Mon Jun 11, 2018 12:35 am
Forum: Ren'Py Questions and Announcements
Topic: Hiding Screen While Movie Loads
Replies: 2
Views: 68

Re: Hiding Screen While Movie Loads

If you're using the same screen from your previous thread: add displayablesName at movie_delay
by philat
Sun Jun 10, 2018 9:11 pm
Forum: Ren'Py Questions and Announcements
Topic: Non Repeating Random without Infinite Loop Error
Replies: 7
Views: 115

Re: Non Repeating Random without Infinite Loop Error

My preference for non-repeating random is to shuffle a list and iterate through it. In this particular instance, the number of cards seen is basically the iterator. default card_indices = range(87) default lore_seen = 0 label start: $ renpy.random.shuffle(card_indices) label lore: if lore_seen <= le...
by philat
Fri Jun 01, 2018 9:40 pm
Forum: Ren'Py Questions and Announcements
Topic: [solved] Persistent dictionary disappearing upon restart :(
Replies: 22
Views: 483

Re: Persistent dictionary disappearing upon restart :(

Your tester doesn't show that any problem with persistent getting reset, just the fact that you shouldn't use python that way inside screens. As for the latter question, are you actually calling the screen manually? You said this is some sort of gallery-related thing, so that seemed unlikely. The po...
by philat
Thu May 31, 2018 10:15 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Dialogue called from a menu is not added to History.
Replies: 10
Views: 220

Re: Dialogue called from a menu is not added to History.

Call the base investigation screen (where you're waiting for the player to click the scenery or whatever) and have that screen with a button that can Show() the inventory. As long as the original screen is waiting for input, the inventory only needs to be shown/hidden.
by philat
Thu May 31, 2018 10:01 pm
Forum: Ren'Py Questions and Announcements
Topic: TypeError: 'str' object is not callable
Replies: 4
Views: 114

Re: TypeError: 'str' object is not callable

No, ConditionSwitch takes displayables. Probably comma errors. (Missing comma inside LiveComposite right before the ConditionSwitch, specifically.)
by philat
Thu May 31, 2018 9:53 pm
Forum: Ren'Py Questions and Announcements
Topic: [solved] Persistent dictionary disappearing upon restart :(
Replies: 22
Views: 483

Re: Persistent dictionary disappearing upon restart :(

Besides the fact that screens aren't supposed to run code that has effects outside the screen -- Seriously. Share something that can be recreated.
by philat
Thu May 31, 2018 5:19 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Dialogue called from a menu is not added to History.
Replies: 10
Views: 220

Re: Dialogue called from a menu is not added to History.

Right mouse/ESC uses ShowMenu. Wouldn't it make more sense just to not do whatever it is you're doing in menu context?
by philat
Wed May 30, 2018 9:21 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Format string problem
Replies: 4
Views: 84

Re: format string problem

Ternary operator refers to the "a if b else c" structure in the line you mentioned. It's best suited for one condition (i.e., two possible results). As for if/else, the code you linked has an example. if type == "dp": self.dp += num else: self.np += num
by philat
Wed May 30, 2018 9:07 pm
Forum: Ren'Py Questions and Announcements
Topic: Image scaling / zooming
Replies: 10
Views: 175

Re: Image scaling / zooming

Well, yeah, im.Composite is so deprecated it's not even documented anymore.
by philat
Wed May 30, 2018 9:05 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Format string problem
Replies: 4
Views: 84

Re: format string problem

Just pull the variable out into a regular if/else. You do not want to nest ternary operators, it's hell to read.
by philat
Wed May 30, 2018 8:58 pm
Forum: Ren'Py Questions and Announcements
Topic: [solved] Persistent dictionary disappearing upon restart :(
Replies: 22
Views: 483

Re: Persistent dictionary disappearing upon restart :(

At this point, probably better to share your project (or recreate the bug with placeholder assets).
by philat
Tue May 29, 2018 10:11 am
Forum: Ren'Py Questions and Announcements
Topic: Image scaling / zooming
Replies: 10
Views: 175

Re: Image scaling / zooming

Zoom isn't a STYLE property. It's a transform property. Not sure if using zoom would be any better (tends not to look great below 0.5 anyway), but you can try using an At(). https://www.renpy.org/doc/html/displayables.html#At
by philat
Wed May 16, 2018 10:32 pm
Forum: Ren'Py Questions and Announcements
Topic: Ren'Py pause and time and such [SOLVED]
Replies: 19
Views: 354

Re: Ren'Py pause and time and such

Dropping in to note that you can curry the function to pass in more arguments (like stride). init python: def cycleoff(trans, st, at, stride=11): trans.xoffset -= stride # shouldn't this be xpos? # I'd assume you could pass in the character and update the char.xpos in here as well cycleoff_curried =...
by philat
Sun May 13, 2018 12:44 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Using conditional statements within dialogue
Replies: 10
Views: 315

Re: Using conditional statements within dialogue

(If you decide that the parser isn't the way you want to go) Use {nw} for the ctc part.

ETA: {nw} and extend, to be clearer.
by philat
Wed May 09, 2018 10:24 pm
Forum: Ren'Py Questions and Announcements
Topic: lagging return button (unpredicted image?)
Replies: 25
Views: 453

Re: lagging return button (unpredicted image?)

Tweak pos/aligns if you need; if there's any difference from what you had before it's negligible as far as I can tell from running it with the rest of your demo. default chapters = [ ("+ Editor's Preface","00"), ("1: A Guest", "01"), ("2: Drifting", "04"), ("3: Descending", "06"), ("4: The Story", "...