setite

Questions about putting in an alignment shift system in KotOR1

Recommended Posts

Hey,

 

I've always liked KOTOR 1 & 2. But I've always had a lot of reservations about 1. It's good the first time you play it, but lacks in depth the second time around. I really feel like TSL added a lot of replayability by letting you shift the ailgnments of your party.

 

Recently I scoped out some tutorials on modding. It doesn't seem all that bad on paper; I'm an experienced programmer and photoshopper. Though, KOTOR1 is old and buggy as sin and the framework from which to mod with doesn't look so adorable... so I'd like to ask the general community here for their experience thoughts.

 

How hard would it be, to implement a similar alignment shift system in KOTOR1? For at least some of the NPCs? I'm thinking the turning point would be the Leviathan. After that point in the game, you could open up additional dialogue choices, minor quest lines, and ability unlocks (depending on alignment). The story would have to change slightly in a few places, to accomodate this sort of thing, and you'd have some added complexity by having reactions from certain party members to the alignment shift...

 

It sounds like a lot of work. And the thing really turning me off from even further investigating the idea is the annoyance that I'd either have to splice voice lines together painstakingly by hand to make a polished-seeming mod that adds new voice options (is there anything that makes this less painful?)... That sounds awful. Almost makes me wish the party members weren't voiced.

 

So yeah. How much work does everyone think it would be to pull off decently well?

Share this post


Link to post
Share on other sites

The alignment changes would probably be done through scripts. I do believe there are mods that do that but it's more of a test than it is a legitimate mod- http://www.nexusmods.com/kotor/mods/931/? (I do believe those mods are for Carth, Jolee, and Bastila)

 

About making voice overs and splicing lines it actually doesn't feel that hard to actually do but the main reason why people don't do it often is because their voices are no good.

Share this post


Link to post
Share on other sites

Technically it shouldn't be too hard.

 

You could easily add new globals for the party member's influence and then use scripts fired in dialogs to change them or you could directly alter their alignment with scripts.

Additional dialog options based on either of those would be easy to do with a simple conditional script and the same goes for minor quest lines.

 

I'm not sure if the ability unlocks could work since I've never worked with feats/force powers and their distribution on level up. What I can tell you though is that it's not possible to give abilities with scripts so this could be a problem.

 

The real problem would probably be the voice lines. Splicing them will probably not work for this amount of lines (I'm no audio engineer though, maybe it's possible, but it definetly limits your writing). That leaves you with either having no voice lines or having to get voice actors that sound as close as possible to the original actors.

 

And a tiny thing: The "alignment picture" in the partymember screen cannot be changed so while the portraits would reflect their alignment shift you'd still see them as they were in those whenever you leave the Ebon Hawk or otherwise choose your party.

Share this post


Link to post
Share on other sites

Technically you can voice sample and then convert the voice to sound like the original actor voice. Various pay to play sound programs can do this easily.

 

So say you sample the voice of han solo, you could easily create new dialogue that sounds like harrison ford did some new voice acting. Most of these programs are pretty high end for mac but I am pretty sure there are some almost free alternatives out there that can be played around with.

 

One I used to have on windows vista was Celemony Melodyne, which was a very dynamic sound altering program. Another one called Cantor was useful for creating new computer generated voices that sound so real it blew my mind when I heard a female voice I generated plugging it into predefined notes that passed for human singing. With just a little tweaking, I turned it from almost the midi style wonky keyboard sample voice to something more fluid and soothing. Combine the effects from both programs and the results are amazing.

 

I can look around and see if I can find something that does what you want for new dialogue (voice altering) but there are no guarantees a free program exists.

Share this post


Link to post
Share on other sites

I would be very, very, very interested in the results of that search as well since I have tons of new dialog for Juhani to record.

My first choice would probably be an actress that can mimic the original voice but if that doesn't work out the way I hope this sounds like a great alternative!

Share this post


Link to post
Share on other sites

@setite, I have a similar background in terms of programming and photoshoppery.

 

