這是用戶在 2024-3-31 14:36 為 https://rentry.co/world-info-encyclopedia 保存的雙語快照頁面,由 沉浸式翻譯 提供雙語支持。了解如何保存?

World Info Encyclopedia 世界資訊百科全書

Page written by: kingbri
頁面撰寫者:kingbri

Contributors: kingbri, Alicat, Trappu
貢獻者:kingbri、Alicat、Trappu

Need help? Ping @kingbri on a Discord server! My DMs are locked. If you'd like to contribute, let me know and I'll put your name in the contributors list!
需要幫忙?在 Discord 伺服器上 Ping @kingbri !我的私訊已被鎖定。如果您想做出貢獻,請告訴我,我會將您的名字添加到貢獻者清單中!

World info is essential for establishing an environment and world for your character(s). It's especially important if you're planning on creating a group chat with a shared world, or just having multiple characters from the same universe.
世界資訊對於為您的角色建立環境和世界至關重要。如果您打算創建一個具有共享世界的群聊,或者只是擁有來自同一宇宙的多個角色,這一點尤其重要。

This is NOT a guide on how to write characters.
這不是如何書寫字符的指南。

If you're looking to create a new character and learn about the fundamentals of PLists and Ali:Chat, please look at Pygmalion's Wiki. Then, come back here to read more about world info.
如果您想建立一個新角色並了解 PLists 和 Ali:Chat 的基礎知識,請查看 Pygmalion 的 Wiki。然後,回到這裡閱讀有關世界資訊的更多資訊。

First off, let's clear up some misconceptions due to misuse of words across the interwebs:
首先,讓我們澄清一些由於網路上的字詞誤用而產生的誤解:

  • A world info (abbreviated: WI) is a file that contains the global environment. It applies to all characters.
    世界資訊(縮寫:WI)是包含全域環境的檔案。它適用於所有角色。
  • A lorebook (abbreviated: LB) contains the lore for a character. It applies to a specific character that's linked to the lorebook.
    傳說書(縮寫:LB)包含角色的傳說。它適用於與傳說書連結的特定角色。

I will be referring to both world info and lorebooks as "world info" since they are fundementally the same structure. Unless lorebooks are specified, "world info" = world info and lorebooks.
我將把世界資訊和傳說書都稱為“世界資訊”,因為它們在本質上是相同的結構。除非指定傳說書,否則「世界資訊」=世界資訊和傳說書。

Character used 使用的字符

To follow this guide, you can find an example world info and a simple PList character with an embedded lorebook here. Please make sure to import the embedded lorebook when prompted, or click the globe icon inside the character card panel in SillyTavern.
要遵循本指南,您可以在此處找到範例世界資訊和帶有嵌入式知識手冊的簡單 PList 角色。請確保在出現提示時導入嵌入的傳說書,或點擊 SillyTavern 中角色卡面板內的地球圖示。

Don't use the character from the PList-base folder unless you are learning that section.
除非您正在學習該部分,否則請勿使用 PList-base 資料夾中的字元。

SillyTavern settings 傻酒館設置

Here is an image showing the various configuration options of World Info (with the editor):
這是顯示 World Info 的各種配置選項的圖像(帶有編輯器):

photo20231001011243 2jpg

Here's an image that shows Lorebook selection for a character (can be accessed by the options dropdown on a character Link to World Info):
下面的圖像顯示了角色的 Lorebook 選擇(可以透過角色 Link to World Info 上的選項下拉式選單存取):

photo20231001011243jpg

Basics 基本

Firstly, there's a concept you need to understand called a key/value pair. Every key corresponds to a unique value. Multiple keys can point to a single value. When that key is mentioned in a prompt, the value is injected into it.
首先,您需要理解一個概念,稱為鍵/值對。每個鍵對應一個唯一的值。多個鍵可以指向一個值。當提示中提到該鍵時,該值將被注入其中。

