Skyrim Special Edition

File information

Last updated

Original upload

Created by

Dwemer Dynamics

Uploaded by

tylermaister

Virus scan

Some manually verified files

About this mod

"Herika - The ChatGPT Companion" is a revolutionary mod that aims to integrate Skyrim with Artificial Intelligence technology. It specifically adds a follower, Herika, whose responses and interactions are governed by an AI. You can talk in almost any language. She can "see" the game. She is basically Player 2.

Requirements
Permissions and credits
Translations
  • Russian
  • Portuguese
  • German
Changelogs

Presents







Herika is a custom NPC Follower who you can interact with through an in-game chatbox or with your microphone. She uses AI technology to respond to anything you say dynamically.

Spoiler:  
Show





🔎She can be found near Warmadien's in Whiterun.
Spoiler:  
Show






🎭Full Character Customization

Herika does not just have to be Herika...
By editing her in-game appearance and name, as well as a few changes in the Herika Server, you can make her ANY CHARACTER you want!

We have an example character replacer, Seth, which can be downloaded in the optional files. 
Spoiler:  
Show





📜Script Writer (Machinima Tool
)

The Script Writer is a tool for getting Herika to recite a dialogue script of your making. You can customize her facial expressions, voice and idle animations. It is written in a .json format, which you can auto generate. It's great for turning Herika into a video presenter!


Here is a video we made using this tool.
Spoiler:  
Show



👀Soulgaze (Image-to-Text Recognition
)

If you press the Soulgaze hotkey (can be set in the SPG MCM menu) it will take a screenshot of your game. We feed this to an Image-to-Text AI service, which generates a text description of the image. We send this back to Herika who will then explain what she "sees"

Soulgaze examples!
Spoiler:  
Show






🧠Offline AI and Memories!

The mod can function offline using KoboldCPP and other AI programs. Please note that actions are not fully functional using offline AI.
Check this article for installation instructions. 

Here is a video example of the mod fully working only using offline AI tools.
Spoiler:  
Show




Also we have implemented ChromaDB (a vector database, used for AI memory storage) within DwemerDistro. This will save all the conversations you have with Herika. She will pull the most relevant memories for context whenever you talk to her. She has a good long-term understanding of your entire adventure together.

An example of what is being saved.
Spoiler:  
Show




3D Mind Map (Download Here)
Spoiler:  
Show




📙Diary, Background Story and Plans


Herika is able to keep a diary of events which have happened. This is triggered through a manual hotkey (configurable in the MCM menu). She will then summarize all the most recent events into a diary entry. She will use her diary entries to help her long-term memory.
She even has a cute diary log in the Herika Server
Spoiler:  
Show




Also we have a background story generator which allows you to very easily create a background story for Herika based on the personality you have created for her. This is also saved to her diary and can be referred to at a later date.
Spoiler:  
Show




Herika is aware of active quests in your quest log (e.g. quests which you have ticked).

"What are our active quests Herika?"
Spoiler:  
Show




You can set a plan/goal for Herika. She will then guide her responses to try and help you complete this goal.

This can be anything from:
  • I need to complete x quest.
  • I must train my alchemy skill.
  • We should find our way to RavenRock.
  • We need to solve the Mystery of the Dwarves.
  • We must find some Ebony armor!
  • Lets make loads of money!

Spoiler:  
Show




👉Commands

You can give Herika commands by asking her. These commands are interpreted by another layer of AI ("The Narrator") which then activates a script function in game to trigger an action. These commands can happen just through normal conversation and don't require a "strict" word pattern to work.

Current Command List:

Spoiler:  
Show

  • Inspect NPC/Player
  • Inspect Surroundings
  • Open Inventory
  • Follow NPC
  • Move to NPC/Location (local travel)
  • Lead the way to (across map travel, have to be more specific with this phrase!)
  • Attack NPC
  • Sheathe Weapon
  • Sit Down
  • Stop (debug command that will cancel all other commands if she gets stuck in a loop)
  • Heal (Requires addon plugin)



🎤Voice Support 


You can use a Speech-to-Text service to actually speak with Herika!
Spoiler:  
Show




💬Random Comments

Herika will make random comments about her environment or conversations she overheard.
Spoiler:  
Show



A few moments later....




🌆Location Awareness

Herika is aware of her current location and can provide information about it.

"Where are we Herika?"
Spoiler:  
Show




👨‍🌾NPC Awareness

Herika is aware of other NPC conversations going on around her. You can ask her about these NPC's.

"What is the name of the priest who is talking?"

Spoiler:  
Show





🤺Combat Awareness

Herika will make comments after combat and other encounters.

Spoiler:  
Show




📚Book Summaries

Herika will summarize any book or note you read in the game.

Saint Jiub's Opus
Spoiler:  
Show


