Mdl and Dummy naming rules (for feedback)

I did a write up about MDL and dummy names and ways that the names can break them. I posted this on the vault discord a couple of days ago and would like everyone to see it and give any feed back good or bad so that I can make any changes needed before I post it on the vault as a project.

OK sorry for the long post, but I feel like I would be better to have all of this in one post.

After racking my brain for the last couple of days trying to figure out why my model would not show the visual effect I made when I placed it on it with a script.I started testing the effect on some other placeables and a npc.
As it turned out the effect worked fine on the merc npc and a couple of other OC placeables,but not all of them.
The visual effect would not show on the “Kelp,Type1,Large” placeable. I looked into its MDL and it had no dummy nodes set up, so that one was a simple find.
But the “Bush 01” placeable would not show the effect either and when I looked into its MDL, it had all of its dummy nodes set up. I will get to the details soon, but it was because the dummy nodes in it’s and my placeable’s MDL did not stick to the strict naming
rules needed for MDLs, Dummy nodes and Use nodes to all play nice together and all work.

One of the main problems is that Neverblender will let you do a lot of things when naming your dummys and your MDL root, but will not warn you in any way if you are doing something that will break your dummys. 99% of your models will export and load up fine in game,
but if the naming in your MDL root, pwk or any of your dummys break any naming rules, the dummys will not work.
The Neverblender “Node Setup Helper” will automatically create all of the dummys for a placeable and give them names, but it does not check to see if any or all of the rules are followed before or after you change anything or before exporting.

So that is why I did this write up, to share some naming rules that I have found that may help you figure out why your dummys are not working, or just things that I have found that I know will break them.

All of my testing was done by looking at data on OC models with NWNexplorer and also checking data on and testing models exported from Neverblender 2.79.

I will assume that you will try to follow the naming standards of the NWN OC models, by only using numbers,letters or underscores in your names. I did not test every character on the keyboard to see if they work on the names.

ROOT MDL NAME RULES - When Working in Neverblender.

  1. MDL ROOT NAME MUST START WITH AT LEAST 3 CHARACTERS BEFORE THE FIRST UNDERSCORE, CANNOT HAVE MORE THAN 3 CHARACTERS BEFORE THE FIRST UNDERSCORE AND MUST HAVE AT LEAST 1 UNDERSCORE OR DUMMYS WILL NOT WORK.

  2. THERE IS A 13 CHARACTER LIMIT THAT STARTS WITH THE FIRST UNDERSCORE, THAT INCLUDES ALL OTHER CHARACTERS AND UNDERSCORES, the first underscore is considered part of that limit. If you go over, it will export and load in game, but dummys will not work.

    Example: This MDL NAME “PLC_123456789ABC” with this DUMMY NAME “123456789ABC_head_hit” will work.
    Example: This “PLC_123456789ABCD” with this “123456789ABCD_head_hit” will load in game but the dummy will not work.

    The first 3 characters of the Root MDLs name can start and end with a underscore “_A__1” or be all underscores “__1" and not break dummys.
    You can also make the whole MDL Root name and dummy names, NOT the dummy node names, all underscores, for one of your models at least, and it will not break dummys.
    You do not have to have more than one character after the first underscore in a mdl name, this “PLC_1” will work and not break dummys.
    You can end a mdl name with a single underscore like this "PLC_1
    " it will not break dummys. You’d think it would, but it doesen’t.
    Other having at least one, there are no other rules for underscores in the mdl name that I could find. This "PLC_1_2_3_4_5_6
    ” will work and not break dummys.

