Author Topic: make body parts available in toolset ?  (Read 693 times)

Legacy_azaz1234

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
make body parts available in toolset ?
« on: December 09, 2015, 10:59:53 pm »


               

there are lots of cool models categorised as armour parts in the cep, and i see these when i go to whip up a new set of armour. i'd like to use some of these as body parts for creatures. elegio's custom content guide v.3.0 implies that these parts should be interchangeable. obviously they're not... i know i'm missing a piece of the puzzle, but can't figure out where to find it. what, exactly, governs which models can appear in the pull-down menus on the toolset's creature properties 'appearance' tab ?



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
make body parts available in toolset ?
« Reply #1 on: December 09, 2015, 11:41:03 pm »


               

Armor parts are stored as a mesh and a dummy. Internal player character systems load that dummy and mesh and place them in the tree structure based on another model. To use them as creature parts, they have to be attached to an actual creature model, and cannot be loaded the same as PC parts... unless VirusMan rewrites that part '<img'>


 


What you need to do is get nwmax and find the part file you want to play with via nwnexplorer. Then get the creature model you want to put it on. Import the part onto the creature file and position it so that it is in the position of the creature corresponding part. Not just visually, but in pivot position and rotation of the 0-th frame.


 


Depending on your needs at that point, you can do one of two things.


 


The first thing you can do is click on the original part on the creature, choose attach, and then select the replacement part. Then switch to element selection mode and remove the original part mesh without deleting the whole object. This gives you the benefit of animation retention. You are basically copying the animation from the old mesh to the new mesh without having to do more work. I would suggest before you do this that you first copy the new texture onto the old part, so that there is no chance of multi-material issues.


 


The second thing you can do, but only if the model calls on another file for animation, is to simply put the part in position, as before. Then change the child/parent structure, replacing the old part with the new part. The new part must be named exactly as the old part for this to work after export.


 


Now depending on your need, you export it one of two ways.


 


If you did the first method because you wanted to keep animation in the new file, then you export the character WITH animations as a new appearance type.


 


If you did the second, you export it without animations.


 


A third option exists in which you do the second option the same as above. Then on your model base you set the "supermodel" designation to the original file. This calls the animations from the other file instead of using the ones on the current file. You can then export without animations and it will get them for you when you load it in the game.


 


It isn't something you can just do in the toolset unfortunately, so you'd have to upgrade your skills or have somebody do it for you. I bet there are a few who would.



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
make body parts available in toolset ?
« Reply #2 on: December 09, 2015, 11:45:41 pm »


               

...what, exactly, governs which models can appear in the pull-down menus on the toolset's creature properties 'appearance' tab ?


appearance.2da is the list of creature appearance models behind that drop-down.


Are you asking how to turn armour parts into body parts? Or how to make a new dynamic race?
               
               

               
            

Legacy_azaz1234

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
make body parts available in toolset ?
« Reply #3 on: December 10, 2015, 12:34:05 am »


               

thanks for the replies, guys !


 


i see i need to be more specific w/what i'm trying to do.


 


i have some custom races i've created, and they're dynamic models based on the std bioware models. the races themselves do appear as possible selections in the toolset, so i think i've got the appearance.2da and racialtypes.2da issues sorted. however, i'd like to be able to use a couple of the cep armour pieces as options for these models ; for example, i've got a faun, and there are armour pieces in the cep that are hairy pelvises and legs and such. i've also got a mermaid, who, for the moment, looks remarkably like a typical 2-legged human... but there's a mermaid part in the cep i'd like to use as a body part. that kind of thing. i suppose i could 'fake' it by creating armour w/these parts, but i'd really prefer to have them as part of the actual creature, if possible. i just can't figure out how to make them show up on the drop-down menus.


 


sorry for the confusion, and thanks again for your help !



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
make body parts available in toolset ?
« Reply #4 on: December 10, 2015, 12:44:20 am »


               

oh! In that case I think you need to clone the part model so that the prefix on the file matches the dynamic "race". Like PMH0 is player male human pheno-zero, you need parts prefixed as player male/female <your race key code> and phenotype index. I would also go in the file you cloned and replace all references of similar in the mesh names to the new file name, so you don't get little odd quirks while playing.


 


For the mermaid tail, you might find that is a skinned feature and probably inside a robe-like structure. If you clone it and do similar as above, it should appear like pants and loincloths in the robe dropdown.


 


If your characters are fully dynamic, then this is how you'd be doing it. For things more bestial, you should research the wemic model on the vault.


 


I may be mistaken, but if you include them as a new part index on your dynamic models, you may see a toolset expectation on other appearances that an index exists for that part on them.


 


I'm not 100% sure on non-armor parts, but you might examine some of the other non-armor parts for zombie pc's where the player can have a bone limb, instead of just plain or tatoo.



               
               

               
            

Legacy_azaz1234

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
make body parts available in toolset ?
« Reply #5 on: December 10, 2015, 08:02:18 am »


               

there must be something i'm not getting here, it's just not working.


here's an example. in the item properties editor, while i'm preparing a suit of armour, i can display pelvis 122. it looks like the front of a deer. i'd like to use this in my new faun model.


 


