TESUnity icon indicating copy to clipboard operation
TESUnity copied to clipboard

Add support for loading NPCs and creatures.

Open ColeDeanShepherd opened this issue 9 years ago • 8 comments

ColeDeanShepherd avatar May 30 '16 21:05 ColeDeanShepherd

Do you have some ideas to get started?

demonixis avatar Oct 05 '16 12:10 demonixis

Yeah, getting this working fully will be a little involved, though... The first step is to add support for new ESM Record types like CREA, BODY, NPC_, and LEVC. You can see the format of those records here. You would add code to support this here. That file is a bit of a mess, and not well documented, so sorry for that. I might make a quick commit adding some comments explaining how to add support for new record types. You would have to make new record classes, add the records to GetModelFilename, add the record types here if needed. And you would maybe add a line of code here.

Then, depending on how extensively we want to support NPC's and creatures, we might have to edit NIFObjectBuilder. One thing it doesn't support is skinned meshes, that's why the flag you looked at in your video was oriented strangely.

Wow. What a mess. This is what happens when you write prototype code without thinking much about a clean design, sorry about that. I've been meaning to refactor the entire project's source code, but I've only gotten around to refactoring most the code in the "Core" folder.

ColeDeanShepherd avatar Oct 05 '16 15:10 ColeDeanShepherd

Ah ah don't worry about the code and thanks for the explanation about the Record types. I'll try few things, now I know where to start!

demonixis avatar Oct 05 '16 15:10 demonixis

I did good progress on my branch for creatures

image

I have added blank files for PNC_, BODY and LEVC. I'll try to implement them asap.

demonixis avatar Oct 07 '16 07:10 demonixis

Very nice! I might clone your branch and get some work done this weekend.

ColeDeanShepherd avatar Oct 07 '16 18:10 ColeDeanShepherd

Great! I started to work on NPC too but it was not as easy as creatures, but as I already said, I'm new to Morrowind (for now 😎)

demonixis avatar Oct 07 '16 20:10 demonixis

Yeah, NPCs are going to be tricky, I think, because they use the character customization system.

ColeDeanShepherd avatar Oct 08 '16 02:10 ColeDeanShepherd

Yep... I have made some progress this morning on my side. I have discovered that the BODY record has more than on SubRecord, it contains MODL, NAME and FNAME but it's not in the doc.. Have you an idea?

demonixis avatar Oct 08 '16 11:10 demonixis