NON PWK DUMMY NODE RULES - This includes the _ground, _hand, _head, _head_hit, _impact nodes and I have also seen a _base node in some of the OC placeables. Neverblender does not set up this _base node with the helper and I’m not sure if it is needed or what it does.

  1. EACH DUMMY NODES NAME, MUST BE EVERY CHARACTER THAT COMES AFTER THE FIRST UNDERSCORE IN THE MDLS ROOT NAME, FOLLOWED BY THE DUMMYS NAME, FOR THE DUMMY TO WORK.

    Example: MDL ROOT NAME “PLC_123_45” - DUMMY NAME “123_45” - DUMMY NODE NAME “_head_hit” - FULL DUMMY NAME “123_45_head_hit”.

    Mdl root name and dummy name matching is not CaSe SeNsitiVe, you can use this “PLC_ABCDE” mdl root name, and this “ABcdE_head_hit” dummy name, it will not break it.
    Dummy node names are not case sensitive either, this “ABCDE_HeaD_hiT” will work.
    The dummy name and dummy node name together can go over 13 characters, this “123456789ABC_head_hit” will work.
    Thats pretty much it on those, they must match up, they are right or they are not.
    The problem is that you can mess these up with the mdl root name, If you mess up the mdl root name up, you automatically break all of the nodes, even if you name the nodes right.

ROOT/PARENT PWK AND USE PWK NODE RULES - This includes the root/parent “_pwk”, “_pwk_use01”, “_pwk_use02” and the “_wg” nodes.

  1. THE ROOT/PARENT PWK’S NODE NAME, NOT THE PWK FILE’S NAME, MUST BE AT LEAST 3 CHARACTERS FOR USE DUMMYS TO WORK.

  2. THE USE PWK NODES NAMES MUST BE THE LAST 3 CHARACTERS OF THE ROOT/PARENT PWKS NAME, THEY CANNOT BE MORE THAN 3 CHARACTERS LONG AND CANNOT BE LESS THAN 3 CHARACTERS LONG. This is why the root/parent name must have at least 3 characters.

    Example: This ROOT/PARENT PWK NAME “8888” with this FULL USE PWK NODE NAME “888_pwk_use01” will work. But this “8888_pwk_use01” will break the use node.

    The root/parent pwks name inside of the PWK file, NOT the PWKs file name, does not have to match the Root mdls name in any way, but the pwk use nodes names must match up with the root/parent PWKs name.
    The root/parent pwk and the use nodes can have, but do not have to have underscores.
    The root/parent pwks name and both use nodes names can start and end with a underscore “A” or can be all underscores “_____” and it will not break them, but you still cannot use more than 3 on the use nodes name.
    Neverblender adds the “_pwk” to the end of the root pwks name when it is created with the helper, but after looking at OC models MDLs data and doing some testing, I have found that this is not needed. Not having the “_pwk” at the end of your root pwks name will not break your dummys.
    I have found no real naming rules for the _wg node. It can be named anything and as far as I can tell and the name does not have to match anything. As long as it has the _wg at the end of its name and is parented to the main pwk, it will be the placeables walk mesh.
    As far as I can tell there is no 13 character limit on the root/parent PWK or the “_wg” either. I named one “888888888888888888888888888888” and “888888888888888888888888888888_wg” and it did not break anything.

I do not know why, but the editor built into this forum changed/edited some things in this post, that’s why couple of things like the “A” and “PLC_1” in the underscores parts look odd…they should be “A_” and “PLC_1_____” now you should get what I was saying about those.EDIT nope it still will not show them right. the a one should have a underscore in front.

I did not check if every single one of these rules are 100% true on a compiled model, but I was able to compile a model with tangets that did follow these rules and everything including dummys and the normals work great in DEV build 1891. Models compiled in game with the dev build 1891 do not work in stable yet as far as I can tell, they will crash the stable versions toolset.

2 Likes

Simply highlight the offending text and press the “Preformatted text” button (</>) in the messages toolbar to fix.

Be aware that NWNMDLComp doesn’t compile everything. For example it strips out selfillumcolor which is why I no longer compile models.

TR

Hmm I will have to check if the in game compiler in dev 1891 still does this.

BTW, I think the reason why it changed that “PLC_1…” is because 3 underscores on their own, in I think BBCode, will give you a horizontal line like -


TR

It should not matter, as everything still looks right in the text file. I am about to upload the text file as a project on the vault.