bead-v

MDLedit

Recommended Posts

thumb-042adb311bca719568860934e738f247-mdledit-comp.png

 

File Name: MDLedit

File Submitter: bead-v

File Submitted: 08 Oct 2017

File Category: Modding Tools

 

 

MDLedit is a (de)compiler for KOTOR and KOTOR2 model files.

 

Which version should I download?
There are two packages on the download page. They differ in whether the program uses Visual Styles or not. The difference is purely visual, they are completely equivalent in terms of functionality. The version in the mdledit_v0.0.0xp.zip package will work on Windows XP or newer as well as on MacOS through Wine, but it will look like crap. The version in the mdledit_v0.0.0.zip package will look better, but will only work on Windows Vista and up.

 

How do I set it up?
Open the .zip archive, extract the .exe and run it. If you want MDLedit to keep track of your option between sessions, create a blank mdledit.ini file in the same folder as your .exe.

 

How do I use it?
The program comes with a help documentation window accessible from the About menu, read that to learn how to use it. If something is not mentioned there please let me know in the relevant thread (link to be added) and I will explain the functionality and add the explanation to the help window for the next version.

 

MDLedit was designed to be used with KOTORmax and the new version of KotORBlender by ndix UR. Using the ascii model files that it produces with NWmax will cause data to be ignored in the best case and a crash in the worst.

 

The program crashed/froze/reported a weird error!
Describe your issue in the relevant thread and I will look into it. Attaching a .zip archive with the files that MDLedit was processing when the problem appeared is also very welcome.

 

Thanks
A big thank you goes out to ndix UR, without whom MDLedit would have maybe half the functionality it has now.
I would also like to thank the testers, who also made a lot of great suggestions that made MDLedit that much better:
– DarthParametric
– JCarter426
– Quanon
– VarsityPuppet
– FairStrides

 

The program was built on the knowledge about the MDL format, which is the result of the work of many modders, including CChargin, Magnusll, JdNoa, ndix UR, DarthSapiens, VarsityPuppet, FairStrides, and others! Thank you for your efforts!

 

Lastly I'd like to thank the KOTOR modding community, which makes taking the time to make such a tool worth it.

 

 

Click here to download this file

  • Like 7

Share this post


Link to post
Share on other sites

What... KOTORmax? NWMax will skip data? What trickery is this?!?

Share this post


Link to post
Share on other sites

And since you mention KOTORmax, when and where will that be available?

 

As soon as it's approved :lol: I expected MDLedit to take a little longer before it's approved, I didn't take this time gap into account.

  • Like 1

Share this post


Link to post
Share on other sites

Question: Is it possible to use MDLedit with KotOR Tools batch exporting feature to export multiple models directly as ASCII with all of their textures?

I know that I can just batch extract the .mdl and .mdx files and then batch convert them in MDLedit, but that leaves me without the extracted textures, so I was hoping there is a faster way.

Share this post


Link to post
Share on other sites

MDLEdit doesn't do anything with textures. You'll need to extract the entire texture ERF to a folder, then batch convert the TPCs to TGA. I would suggest using xoreostex2tga from Xoreos Tools for this. On Windows, use a batch file like this:

@echo off
Echo Converting all TPC files in current directory to TGA
Echo using Xoreos Tools' xoreostex2tga
for %%F in (*.tpc) do xoreostex2tga --tpc %%~nF.tpc %%~nF.tga
pause
If you add the texture folder to your Max/GMax directory list, Customize -> Configure User Paths -> External Paths, KOTORMax will automatically load the texture when loading the ASCII model. If you open the Listener (F11) after loading KOTORMax, you will see what texture directories it will search.

 

You'll need to extract K1 and TSL textures to two different directories, and add them both to your user paths. Note that KOTORMax will search in the order they are listed in the hierarchy, so you may need to manually switch between K1 and TSL versions for textures with the same name (for example, Jedi robe textures).

Share this post


Link to post
Share on other sites

Question: Is it possible to use MDLedit with KotOR Tools batch exporting feature to export multiple models directly as ASCII with all of their textures?

 

Kotor Tool uses MDLOps for that conversion, right? So maybe if you just plug in ndix UR's MDLOps instead, it could work. "could" because I've never tried it.

Share this post


Link to post
Share on other sites

Batch conversion in KOTOR Tool worked with MDLOps 0.7. You just need to replace the EXE. I haven't tried it with ndix UR's either though. Already have every single model converted to ASCII in the old archives.

Share this post


Link to post
Share on other sites

Greetings, TS!

I am here to request for some support regarding the application of MDLedit:

  1. Why did I always facing this error when loading the ASCII?
    Spoiler

    ASCIIMdlFailedLoad.PNG.304902c878295571909c957842cf8cf9.PNG

    Edit: The failed attempt always happen particularly when loading the head model. When loading all the models extracted from models.bif, I've encountered no problem. I have had decompiled the head model along with its supermodel [s_female03] but still I can't get it to work.

  2. When trying to load the ASCII with the KOTORmax, I got this error message too:
    Spoiler

    KotORMaxError.PNG.bb1cd5ab050fa73e8271232f47da21eb.PNG

     

Many thanks for considering this. :cheers:

Edited by ebmar
Add details about which model included in the failed attempt

Share this post


Link to post
Share on other sites

Hey ebmar!

Please try the latest version attached to this post. Hopefully it'll work then.

  • Thanks 1

Share this post


Link to post
Share on other sites
On 10/11/2018 at 4:26 AM, bead-v said:

Please try the latest version attached to this post. Hopefully it'll work then.

Thanks for the heads-up, bead-v! I'll reach out again with a feedback soon. :cheers:

Edit: very sorry for the super late feedback but now I have both the KOTORmax and MDLedit functionally working.

Share this post


Link to post
Share on other sites

Greetings, Thread Master!

I'm here to report that there seem to be a broken feature from the released version/v1.0.3 which is tangentspace compiler, by hypothesis.

Here's the breakdown:

  1. If a model decompiled by v1.0.3 and then went changing the tangentspace flags from 0 to 1 on its ASCII; the bumpmap flag looks to be ticked on the UI while it actually wasn't working in-game
  2. It'd then working if the flag was re-ticked using the [officially] unreleased v1.0.102b

I hope the information provided sufficient for some troubleshooting, and many thanks for considering this. :cheers:

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.