-
-
Notifications
You must be signed in to change notification settings - Fork 324
Curly Brased Syntaxes
Curly brased syntaxes are custom syntaxes in Risu, which you can use at prompts, character description, chat... and more!
For example, if you put {{char}} is cute in the main prompt, and roleplay with character named "Hana", the app will convert it to Hana is cute.
If you know this part, there will be no big problem in making a bot.
outputs character's name if its set.
- alias:
{{bot}}
outputs user's name if its set.
This part is for making complex bots. If you are making a bot that isn't complex, you can just ignore this part.
outputs character's personality if its set.
- alias:
{{char_persona}}
outputs user's personality if its set.
- alias:
{{user_persona}}
outputs current global notes if its set.
- alias:
{{ujb}}
outputs current index of the chat.
If it is first message, or unknown, it would output -1
outputs nothing. would be useful for where you need blank but not allowed to by default.
- alias:
{{none}}
outputs one of the prompt randomly.
- example:
{{random::hello::bye::good}}
outputs result of the caculation.
- example:
{{calc::1+9/2}}
Variable used for making complex bots. this can store values and output in the chat/lorebook and others.
the values doesn't render dynamicly, so editing the prompt might not rerender the chat.
If you are making a bot that isn't complex, you can just ignore this part.
sets the variable named <varname> to <val>.
you can store numbers and strings.
only works when this syntax is in the chat or first message, otherwize it would be ignored.
- example:
{{setvar::a::10}}
adds <val> to the variable named <varname>.
If the varable is a string, it would make varable NaN.
If the varable is not set, it might not work propally.
only works when this syntax is in the chat or first message, otherwize it would be ignored.
- example:
{{addvar::a::5}}
outputs variable named <varname>.
- example:
{{getvar::a}}
sets the maximum value of the variable named <varname>.
only works when this syntax is in the chat or first message, otherwize it would be ignored.
If the varable is a string, it would make varable NaN.
- example:
{{varrule_max::a::100}}
sets the min value of the variable named <varname>.
only works when this syntax is in the chat or first message, otherwize it would be ignored.
If the varable is a string, it would make varable NaN.
- example:
{{varrule_min::a::100}}
sets the variable named <varname2> to caculation of var1 / value, and remainder would be set in first varible
only works when this syntax is in the chat or first message, otherwize it would be ignored.
If the varable is a string, it would make varable NaN.
- example:
{{varrule_overflow::a::100::b}}
- using
<something>also works like{{something}}. for example,<user>is also equalivent with{{user}} - you can also nest the syntax, like:
{{calc::9 + {{getvar::a}} + 1}}. The syntax can be nested up to 255 levels deep. if you nest it furder, it might not render properly