Hi!
When creating my MC, I would like to have it so that the player is free to change the name of the MC to their own or to whatever name they'd like, also how to make it so the change is permanent. (For example, if the MC's name was changed to Cecilia, what would you need to do so that every time the MC's name shows up, it would show Cecilia instead of the default name). Unfortunately, since I'm fairly bad at coding outside the basics, I'm not quite sure how to go about it.
Any help would be appreciated!!
Thank you
[Solved] How to give the option to change default MC's name?
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.
[Solved] How to give the option to change default MC's name?
Last edited by Mimrose on Wed May 22, 2013 9:31 pm, edited 1 time in total.
- 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: How to give the option to change default MC's name?
Add this to the game when it is time for the player to choose their name:
You can change the p to something else if you want. p is the shortcut you use when writing dialog for the character. If you would rather have the short cut be mc or something it is fine.
You can also change the color section to whatever color you want. It determines the color that the name is written in. It doesn't change the dialog color just the name in the text box that shows who is speaking. That particular set of numbers is for a sort of blueish color.
Oh and when a character mentions the MC by name in the game use this in the code:
In the game it will show up as whatever the chosen name is.
I'm not sure if there is another way or not but that is what I've been doing.
Code: Select all
$ player_name = renpy.input("Enter name: ").strip()
$ p = Character(player_name, color="#736AFF")
You can also change the color section to whatever color you want. It determines the color that the name is written in. It doesn't change the dialog color just the name in the text box that shows who is speaking. That particular set of numbers is for a sort of blueish color.
Oh and when a character mentions the MC by name in the game use this in the code:
Code: Select all
%(player_name)s
I'm not sure if there is another way or not but that is what I've been doing.
Last edited by Googaboga on Tue May 14, 2013 7:41 pm, edited 1 time in total.
In-Progress:
Floret Bond, XOXO Blood Droplets, Our Life
Released:
A Foretold Affair, My Magical Divorce Bureau, XOXO Droplets, Lake of Voices
Floret Bond, XOXO Blood Droplets, Our Life
Released:
A Foretold Affair, My Magical Divorce Bureau, XOXO Droplets, Lake of Voices
Re: How to give the option to change default MC's name?
Thank you so much! This is very helpful
- 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: How to give the option to change default MC's name?
No problem. Good luck with your game :].
In-Progress:
Floret Bond, XOXO Blood Droplets, Our Life
Released:
A Foretold Affair, My Magical Divorce Bureau, XOXO Droplets, Lake of Voices
Floret Bond, XOXO Blood Droplets, Our Life
Released:
A Foretold Affair, My Magical Divorce Bureau, XOXO Droplets, Lake of Voices
Who is online
Users browsing this forum: piinkpuddiin