OMG this is so awesome, I'm gonna try that now

!!! Thanks for pointing that out.
Is there any chances of getting any detailed documentation on that feature? This page
http://www.renpy.org/wiki/renpy/doc/ref ... Statements is the only one I can find that mention user-defined statement, but in light of what you said, it is clearly out of date. Beside, some of the function of lexer is not even listed.
In particular, I am looking at how to:
-Handle an arbitrary Ren'Py statement that is supplied to your user-created statement. For example, if I want to create a statement called random-shuffle that can be used like this:
Code: Select all
random_shuffle:
e "What is going on?"
s "Calm down everyone"
$renpy.show("bg flame")
"I can't see anything in this commotion."
"Someone bumped into me."
menu:
"Wait and see":
$choice="wait"
"Run and scream":
$choice="run"
And random-shuffle is supposed to run all statement once each, but in a random order. It also need to specifically shuffle the menu choice too. So it would need to run all sort of arbitrary statement, such as the above, other Ren'Py or python statement, and other defined function. We can obtain the lexer for each of these statement as you shown above, but is there anyway to:
(a) modify a lexer for an arbitrary menu?
(b) run an arbitrary statement given its lexer?
-Multiple layer of subblock. So for example defining a statswindow statement that can be used like this:
Code: Select all
statswindow:
Brian:
Friendship
Trust:
Safety
Fidelity
Romance
Aya:
Friendship
Basically, this is supposed to show a stats screen that initially show only Brian and Aya, but clicking on Brian expand the screen to show Friendship, Trust and Romance, and clicking on Trust expand the screen to show Safety and Fidelity. So how can I handle arbitrary deep layer of subblock? Is it even possible?
Thanks for your help.

Oh and since this is not a feature request anymore, you can move it to the other subforum too. I am going to change the title of the thread.