supersatangod

Kotor 2 head to Kotor 1

Recommended Posts

Hi,

I've been looking around and noticed people have been porting kotor 2 heads into kotor 1, and was wondering if anyone would be willing and able to port the ginger one here.

If not, how difficult and what would be required to do the job myself? I do have some basic modding experience with other games like Empire at War, but that's mostly coding 

 

82768_1.jpg

Share this post


Link to post
Share on other sites
Guest

It's easy enough once you become somewhat familiar with Kotor Tool. You need that to extract the model (.mdl) and model extension (.mdx), as well as the supermodel so that the face animations aren't missing. Then you just need to use MDLedit to port whatever you want. Note however that the editing tool will screw up the smoothing groups. There's some steps involved, so let me know if you want to give it a try.

Share this post


Link to post
Share on other sites

I'll try a little tutorial:

Conversion:
With KotOR Tool you extract pmhc07.mdl (from Kotor II -> BIFs -> models.bif -> Aurora Model) and pmhc07.mdx (from Kotor II -> BIFs -> models.bif -> Aurora Model Extension).

Now with MDLEdit you load the mdl file, just to see which supermodel you need (it's almost always S_Female02, but still good to check). After loading the file, on the bottom half of the window you see "Header", click that and on the top half of the window you see "Supermodel: S_Female02". This is the supermodel from K1 that you need (the supermodel from the game you are porting to is needed). The mdl and mdx of the supermodel need to be in the same location as the model you're trying to convert. So, in KotOR Tool you need to export those files, Kotor I -> BIFs -> Aurora Model / Aurora Model Extension -> s_female02.mdl/mdx. Preperation for conversion done.

Now you open MDLEdit, make sure the KOTOR1/KOTOR2 button below the menu is on KOTOR2, because you're loading a K2 model. Load the mdl file, you might think you can now just switch to K1 and save a binary file, but no. You can now switch the button to KOTOR1, you Save -> ASCII, then you load that ascii file, now you can save as binary (which the game can use). Put the mdl and mdx in K1's override folder.

Textures/portraits:
K1 has 2 more darkside transition phases and the filenames work slightly different.
K2: neutral/light, halfway dark (...d1), full dark (...d2)
K1: neutral/light, 1/4 dark (...d1), halfway dark (...d2), 3/4 dark (...d3), full dark (...d)
With PMHC07 you're in luck, the portraits all have the same pose, so in an image editor you can combine different images to get the intermediate phases. For example, load the neutral portrait, add the halfway dark portrait in a layer on top, set the opacity of that layer to 50% and you get K1's d1 phase portrait.
You do pretty much the same with the head textures.
Portraits: Kotor II -> ERFs -> TexturePacks -> swpc_tex_gui.erf -> P -> po_PMHC07/po_PMHC07d1/po_PMHC07d2
Head textures: Kotor II -> ERFs -> TexturePacks -> swpc_tex_tpa.erf -> P -> PMHC07/PMHC07d1/PMHC07d2

2da files:
To turn this into a mod you would need to use the TSLPatcher, but that's a bit beyond the scope of this tutorial. You can however study the changes.ini file that come with one of my mods that do something similar, it's mostly just changing P[M/F]H[A/B/C/H] values to PMHC07. There's no PMHC07 in K1 so you can stick to that name.
To test things for yourself you need to add lines to portraits.2da, appearance.2da and heads.2da (You can extract those with KotOR Tool to your override if you don't already have these in there. Kotor I -> BIFs -> 2da.bif -> 2D Array). You can add a new line with the * at the bottom of the list and you can copy lines to that new line, so copy another row (for example an existing PMHC one, right click the "button" of an existing line, left from the first column -> Copy Row, similarly you can paste that on the new row). Make sure you change things accordingly. Portraits.2da lists the playable characters and points to lines in appearance.2da, appearance.2da points to a head in heads.2da. In this case I would repeat how things are done for an existing pmhc, for example pmhc05.

Good luck and happy experimenting :)

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks guys, really appreciate your assist, I'll see what I can do :)

Well so far the results are quite hilarious, in cutscenes the head model has eye droops and the mouth is either wide open or grinning like an idiot 😄

I'm not sure if I did it right, I made to extract the supermodels and then did the conversion (s_female02). I initially tried it on my modded set up which had adjusted supermodels, but even on vanilla it had the same issue.

 

Share this post


Link to post
Share on other sites
Guest

That's gotta be something with the supermodel (which contains the animations). You had everything in the same folder during the whole process, right?

Checking some of the later responses in this thread may help.

Share this post


Link to post
Share on other sites

The mouth issue is due to the facial bones in K1 & K2 being different. If you just port a head without correcting that, then they'll be animated improperly. I've posted a sort of mini-tutorial on it here.

  • Like 1

Share this post


Link to post
Share on other sites
Guest

Oh yeah, totally forgot about that whole shenanigans. Thanks, JC. That thread should be announced somewhere other than the blog section, I swear.

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.