Skip to content

Commit

Permalink
Merge pull request #99 from steve02081504/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Cohee1207 authored Sep 14, 2024
2 parents 9eabe9a + 865678f commit 2285195
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Usage/Core Concepts/worldinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ An entry/instruction that should be inserted, when char is doing a weather-relat
/(?:{{char}}|he|she) (?:is talking about|is noticing|is checking whether|observes) (?:the )?(rainy weather|heavy wind|it is going to rain|cloudy sky)/i
```

**ST prefixes every dialogue entry with `{{character name}}:` and after v1.12.6, concatenates them using the character value 1 (`\x01`).**

This means you can match specific input or output from a certain character using:
```js
/\x01{{user}}:[^\x01]*key/
```
For example, to match **only** the user saying "hello", you could use the following regex:
```js
/\x01{{user}}:[^\x01]*hello/
```

For more information on Regex syntax and possbilities: [Regular expressions - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions)

##### Key Input
Expand Down

0 comments on commit 2285195

Please sign in to comment.