Giter Site home page Giter Site logo

againpsychox / kingmaker-morevoicelines Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 84 KB

Modification for Pathfinder: Kingmaker cRPG game to add more voice lines, for now only Jaethal from AI voice cloning.

C# 63.69% AutoHotkey 0.81% PowerShell 30.82% Python 4.68%
ai-voice-clonining pathfinder-kingmaker unity-mod crpg unity-modding

kingmaker-morevoicelines's Introduction

More Voice Lines for Pathfinder: Kingmaker

This is modification for Pathfinder: Kingmaker. Uses Unity Mod Manager and 0Harmony. Audio files along with some configuration are required. For now, only Jaethal voice lines are done (at least by me), but you are free to contact me via GitHub Issues or e-mail if you want to contribute more. The repository also includes notes on voice clonning & scripts I used for generating Jaethal.

You can download the mod from Nexus Mods.

Notes

  • Voice over requests from game are detected by LocalizedString.PlayVoiceOver patch. We map those strings UUIDs to audio files, with special "recipe" that describes which actual files are to be used, in what order. Some suffixes are expected for sex or kingdom status dependent dialogues.

  • Audio files should be placed in audio directory inside mod directory. I used AI generated samples with 44100 Hz sample rate single channel (mono), but the mod can also play any other sample rate and stereo (might require tweaking the AudioPlaybackEngine instance on audio player side for better performance).

  • Next to the audio folder there should be audio_metadata.csv, | separated file with columns: LocalizedStringUUID, Companion (unused actually), Recipe and RawText (also unused).

  • Modification uses external executable (outside the game) for playing the sound, sources are of course included in the repository, as I failed to found another way.

    • I couldn't get Unity AudioClip to work

      Neither UnityWebRequestMultimedia.GetAudioClip nor WWW.GetAudioClip worked for me, maybe because wierd WAV format. They did load the bytes, but did not produce usable AudioClip (length was 0). I tried manually AudioClip.Create and AudioClip.SetData, with custom WAV parsing. Sadly I always got AudioClip.GetData failed; AudioClip contains no data (on SetData), because for some fucking reason Create, despite having channels parameter, always creates 0 channles.

    • I tried using C# MediaPlayer and SoundPlayer, but had issues with dependencies (WPF disagrees with Unity). Maybe one day someone (or me) will try using SoundPlayer tho.

    • For now, ended up using separated process with NAudio library to playback the audio files, communicates with game process using named pipes IPC, one receiving requests from game, other sending notifcations when audio/recipe finishes.

To-do

  • Add detecting missing dialogues to the mod; save to file and keep showing "notification" on the mod settings asking user to upload their logs/update the mod.
  • Replace dialogues referencing player character name by something more generic (for now it's fixed to use my character Elizabeth).
  • Add pitch setting
  • Add speed setting
  • Add re-focus option, as sometimes game window doesn't get focus, maybe because conosle window (even if hidden) blinks.
  • Allow skip part of the voice line using space, if possible using speed up

kingmaker-morevoicelines's People

Contributors

againpsychox avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

shellybelly114

kingmaker-morevoicelines's Issues

'Till Last Update we Have to Copy Manually in Main Mod Folder Mod don't Work and i have error in Playerxxx.log

Hello,

  • I have use your mod and it work but i'have do the update, copy in the main mod the update content and now the mod don't work.
  • I use Vortex, I have Copy in Vortex Main Mod the Update and install the Main Mod for me it's exactly the same to do manually in folder Kingmaker/Mod/....
  • And i have always use Vortex for you Mod and it have work till i do the update.

here the error :

[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (1559ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (1660ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (1760ms)
[RemoveAreaEffects] Active.
[RemoveAreaEffects] Loading time 1.41 s.
[Respec] Version '1.6.6'. Loading.
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (1861ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (1961ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (2061ms)
[Respec] Active.
[Respec] Loading time 0.27 s.
[SavingThrowDisplayFix] Version '1.0.0'. Loading.
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (2162ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (2262ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (2362ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (2462ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (2562ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (2663ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (2763ms)
[SavingThrowDisplayFix] Active.
[SavingThrowDisplayFix] Loading time 0.65 s.
[SkipIntro] Version '1.3.1'. Loading.
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (2863ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (2963ms)
[SkipIntro] Active.
[SkipIntro] Loading time 0.23 s.
[SortByCategory] Version '1.1.0'. Loading.
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (3064ms)
[SortByCategory] Active.
[SortByCategory] Loading time 0.14 s.
[StolenLandsEncounters] Version '1.0.0'. Loading.
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (3164ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (3264ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (3364ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (3464ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (3565ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (3665ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (3765ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (3866ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (3966ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (4066ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (4166ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (4267ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (4367ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (4467ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (4567ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (4667ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (4768ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (4868ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (4968ms)
[MoreVoiceLines] [Debug] Failed to connect audio player client pipe (5069ms)
[MoreVoiceLines] [Error] IPC failed
[MoreVoiceLines] [Exception] Win32Exception - Le fichier spécifié est introuvable.

System.ComponentModel.Win32Exception (0x80004005): Le fichier spécifié est introuvable.

  at System.IO.Pipes.Win32NamedPipeClient.Connect (System.Int32 timeout) [0x0002b] in <fbb5ed17eb6e46c680000f8910ebb50c>:0 
  at System.IO.Pipes.NamedPipeClientStream.Connect (System.Int32 timeout) [0x00000] in <fbb5ed17eb6e46c680000f8910ebb50c>:0 
  at (wrapper remoting-invoke-with-check) System.IO.Pipes.NamedPipeClientStream.Connect(int)
  at MoreVoiceLines.ExternalAudioPlayer+<IPC>d__16.MoveNext () [0x00152] in <397d9e6f9bb34e379858dec29a3ab747>:0 
[MoreVoiceLines] [Debug] Closing audio player client pipe`

Could you help me ?
Or it's a real bug ?
Can i use the old Version Without the Update ?

Best Regards, ExA
And a Very Very thx for this Great Mod and the Work hard you have do :)

See You ExA

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.