JohnnyTM Posted June 9, 2017 Share Posted June 9, 2017 (edited) My first post there :cool: I'm using following mods http://www.nexusmods.com/witcher3/mods/2435 + http://www.nexusmods.com/witcher3/mods/1031/ and after digging around with few sound editing / processing software(s) i have managed to alter Geralts voice in real time (deeper, softer or even female) without digging in files. The only thing that is left to do is trigger a keyboard key (auto trigger) when Geralt is speaking. i have taken a look at Mute Geralt mod by Althiya with following function: function MuteGeralt() { if(thePlayer.IsSpeaking() && !wasSpeaking) { originalVolume = theGame.GetInGameConfigWrapper().GetVarValue( 'Audio', 'VoiceoversVolume'); //theGame.GetInGameConfigWrapper().SetVarValue( 'Audio', 'VoiceoversVolume', "0" ); //theGame.SaveUserSettings(); wasSpeaking = true; } else if(!thePlayer.IsSpeaking() && wasSpeaking) { //theGame.GetInGameConfigWrapper().SetVarValue( 'Audio', 'VoiceoversVolume', originalVolume ); //theGame.SaveUserSettings(); wasSpeaking = false; } } The issue is that i don't have any sufficient knowledge on C++ scripting (but i understand the function above). If someone knows how to auto trigger certain keyboard key (without pressing it on keyboard) in function above i'm willing to share my workround with the community (before that i would like to run a test to check if auto triggering that key in above function is working). Thanks. Edited June 10, 2017 by JohnnyTM Link to comment Share on other sites More sharing options...
Althiya Posted June 14, 2017 Share Posted June 14, 2017 Are you saying it could be added as an option which would modify the geralt voice instead of muting it? More like a new (downloadable option) to your existing mod. function MuteGeralt() { if(thePlayer.IsSpeaking() && !wasSpeaking) { originalVolume = theGame.GetInGameConfigWrapper().GetVarValue( 'Audio', 'VoiceoversVolume'); //theGame.GetInGameConfigWrapper().SetVarValue( 'Audio', 'VoiceoversVolume', "0" ); //theGame.SaveUserSettings(); //Function / code or whatever that will auto fire / trigger keyboard key (any) without pressing it wasSpeaking = true; } else if(!thePlayer.IsSpeaking() && wasSpeaking) { //theGame.GetInGameConfigWrapper().SetVarValue( 'Audio', 'VoiceoversVolume', originalVolume ); //Function / code or whatever that will auto fire / trigger keyboard key (any) without pressing it //theGame.SaveUserSettings(); wasSpeaking = false; } } I have already commented out set / save options in your function, but what i need is witcher script equivalent to C++ autopress key (something like SendMessage(hwnd, WM_KEYDOWN, VK_T, NULL) :wink: where keyboard key is pressed via function / code instead of actually clicking on keyboard key. In that way you are triggering voice filter on / off each time when that key is pressed (via function / code, instead of clicking on it manually). I'm assuming you're using an external program to modulate the voice and it has to be triggered by a hotkey? I'm not aware of any w3 script functions being able to trigger a system-wide key press, or communicate with the outside world in any other way. (maybe someone knows). The only solution I can think of, is to use my code and set a new custom variable to true whenever geralt speaks, and then have an external program read this variable repeatedly from W3 config, and enable/disable voice modulation based on the config variable state. Link to comment Share on other sites More sharing options...
JohnnyTM Posted June 15, 2017 Author Share Posted June 15, 2017 I'm assuming you're using an external program to modulate the voice and it has to be triggered by a hotkey? I'm not aware of any w3 script functions being able to trigger a system-wide key press, or communicate with the outside world in any other way. (maybe someone knows). The only solution I can think of, is to use my code and set a new custom variable to true whenever geralt speaks, and then have an external program read this variable repeatedly from W3 config, and enable/disable voice modulation based on the config variable state. Yes, it's triggered by a hotkey (it can be set to any key). Also it doesn't have to communicate outside of witcher 3 window (it can be triggered inside to). Link to comment Share on other sites More sharing options...
Recommended Posts