Museum Pamphlet
Spoiler:  
Show




The Lusty Argonian Maid Volume 2
Spoiler:  
Show






🔮Customizable Personality

You can edit Herika's entire personality. Depending on your configuration you will get different responses. Check the Articles section for some good starting templates.


Question: What are your thoughts on Talos?

"You are Herika, a Breton female who likes jokes and sarcastic comments" (Default)
Spoiler:  
Show

"You are Herika, a Dark Elf female who is rude and makes dismissing comments."
Spoiler:  
Show

"You are Herika, a Breton female who only speaks in rhymes. You also think Talos is a actually a Mudcrab."
Spoiler:  
Show

"You are now Pelinal Whitestrake"
Spoiler:  
Show


📢Text-to-Speech Support

Currently the mod can be hooked up to a TTS service which allows you to give Herika a voice.

Here are some of the current options:
  • OpenAI: Decent voice quality. Reasonable price. 
  • xVASnyth: Decent quality. Can be run on your machine for free!
  • Mimic3: Completely free and works offline. Low voice quality. Included automatically with DwemerDistro!
  • Elevenlabs: Create custom voices (Yes you can make her sound like Dagoth Ur). Costs $. Great voice quality. 



The mod works as follows:

It has two components: the plugin itself and the Herika Server. The plugin is responsible for collecting events from the game (conversations, events, deaths, etc.) and sending them to the "Herika Server". This server will store this data and sends it to the remote AI. It will also store the AI's responses and send them to the plugin, which will make them available to the follower in-game.

The plugin is an SKSE plugin. The 
Herika Server
 acts as the middle man between Skyrim and the AI API's. This server can run on the same machine as the game, but it can also run on a remote machine.

As a general rule, the plugin will send information to the server, and the server will obtain comments/responses from the AI and send them to the plugin, which will store them in queues. These queues will play in game with the dialogue showing up as subtilties with lip sync and the audio playing over your system sounds. The gateway will also store context information.

For example, you are in a cave and you kill a Draugr. The "death" event is sent to the server, which in turn sets up a conversation with the latest dialogues, locations, and events and sends it to the AI to give it context. The AI responds, and this response is sent to the plugin, which will launch a dialogue commenting on the situation.

Some notes from the developers:

1. The AI's are not deterministic, meaning the same input does not always produce the same result. Therefore, despite numerous tests, sometimes it simply doesn't work as it should.
2. Herika is not a character from Skyrim. She is an AI interpreting a character from Skyrim. Sometimes, she may misinterpret and break certain rules. If that happens, just remind her not to do it.
3. The GPT-4 model is more expensive and slower than GPT-3.5, but significantly better. It adheres better to the rules of roleplay and makes more logical decisions. The functionality of commands/actions with this model is much better. Our base model remains GPT-3.5, but sometimes it doesn't work well. Over time, GPT-4 will become the reference model through "natural" evolution, so we know we are on the right track.

For more details watch this video:



Herika Server GitHub: https://github.com/abeiro/HerikaServer

Mind Map for 3D memory visulation: 
https://github.com/RANGROO/herikamindmap 




❌Potential Mod Conflicts:
  • Requiem and other total overhaul style mods.
  • Relationship Dialogue Overhaul (due to different NPC voicetype).
  • Nether's Follower Framework/Amazing Follower Tweaks may have some inconsistent issues. 
  • Whiterun layout changes (as this is where Herika spawns, cell Whiterun Plains District 05,02).

✅Mod Recommendations:
  • To your Face (Only NPC's in your line of sight will greet you, helps prevent dialogue spam that can overflow Herika's context)
  • Subtitles (Prevents Herika's subtitles from overriding other NPC's subtitles)
  • Dialogue History (Keep track of previous conversations ingame)




🛑For any issues you encounter with installing the mod please post them in our discord in the i-have-a-problem channel.🛑

We have more in-depth and multi-lingual installation guides in the Articles section! 

Alternate (more detailed) Installation Guide: 
https://www.nexusmods.com/skyrimspecialedition/articles/6279

Guide d'installation en Français: https://www.julien-richard.fr/skyrim-nextgen-herika/
Deutsche Installationsanleitung: 
https://www.youtube.com/watch?v=mprZ882wZvs




🚨DO NOT SHARE YOUR API KEYS WITH ANYBODY!

🤖AI Service Options:

🧠AI Generation (REQUIRED FOR MOD TO WORK) 

📢Text-to-Speech (NOT REQUIRED BUT HIGHLY RECOMMENDED) 
  • (Free & Recommended) Mimic3: Automatically Installed with DwemerDistro!
  • (Paid & Recommended) Azure TTS: Guide Here
  • (Paid & Recommended) OpenAI TTS: Just use the same key you used for ChatGPT.
  • (Paid) Google Cloud TTS: Guide Here
  • (Paid) Eleven Labs: Guide Here
  • (Paid) ConvAI: Decent voice quality. Create an account here: https://convai.com/
  • (Free) XTTS: Good quality voice, fantastic tone/speech patterns. Get it here: https://huggingface.co/spaces/coqui/xtts

