Skip to content

From the archives

One Explosive Situation

An industry that writes its own rules leaves us all at risk

Starchitect Saga

Two accounts chart the emergence of Frank Gehry’s genius

Alberta and Me

From a land of oil, true enough

Names.rpy

: Keeping names in a separate names.rpy file is a great way to stay organized as your script grows.

In your project's game/ folder, create a new text file and name it names.rpy . Ensure the file extension is .rpy and not .txt . 2. Sample Code for Your Post names.rpy

To create a names.rpy file and share it as a post (likely for a tutorial or showcase), you should focus on defining your characters and player input clearly. In Ren'Py, .rpy files are simple text files that store your game's scripts. 1. Creating the File : Keeping names in a separate names

# Character Definitions # Use DynamicCharacter if you want their name to change during the game define e = Character("Eileen", color="#c8ffc8") define m = Character("[player_name]", color="#3399ff") # Variable for Player Name default player_name = "Protagonist" label start: # Player Input Sequence # This allows users to type their own name $ player_name = renpy.input("What is your name?", length=20).strip() # Provide a default name if they leave it blank if not player_name: $ player_name = "Protagonist" m "My name is [player_name]!" e "Nice to meet you, [player_name]." Use code with caution. 3. Key Tips for Your Post color="#c8ffc8") define m = Character("[player_name]"

For more advanced setups, like using images for names or complex input boxes, you can check community discussions on the Lemma Soft Forums or the Ren'Py Subreddit .

You can use this standardized structure to handle character definitions and a custom player name input: