Set Up OpenRouter for Daggerfall Unity

1. Create an OpenRouter Account

Visit OpenRouter and create an account if you don't have one.

2. Generate Your API Key

Hover over your user icon in the top-right corner.

Click "Keys".

Click "Create Key" and enter a name (e.g., Daggerfall).

Important: Copy the key immediately—this is the only time you will see it.

If you miss it, delete the key and create a new one.

3. Add the API Key to DFU

Open your file explorer and go to (replace your username):
C:\Users\USERNAME\AppData\LocalLow\Daggerfall Workshop\Daggerfall Unity\Mods\EditorData\bb531540-55de-47a4-a398-7310c8948b80\Data(Example for Windows)

Open ai-settings.txt and add your API key:
api-key=YOUR_KEY_HERE

Save the file.

Choose an AI Model

1. Browse Models on OpenRouter

Click "Models" at the top-right of the OpenRouter page.

Adjust filters for free and fast models:

Set "Prompt Pricing" to Free.

Sort by "Latency: Low to High" (Next to the big search bar).

2. Select and Copy Model Name

Click on a model you want to use.

On the next page, copy the model name below the title.

Set Up Daggerfall Unity (Immersive Journal Mod)

1. Open Mod Settings in DFU

Go to the settings for Immersive Journal.

Select OpenRouter.ai as the AI provider.

2. Enter Model Name

Type in the model name in the "Modelname" field.

Note: DFU does not allow pasting text :/

Fixing Long Model Names

If your model name is too long for the DFU textfield, follow these instructions:

1. Open Mod Settings File

Open your file explorer and go to:
C:\Users\USERNAME\AppData\LocalLow\Daggerfall Workshop\Daggerfall Unity\Mods\EditorData\bb531540-55de-47a4-a398-7310c8948b80(Example for Windows)

Open modsettings.json.

2. Manually Add the Model Name

Find the line with "Modelname" and enter the name between the quotes:
{
"SettingsVersion": "1.0.0",
"Values": {
"AI": {
"AIProvider": "1",
"Modelname": "YOUR_MODEL_NAME",
"JournalStyle": "0"
},
"LMStudio": {
"Host": "localhost",
"Port": "1234"
}
},
"$version": "v1"
}


Customize AI Prompts (Optional)

You may have already seen the pre-prompt in the ai-settings.txt file (found here
"C:\Users\USERNAME\AppData\LocalLow\Daggerfall Workshop\Daggerfall Unity\Mods\EditorData\bb531540-55de-47a4-a398-7310c8948b80\Data"
or by double clicking the path in the DFU Starter)

This is the pre-prompt that gets used, when you select the Neutral Journal Style in the mod settings.

You can alter it the way you like it. The actual journey text gets added to this prompt and sent to the AI Server. 
Keep in mind, that the whole prompt MUST BE in one line!

Article information

Added on

Edited on

Written by

Excoriated

1 comment

  1. justice7ca
    justice7ca
    • member
    • 0 kudos
    EditorData path doesn't exist, I only see GameData, did I do something wrong?  I also tried loading the game with the mod installed, still not there.
    Great idea, I realize it's still early for this mod but thank you for putting the time into this one.

    Edit: it's under GameData with the same instructions.