i opened up nwnexplorer and searched around in the cep haks and found the model. its name is pmh0_pelvis122.mdl. i exported it and decompiled it to ascii. i then exported and decompiled pmh0_pelvis001.mdl from the o/c, and compared the two. w/the exception of the names, the headers of the files were identical [obviously the sections listing vertices and such were different]. but the one from the cep never shows up in the dropdown menus in the creature properties window in the toolset. so i think there must be more to it than just giving the file a name that fits the formula. i'm thinking there must be some sort of directory structure somewhere, maybe a 2da or config file or something, that tells the toolset 'use this model for creature design and armour, but this one only for armour.'  or perhaps a file showing the maximum number of parts available ?  there's a file called des_crft_aparts.2da that has a list including a column called 'num_parts', thought that might be it, but it's set at 38, and there are only 3 models selectable in the creature properties dropdown. i found a 2da called parts_pelvis.2da, but that doesn't seem to be it either. the entries for line 1 and 122 are virtually identical. i've also read through the sections on armour and creatures in the custom content guide, and either i'm too thick to recognise the clue i'm missing or it isn't there. so. i'm stumped.



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
make body parts available in toolset ?
« Reply #6 on: December 10, 2015, 11:13:25 am »


               

Body parts - except heads - work like so...


 


1. Slots 001 and 002 are displayed at character creation. They are the ONLY parts available to a player when creating a character - but see #s 3 and 4 below. 


 


2. Slots 003-200 are reserved space for clothing options. They will NOT appear at character creation.


 


3. Slots 201-202 recycle slots 001-002. Anything placed in these slots will REPLACE slots 001-002 at character creation.


 


4. Slots 203-255 appear in the drop down menus for dynamic races. I am not sure if they also appear at creation. Note that slot 255 is reserved for the skeletal components used with the Pale Master.


 


5. The des_crft_aparts.2da is an internal reference 2da for the crafting system. The NUMPARTS column is used to tell the scripts how many parts are available for crafting.


 


6. parts_####.2da are internal reference 2das that tell the engine that a specific part number exists and, according to the value assigned to the ACBONUS column, where to display it in the drop down menu. The only 2da in this set that actually uses the ACBONUS column for whats its name implies is parts_chest.2da. In that 2da, the value assigned to ACBONUS is the AC of the clothing. Note however, that you can have decimal values assigned to ACBONUS to change the indexing of the chest pieces - as long as the digit left of the decimal remains the same, the AC value will not change (e.g. an ACBONUS value of 8.41 is AC 8 and will appear in the dropdown before a chest piece with an ACBONUS value of 8.52, which is also AC 8).


 


There is a 2da reference sheet built into the documentation for Project Q. The link for Q is in my sig.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
make body parts available in toolset ?
« Reply #7 on: December 10, 2015, 12:22:33 pm »


               

I knew there must be something to the higher indices regarding body parts, now I know the exact indices. Thanks!


 


Here's a question. I assume body parts, rather than clothing, are labeled as AC 0. Are you able to give 200 range body parts an AC value, and actually have it register in game? Or does the armor type designation in baseitems.2da define the need to actually calculate AC from the chest part?



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
make body parts available in toolset ?
« Reply #8 on: December 10, 2015, 02:03:57 pm »


               

The AC value only applies to chest parts. For other parts it's just used to order them.  The body parts ones do not have to be 0.  If the chest parts are non-zero presumably you'd get AC for those. 


 


Not sure what armor type designation you are referring to, there are AC_Enchant, BaseAC and ArmorCheckPen.  The former determines the type of AC bonus if the item provides that as an item prop, useful for making things stack or not. The BaseAC is for shields but is actually hardcoded so not useful.  ArmorCheckPenalty what it says although since the other shield specific things are pretty hardcoded I don't know if this is respected or not off hand.


               
               

               
            

Legacy_azaz1234

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
make body parts available in toolset ?
« Reply #9 on: December 10, 2015, 05:43:26 pm »


               

aha !  many a mystery solved. '<img'>  so it's basically hardcoded into the toolset. that gives me some ideas for workarounds.


 


thanks much for the insight.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
make body parts available in toolset ?
« Reply #10 on: December 10, 2015, 08:55:26 pm »


               

In baseitems there is a model type designation, and one of those is armor. I wasn't sure if checking that designation on wearable armor which call on similar body parts was the key to unlocking AC for chest parts, or if simply providing an AC value for the chest part, even if it was going to be a non-armor part, was enough to create an actual AC value.


 


I have not tested it personally, but I was just wondering if anybody knows if you can provide AC via body parts on the chest in addition to armor, and if so, does armor once worn override or add to existing AC on the underlying body chest.



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
make body parts available in toolset ?
« Reply #11 on: December 10, 2015, 09:48:44 pm »


               

Ah, I see what you were asking MD. I'm not sure if that applies to the creature's inherent body parts since they are not items and are not actually equipped. So yes, possibly the fact that they are not items means the engine ignores the AC setting on the chest part.


 


If you set the base part to non-zero AC, even if it did actually take, I think it would just get overridden by the armor AC if you wore armor. I suspect base AC does not stack. But I have not tested for that explicitly either.


 


An interesting question...