How to structure dialogue scripts and events to make it easier for someone to code into Ren'py?

Questions, skill improvement, and respectful critique involving game writing.
Post Reply
Message
Author
User avatar
JenivereDomino
Regular
Posts: 27
Joined: Tue Nov 17, 2020 4:14 pm
Completed: Summer Horrordays
Projects: "Project Cadence" (Placeholder)
Organization: PunderBash Games
Deviantart: JenivereDomino
Github: JenivereSH
itch: punderbashgames
Location: United Kingdom
Discord: Jenivere #1227
Contact:

How to structure dialogue scripts and events to make it easier for someone to code into Ren'py?

#1 Post by JenivereDomino »

So I'm very new and at the start of this project, but I decided to talk to a friend who knows how to code and has worked with Python for fun. He's willing to jump on board with the project, because he wants a new thing to start coding for fun, which is excellent because it means I'm not going to have to spend the time learning how to use the system myself and he will likely be able to implement much more sophisticated code and ideas.

So my question really is this, how should I be drafting scripts in order for them to be easy to transfer and put into code? Is there a suggested maximum amount of words/characters per line? Should I try to insert pieces of the code to make it easier? Or is it better to just write direction notes of what should be where?

Right now I'm working on a basis of giving a key at the header for character name definitions, then using the 2 letter code for the character names, and using # and brackets for direction notes like this:
??? 1 (SN, colour code green): Are you sure this is the place you saw?

??? 2 (TT, colour code dark blue): I think so...yes, there’s the temple. We don’t have much time though, it’s already noon.

??? 1: Alright then, lead the way.

??? 3 (ZT colour code lilac): *chuckles* This will be interesting.

# [Fade out. Fade in on hallway scene and a half open door]
# [Show mc_stressed]

MC: Slow down, SS, why are you always in such a rush?

SS: Just keeping you on your toes, [MC]! Race you to the dining hall! [sound effect, running]

MC: (Not again! Wait a minute, that door is open, is someone in there?)

CHOICE: 1. Stop and listen
2. Catch up to SS

~ Stop and listen [NS romance +1]
# [show mc_curious]
# [music mystery_bgm]
MC: (I wonder who is in there? Maybe I should let them know it is time for lunch so they don’t miss out.)

MC: (Huh?)

# [show NS sprite silhouette]
???: I’m sorry... You understand, right? I can’t go back to living like that.

??? 4 (NS colour code red): It’s ok, after what happened I don’t blame you. I just hoped…

???: Wait, I think I heard someone outside. Close the door.

# [show MC neutral]
MC: (Uh oh, better catch up to SS)

# author note [add more to this conversation, it is too short, make more mystery]

~ Catch up to SS (ss romance + but only after all other routes complete)
MC: Hey, no fair! You got a head start! (Footsteps running)

MC: (Part of me felt happy, I was glad he could still act like we did when we were children. Sometimes when he doesn’t think I’m watching, I see such sadness in his eyes…)

MC: (Aha! I think I’m getting closer!)

# author note [add more for when SS route open following competing all other routes, so MC falls and is caught or picked up by SS, sure it may be cliche but it should show a bit more relationship between them]

-

Priest: Hey! Stop running in the halls!
# [show mc_shocked]
MC: (Eek!)
# [show ss_neutral]
My friend is just starting to look into Ren'py and learning how to use it, but with his background in coding I have no doubt he will be able to implement the ideas I'd like to have in there pretty well.

Critique of both how this is being written (in terms of how easy it will be to input to renpy) and what has been written is welcome at this point, though keep in mind it is very early and just represents a small sample.

I am keeping a log of all the different assets I will need too, in the form of a spreadsheet with suggested filenames for the sprites, art, music etc so that they can be written into the game code then the final assets put into the right files later on.

I hope all this makes sense!
Mighty Morphine Vowel Arranger

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: How to structure dialogue scripts and events to make it easier for someone to code into Ren'py?

#2 Post by Imperf3kt »

This will mostly come downto personal preference, but myself, I prefer when someone can give an example of what something is, what it is expected to do, and how the player is expected to interact with it - does it appear on screen after completing something? Is it always there? Is it hidden away in a menu? Etc.
Does it glow, explode, make noises when interacted with?

If your friend is also handling the GUI, it may help them to provide a rough visual image of what you're after. Even pencil scribbles with descriptions is enough.
Make sure they're aware of any special things you need (item inventory, stats page, glossary, etc)


The rest really just comes down to personal preference, so make sure you talk to them and find out what they need.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
RicharDann
Veteran
Posts: 286
Joined: Thu Aug 31, 2017 11:47 am
Contact:

Re: How to structure dialogue scripts and events to make it easier for someone to code into Ren'py?

#3 Post by RicharDann »

This is something you need to discuss with the programmer himself, as there is no one true perfect way to convert a story script into code and as Imperf3kt stated above, everyone has their own preference.
You should aim for a style both of you find easy to understand and are comfortable to work with. The script draft you presented is already similar to the way the Ren'py script language is written so it shouldn't be too hard to adapt, but be sure to show it to him and listen to his input and suggestions.
The most important step is always the next one.

Post Reply

Who is online

Users browsing this forum: No registered users