Search found 1736 matches

by nyaatrap
Mon Jan 09, 2017 11:48 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]ConditionSwitch "pl.dp >= num" is completely IGNORED
Replies: 6
Views: 446

Re: ConditionSwitch "pl.dp >= num" is completely IGNORED

nyaatrap wrote:Though I don't think conditionswitch in ATL works, because ATL only evaluates values when it's showing or replacing.
To reflect changes in ATL, you'll need to show it again.
by nyaatrap
Mon Jan 09, 2017 11:26 pm
Forum: Ren'Py Questions and Announcements
Topic: DynamicDisplayable of object. How to show the result?
Replies: 4
Views: 483

Re: DynamicDisplayable of object. How to show the result?

You can't use image statement after start, but you have to define objects after start. It needs two steps, so you have to separate methods into two.
Here is my way of doing it: https://github.com/nyaatrap/renpy-utili ... ressup.rpy
by nyaatrap
Mon Jan 09, 2017 10:47 pm
Forum: Ren'Py Questions and Announcements
Topic: Define and Default vs. Lint and Saves
Replies: 6
Views: 491

Re: Define and Default vs. Lint and Saves

Define overwrite default everytime when game loads, so you can't alias mutable object.
Instead, you can copy objects using the copy module so these two objects become different.
from copy import copy, deepcopy: default rooms = deepcopy(rooms_init) #deepcopy if variable is nested
by nyaatrap
Mon Jan 09, 2017 1:37 pm
Forum: Ren'Py Questions and Announcements
Topic: AttributeError: 'bool' object [Solved]
Replies: 10
Views: 837

Re: AttributeError: 'bool' object

I'd rather tell how to search these errors. 1. look the error word "barter" then what word is related on error message. this is apparently "buyer". 2. search word "buyer" on all your scripts, then investigate functions that contains this word. 3. repeat this until you get something questionable. (So...
by nyaatrap
Mon Jan 09, 2017 1:21 pm
Forum: Ren'Py Questions and Announcements
Topic: AttributeError: 'bool' object [Solved]
Replies: 10
Views: 837

Re: AttributeError: 'bool' object

Just a quick examine, but I think the thing is came from screen tooltip(item=False,seller=false): if item: hbox: xalign 0.5 yalign 1.0 if seller: text ("[item[0].name]: [item[0].desc] (Sell Value: " + str(calculate_price(item, seller)) + ")") if this seller is True, then it causes this type of error...
by nyaatrap
Mon Jan 09, 2017 6:49 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]AttributeError:'StoreModule' object has no attribute
Replies: 2
Views: 2280

Re: AttributeError: 'StoreModule' object has no attribute

Did you defined, or defaulted variables before start?
Variables that is used in screens (and transforms, styles, anything other than label) need to be declared by define or default statement.
by nyaatrap
Sun Jan 08, 2017 11:06 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]ConditionSwitch "else" and "None" are posible?
Replies: 6
Views: 483

Re: ConditionSwitch "else" and "None" are posible?

"True", Null(). This code means if condition reached here, it shows Null displayable.
Though I don't think conditionswitch in ATL works, because ATL only evaluates values when it's showing or replacing.
by nyaatrap
Sun Jan 08, 2017 1:08 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Setting renpy.checkpoint in python function
Replies: 2
Views: 519

Re: Setting renpy.checkpoint in python function

No, you can't create checkpoints in python. You have to write something like:

Code: Select all

$ messages = ["a", "b"]
$ index=0
While index<len(messages):
   $ renpy.say(None, messages[index])
   $ index += 1
by nyaatrap
Sat Jan 07, 2017 2:56 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Spritesheet Support?
Replies: 3
Views: 463

Re: Spritesheet Support?

The most straight forward way is: image spriteX: "sheetX.png" crop (0,0,width,height) pause 1.0/framerate crop (0,1*height, width, height) pause 1.0/framerate Though it's very redundant way of coding. There're some other ways to code more efficiently. One example code I'm using is: init pyton: def d...
by nyaatrap
Tue Dec 27, 2016 1:24 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Opacity update after slider moving
Replies: 7
Views: 1469

Re: Opacity update after slider moving - unresponsive screen

Try: changed update_mask_opacity #without ()
Though style.rebuild is a slow operation, it's better to avoid to use it.
by nyaatrap
Tue Dec 27, 2016 11:16 am
Forum: Development of Ren'Py
Topic: Ren'Py Gripes
Replies: 507
Views: 121271

Re: Ren'Py Gripes

It would be good if transform also support named spaces, something like

Code: Select all

 transform gui.right:
Because transforms are one of the most frequently used global variables but simple names, so they conflict many times.
by nyaatrap
Sun Dec 25, 2016 11:02 am
Forum: Ren'Py Questions and Announcements
Topic: Save files always jump back to the same screen
Replies: 2
Views: 408

Re: Save files always jump back to the same screen

ShowMenu is intend to show game menus, which are separated form save data. For your game, use Show and Hide, instead of ShowMenu. You would also have to use renpy.retain_after_load() before showing the first screen, because without this statement renpy rolls back to the latest dialogue when game is ...
by nyaatrap
Sun Dec 25, 2016 10:18 am
Forum: Ren'Py Questions and Announcements
Topic: Transitions break when transformation is applied to a layer
Replies: 6
Views: 587

Re: Transitions break when transformation is applied to a la

Easy way is use config.tag_layer to change layers to show on each images, so they will be shown on different layers. If you want to use transition after transform on a same image, I don't think there's an easy way. (Even transform after transform hardly work on layer. It seems it doesn't hold curren...
by nyaatrap
Thu Dec 22, 2016 2:55 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Pause audio in the MusicRoom?
Replies: 2
Views: 281

Re: Pause audio in the MusicRoom?

PauseAudio("music", value="toggle") works for me. It looks if value is not "toggle", some play functions behave weirdly.