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.
For now (I'm new in Ren'Py) it seems to be handy to have:
1) one (or several in 2-3 layers if the game is big) of "manager" files containg neigther text nor media content, but just main plot logic: they contain "start" label, keep and change main variable, implement high level forks depending on decisions done in "content" files (see below) and call all other files in corresponding time dependingly on plot logic (jumps use seems very strange and confusing to me, probably because of my previous Java background)
2) content files, each of them covering one part of plot (one dialog, one evening at home, one dream etc) and divided into "logic" section (starting with main file label, ending with "return" and relatively short section where all plot structure is kept: forks, variables changes) and "content" section (containing linear sequences of content, like text, images, sounds, character pictures to show to the user, each sequence starting with a special label that should be called from logic section and ending with "return").
3) service files, defining all game characters, mini-games, effects etc and called probably at the very start of the game.
So far such a systems seems to me clear and easy to use except one detail: if I understood correct, all labels in the game are available globally, so I can't have just label like "ask_where:" but rather something like "day_2_sam_dialog_1_ask_where_is_my_dog:" (that is definitely ugly) to avoid labels duplication despite that labels are mostly used just in one file and have no need to be accessible outside of it.
I suspect that I just see and do something wrong here, but what? Are there some locally available labels or something? Or should the game code be organized different to avoid this problem ando another ones I did not face yet? What kind of Ren'Py code organization is considered by the community around it to be really good?
I'm writing a Renpy textbook (in Russian). I would be glad if someone translated into an English or German textbook https://yadi.sk/d/ZX_DonP63USRru Update 22.06.18
- Posts: 295
- Joined: Mon May 22, 2017 8:12 am
- Completed: Santa's workshop, Cat's Bath, Computer Art Club
- Location: Taiwan
Make it generic, e.g. walkdog
You can add some if statements to vary the content depending on how many times you've done it or whatever.
'Call' will return you to your previous position afterwards, 'jump' will play whatever label is under walkdog.
Organization can be done in whatever way suits your needs.
You can have local labels inside labels, check the docs. I use them but no time to explain any more right now.
Renpy Creators and Enthusiasts Facebook Group
My latest game:
BoPoMoFo Chinese for Babies, Toddlers and Children Android App
Creative Commons stuff:
100+ 360° photos of Japan,
- Eileen-Class Veteran
- Posts: 1064
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
Imagine, very basically, you opted to have one file per character, bob.rpy and sid.rpy...with each holding labels named act_NN
Code: Select all
## bob.rpy # this defines the global label name label bob: "Nothing here" # note the . (dot/period) making this local to bob label .act_1: "... no global referenced, so uses its own ( effectively bob.act_2 )" jump .act_2 label .act_2: "... now uses global reference from other file to jump there... " jump sid.act_5
- Finish Improved Event Handler
- Implement DragonBones animation as a Creator Defined Container
- Develop Cartoon Speech Bubble dialogue
- Finish Bitmask collision and rebound vector system
- Develop time based building mechanic
- *Find a superb artist and actually write a game*
Users browsing this forum: No registered users