Now that this concept is understood, let's look into the various ways to make key value pairs. There are two overarching types:
現在已經理解了這個概念,讓我們來看看創建鍵值對的各種方法。有兩種總體類型:

  • Environment - Simple PList
    環境 - 簡單 PList
  • Lore - Combination of PList + Ali:Chat
    Lore - PList + Ali:Chat 的組合

This structure is based on PList + Ali:Chat characters. If you have a character in a different format, write values in that format! For example, a plaintext character should have values that are in plaintext (but, this is not always true. Look in the advanced section for more information).
這個結構是基於PList + Ali:Chat字元。如果您有不同格式的字符,請以該格式寫入值!例如,明文字元應該具有明文形式的值(但是,這並不總是正確的。請參閱高級部分以獲取更多資訊)。

Environment 環境

These pairs consist of areas and objects such as places, buildings, landmarks, even houses. You mainly want a simplistic PList description with all the characteristics of the area.
這些對由區域和物體組成,例如地點、建築物、地標,甚至房屋。您主要需要一個具有該區域所有特徵的簡單 PList 描述。

For an example, let's look at a town in Farlandia. Here's how this will look in World Info:
舉個例子,讓我們來看看法蘭迪亞的一個小鎮。這是在 World Info 中的外觀:

  • [Mossford(The town of Moss): town, mossy buildings, moss used for(magic, power), has(tavern, bank, inn, castle), kind people, wealthy] - Here, Mossford has a strong association/alias to a nickname (The town of Moss) and it contains the PList entries of a town landscape.
    [Mossford(The town of Moss): town, mossy buildings, moss used for(magic, power), has(tavern, bank, inn, castle), kind people, wealthy] - 在這裡,Mossford 與暱稱 (The town of Moss) 有很強的關聯/別名,並且它包含城鎮景觀的 PList 條目。

For keys, put anything that associates to the place. With Mossford, I put Mossford,town,moss. Even though the keys may seem general, they all associate with Mossford, so it'll get thrown into the context whenever it's needed. Don't worry about including spaces between commas, SillyTavern trims excess whitespace for you!
對於鑰匙,請放置與該位置相關的任何東西。對於莫斯福德,我輸入了 Mossford,town,moss 。儘管這些鍵看起來很通用,但它們都與 Mossford 相關聯,因此只要需要它就會被扔到上下文中。不用擔心逗號之間包含空格,SillyTavern 會為您修剪多餘的空格!

If you have a one-word description of a place. Consider using a strong association instead. For example, just calling Mossford a town will be listed as Mossford(town) rather than wasting extra tokens on a full PList.
如果您對某個地方有一個詞的描述。考慮使用強關聯來代替。例如,僅將 Mossford 稱為城鎮就會被列為 Mossford(town) ,而不是在完整的 PList 上浪費額外的標記。

Lore 知識

These pairs can consist of both PLists and Ali:Chat entries and are ideally placed inside a lorebook. The PList is used for generic descriptions while Ali:Chat is used for examples on what the character thinks about the lore entry.
這些對可以包含 PList 和 Ali:Chat 條目,並且最好放置在知識手冊中。 PList 用於一般描述,而 Ali:Chat 用於範例角色對傳說條目的看法。

One exception is when a character is reacting to a global object from world info. Since the global object already has a PList, you only need to write an Ali:Chat reaction only if the object is considered to be really important.
一個例外是當角色對世界資訊中的全域物件做出反應時。由於全域物件已經有一個 PList,因此只有當該物件被認為非常重要時,您才需要編寫 Ali:Chat 反應。

