[solved] Custom Name not showing up in Dialogue

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
User avatar
MagicalSakura
Newbie
Posts: 5
Joined: Tue Oct 19, 2010 12:46 am
Projects: Fyfkt, By: Lotte, Violet
Organization: MagicalSakura
Tumblr: magicalsketchy
Deviantart: magicalsakura
Soundcloud: magicalsakuraart
itch: magicalsakura
Location: NJ
Contact:

[solved] Custom Name not showing up in Dialogue

#1 Post by MagicalSakura »

Edit2: Solved, my issue was all due to a slightly out of date copy of ren'py. I feel dumb.

Hello there, I wanted to have the name of the Heroine to be changeable. I used the code given on the ren'py cookbook, but I can't seem to get it to work in the dialogue of the game. It shows up as the defined MC Name Area, but it won't show up in the text it only displays as %(MC)s and I'm rather lost as to why. (I'm sorry if there is a blatantly obvious reason why, I'm not very good. Learning as I go along.)
Edit: I'm also not using the newest version of Ren'py is that is an issue????

Image

Code: Select all

define MC = Character("%(MC)s", image="Bridget", color="#ffffff", ctc="ctc1", ctc_position="fixed")

Code: Select all

label start:   
    $ MC = renpy.input ("What is your name Heroine?")

    $ MC = MC.strip()

    if MC == "":
        $ MC="Bridget"
 
    MC "Pleased to meet you, %(MC)s!"
Last edited by MagicalSakura on Tue Jun 25, 2013 7:46 pm, edited 1 time in total.

User avatar
Suwamoto
Regular
Posts: 66
Joined: Wed Sep 05, 2012 7:36 am
Contact:

Re: [Help Please] Custom Name not showing up in Dialogue

#2 Post by Suwamoto »

Maybe like this? owo

Code: Select all

define MC = DynamicCharacter("MC", image="Bridget", color="#ffffff", ctc="ctc1", ctc_position="fixed")

User avatar
MagicalSakura
Newbie
Posts: 5
Joined: Tue Oct 19, 2010 12:46 am
Projects: Fyfkt, By: Lotte, Violet
Organization: MagicalSakura
Tumblr: magicalsketchy
Deviantart: magicalsakura
Soundcloud: magicalsakuraart
itch: magicalsakura
Location: NJ
Contact:

Re: [Help Please] Custom Name not showing up in Dialogue

#3 Post by MagicalSakura »

Suwamoto wrote:Maybe like this? owo

Code: Select all

define MC = DynamicCharacter("MC", image="Bridget", color="#ffffff", ctc="ctc1", ctc_position="fixed")
That part actually worked fine. I'm only having issues with the Dialogue in game not working not with the defined name. like in the second screen where it says "pleased to meet you %(MC)s!" when it should be "Pleased to meet you yourmom!". I only showed that part of the code because it does work, hence why I'm confused.

Or wait, would that make the dialouge work too? sorry I'm a noob OTL

User avatar
Googaboga
Eileen-Class Veteran
Posts: 1395
Joined: Wed Dec 12, 2012 1:37 pm
Completed: https://gbpatch.itch.io/
Projects: Floret Bond, XOXO Blood Droplets, Our Life
Organization: GB Patch Games
Tumblr: gb-patch
itch: gbpatch
Contact:

Re: [Help Please] Custom Name not showing up in Dialogue

#4 Post by Googaboga »

This is how I got that type of name to work:

Code: Select all

    $ player_name = renpy.input("Enter name: ").strip()
    $ p = Character(player_name, color="#000000")

Code: Select all

Nice to meet you, %(player_name)s.
%(player_name)s will show up as the chosen name in the actual game dialog.

Your GUI is very cute by the way :].
In-Progress:
Floret Bond, XOXO Blood Droplets, Our Life
Released:
A Foretold Affair, My Magical Divorce Bureau, XOXO Droplets, Lake of Voices

User avatar
Suwamoto
Regular
Posts: 66
Joined: Wed Sep 05, 2012 7:36 am
Contact:

Re: [Help Please] Custom Name not showing up in Dialogue

#5 Post by Suwamoto »

Uhm, then "My name is %(MC)s." should work fine oxo At least it does for me >w<

User avatar
MagicalSakura
Newbie
Posts: 5
Joined: Tue Oct 19, 2010 12:46 am
Projects: Fyfkt, By: Lotte, Violet
Organization: MagicalSakura
Tumblr: magicalsketchy
Deviantart: magicalsakura
Soundcloud: magicalsakuraart
itch: magicalsakura
Location: NJ
Contact:

Re: [Help Please] Custom Name not showing up in Dialogue

#6 Post by MagicalSakura »

Thanks for the replies, after seeing you said it should work (and trying what Googaboga suggested and it still not working) I decided to Update my copy of ren'py to see if that would help. It did, it made everything work. I feel really dumb now wasting so much time. _(´ཀ`」 ∠)_ Thanks a bunch I really appreciate it.

Post Reply

Who is online

Users browsing this forum: Ocelot