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.
I'm really frustrated. I've looked through forums, youtube, websites, tutorials, everything to find an answer but I have yet to find one. Whenever I try to type in code to let the player choose their own name, i always get this error: AttributeError 'StoreModule' object has no attribute 'dialogue_xalign'
I've copied and pasted other people's codes that work for them, but it still gives me that error. Here's an example of what I've typed in:
# Declare characters used by this game.
define e = Character('Eileen', color="#c8ffc8")
define n = Character('[name]', color="#c8ffc8")
# The game starts here.
label start:
$ name = renpy.input("What is your name?")
$ name = name.strip()
if name == "":
$ name="You"
"Pleased to meet you, [name]!"
n "This is a test. You are talking."
return
thank you for the suggestion, but unfortunately it still didn't work I'm thinking something is wrong with the actual program... maybe I should try an re-install it?
While running game code:
File "game/script.rpy", line 8, in script
$ name = renpy.input("What is your name?")
File "game/script.rpy", line 8, in <module>
$ name = renpy.input("What is your name?")
File "game/screens.rpy", line 170, in execute
screen input(prompt):
File "game/screens.rpy", line 170, in execute
screen input(prompt):
File "game/screens.rpy", line 173, in execute
window:
File "game/screens.rpy", line 175, in execute
vbox:
File "game/screens.rpy", line 175, in keywords
vbox:
AttributeError: 'StoreModule' object has no attribute 'dialogue_xalign'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 8, in script
$ name = renpy.input("What is your name?")
File "C:\Users\Hannah\Downloads\renpy-6.99.12.3-sdk\renpy\ast.py", line 814, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\Users\Hannah\Downloads\renpy-6.99.12.3-sdk\renpy\python.py", line 1715, in py_exec_bytecode
exec bytecode in globals, locals
File "game/script.rpy", line 8, in <module>
$ name = renpy.input("What is your name?")
File "C:\Users\Hannah\Downloads\renpy-6.99.12.3-sdk\renpy\exports.py", line 797, in input
rv = renpy.ui.interact(mouse='prompt', type="input", roll_forward=roll_forward)
File "C:\Users\Hannah\Downloads\renpy-6.99.12.3-sdk\renpy\ui.py", line 285, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "C:\Users\Hannah\Downloads\renpy-6.99.12.3-sdk\renpy\display\core.py", line 2519, in interact
scene_lists.replace_transient()
File "C:\Users\Hannah\Downloads\renpy-6.99.12.3-sdk\renpy\display\core.py", line 822, in replace_transient
self.remove(layer, tag)
File "C:\Users\Hannah\Downloads\renpy-6.99.12.3-sdk\renpy\display\core.py", line 1107, in remove
self.hide_or_replace(layer, remove_index, "hide")
File "C:\Users\Hannah\Downloads\renpy-6.99.12.3-sdk\renpy\display\core.py", line 1031, in hide_or_replace
d = oldsle.displayable._hide(now - st, now - at, prefix)
File "C:\Users\Hannah\Downloads\renpy-6.99.12.3-sdk\renpy\display\screen.py", line 443, in _hide
self.update()
File "C:\Users\Hannah\Downloads\renpy-6.99.12.3-sdk\renpy\display\screen.py", line 578, in update
self.screen.function(**self.scope)
File "game/screens.rpy", line 170, in execute
screen input(prompt):
File "game/screens.rpy", line 170, in execute
screen input(prompt):
File "game/screens.rpy", line 173, in execute
window:
File "game/screens.rpy", line 175, in execute
vbox:
File "game/screens.rpy", line 175, in keywords
vbox:
File "<screen language>", line 177, in <module>
AttributeError: 'StoreModule' object has no attribute 'dialogue_xalign'
define e = Character("name", dynamic=True)
label start:
$ name = renpy.input("What is your name?")
$ name = name.strip()
if name == "":
$ name="You"
"Pleased to meet you, [name]!"
e "This is a test. You are talking."
return
and I have no idea what it means when it says dialogue_xalign... i've never typed that anywhere...