bead-v

KOTORmax bug reporting thread

Recommended Posts

Hey, all!

I recently reinstalled 3Ds Max and KotorMax. But I ran into a little snag. Whenever I hit export I get this error message.
I've looked through an old PM chain between me and Bead-V, cause I had the feeling I've encountered this before... Feel like a noob now 😅

I checked the KotorMax.ini file. UseMax is 1, so... Sanity looks weird though?
 

[init]
dock=1
basepointer=1
sanity=111110111111111
verbose=0
visible=1
usemax=1
exportwok=0
exportcolors=0
dotascii=1
lowercase=1
position=[0,100]
lastexport=""

 

KotorMax_Bug.jpg

Share this post


Link to post
Share on other sites

The sanity value is fine, although interestingly mine has usemax=0 (although looking at the script, this is bypassed via a lookup of the Max version number).

Edit: The sanity values come from the Preferences settings:
Sanity.jpg.7c66e019833411a9ec988ee13977f277.jpg

Share this post


Link to post
Share on other sites

I ran into this issue with 3ds Max 2023:

Spoiler

czpZvrl.png

I think it has to do with the PhysicalMaterial type that was introduced in 3ds Max 2017 and lacks a diffuse field. Maybe they changed MultiMaterial to use PhysicalMaterial by default.

Whatever the case, this error prevents any models with walkmeshes from importing. I was able to get them to import with the following correction to KOTORmax/kotormax_scripts/odyssey_fn_general.ms:

       newMaterial = multimaterial name:matName numsubs:SurfaceMatName.count

       for i in 1 to SurfaceMatName.count do
       (
         newMaterial.names[i] = SurfaceMatName[i]
         newMaterial[i] = standard name: SurfaceMatName[i] diffuse: kx_SurfaceMat[i]
       )

This seems to work, although I must confess I know next to nothing about MAXScript and I'm not sure that StandardMaterial is the correct material type that it was before. Still, it seems to be at least a step in the right direction.

I've attached the edited script.

odyssey_fn_general.ms

Share this post


Link to post
Share on other sites

For those having errors when loading placeable PWKs (possibly also door DWKs?), it appears the problem is line 417 in \Scripts\KOTORmax\kotormax_scripts\odyssey_fn_import.ms:

kx_enableMapChannel newObj 0 true

which gives the error about wanting two arguments but getting three when processing the walkmesh. Changing it to:

kx_enableMapChannel newObj 0

fixes the issue. Pre-edited copy attached for those that don't want to edit it themselves.

odyssey_fn_import.ms

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.