Search found 1853 matches
- Wed Jun 09, 2021 11:50 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Customizing/Changing Rollback function in Renpy
- Replies: 2
- Views: 720
Re: Customizing/Changing Rollback function in Renpy
Rollback is based on statements (i.e., it will rollback to the preceding statement ) but IIRC everything in a python block is treated as one statement. Possibly also things happening in a while loop, although I haven't tested that and can't be assed to do so right now. So, despite it being slightly ...
- Wed Jun 09, 2021 11:43 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Automatically darkening characters that aren't speaking, layered image version
- Replies: 10
- Views: 1175
Re: Automatically darkening characters that aren't speaking, layered image version
You can just wrap the whole image in a matrixcolor transform now, I'm pretty sure. transform grayscale: matrixcolor SaturationMatrix(0.0) define testchar = Character("test", image="test") image test speaking = "yourimage" image test = At("yourimage", grayscale) define config.speaking_attribute = "sp...
- Sun Jun 06, 2021 9:18 am
- Forum: Ren'Py Questions and Announcements
- Topic: Line id indented, but the preceding one-line python statement statement does not expect a block?
- Replies: 4
- Views: 1160
Re: Line id indented, but the preceding one-line python statement statement does not expect a block?
There shouldn't be a colon after $ randaction = renpy.random.choice(["attack", "defend"]) and the blocks under it shouldn't be indented.
- Mon May 31, 2021 9:46 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Structuring my scripts correctly while also displaying stats
- Replies: 5
- Views: 1539
Re: Structuring my scripts correctly while also displaying stats
I mean basically it's just that 1 is too broad a question to be able to answer in any meaningful way and 2 is just wrong - a shown screen will stay up until told otherwise. That said, I wouldn't really use call or Call() until you have a stronger grasp of flow control in Ren'Py - keeping everything ...
- Mon May 31, 2021 9:34 pm
- Forum: Ren'Py Questions and Announcements
- Topic: conditional substitution for "what"
- Replies: 2
- Views: 624
Re: conditional substitution for "what"
Not really sure what you're trying to do and I'm almost certain you wouldn't want to write a game in tuple format, but fwiw, you can get the variable tuple1 or tuple2 using getattr or eval (e.g., getattr(store, "tuple"+persistent.c)
- Tue May 18, 2021 2:52 am
- Forum: Ren'Py Questions and Announcements
- Topic: [Solved] Adding preference that determines length of pauses
- Replies: 2
- Views: 687
Re: Adding preference that determines length of pauses
You could use config.say_menu_text_filter with regex instead of custom text tags, I think.
- Sat May 08, 2021 11:18 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Grayscaling & focus for tutorial?
- Replies: 5
- Views: 1039
Re: Grayscaling & focus for tutorial?
Quick and dirty easy way to do this is to just show a semitransparent black image on top of everything, darkening everything. Either fiddle with the order of the black image or whatever you need not to be darkened to "highlight".
- Sat May 08, 2021 3:27 am
- Forum: Ren'Py Questions and Announcements
- Topic: Using imagebutton to return variables?
- Replies: 4
- Views: 758
Re: Using imagebutton to return variables?
SetVariable("name", name-1) / SetVariable("name", name+1)
- Thu Apr 29, 2021 11:47 am
- Forum: Ren'Py Questions and Announcements
- Topic: Limiting animations to a specific spot
- Replies: 3
- Views: 451
Re: Limiting animations to a specific spot
There are several threads on AlphaMask and AlphaBlend if you poke around the forums. From a quick glance, this looks similar to what you need: viewtopic.php?t=34323
- Thu Apr 29, 2021 3:31 am
- Forum: Ren'Py Questions and Announcements
- Topic: Not-so Permanent NVL-to-ADV switch
- Replies: 3
- Views: 526
Re: Not-so Permanent NVL-to-ADV switch
I'm not very familiar with the innards of Ren'py, but Character objects don't take very kindly to being modified in-game, iirc. Probably the simplest thing is to create two definitions and alias them with a normal variable. define testchar_adv = Character("Test", kind=adv) define testchar_nvl = Char...
- Thu Apr 29, 2021 3:19 am
- Forum: Ren'Py Questions and Announcements
- Topic: Limiting animations to a specific spot
- Replies: 3
- Views: 451
Re: Limiting animations to a specific spot
Immediate thought is to either crop or use AlphaMask to limit the visibility of the animated background to the viewport, but not knowing the specifics of how it's set up, hard to give concrete examples.
- Thu Jan 21, 2021 11:28 pm
- Forum: Ren'Py Questions and Announcements
- Topic: How to use a call to pass a character variable to a sub-routine
- Replies: 4
- Views: 334
Re: How to use a call to pass a character variable to a sub-routine
I mean, there are lots of ways to do what you want, but it's hard to give advice because I don't know what you prefer or would be comfortable with. Basically, you should look into renpy.say and the python equivalent of say statements and the character and store namespaces and how to retrieve objects...
- Thu Jan 21, 2021 1:01 am
- Forum: Ren'Py Questions and Announcements
- Topic: How to use a call to pass a character variable to a sub-routine
- Replies: 4
- Views: 334
Re: How to use a call to pass a character variable to a sub-routine
Obvs can't run this, but it seems like it ought to work with call vid1(p, "-office") (note that the p is not in quotation marks -- you want to pass the variable; using the quotation marks makes it a string).
- Wed Jan 13, 2021 9:03 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Screen prediction when using the Function() action
- Replies: 5
- Views: 361
Re: Screen prediction when using the Function() action
The following works fine, so it's not Function. I don't know what it is based on what you posted. init python: class Game(): def __init__(self): self.diff = 5 self.achievements = True def change_diff(self, amount): self.diff += amount self.update_achievements() def update_achievements(self): if self...
- Wed Jan 13, 2021 2:21 am
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED]How do I make an imagemap insensitive?
- Replies: 3
- Views: 348