🎤Speech-to-Text (NOT REQUIRED, ALLOWS YOU TO USE YOUR MICROPHONE TO SPEAK) 
  • (Paid & Recommended) Whisper: Create an OpenAI account and setup an API: https://platform.openai.com/account/api-keys
  • (Free & Recommended) Local Whisper: Preinstalled with DwemerDistro, just need to active the script in the "tools" folder.
  • (Paid) Azure STTGuide Here

👀Image-to-Text  (NOT REQUIRED, USED FOR SOULGAZE FEATURE)
  • (Paid & Recommended) ChatGPT Vision: Just use your OpenAI API key, around $0.04 an image.
  • (Free/Paid) Llama.cpp llavaRead and run this CoLab file

💰Costs Estimates for (Paid) Services

  • ChatGPT 3.5 is around $1-$3 a week for heavy playtime. ($5 in free credits when you sign up for a month).
  • ChatGPT 4 is about 10x more expensive than 3.5!
  • Open Router can either be really cheap running a smaller model (7B) or $ with a larger model (70B).

  • Azure TTS & GCP TTS is around $2.25 for 2 hours of audio.
  • OpenAI TTS is around a $1.5 for 2 hours of audio.
  • Elevenlabs TTS is very expensive and is not recommended for long-term use. Two hours of audio is $22 a month!

  • Whisper/Azure STT are very cheap. Maybe $1 a week for heavy usage. 


DwemerDistro Installation 

  • Open Control Panel - Programs - Turn Windows Feature on or off


  • Enable Windows Subsystem for Linux and Virtual Machine Platform (you may need to restart your pc)
    
  • Open a CMD prompt (make sure to run it as admin) and enter this command: wsl --update (This is to update to WSL2)
  • You may have issues installing WSL if you do not have virtualization enabled in your BIOS/UEFI boot menu. You may need to do a quick google search on how to do it for your specific computer. Here is a good starting point

  • Download the 2. Herika Server Full (DwemerAIDistro2) from the files page
  • Unpack the contents
  • Run the Install.bat file and wait for it to finish
  • Open up the Tools folder and run Update.bat 
  • When prompted enter the password dwemer - IT IS CAPSLOCK SENSITIVE
  • Once updated go back a folder and run the Run.bat file
  • Wait for the terminal to bootup. DO NOT CLOSE THE TERMINAL OTHERWISE IT WILL SHUTDOWN THE SERVER!
  • Follow the instructions in the terminal menu to reach the Herika Server

  • Click "Server Actions - Reinitialize Heirka Server"

  • Click "Configuration - Configuration Wizard"
  • Enter in your API keys and make any customizations you desire. Please read the descriptions!

Configuration Wizard Notes:
  • Its is recommended to enable NEW_QUEUE
  • For bare functionality you just need an AI/LLM service enabled. However having TTS and SST is strongly recommended.
  • OpenAI (yes even with all the controversy) is a good online service to use to start with as you get AI, TTS, STT & ITT generation with one API key!

  • Click Save once you are happy with your changes

Mod Installation

Requirements for SE/AE:
Requirements for VR:
Suggested mod load order:
  • Address Library 
  • PapyrusUtil
  • Powerofthree's Papyrus Extender
  • SkyUI
  • UI Extensions
  • Fuz Ro D'oh
  • HerikaAI


  • Download 1. HerikaAI (Skyrim Mod File)  file in the downloads page
  • Install it with your mod manager of choice (recommend to place it at the bottom of your mod load order)

  • Open the Mod folder and check that the SimpleGatewayer.ini (\skse\Plugins), then copy and paste the DwemerDistro terminal output into the file.

    Example File Output:
SERVER=192.168.86.12

PORT=8081                                    

PATH=/HerikaServer/comm.php
POLINT=1


  • MAKE SURE THE UWAMP/DwemerDistro SERVER IS RUNNING BEFORE YOU START THE GAME!

  • Start Skyrim and once in-game open the Mod Configuration Menu and click SPG
  • Edit the settings to your liking
  • Exit out of the MCM menu

  • Find Herika in Whiterun to the left of Warmadien's
  • Ask her to follow you
  • The mod should now activate and you will get a response when you talk to her!


  • 🎊Well done for getting it installed! We hope you enjoy the mod!🎊
  • Check the "Articles" section for more advanced configuration guides
  • You can also change her default Skyrim dialogue with any of the audio packages in the optional files section. You can also generate your own custom audio files using your TTS of choice and replace them