Allow dice rolls in {{random}}
This commit is contained in:
parent
a8dc4dc810
commit
67fa9c9595
|
@ -2055,8 +2055,8 @@ function substituteParams(content, _name1, _name2, _original, _group, _replaceCh
|
||||||
const utcTime = moment().utc().utcOffset(utcOffset).format('LT');
|
const utcTime = moment().utc().utcOffset(utcOffset).format('LT');
|
||||||
return utcTime;
|
return utcTime;
|
||||||
});
|
});
|
||||||
content = randomReplace(content);
|
|
||||||
content = diceRollReplace(content);
|
content = diceRollReplace(content);
|
||||||
|
content = randomReplace(content);
|
||||||
content = bannedWordsReplace(content);
|
content = bannedWordsReplace(content);
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
<li><tt>{{time_UTC±#}}</tt> – the current time in the specified UTC time zone offset, e.g. UTC-4 or UTC+2</li>
|
<li><tt>{{time_UTC±#}}</tt> – the current time in the specified UTC time zone offset, e.g. UTC-4 or UTC+2</li>
|
||||||
<li><tt>{{idle_duration}}</tt> – the time since the last user message was sent</li>
|
<li><tt>{{idle_duration}}</tt> – the time since the last user message was sent</li>
|
||||||
<li><tt>{{bias "text here"}}</tt> – sets a behavioral bias for the AI until the next user input. Quotes around the text are important.</li>
|
<li><tt>{{bias "text here"}}</tt> – sets a behavioral bias for the AI until the next user input. Quotes around the text are important.</li>
|
||||||
|
<li><tt>{{roll:(formula)}}</tt> – rolls a dice. (ex: {{roll:1d6}} will roll a 6-sided dice and return a number between 1 and 6)</li>
|
||||||
<li><tt>{{random:(args)}}</tt> – returns a random item from the list. (ex: {{random:1,2,3,4}} will return 1 of the 4 numbers at random. Works with text lists too.</li>
|
<li><tt>{{random:(args)}}</tt> – returns a random item from the list. (ex: {{random:1,2,3,4}} will return 1 of the 4 numbers at random. Works with text lists too.</li>
|
||||||
<li><tt>{{roll:(formula)}}</tt> – rolls a dice. (ex: {{roll:1d6}} will roll a 6- sided dice and return a number between 1 and 6)</li>
|
|
||||||
<li><tt>{{banned "text here"}}</tt> – dynamically add text in the quotes to banned words sequences, if Text Generation WebUI backend used. Do nothing for others backends. Can be used anywhere (Character description, WI, AN, etc.) Quotes around the text are important.</li>
|
<li><tt>{{banned "text here"}}</tt> – dynamically add text in the quotes to banned words sequences, if Text Generation WebUI backend used. Do nothing for others backends. Can be used anywhere (Character description, WI, AN, etc.) Quotes around the text are important.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Reference in New Issue