CarthOnasty

[K1] Replacing/adding into .mdl and how to retain animations?

Recommended Posts

First things first: yes, this is star map related. 😉

I created new arms I'd like to try out but have no idea how to get those into the current star map model. (plc_starmap.mdl) I created them separately.

So question would be, how do I replace what's in the old model with what I have created, and then how do I retain the animations?

Share this post


Link to post
Share on other sites

Pretty sure I already told you how to do this. Just copy and paste from one ASCII to another. Export your geometry in the same hierarchy as the original and all the pivots and rotations are the same, etc., then copy and paste all the emitter nodes, etc. and anims from the vanilla file. Possibly you may have to fiddle with the hierarchy to makes things easier.

Share this post


Link to post
Share on other sites

I'm sure you did. I'm forgetful and don't save things.

So I would need to export the new model to ASCII via KotORMax/Blender. And that's the code I would copy and replace in the ASCII of the original model?

How would I know if I'm exporting it in the same hierarchy?

Share this post


Link to post
Share on other sites

I don't use Blender, so I couldn't tell you how to handle that side of things. Here's what the top of the hierarchy looks like in Max:

Star_Mpa_Hierarchy_Top.jpg.c2466d99c6b902681145e0baad45ee1b.jpg

So you'd have to deal with the legs being below parts you'd (presumably) retain from the vanilla ASCII. It's actually not too difficult if you use Notepad++ and the Aurora MDL language definition for it. That will let you collapse each mesh/object so you can easily select and excise bits you don't need:

801050950_N_ASCII_Collapsed.jpg.37d260d4a97b074f227c331362d86d97.jpg

Share this post


Link to post
Share on other sites

Okay, yeah, Blender's basically the same.

125210168_ScreenShot2020-11-06at9_21_10AM.thumb.png.2a0a3ead222608dd015aec2659e174c6.png

 

Thanks for the Notepad++ tip, that's really convenient!

And then for my new model, would I need to export that as an .ascii? And that's what I would copy/paste?

Share this post


Link to post
Share on other sites

Yeah I would just start with a copy of the original star map, delete everything except the base and the meshes you are going to replace. Add your new meshes and give them the same pivot position/orientation as the originals. Export that as an ASCII when done.

You don't even necessarily need to delete the originals - you could just disable their render flag. They might be useful as shadowcasters. That would also make your life easier for the merge, since if you make your new meshes each children of the originals, then all you need to do is paste the data for your new meshes at the end of the geometry list , since their data block lists their parent object (although you would need to edit the render flag settings of the originals). Order in an ASCII is more or less irrelevant, outside of listing parent objects before children. I'm not sure if that is strictly required, but MDLEdit is kind of finicky so better to be safe than sorry.

Share this post


Link to post
Share on other sites

You could also  change the data of the legs to your new legs and import the animations later. 

image.thumb.png.ace8b1b474f91d20022a3b5e75465426.png

 

tut22.thumb.jpeg.94df9d1bfa00ae04fdc3e78e62140f11.jpeg

 

Some notes - you will need to copy your arms to new scene and import without animations if you want to take this approach, and you should reveres that  when it's time to import animations(import only animations ). Also you may have to mess with the rotation and origin to get it to line up.

 

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.