diff --git a/src/lang/en.ts b/src/lang/en.ts index 452e3258..db40da85 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -50,6 +50,13 @@ export const languageEnglish = { + "\n- if the key starts with **|**, the key's value will not change." + "\n- if the key starts with **$**, the key's value will more likely to change." + "\n\nwhen the image is first generated, you can only change it by modifying 'Current Image Generation Data' in below.", + + regexScript: "Regex Script is a custom script that is embbedded to the character. it replaces string that matches IN to OUT.\n\nThere are three type options." + + "- **Modify Input** modifys user's input" + + "- **Modify Output** modifys character's output" + + "- **Modify Request Data** modifys current chat data when sent.\n\nIN must be a regex without flags and *\\*.\n\nOUT is a normal string." + + "\n\n If OUT starts with @@, it doesn't replaces the string, but instead does a special effect if matching string founds." + + "\n\n- @@emo (emotion name)\n\n if character is Emotion Images mode, sets (emotion name) as emotion and prevents default.", experimental: "This is a experimental setting. it might be unstable." }, setup: { diff --git a/src/lang/ko.ts b/src/lang/ko.ts index 25e00f5c..605cef70 100644 --- a/src/lang/ko.ts +++ b/src/lang/ko.ts @@ -179,7 +179,13 @@ export const languageKorean = { + "\n- 키의 이름이 **|** 로 시작할 시, 값은 고정됩니다." + "\n- 키의 이름이 **$** 로 시작할 시, 값은 더 자주 변합니다." + "\n\n이미지가 처음 생성된 이후부터는 '현재 이미지 생성 데이터'를 수정하여 변경할 수 있습니다.", - experimental: "실험적 기능입니다. 불안정할 수 있습니다." + experimental: "실험적 기능입니다. 불안정할 수 있습니다.", + regexScript: "정규식 스크립트는 캐릭터에 종속된 커스텀 스크립트입니다. IN의 조건에 맞는 문자열을 OUT으로 변경합니다.\n\n타입은 세가지가 있습니다." + + "- **입력문 수정** 유저의 입력문을 수정합니다" + + "- **출력문 수정** 캐릭터의 출력문을 수정합니다" + + "- **리퀘스트 데이터 수정** 리퀘스트를 보낼 때 채팅 데이터를 수정합니다.\n\nIN은 flag와 *\\* 가 없는 Regex여야 합니다.\n\nOUT은 일반 문자열입니다." + + "\n\n 만약 OUT이 @@로 시작된다면, 특수한 효과를 냅니다" + + "\n\n- @@emo (emotion name)\n\n 감정 이미지 모드일 시 (emotion name)을 감정으로 정하고 감정 처리를 하지 않습니다.", }, setup: { chooseProvider: "AI 제공자를 선택해 주세요", diff --git a/src/lib/SideBars/CharConfig.svelte b/src/lib/SideBars/CharConfig.svelte index 3f9ee72f..50d7b9ed 100644 --- a/src/lib/SideBars/CharConfig.svelte +++ b/src/lib/SideBars/CharConfig.svelte @@ -396,7 +396,7 @@ {/each} - {language.regexScript} + {language.regexScript} {#if currentChar.data.customscript.length === 0}
No Scripts
diff --git a/src/ts/process/scripts.ts b/src/ts/process/scripts.ts index 291ba215..6581da8b 100644 --- a/src/ts/process/scripts.ts +++ b/src/ts/process/scripts.ts @@ -20,6 +20,9 @@ export function processScriptFull(char:character, data:string, mode:ScriptMode){ if(char.viewScreen !== 'emotion'){ return v } + if(emoChanged){ + return v + } const emoName = script.out.substring(6).trim() let charemotions = get(CharEmotion) let tempEmotion = charemotions[char.chaId]