Search found 1281 matches

by Remix
Thu Aug 22, 2019 5:58 am
Forum: Ren'Py Questions and Announcements
Topic: Store new variable within a class?
Replies: 2
Views: 91

Re: Store new variable within a class?

Directly: SetField( store, "var_name", value ) Through a method: def set_store_var( self, var, value ): setattr( store, var, value ) Function( instance.set_store_var, "var_name", value ) You'd probably want to rewrite the setattr method of the class though, to use the store for known attributes. Alt...
by Remix
Wed Aug 21, 2019 10:18 am
Forum: Ren'Py Questions and Announcements
Topic: Random number slows down game
Replies: 8
Views: 193

Re: Random number slows down game

The randoms are definitely not the problem here. Just ran a test with init python: import time def get_time_for_thousand_rands(): start = time.time() rands = [ renpy.random.randint(0,50) for k in range(1000) ] end = time.time() return end - start label start: $ duration = get_time_for_thousand_rands...
by Remix
Mon Aug 19, 2019 9:11 am
Forum: Ren'Py Questions and Announcements
Topic: Cannot build distributions, errors detected but no actual errors in game or lint
Replies: 4
Views: 144

Re: Cannot build distributions, errors detected but no actual errors in game or lint

You could try: Delete Persistent in Launcher Delete all .rpyc files from folders in your game (just the .rpyc ones, not .rpy) Maybe make a backup of your project first. Force Recompile in Launcher (to rebuild the .rpyc files from the .rpy ones) You might also do well to check the .txt files in the p...
by Remix
Sun Aug 18, 2019 11:45 am
Forum: Ren'Py Questions and Announcements
Topic: How to force an event
Replies: 4
Views: 177

Re: How to force an event

So, where in your script does the hour change?
Are you using a timer like Kia showed or just adding to the variable in a label?

Either way, you'd likely do best concentrating on that point as a place to also run the conditional test to see if it's a new day.
by Remix
Sun Aug 18, 2019 11:36 am
Forum: Ren'Py Questions and Announcements
Topic: Expected 'image_name_component' not found -error?
Replies: 8
Views: 177

Re: Expected 'image_name_component' not found -error?

Show the code you are using...
Tell us exactly what the image is named and which folder it is in...
Do you define the image or not?
What version of Ren'Py are you using?
by Remix
Sun Aug 18, 2019 7:13 am
Forum: Ren'Py Questions and Announcements
Topic: Expected 'image_name_component' not found -error?
Replies: 8
Views: 177

Re: Expected 'image_name_component' not found -error?

If the image (popup.png) is in ./images or any sub-folder in there it will be automatically defined as popup

so remove the 'image popup = "...' bit (you do not need that and it should Not have "game/ in it anyway) and just do

show popup with moveinbottom
by Remix
Tue Aug 13, 2019 6:59 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Animated image with different repeat
Replies: 4
Views: 167

Re: Animated image with different repeat

image thunderstorm: block: "rain 1.png" pause 0.1 "rain 2.png" pause 0.1 "rain 3.png" pause 0.1 repeat 5 # Repeat this block 5 times (note the 5) block: "thunder 1.png" pause 0.1 "thunder 2.png" pause 0.1 # no repeat in this block (this bit does not need to be in a block tbh) repeat # Start the ani...
by Remix
Mon Aug 12, 2019 5:15 pm
Forum: Ren'Py Questions and Announcements
Topic: [solved] pass an index to dragged?
Replies: 2
Views: 184

Re: pass an index to dragged?

Surely you'd do best just setting a drag_name using the index then just read that from the first drag object dropped into the dragged function... init python: def test_drag( drags, drop ): print( drags[0].drag_name ) return for i in range(6): drag: dragged test_drag drag_name "drag_number_{}".format...
by Remix
Fri Aug 09, 2019 10:38 pm
Forum: Ren'Py Questions and Announcements
Topic: adjustable variables not reflecting change on live composite if defined in a style group
Replies: 2
Views: 151

Re: adjustable variables not reflecting change on live composite if defined in a style group

Styles are built at init time and pretty much set in stone from that point on (short of changing language or expressly calling style.rebuild() which is Not advised as it takes a while to rebuild them all) So, in essence, a variable or function call is likely the best approach here (depending where t...
by Remix
Fri Aug 09, 2019 10:40 am
Forum: Ren'Py Questions and Announcements
Topic: Determining how long it takes to easein and easeout
Replies: 7
Views: 178

Re: Determining how long it takes to easein and easeout

Warpers just modify the time, not any related distances (though the distance is calculated from the returned time, so it might appear to modify distance)... they take a float between 0.0 and 1.0 and return a modified float (also often between 0.0 and 1.0) Why not just alter your ATL to use multiple ...
by Remix
Thu Aug 08, 2019 8:17 pm
Forum: Ren'Py Questions and Announcements
Topic: Outlining specific lines of text
Replies: 6
Views: 189

Re: Outlining specific lines of text

Just for info, you could pass an outlines parameter to Text() if you just want it all the same...

Code: Select all

show expression Text("ABC", outlines=[(2, "#567", 0, 0)]) at top
by Remix
Wed Aug 07, 2019 6:03 pm
Forum: Ren'Py Questions and Announcements
Topic: How to import another file classes
Replies: 4
Views: 195

Re: How to import another file classes

A file in ./utils/will be parsed late though... If you want things defined in those files available in others it might be best to rename utils to _utils Ren'Py semi interprets files even before doing the inits, so it does expect to find things which are referenced in one file even if they are define...
by Remix
Tue Jul 30, 2019 7:40 pm
Forum: Ren'Py Questions and Announcements
Topic: Referencing Ren'py variables within Python block
Replies: 4
Views: 222

Re: Referencing Ren'py variables within Python block

You would need to make sure the file creating the variable is parsed before the file using it... basically name them in the order you want them.

Alternatively, you could adjust the python init to be higher than zero, with: init 1 python:
by Remix
Tue Jul 30, 2019 7:36 pm
Forum: Ren'Py Questions and Announcements
Topic: action Function() summons itself
Replies: 2
Views: 179

Re: action Function() summons itself

That is Not how to use that action...

action Function(inventory.sendToRD, "myGuest")