Natural Law

HK-47 Overhaul Mod, TSL Conversion?

Recommended Posts

An amazingly detailed re-imagining of HK was released over on Nexus Mods at the end of last month.

But since it edits the mdl and mdx files it is not compatible with TSL.

Could one of you vastly more experienced fellas point me towards how one might convert the files to work on the sequel?

Screenshot 2022-06-13 at 12-15-13 HK-47 Overhaul Mod.png

Share this post


Link to post
Share on other sites

I did this for my own game. You can do this with either MDLOps, or the Kotor Blender extension for blender.

I will warn you, however that because of the way that HK is implemented - with more than one texture file assigned to the entire model - the conversion process was not straight forward.

While a straight conversion allowed me to get the model in game, it did not however work with it recognizing the multiple textures. Personally I opted for resizing the UV's and moving them all to a single texture, since things like a 4k map for just the head seemed overkill to me. There may be a simpler way of getting TSL to recognize all the single textures, however.

  • Thanks 1

Share this post


Link to post
Share on other sites

 That has nothing to do with the model. It's due to the textures being overriden by appearance.2da. Odyssey has no problem dealing with multiple texture assignments per model. Half vanilla game content works that way.

  • Thanks 1

Share this post


Link to post
Share on other sites

Ah, that's good to know, still learning the ropes on how this game works.

In that case it sounds like it should be fairly straight forward Natural Law. Use one of the two tools I mentioned to do a straight conversion, and then use a 2da editor to remove the texture entry, if there is one, for HK in appearance.2da.

  • Thanks 1

Share this post


Link to post
Share on other sites
17 hours ago, Nehua said:

Ah, that's good to know, still learning the ropes on how this game works.

In that case it sounds like it should be fairly straight forward Natural Law. Use one of the two tools I mentioned to do a straight conversion, and then use a 2da editor to remove the texture entry, if there is one, for HK in appearance.2da.

Tried using MDLOps, but it didn't seem to want to open p_hk47.mdl, don't suppose you could drop me your converted file, please? 🤞

Share this post


Link to post
Share on other sites
13 minutes ago, DarthParametric said:

You're using an outdated version (presumably 0.5/0.7). Use v1.0+ or MDLEdit and it will work fine.

https://github.com/ndixUR/mdlops/releases/tag/v1.0.2

https://deadlystream.com/topic/5735-mdledit-bug-reporting-thread/page/10/?tab=comments#comment-73932

 

Still no luck with v1.0.0 or v1.0.2 I'm afraid. Both are uncooperative.

Share this post


Link to post
Share on other sites

I click the select file button and navigate to the mdl, highlight it, press open and... zilch. Nada.

The open model window disappears and that's that.

Share this post


Link to post
Share on other sites

Just to add another point onto the topic, there are animations present on the TSL HK model which the K1 model lacks. You'll need to edit the converted model to reference the default TSL model as a supermodel if you want the 'new' animations to work.

Not sure what the issue is you’re having with the tools, as I did what I just mentioned above and converted the model and changed it to use the original as a supermodel a few minutes ago and it works perfectly.

  • Sad 1

Share this post


Link to post
Share on other sites

Must be Windows or Bitdefender maybe...

So you have a workable version of Selkaths' HK running around in the Dark Wars?

...Sharing is caring!

Share this post


Link to post
Share on other sites
5 minutes ago, Natural Law said:

Must be Windows or Bitdefender maybe...

So you have a workable version of Selkaths' HK running around in the Dark Wars?

...Sharing is caring!

As @DarthParametric just pointed out, sharing another authors work without their permission isn’t acceptable.

Since it’s Selkath’s model, I won’t be circulating an edited version without his blessing or consent. 

It’s honestly a really straightforward process, keep trying and you’ll get it.

If you’re not having any joy with MDLEdit, give the latest MDLOps a try. That’s what I used and it worked perfectly.

  • Like 1
  • Light Side Points 1

Share this post


Link to post
Share on other sites
11 minutes ago, Marius Fett said:

If you’re not having any joy with MDLEdit, give the latest MDLOps a try. That’s what I used and it worked perfectly.

Kriff! Both programs refuse to work for me. *Le sigh*. Guess I'll ask him over on Nexus, if that's all right with you, Marius?

Share this post


Link to post
Share on other sites
Just now, Natural Law said:

Kriff! Both programs refuse to work for me. *Le sigh*. Guess I'll ask him over on Nexus, if that's all right with you, Marius?

If you run through the steps you’re following, I’ll see if I can troubleshoot your process for you.

It’d be much more beneficial for you if could produce your own port, as it’ll teach you how to do the same in future if another model comes along that you want to use.

  • Thanks 1

