Search found 236 matches
- Thu Sep 05, 2019 11:05 am
- Forum: Development of Ren'Py
- Topic: Coding Dialogue Statements easier!
- Replies: 16
- Views: 8349
Re: Coding Dialogue Statements easier!
Or you can write python or even RenPy script what will load lines from file, modify lines and save lines to new file. P.S.: Something like: label start: python: ## load lines, file.txt must be in project directory with open(config.basedir+'\\file.txt','r') as f: lines=f.read().split('\n') ## modify ...
- Thu Sep 05, 2019 11:04 am
- Forum: Ren'Py Questions and Announcements
- Topic: Is there a way to call a @property method with variables?
- Replies: 1
- Views: 413
Re: Is there a way to call a @property method with variables?
Use something like: class...: def get_thing(self,param=0): return self.x+param @property def thing(self): return self.get_thing() label test: 'Thing: [obj.thing]' $extra_thing=obj.get_thing(5) So obj.thing will return default value and by using obj.get_thing you can get specific value. Overall you c...
- Mon Sep 02, 2019 5:26 pm
- Forum: Development of Ren'Py
- Topic: Menu/Choice bug
- Replies: 9
- Views: 8053
Re: Menu/Choice bug
I said when line is said by defined character and not narrator it is not shown when returned from label. Line was commented to show line what do not works, if you comment another line and uncomment this, then everything works, because line will be said by narrator. Just start new project and copy co...
- Mon Sep 02, 2019 3:26 pm
- Forum: Development of Ren'Py
- Topic: Menu/Choice bug
- Replies: 9
- Views: 8053
- Mon Sep 02, 2019 3:02 pm
- Forum: Development of Ren'Py
- Topic: Menu/Choice bug
- Replies: 9
- Views: 8053
Re: Menu/Choice bug
Ok, i looked what happens in RenPy guts and managed to hack proper behavior (for my use cases it works perfectly, no bugs seen so far, save/load/rollback works), tho i really would prefer official solution. renpy/parser.py, at bottom of parse_menu: rv.append(ast.Menu(loc, items, set, with_, has_say ...
- Mon Sep 02, 2019 2:17 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Displaying ingame variables in the save/load screen
- Replies: 5
- Views: 590
Re: Displaying ingame variables in the save/load screen
Simpler solution would be using save file json. https://www.renpy.org/doc/html/config.html#var-config.save_json_callbacks https://www.renpy.org/doc/html/screen_actions.html#FileJson https://www.renpy.org/doc/html/save_load_rollback.html#renpy.slot_json https://lemmasoft.renai.us/forums/viewtopic.php...
- Mon Sep 02, 2019 2:09 pm
- Forum: Development of Ren'Py
- Topic: Menu/Choice bug
- Replies: 9
- Views: 8053
Re: Menu/Choice bug
Why it works as expected without character, but with default narrator? Screen displayed during menu interaction, so call to label happens from menu statement and test_label returns to menu statement. I believe it should work just fine, but likely there is separate code paths when menu caption spoken...
- Mon Sep 02, 2019 10:47 am
- Forum: Development of Ren'Py
- Topic: Menu/Choice bug
- Replies: 9
- Views: 8053
Menu/Choice bug
Click on "Click me" textbutton, click again to return to menu, see bug. After you return from test_label menu is visible, yet "Testing menu bug" is not there. Any simple workaround for this? default bob=Character('Bob') label test_label: hide screen test_screen 'Click to return to menu.\nCharacter l...
- Mon Sep 02, 2019 3:22 am
- Forum: Ren'Py Questions and Announcements
- Topic: [solved] can somebody test this code and tell me the result please
- Replies: 12
- Views: 772
Re: can somebody test this code and tell me the result please
They changed dicts to be sorted-by-insertion-order in Python 3.7 i think, maybe you tested it there. RenPy uses 2.7 and frankly i don't think PyTom will upgrade Python version any soon as it will require to drop legacy support for some stuff.
- Sun Sep 01, 2019 11:59 am
- Forum: Ren'Py Questions and Announcements
- Topic: [solved] can somebody test this code and tell me the result please
- Replies: 12
- Views: 772
Re: can somebody test this code and tell me the result please
Python uses hashtables for dicts, while integers may appear in 1-2-3 order, strings and pretty much any other thing are in random order. Use dutst_order list ["1","2","3"], iterate over it then read actual value from dict. Or try OrderedDict, tho not sure how good it behave with RenPy save/rollback ...
- Thu Aug 29, 2019 7:59 am
- Forum: Ren'Py Questions and Announcements
- Topic: $ renpy.show and image directory
- Replies: 31
- Views: 1659
Re: $ renpy.show and image directory
Code i posted walk thru all images in all folders inside 'game/images' folder and register them. Converting file path into image name, yes, removing need to hardcode file extension. For example 'game/images/characters/bob/side_images/angry.png' will be registered as 'bob side_images angry'. How it d...
- Wed Aug 28, 2019 5:24 pm
- Forum: Ren'Py Questions and Announcements
- Topic: $ renpy.show and image directory
- Replies: 31
- Views: 1659
Re: $ renpy.show and image directory
RenPy auto-image definer is ... well, ugly (sorry, PyTom).
I use this: viewtopic.php?f=8&t=56534#p517181
Does exactly what you want for same reasons, it is really annoying to traverse thru hundreds of images with loooong filenames, folders is must for big projects.
I use this: viewtopic.php?f=8&t=56534#p517181
Does exactly what you want for same reasons, it is really annoying to traverse thru hundreds of images with loooong filenames, folders is must for big projects.
- Wed Aug 21, 2019 3:43 am
- Forum: Ren'Py Questions and Announcements
- Topic: (Solved) getting invalid syntax
- Replies: 5
- Views: 533
Re: getting invalid syntax
Remove extra ifs from conditions. if g3_point <=5 : jump bethtalkintro elif g3_point >=5 and g3_point <=20 : jump bethtalk1 ... else: jump science1 Also it may be easier to read next way: if g3_point<=5: jump bethtalkintro elif 5<g3_point<=20: jump bethtalk1 ... else: jump science1
- Wed Aug 21, 2019 3:37 am
- Forum: Ren'Py Questions and Announcements
- Topic: Random number slows down game
- Replies: 8
- Views: 775
Re: Random number slows down game
Generation of random number is very fast operation, it can't slow down game. Most likely issue is failed image prediction, as Alex mentioned. Issue is more glaring when using higher resolutions, 1280x720 would run smooth, but 1920x1080 may show visible lag during some scenes transitions.
- Tue Aug 20, 2019 5:43 am
- Forum: Ren'Py Questions and Announcements
- Topic: Possible to create multiple timed key presses/holds?
- Replies: 1
- Views: 372
Re: Possible to create multiple timed key presses/holds?
Create custom displayable, in event method check if key is pressed/released and update variables, check time either in event method or in render method, when qte succeed/failed return 'succeed'/'failed' from event method. Add this method to screen and call it, then check _return variable. https://ww...