Random settings or semi-random character encounters, can this be done with Ren'Py?
Still a noob, still trying to figure out the best directions to proceed..
Procedural generated Ren'Py?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- Chronocide
- Regular
- Posts: 77
- Joined: Tue Feb 16, 2021 8:03 pm
- Projects: Land of the 11 Towers
- Contact:
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
- Contact:
Re: Procedural generated Ren'Py?
The simple answer is yes.
The more complete answer is a question : How does your game work, is it an RPG, point and click, idle clicker game, dating sim, vanilla VN etc.
The more complete answer is a question : How does your game work, is it an RPG, point and click, idle clicker game, dating sim, vanilla VN etc.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Re: Procedural generated Ren'Py?
renpy.random is a random-number generator that supports renpy rollback.
https://www.renpy.org/doc/html/other.ht ... npy-random
https://www.renpy.org/doc/html/other.ht ... npy-random
Code: Select all
# return a random float between 0 and 1
$ randfloat = renpy.random.random()
# return a random integer between 1 and 20
$ d20roll = renpy.random.randint(1, 20)
# return a random element from a list
$ randfruit = renpy.random.choice(['apple', 'orange', 'plum'])colin r
➔ if you're an artist and need a bit of help coding your game, feel free to send me a PM
➔ if you're an artist and need a bit of help coding your game, feel free to send me a PM
- Chronocide
- Regular
- Posts: 77
- Joined: Tue Feb 16, 2021 8:03 pm
- Projects: Land of the 11 Towers
- Contact:
Re: Procedural generated Ren'Py?
Thank you both.
Who is online
Users browsing this forum: GetOutOfMyLab, Google [Bot]