Eg...
RenPy code/script
Code: Select all
name "Some text to say"
For instance, increment time, check values for changes due to incremented time, display specific displayables when text contains certain things... Without having to type "call SomeFunction(stuff)" over and over, when it isn't needed.
EG, if a line of text is greater than, say 40 characters... It auto-increments time by 1-min, ignoring shorter text and without compounding uber-long text as multiple minutes. Also, if the text contains the word "ItemName", it displays the item in question.
I am fine with using something like this...
Code: Select all
$ Name("Say this", MyOptionalThingsToDoIfNeeded)
# This would go to my custom function, inserting the text into the normal "name" displayable, but then also do whatever other code I wanted it to do along with it.
I will also be doing something similar for "show ThisImage" and "show ThisScreen"... etc.
Is there some way to just attach a function to the default processor functions, like appending it? So it will pre/post process my functions before/after the RenPy display of the function? (In other languages, it is often called a callback operation/function. Or an overloading/hijacking.)