|
3.
|
|
|
Creator-defined statements must be defined in a python early block. What's more, the filename containing the user-defined statement must be be loaded earlier than any file that uses it. Since Ren'Py loads files in unicode sort order, it generally makes sense to prefix the name of any file containing a user-defined statement with 01, or some other small number.
|
|
|
|
Creator-defined statements must be defined in a python early block. What's more, the filename containing the user-defined statement must be be loaded earlier than any file that uses it. Since Ren'Py loads files in unicode sort order, it generally makes sense to prefix the name of any file containing a user-defined statement with 01, or some other small number.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/cds.rst:12
|
|
4.
|
|
|
A user-defined statement cannot be used in the file in which it is defined.
|
|
|
|
A user-defined statement cannot be used in the file in which it is defined.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/cds.rst:18
|
|
5.
|
|
|
Creator-defined statement are registered using the renpy.register_statement function.
|
|
|
|
Creator-defined statement are registered using the renpy.register_statement function.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/cds.rst:20
|
|
6.
|
|
|
This registers a user-defined statement.
|
|
|
|
This registers a user-defined statement.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/inc/statement_register:5
|
|
7.
|
|
|
`name`
|
|
|
|
`name`
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/inc/statement_register:10
|
|
8.
|
|
|
This is either a space-separated list of names that begin the statement, or the empty string to define a new default statement (the default statement will replace the say statement).
|
|
|
|
This is either a space-separated list of names that begin the statement, or the empty string to define a new default statement (the default statement will replace the say statement).
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/inc/statement_register:8
|
|
9.
|
|
|
`parse`
|
|
|
|
`parse`
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/inc/statement_register:15
|
|
10.
|
|
|
This is a function that takes a Lexer object. This function should parse the statement, and return an object. This object is passed as an argument to all the other functions. The lexer argument has the following methods:
|
|
|
|
This is a function that takes a Lexer object. This function should parse the statement, and return an object. This object is passed as an argument to all the other functions. The lexer argument has the following methods:
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/inc/statement_register:13
|
|
11.
|
|
|
`lint`
|
|
|
|
`lint`
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/inc/statement_register:19
|
|
12.
|
|
|
This is called to check the statement. It is passed a single object, the argument returned from parse. It should call renpy.error to report errors.
|
|
|
|
This is called to check the statement. It is passed a single object, the argument returned from parse. It should call renpy.error to report errors.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/inc/statement_register:18
|