Here is an example of Shizuru's feelings about slimes, a global world info object:
以下是 Shizuru 對全球世界資訊物件史萊姆的感受的範例:

  • PList (from Farlandia's world info) - [slime: enemy, slimeball, made of gelatin, bounces to move, annoyance]
    PList(來自 Farlandia 的世界資訊)- [slime: enemy, slimeball, made of gelatin, bounces to move, annoyance]
  • Ali:Chat (in Shizuru's lorebook) -
    Ali:Chat(在靜流的傳說書中)-

    • {{user}}: Slime?
      {{char}}: "Oh... Those things." She looks down and slightly blushes in embarrassment. "I remember first fighting those things. They're so quick that it's hard to get a good strike on them." Shizuru brushes away the memory. "Anyways, let's keep going. There's more places to explore."
      

In this case, the PList contains an entry for a slime and the Ali:Chat provides information of how Shizuru feels about them. Follow the same template for any other specific lore that one may have for a character.
在本例中,PList 包含一個史萊姆條目,而 Ali:Chat 提供了 Shizuru 對它們的感受的資訊。對於某個角色可能擁有的任何其他特定傳說,請遵循相同的模板。

Outfits? 服裝?

If you want your character to have alternate outfits based on the scene at hand, add both the PList and Ali:Chat entries in the lorebook.
如果您希望角色根據當前場景擁有備用服裝,請在知識手冊中新增 PList 和 Ali:Chat 條目。

For keys, follow the same principles as environment pairs and think about what someone would use to trigger injection of this pair. For triggering slimes, I used slime,slimes because these keys are needed when a slime is relevant. To start off, use the same keys for both the PList and Ali:Chat, but feel free to add more onto either as necessary.
對於密鑰,請遵循與環境對相同的原則,並考慮有人會使用什麼來觸發該對的注入。為了觸發史萊姆,我使用了 slime,slimes 因為當史萊姆相關時需要這些鍵。首先,對 PList 和 Ali:Chat 使用相同的鍵,但可以根據需要隨意添加更多鍵。

Placement 放置

The World Info editor also has an option for placement. In a prompt, there are two places to inject world info:
世界資訊編輯器還​​有一個放置選項。在提示符號中,有兩個地方可以注入世界資訊:

  • Before character - Before the character description (wiBefore in story string)
    Before character - 在角色描述之前(故事字串中的 wiBefore)
  • After character - After the character description (wiAfter in story string)
    After character - 在角色描述之後(故事字串中的 wiAfter)
  • Author's note top - Top of author's note
    Author's note top - 作者註釋的頂部
  • Author's note bottom - Bottom of author's note
    Author's note bottom - 作者註釋的底部
  • At depth - At a specific depth in the context, starting from the bottom and working up as the depth increases. The lower the depth, the more important the information is in the prompt.
    At depth - 在上下文中的特定深度,從底部開始並隨著深度的增加而向上。深度越低,提示中的資訊越重要。

These positions are determined based on how important something is in the prompt. If you believe something to be more important, then place it further down the prompt. Depth is the most useful option since the entries can be placed anywhere.
這些位置是根據提示中某些內容的重要性來決定的。如果您認為某件事更重要,請將其放在提示的更下方。深度是最有用的選項,因為條目可以放置在任何地方。

For Shizuru and Farlandia's world info, I place PLists at a depth of 5 (one above author's note/persona Plist WI entry) and Ali:Chats at the After character position.
對於 Shizuru 和 Farlandia 的世界訊息,我將 PList 放置在深度 5 處(比作者註釋/角色 Plist WI 條目高一級),將 Ali:Chats 放置在 After character 位置。

Do not overdo importance!
不要過度重視!

As a writer, you may think that everything is important to your character. This is not the case and should be avoided to prevent possible leakage. Instead, think of the most important parts you will have in a conversation with your character.
身為作家,您可能認為一切對您的角色都很重要。但情況並非如此,應避免這種情況,以防止可能的洩漏。相反,想想你在與你的角色對話時會遇到的最重要的部分。

For example, a description of a city can be placed before the character description since it's never highlighted in the chat itself, but the character is aware of it.
例如,可以將城市的描述放在角色描述之前,因為它在聊天本身中永遠不會突出顯示,但角色知道它。

Scan depth 掃描深度

This dictates the amount of chat messages to scan for world info. Generally, this should be kept at the default of 2 unless you want more messages to be scanned for injection. I use 4.
這決定了要掃描世界資訊的聊天訊息的數量。一般來說,除非您希望掃描更多訊息以進行注入,否則應將其保留為預設值 2 。我使用 4

Context Percent 上下文百分比

The percent of context that world info can occupy at a maximum. Keep this to the default of 25% unless you want a higher maximum budget for world info context injection. I use 45%.
世界資訊最多可以佔據的上下文百分比。將此值保留為預設值 25% ,除非您想要更高的世界資訊上下文注入最大預算。我使用 45%

Token Budget 代幣預算

If you don't like using a percent, this allows you to set the maximum token amount to budget for world info. Make sure to set context percent to 100% and move around the budget from there.
如果您不喜歡使用百分比,這允許您將最大代幣金額設定為世界資訊的預算。確保將上下文百分比設為 100% 並從那裡調整預算。

Are you an adventurer?
你是冒險家嗎?

Set a high scan depth and context percent/budget! Adventure mode warrants a larger emphasis on world info, so more budget and scanning is needed. I use a scan depth of 15 and a budget of 1800 (you can increase these values as the context size of your model increases).
設定高掃描深度和上下文百分比/預算!冒險模式需要更加重視世界訊息,因此需要更多的預算和掃描。我使用 15 的掃描深度和 1800 的預算(您可以隨著模型上下文大小的增加而增加這些值)。

Disable selector 停用選擇器

An entry can be marked as constant, conditional, or disabled. In SillyTavern, these are represented as green, yellow, and red in the selection dropdown. Here's what each color stands for:
條目可以標記為 constantconditionaldisabled 。在 SillyTavern 中,這些在選擇下拉清單中表示為綠色、黃色和紅色。以下是每種顏色所代表的意思:

  • Green: constant 綠色:恆定
  • Yellow: conditional (relies on key activation). This is the default option.
    黃色:有條件(依賴按鍵啟動)。這是預設選項。
  • Red: Disabled 紅色:已禁用

Specificity 特異性

What if a certain entry in World Info focuses on a specific character? Well, in that case, the dropdown between primary and secondary keys has options for AND and NOT. For AND, this condition requires that both keys from the primary and secondary list are presented in the prompt for the world info to trigger injection. NOT is the opposite where the presence of a secondary key will not trigger injection. Let's take a look at an example with Shizuru's previous house using the AND condition:
如果世界資訊中的某個條目關注特定角色怎麼辦?好吧,在這種情況下,主鍵和輔助鍵之間的下拉清單有 ANDNOT 選項。對於 AND ,此條件要求主列表和輔助列表中的兩個鍵都出現在世界資訊的提示中以觸發注入。 NOT 與此相反,輔助密鑰的存在不會觸發注入。讓我們來看看使用 AND 條件的 Shizuru 以前的房子的範例:

  • Value: [Shizuru's house: house(Japanese, traditional), located in Japan, sliding doors, tatami mats, futons, lived with {{user}}, no longer accessible] 值: [Shizuru's house: house(Japanese, traditional), located in Japan, sliding doors, tatami mats, futons, lived with {{user}}, no longer accessible]
  • Keys: 按鍵:

    • Primary: house,home 主要: house,home
    • Secondary: your,yours,she,her,our,ours 次要: your,yours,she,her,our,ours

The inclusion of primary and secondary keys means that both have to be included for entry injection. A sentence such as Let's go to your home will fire for keywords home, and your.
包含主鍵和輔助鍵意味著必須包含兩者才能進行條目注入。諸如 Let's go to your home 這樣的句子將針對關鍵字 homeyour 觸發。

If you want to trigger the entry based on the character's name, add Shizuru to the secondary keys. If Always add character's name to prompt is on, the character's name is included because that's given with the prompt. However, a lorebook will accomplish the same thing, so only do this if you're including the specific entry in world info.
如果要根據角色名稱觸發輸入,請在輔助鍵中新增 Shizuru 。如果 Always add character's name to prompt 打開,則角色的名字會被包含在內,因為它是隨提示給出的。然而,傳說書可以完成相同的事情,所以只有當您在世界資訊中包含特定條目時才執行此操作。

Replacing the Author's Note
替換作者註釋

You may recall from the Pygmalion guide that a character's PList containing sections such as persona and appearance is usually placed into the Character's Author's note. With lorebooks, this is no longer necessary! Character PLists can now be placed inside a lorebook with a specific depth and the best part is that there's
您可能還記得皮格馬利翁指南中包含角色和外觀等部分的角色 PList 通常放置在 Character's Author's note 中。有了傳說書,這不再是必要的!角色 PList 現在可以放置在具有特定深度的知識書中,最好的部分是

Utilizing embedded lorebooks leaves the author's note open for what it really is, a quick and convienient place to add information at any prompt depth.
利用嵌入的知識手冊可以讓作者的筆記保持開放的狀態,這是一個可以快速方便地在任何深度添加資訊的地方。

To accomplish this: 為了實現這一點:

  • Create a new lorebook for your character (if there isn't one already)
    為你的角色創建一本新的傳說書(如果還沒有的話)
  • Create a new entry and add in the character PList
    建立一個新條目並新增到字元 PList 中
  • Mark the entry as Constant
    將條目標記為 Constant
  • Select At Depth and set it to 4 (or whatever depth you previously set author's note to)
    選擇 At Depth 並將其設為 4 (或您先前設定作者註釋的任何深度)
  • Associate the lorebook with the character card
    將傳說書與人物卡關聯起來
  • Export the character card from SillyTavern (which contains the embedded lorebook)
    從 SillyTavern 導出角色卡(其中包含嵌入的傳說書)

SillyTavern will prompt the user to import the embedded lorebook once the character is imported. Be sure to do that.
匯入角色後,SillyTavern 將提示使用者匯入嵌入的知識書。一定要這樣做。

Nowadays, I keep my character persona inside a lorebook entry and put [Genre; Tags; Scenario] inside author's note at a depth of 1.
如今,我將我的角色保留在傳說書條目中,並將 [Genre; Tags; Scenario] 放入作者註釋中,深度為 1。

I advise more people switch to this method as it's easier for the end user.
我建議更多的人改用這種方法,因為它對最終用戶來說更容易。

Advanced concepts 先進理念

These concepts are... advanced. If you have a hang of the basics, feel free to proceed.
這些概念是……先進的。如果您掌握了基礎知識,請隨時繼續。

This section is being updated as new features are created and more ideas are shared. Keep an eye out!
隨著新功能的創建和更多想法的共享,此部分正在更新。請留意!

If you are confused, ask in Discord! I don't bite.
如果您感到困惑,請在 Discord 中提問!我不咬人。

Recursive scanning 遞迴掃描

Recursive scanning, or recursion, is a fancy way of saying "do something again if a condition is met". You can also call this a form of looping. With world info, recursion occurs in the form of keys and subkeys.
遞歸掃描或遞歸是「如果滿足條件則再次執行某事」的一種奇特方式。您也可以將其稱為循環形式。對於世界訊息,遞歸以鍵和子鍵的形式發生。

Let's say you want to categorize Farlandia's monsters:
假設您想要對 Farlandia 的怪物進行分類:

  1. Key - monsters; Value - [Farlandia's monsters: slimes]
    鍵 - monsters ;值 - [Farlandia's monsters: slimes]
  2. Key - slimes; Value - [slime: enemy, slimeball, made of gelatin, bounces to move, annoyance]
    鍵 - slimes ;值 - [slime: enemy, slimeball, made of gelatin, bounces to move, annoyance]

With recursive scanning enabled, mentioning the word monsters in chat will inject both monsters and slimes into the context.
啟用遞歸掃描後,在聊天中提及單字 monsters 會將 monstersslimes 注入上下文。

Recursion searches the words from a parent pair and looks for subkeys that match those words. In this case, the value for monsters contained slimes and the pair for slimes was found and injected into the context.
遞歸從父對中搜尋單字並尋找與這些單字相符的子鍵。在本例中, monsters 的值包含 slimes ,並且 slimes 的值對被發現並注入到上下文中。

The principle of recursion can be leveraged to create a full tree of pairs and subpairs for a complex section of lore. This will help further define and expand your world.
可以利用遞歸原理為複雜的知識部分創建完整的對和子對樹。這將有助於進一步定義和擴展您的世界。

Sometimes, you might want to avoid recursion for some entries. This is especially important with alternative outfits or specific buildings. You can enable Non-Recursable in SillyTavern when editing the world info entry.
有時,您可能希望避免某些條目的遞歸。這對於替代服裝或特定建築物尤其重要。您可以在編輯世界資訊條目時在 SillyTavern 中啟用 Non-Recursable

Recursion scalability 遞歸可擴展性

Scalability is very important when creating world info. While there's a % context limit that you can set, it's bad to run out of WI budget when sending a message.
在創建世界資訊時,可擴展性非常重要。雖然您可以設定 % 上下文限制,但發送訊息時用完 WI 預算是很糟糕的。

Let's start by editing Farlandia's world info. I want to have a category of monsters and recursively create a tree that works downstream until all monsters are fetched into context. The main issue is that the more monsters I have, the harder it's going to be to coordinate all these tokens since each monster will have a PList and Ali:Chat entry associated with it.
讓我們從編輯 Farlandia 的世界資訊開始。我想要有一類怪物,並遞歸地創建一棵在下游工作的樹,直到所有怪物都被提取到上下文中。主要問題是,我擁有的怪物越多,協調所有這些令牌就越困難,因為每個怪物都有一個與其關聯的 PList 和 Ali:Chat 條目。

So here's an algorithm that does just that. PLists are always injected and recursed since they're ideally small fragments of what a monster is. However, Ali:Chat is not pulled unless the specific monster's keys are stated in context. An image of the algorithm is provided below:
所以這裡有一個演算法可以做到這一點。 PList 總是被注入和遞歸,因為它們理想地是怪物的小片段。然而,除非在上下文中說明了特定怪物的按鍵,否則 Ali:Chat 不會被拉出。下面提供了該演算法的圖像:

IMG0537jpg

To accomplish this algorithm, enable Non-Recursable on Ali:Chat lorebook entries.
若要完成此演算法,請在 Ali:Chat lorebook 條目上啟用 Non-Recursable

But what about if all those monsters tie to a common attribute which the character has specific feelings for? For example, Shizuru treats slimes and dragons as enemies. In this case, the algorithm will have to be expanded to look like the following:
但是,如果所有這些怪物都與角色有特定感情的共同屬性相關聯怎麼辦?例如,靜將 slimesdragons 視為敵人。在這種情況下,演算法必須擴展為如下所示:

IMG0536jpg

To accomplish this modification, create a common Ali:Chat of how the character feels towards multiple items and make sure it's recursable.
要完成此修改,請建立一個通用的 Ali:Chat,描述角色對多個項目的感受,並確保它是可遞歸的。

PList base world PList基礎世界

Multiple PLists have a higher possibility of causing leakage of brackets. If you are seeing leaking, this base world can help compress all PList information into one PList per world info insertion depth and position (ex. After char or depth at 5).
多個 PList 導致括號洩漏的可能性較高。如果您發現洩漏,這個基礎世界可以幫助將所有 PList 資訊壓縮到每個世界資訊插入深度和位置的一個 PList 中(例如,在 5 處的字元或深度之後)。

  1. Firstly, create a new world and add two entries. One entry contains a [ while the other contains a ]. These are square bracket borders for a PList.
    首先,創建一個新世界並新增兩個條目。一個條目包含 [ ,而另一個條目包含 ] 。這些是 PList 的方括號邊框。
  2. Next, make the first entry have an insertion order of 2 and the second entry have an insertion order of 998. This ensures that anything in between these orders will be nested inside the PList.
    接下來,使第一個條目的插入順序為 2 ,第二個條目的插入順序為 998 。這確保了這些訂單之間的任何內容都將嵌套在 PList 內。
  3. Finally, mark both of these entries as Constant and select the placement. Both entries need to be in the same placement (or depth) otherwise you'll get extremely weird responses!
    最後,將這兩個條目標記為 Constant 並選擇放置位置。兩個條目需要位於相同的位置(或深度),否則您會得到非常奇怪的回應!
  4. Rinse and repeat for any other placements
    沖洗並重複任何其他放置

After selecting your PList base world in global info, remove the [] from PList entries in all associated worlds and add a ; to the end of each entry.
在全域資訊中選擇 PList 基本世界後,從所有關聯世界的 PList 條目中刪除 [] ,並在每個條目的末尾添加 ;

Make every Ali:Chat entry have an insertion order of either 1 or 999. This will make sure these example dialogues go before or after the large PList.
使每個 Ali:Chat 條目的插入順序為 1 或 999。這將確保這些範例對話位於大型 PList 之前或之後。

Here's an example of a constructed WI Plist prompt
這是建構的 WI Plist 提示的範例

[
Farlandia's monsters: slimes, dragons;
法蘭迪亞的怪物:史萊姆、龍;

slime: enemy, slimeball, made of gelatin, bounces to move, annoyance;
黏液:敵人,黏液球,由明膠製成,彈跳移動,煩惱;

]

Templates 範本

If you don't want to create this world by yourself, a quick start JSON is provided here. Just disable the entries you don't want to see. Select this world inside global world info, which will inject square brackets at insertion positions 2 and 998. Finally, follow the steps above to convert old PList entries into ones compatible with PList base.
如果您不想自己創建這個世界,這裡提供了快速入門 JSON。只需停用您不想看到的條目即可。在全域世界資訊中選擇這個世界,這將在插入位置 2998 處注入方括號。最後,請按照上述步驟將舊的 PList 條目轉換為與 PList 函式庫相容的條目。

Modified Shizuru 改良靜

You can also find Shizuru's modified character and worlds here as a more concrete example of how a character is adopted for PList base.
您還可以在這裡找到 Shizuru 修改後的角色和世界,作為 PList 基礎如何採用角色的更具體範例。

Lorebook stacking 傳說書堆疊

Sometimes, the character you're writing for may be a variation of a base character. The most common usecase for stacking is for building an NSFW character based on an SFW one. However, I'll be using an example of two Shizuru characters to stay in tone of this guide.
有時,您所寫的角色可能是基本角色的變體。堆疊最常見的用例是基於 SFW 角色來建立 NSFW 角色。不過,我將使用兩個 Shizuru 字元的範例來保持本指南的基調。

The characters are as follows:
人物如下:

  1. Shizuru: A samurai that fell into another world with the User
    靜:與使用者一起墜入異世界的武士
  2. Shizuru: An edo-period princess that fell into another world with the User
    靜:與使用者一起墜入異世界的江戶時代公主

Now, these two characters will each need a lorebook, but it would be best to build on a single "core" lorebook. The core will consist of entries for Shizuru the samurai and an expansion lorebook will be created for Shizuru the princess. With this architecture, both the core and expansion lorebook can be updated independently from each other.
現在,這兩個角色都需要一本傳說書,但最好以一本「核心」傳說書為基礎。核心內容將包括武士靜的條目,以及公主靜的擴展故事書。透過這種架構,核心知識庫和擴展知識庫都可以彼此獨立更新。

To add an expansion/auxillary lorebook in SillyTavern, just enter the character's lorebook selection screen and add the name under Auxillary lorebooks.
要在 SillyTavern 中新增擴展/輔助知識書,只需進入角色的知識書選擇畫面並在 Auxillary lorebooks 下新增名稱。

Character filters 字元過濾器

Let's say you have a world info entry and you only want a certain character to trigger it. This is now possible with the Filter to Character(s) box in SillyTavern.
假設您有一個世界資訊條目,並且您只想要某個角色來觸發它。現在可以透過 SillyTavern 中的 Filter to Character(s) 框來實現這一點。

To illustrate this, let's say there are two characters named Jamie and Bill. The sample entry is as follows: [Skytree: skyscraper, large building, located in Tokyo]. We want Jamie to know about the Skytree, but nobody else should. It's her secret place. In this case, add Jamie into the filter list. Now Jamie knows about the Skytree, but nobody else does.
為了說明這一點,假設有兩個名為 JamieBill 的字元。範例條目如下: [Skytree: skyscraper, large building, located in Tokyo] 。我們希望傑米了解晴空塔,但其他人不應該知道。這是她的秘密地點。在這種情況下,將 Jamie 新增到過濾器清單中。現在傑米知道了晴空塔,但沒有其他人知道。

What about if you don't want certain characters to trigger an entry? That exists too. Inside SillyTavern, check the Character Exclusion box and all the characters in your filter list will now be excluded from triggering that entry.
如果您不希望某些字元觸發條目怎麼辦?這也是存在的。在 SillyTavern 中,選取 Character Exclusion 框,過濾器清單中的所有字元現在都將被排除在觸發該條目之外。

For the example of Jamie and Bill, just remove Jamie and add Bill in the Exclude character(s) box. Now Bill doesn't know what the Skytree is, but Jamie and any other character does!
對於 Jamie 和 Bill 的範例,只需刪除 Jamie 並在 Exclude character(s) 框中新增 Bill 即可。現在比爾不知道晴空塔是什麼,但傑米和任何其他角色都知道!

This feature is more suited with lorebooks, especially if you're creating a character with stacked lorebooks. Sometimes an entry from the core character should not leak into other characters (like a personality PList)!
此功能更適合傳說書,特別是當您創建具有堆疊的傳說書的角色時。有時,來自核心角色的條目不應該洩漏到其他角色中(例如個性 PList)!

Mixing formats 混合格式

I get it, people are lazy. A large world info you imported is in plaintext and you don't want to format it. However, you still want to use the world info. What do you do?
我明白了,人都是懶惰的。您匯入的大量世界資訊是純文字形式的,您不想對其進行格式化。但是,您仍然想使用世界資訊。你做什麼工作?

Well... formats can be mixed, but they should be placed much farther up the context. The main reason is because the formatting won't make the AI think that world info is dialogue.
嗯......格式可以混合,但它們應該放在上下文中更遠的地方。主要原因是格式化不會讓AI認為世界資訊是對話。

Let's say that you have a character that's in PList + Ali:Chat, but world info is in plaintext. You'd place the world info entries before character defintions. This way, the world info has less potential to confuse the AI since it isn't being treated like an action or dialogue (depending on the character formatting style).
假設您有一個角色位於 PList + Ali:Chat 中,但世界資訊是明文形式。您可以將世界資訊條目放在角色定義之前。這樣,世界資訊就不太可能混淆人工智慧,因為它不會被視為動作或對話(取決於字元格式樣式)。

Another possibility is to use the PList base world and place the plaintext world info in there. This will wrap all the plaintext world info in square bracket format. This way, the AI will know that the injected information isn't part of dialogue or actions. But, this can cause unintended side effects.
另一種可能性是使用 PList 基礎世界並將明文世界資訊放入其中。這將以方括號格式包裝所有純文字世界資訊。這樣,人工智慧就會知道注入的資訊不是對話或動作的一部分。但是,這可能會導致意想不到的副作用。

Overall, the best solution for a foreign world info book is to reformat it.
總的來說,外國世界資訊書的最佳解決方案是重新格式化。

Conclusion 結論

World info and lorebooks are very powerful resources for customizing your character and expanding an overall universe for an AI to grab from. All while saving permanent tokens!
世界資訊和傳說書是非常強大的資源,可用於自訂您的角色並擴展整個宇宙以供人工智慧取得。同時保存永久代幣!

Edit
Pub: 01 Oct 2023 05:53 UTC
發佈時間: 2023 年 10 月 1 日 05:53 UTC

Edit: 09 Oct 2023 06:00 UTC
編輯:2023 年 10 月 9 日 06:00 世界標準時間

Views: 12658  瀏覽次數:12658

new·what·how·langs·contacts
新·什麼·如何·語言·聯絡人