Tutorial: How to create a character that the player can name in a Ren’Py visual novel.
Someone very nicely asked how I did this in Must Love Jaws (where the player can name the shark), so I’ve made a tutorial. :)
(This is my first tutorial, I’m nervous!)
- Okay, so first you pull up the script where you want this scene to happen. I wrote some conversation between Matt and Bernard that leads to them naming the shark. (Lines 606-611)
- Matt wants to name him “Bruce.” I added a Menu option where Bernard (the player) can agree with this, or pick a name themselves. (Lines 613-618)
- Now this is where it get’s interesting: At Line 625, you need to type what you want to use as the label for the shark’s name (I used shark_name. Just remember that you’ll have to type it out EVERY time you use the shark’s name in dialogue), what you want the textbox to say (I wrote “I need to think up a better name for the shark”), and the character limit (meaning how many letters the name can be. I used a character limit of 10, so I typed length=10). Adding a character limit is important, because if the player chooses a long name, it could cause the text to go off-screen! 0_o
- Lines 627-628: Removes spaces if the player added one in the name.
- Lines 632-633: This code is in case the player leaves it blank.
- Lines 635-636: If the player types in Bruce, the name Matt suggested, the game acts as if the player agrees with Matt’s original suggestion.
- Lines 657-659: The player picking the name, followed by Bernard saying the name in conversation.
- EXTRA CREDIT - Lines 638-655: This code is for creating custom responses to certain names. I made it so that if you name the shark “Ogu Pigu,” (I did this in case ChrisTenarium played the game, which he did. XD ) Matt gets mad and changes the name to “Dave.” Also, if you name the shark “Dave,” Matt notes how it’s a plain name, but goes along with it anyway. You can also use this code to prevent the player from using swear words or other characters’ names.
I think that’s about it? Any questions, just let me know! Hope this helps. :)
kinw147 liked this
robbingroses liked this
company-policy-ntmy liked this
gungeonsandgoblins liked this
attackatosh liked this
alke-ne-main liked this tsuyanrider liked this
ghostbirbs liked this sweetlywingedcreation reblogged this from katy-133
sweetlywingedcreation liked this
walonde reblogged this from katy-133
walonde liked this katy-133 reblogged this from fatmoonbear and added:
Glad I could help!
katy-133 liked this
fatmoonbear reblogged this from katy-133 and added:
yo this saved my LIFE. thank you!
junibreeze liked this
lylynyan reblogged this from daeva-agas
lylynyan liked this
mnemehoshiko liked this
katwithakeyboard liked this harriet127 liked this
lntellectual reblogged this from katy-133
lntellectual liked this
fuzzystarlightstrawberry liked this berrycrepes liked this
queenpinks-world liked this
neonwave-forest liked this
thatoneberserkerpumpkin liked this
daeva-agas reblogged this from katy-133
artikgato liked this lord-kikuchiyo-blog liked this
e512 liked this
elliotli reblogged this from katy-133
elliotli liked this
halopluton-blog liked this
daeva-agas liked this
david-cage-do-not-interact liked this
douteshani reblogged this from a-box-o-jills
a-box-o-jills reblogged this from katy-133
lydianchord liked this
crastinox liked this
sugarscares-archive liked this
nattoppet-dj liked this
bokutokoutarowife reblogged this from katy-133 a-box-o-jills liked this
themedicalninjagirl liked this - Show more notes