About this mod
Allows you to create your own dreams and customized dream display.
- Permissions and credits
- Donations
This mod lets you create your own dream sets, and customize the dream display.
Dream display customizations include:
- Custom font
- Custom text color
- Custom font size
Dream Sets
To create your own dream set, the easiest thing to do is create a text file and put it in BepInEx\plugins\CustomDreamTexts\. Name it after the folder you want to create, e.g.:
BepInEx\plugins\CustomDreamTexts\MyDreamSet.txt
Dreams should be one dream per line, in the following format:
<DreamText>^<AuthorName>|<DreamChance>
Author name is optional (useful for lists of quotes), as is dream chance. If you do include a caret "^" in the dream text, it will separate the author out from the text with the string specified in the config file. For example, the default config turns:
Never jump into a pile of leaves with a wet sucker.^Linus Van Pelt
into
{"m_text":"Never jump into a pile of leaves with a wet sucker.\r\n\r\n-- Linus Van Pelt","m_chanceToDream":1.0,"m_trueKeys":[],"m_falseKeys":[]}
Which looks like:
Never jump into a pile of leaves with a wet sucker.
- Linus Van Pelt
If you specify a chance, you separate it from the dream text with a pipe "|", and the chance should be between 0 and 1, e.g.:
Never jump into a pile of leaves with a wet sucker.^Linus Van Pelt|0.5
This means that if the game chooses this dream to display, there will be a 50% chance of actually showing the dream, and a 50% chance of showing nothing.
If you don't include a chance, the mod will use the default chance specified in the config file.
The mod will take your text file and turn it into a folder full of json files. If you want to specify certain keys to require or avoid, you can add them to the m_trueKeys and m_falseKeys fields of the corresponding json file, e.g.:
{
"m_text": "$dream_yagluth01",
"m_chanceToDream": 0.1,
"m_trueKeys": [
"defeated_moder",
"defeated_bonemass",
"defeated_gdking",
"defeated_eikthyr"
],
"m_falseKeys": [
"defeated_goblinking"
]
}
This dream has a 10% chance of showing, and only if the true keys are true and the false keys are false. It uses a built-in string $dream_yagluth01, which changes based on the set language. This mod doesn't add any such strings, you need to input actual text.
I've included a set of 112 quotes I put together for a Stardew Valley mod, as an example.
If you edit your text file and you want to recreate your dream set folder, just delete the folder, e.g. BepInEx\plugins\CustomDreamTexts\MyDreamSet and run the game into your world. The mod will recreate the folder based on the text file.
The mod also outputs the default dreams to a dream set folder, BepInEx\plugins\CustomDreamTexts\Default, just for reference. There is a localized.txt with the actual text for your language for each dream (probably containing mild spoilers). Editing the default dreams won't do anything, but you can copy the Default folder and edit your own copy.
Config
A config file BepInEx/config/aedenthorn.CustomDreamTexts.cfg is created after running the game once with this mod).
You can adjust the config values by editing this file using a text editor or in-game using the Config Manager.
To reload the config from the config file, type customdreamtexts reset into the game's console (F5).
Technical
To install this mod, place the zip file contents in the BepInEx/plugins folder. You will need BepInEx.
Code is at https://github.com/aedenthorn/ValheimMods.
If you want to complain or ask for help or help me test my mods, you can visit my Discord server.
Click here for a list of all my mods for Valheim.