Share this post


Link to post
Share on other sites
7 minutes ago, Marius Fett said:

If you run through the steps you’re following, I’ll see if I can troubleshoot your process for you.

It’d be much more beneficial for you if could produce your own port, as it’ll teach you how to do the same in future if another model comes along that you want to use.

Okay... MDLOps doesn't even register trying to open the file. I get a bit further with MDLEdit but still get stuck with this.

Capture.PNG

Share this post


Link to post
Share on other sites
5 minutes ago, DarthParametric said:

You aren't using the right version. Use the one I linked to, it's the most recent. And you don't need to load the model in MDLEdit. Just choose File -> Batch -> Convert to ASCII.

This. For a straight port of Selkath’s model without the extra TSL animations in my version (which honestly aren’t a huge deal) just do what DP said.

Then change to KotOR 2 mode and do the reverse. Go to batch > convert to binary and select the ascii file you generated in step 1.

  • Thanks 1

Share this post


Link to post
Share on other sites

Nice. All seems to be working now.

Thanks, guys. I'll give it a spin.

What extra animations does HK have in TSL? Nothing really jumps out at me.

Share this post


Link to post
Share on other sites

The Disabled one is the main one that you'll notice missing. It's what is used when he is standing still in the closet before you get all his parts and activate him. To fix it, download and extract the attached, putting it in the same location as the ASCII. Open the ASCII in a text editor (Notepad++, etc.) and find the line near the top that says

setsupermodel P_HK47 NULL

and change that to

setsupermodel P_HK47 S_HK47

Save it and recompile the model. Put all four MDL/MDX files in your Override.

TSL_HK_Supermodel.7z

  • Thanks 1

Share this post


Link to post
Share on other sites
11 minutes ago, Natural Law said:

Nice. All seems to be working now.

Thanks, guys. I'll give it a spin.

What extra animations does HK have in TSL? Nothing really jumps out at me.

Give it a spin and see how you get on! :) Off the top of my head, the only ones I can think of for sure are the animation for when Force Crush is used on him (which in all fairness you aren't likely to ever need to see since you don't fight him) and he has a new 'disabled' animation. Pretty sure there are a few more, but those are the ones that immediately come to mind. :)

5 minutes ago, DarthParametric said:

The Disabled one is the main one that you'll notice missing. It's what is used when he is standing still in the closet before you get all his parts and activate him. To fix it, download and extract the attached, putting it in the same location as the ASCII. Open the ASCII in a text editor (Notepad++, etc.) and find the line near the top that says

setsupermodel P_HK47 NULL

and change that to

setsupermodel P_HK47 S_HK47

Save it and recompile the model. Put all four MDL/MDX files in your Override.

TSL_HK_Supermodel.7z 270.36 kB · 0 downloads

Not that it matters now if the OP has it working in the game, but the reason for the error messages in MDLEdit appears on closer inspection to be due to multiple objects in the model file with duplicated names which seemed to be causing confusion on the animations side of things. I seem to have avoided this with my own version as I re-exported the new model from Max as Geom only with the HK Supermodel already referenced, so it didn't affect me. More to make doubly sure there wouldn't be any confusion/conflicts animation-wise due to my own paranoia than anything, but it appears to have been something of a necessary step. I also used MDLOps rather than MDLEdit.

I didn't realise that it would upset MDLEdit though, so my bad there.

  • Like 1

Share this post


Link to post
Share on other sites

MDLEdit is extremely finnicky about how things are done and will complain about it, even if they technically work. MDLOps, on the other hand, will just plow straight through without batting an eyelid.

If it's just the anims themselves that are causing problems, it's easy enough to just delete them from the ASCII. Select everything from the first newanim down to the end of the last doneanim line (just before the donemodel row) and hit delete. Save and recompile. All the anims will get pulled from the supermodel.

Share this post


Link to post
Share on other sites
4 minutes ago, DarthParametric said:

MDLEdit is extremely finnicky about how things are done and will complain about it, even if they technically work. MDLOps, on the other hand, will just plow straight through without batting an eyelid.

If it's just the anims themselves that are causing problems, it's easy enough to just delete them from the ASCII. Select everything from the first newanim down to the end of the last doneanim line (just before the donemodel row) and hit delete. Save and recompile. All the anims will get pull from the supermodel.

Indeed. I just happened to have the model open in Max anyway because I wanted to have a nose at the new model, so exporting seemed quicker.

Share this post


Link to post
Share on other sites

Got the model and super models to work, just took them out to get a better view at this next roadblock!

(use a 2da editor to remove the texture entry, if there is one, for HK in appearance.2da.) ?

20220614230842_1.jpg

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.