I started taking a hard look at the dialog problem around 3 months ago. I tried a few different 'generative' audio methods (based on Google DeepMind's Wavenet algorithm), but found them a bit lacking. The idea of using an actor and then using software to modulate the voice into the selected character is an interesting one I haven't looked into too much.

 

I've been pursuing the steps for programmatically producing new dialog in a concatenative way. I am currently still at the point of generating the full speech-to-text map per-character. The maps I'm producing are JSON and contain each word w/ time interval and the filename. They are being derived from an IBM watson speech recognition pass w/ a customized language model. I have a custom nw.js app I'm running after that process to produce human-reviewed/confirmed results. Once those maps are all built out, I plan to put them into a form keyed by word, so that new dialog can be pretty easily created ... from within the corpus of words a particular character has pre-recorded. I am assuming that some amount of post-processing will be required to make them actually sound natural, but that's at least two problems down the road...

 

Could be interesting to combine the splice-n-dice technique w/ the modulation approach to mix in needed new words for a character...

 

So, my point is, while I have no concrete time estimate on how long this might take, there is a possibility of being able to produce new dialog in a less hurty way on the horizon ... especially if you know how to run python code (because it's really trivial to go from the JSON dictionary to an audio file in python, at least 50% harder in javascript for a cross-platform GUI app).

Share this post


Link to post
Share on other sites

And a tiny thing: The "alignment picture" in the partymember screen cannot be changed so while the portraits would reflect their alignment shift you'd still see them as they were in those whenever you leave the Ebon Hawk or otherwise choose your party.

 

Is that hard coded into the game? If not there should be a picture in the game files that corresponds to what you see. I guess dynamically changing that to their current alignment might be hard though.

 

Other than that I think that any way to easily create new voice lines that sound reasonably close to the original would be a huge step for kotor modding. It is possible to create new modules now so the only thing that is keeping new content back is the issue of voice acting.

Share this post


Link to post
Share on other sites

The character picture in the party selection screen is part of the portraits for every character. If you have a look at portraits.2da in this overview you'll see what's the issue.

Basically there are portraits for light side alignment in the baseresref column and for the dark side transition portraits there are the last 4 columns (baseresrefe, baseresrefve, etc). Each of these corresponds to a portrait for a certain alignment.

Additionally there are two more textures related to this: First of all the silhouette portrait for when the party member is unavailble like Bastila on Korriban and then the "alignment picture" aka the body shot of the character in the party selection screen. Those files are named the same as the standard portrait (the entry in the baseresref column) with an added 2 / 3 at the end. This suggests that you can simply do the same for the dark side portraits but the game won't use them. It will always use those from the baseresref column. So yeah, it's basically hardcoded :(

Share this post


Link to post
Share on other sites

So the issue is that it'll always use the same file? I guess if you could get the game to rename files within override you could put as many pictures as you need in the overwrite and change the names dynamically so it always uses the correct one. 

 

K1 is so limited by all the stuff that's hardcoded :/ Gotta give props to Obsidian for improving on that in k2 (especially with menu resolution being dynamic) despite only having 1 year to make the game.

Share this post


Link to post
Share on other sites

I feared as much. Guess you could write a program that either checks the game's memory for influence change or the latest autosave and have that program copy the correct file to the overwrite folder. But having to run an extra program for one mod seems a bit much. I guess one would have to live with that then. I'd still be an awesome mod if creating new audio files could be done without too much trouble.

Share this post


Link to post
Share on other sites

The program you're making ndix UR, sounds really interesting. A shame you'll be limited by the spoken words of each character, but it sounds like it would greatly simplify hand-making all that audio. I recently tried to write a program to simply split up a recording of a sentance into multiple words -- doing that by itself is extremely hard (since most recordings don't contain a threshold of "0 noise" between words to split them by).

 

I have heard of high-end programs that can take voice samples and give you something back to work with, but I've no experience with those.

Share this post


Link to post
Share on other sites

Technically one could just take snippets from a few words such as vowels and hard consonant sounds etc to make a library of tones, and then they can be used to map an artificial voice like Microsoft Sam. Once you have the voice mapped you can pretty much type the dialogue, have a reader speak the dialogue, record that, and them go clean it up with Melodyne (make it more human instead of clunky). The pauses or breaths can be added or tweaked in a sound editing program like audacity.

 

Unfortunately all the dialogue is pre recorded in the KotoR engine and a script fires to call the correct sound file for a conversation. There is no way I know of to change that on the fly. There are easier ways to determine or change what audio is called in a conversation than by a terminal in game.

 

So far my search has turned up empty for any Linux users, but I did manage to find out that if anyone wanted to they can get the Morphvox pro download for windows (I might try it) and there are a ton of add-ons that change your voice real time. With a little tweaking and maybe a few tutorials, it looks like it would be very possible to get pretty close to any of the character voices for new dialogue.

 

Still have not found out how to sample existing audio and change my voice yet, even though I know it is possible.

 

A little off topic but I got off on a tangent and now I am checking out some really cool natively run Linux games (Like The Dark Mod: a really well put together Thief style game) which is updating right now.

 

Ok enough of that.

Share this post


Link to post
Share on other sites

I have used morphvox pro for my own prototype game projects (mostly so I can self-voice a myriad of NPCs). It is not very good honestly. You could never take the average voice and make it sound even remotely like Bastila. It'll be jarring to hear. You'd have to find someone who sounds close enough to Bastila already and then MAYBE you could get something approaching her voice, but good luck with that. The program lets you play with timbre, shift pitch, etc., but nothing so radical as to really let you match voices.

 

It's a shame my OCD nature would make me cringe to just put it unvoiced lines in a mod. I mean, it wouldn't be game-breaking but it really turns me off, lol.

Share this post


Link to post
Share on other sites

I have used morphvox pro for my own prototype game projects (mostly so I can self-voice a myriad of NPCs). It is not very good honestly. You could never take the average voice and make it sound even remotely like Bastila. It'll be jarring to hear. You'd have to find someone who sounds close enough to Bastila already and then MAYBE you could get something approaching her voice, but good luck with that. The program lets you play with timbre, shift pitch, etc., but nothing so radical as to really let you match voices.

 

It's a shame my OCD nature would make me cringe to just put it unvoiced lines in a mod. I mean, it wouldn't be game-breaking but it really turns me off, lol.

 

I know how you feel, trust me, I'm a sound guy first, modder second. The recorded voice, no matter the tools at one's disposal, is still the most important part. To say otherwise goes against the GOOD rule of recording. They need to get the character and all their inflections just right and in character, and still manage to sound as close to the same. Obviously, a formant-controlling pitch shift software (like Melodyne) would help a ton, but utilizing that would require a great deal of work to get it sounding right AND natural enough, and then you would need a good EQ Match tool or plugin (I'm thinking about getting the full iZotope Ozone Mastering Bundle, it has one) that could change the sound to very closely match the frequency curve of another file.

 

The only time something like this sounds like a good idea is if you're just worried about one character, because you get to know that character's voice inside and out in such a way that you can use the formant-controlling pitch shift software as easily as a simple compressor. The downside to this: you will very likely be fed up with this character's voice by the time you're done, if you last that long.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.