I’ve just noticed that one or two of my fish models sit above the waterplane in some of my tilesets, and therefore appear to be flying in-game!
Other fish models sit below the waterplane and swim happily about in a realistic manner.
So, I wondered if anyone knows a way to edit an ASCII .mdl file in such a way as to lower the creature’s height? I’m afraid I’m not a modeller and don’t have such things as Blender etc.
Also, I should perhaps add that one of the flying models has a supermodel, whereas the other offender (jfk_coho.mdl) contains its own animations (in case this matters.)
It is possible, though its a bit touchy some times
Provided its a fish that runs on the shark animations, adjusting the animation scale to be smaller than 1.0 will cause it to sink lower towards the ground. Ones with this tend to be released as lowrider creatures, after Bloodsong’s first version of such. Of course, how much you need to edit the scale by depends, and it won’t work for ones that use other animations (Like, say, the rays or sea dragons I’ve whipped up in the past)
It would be nice to see, which fish we’re talking about. So put the mdl into an zip and attach it to your post. If it’s cep, the 2da line would be enough.
I’ve narrowed the issue down a bit, not that it’ll help much I expect.
The problems arise with marsh and swamp terrain in various tilesets, where the waterplane is much closer to the groundplane than in other walkable water terrains such as Shallows and Worm’s Summer Water Main.
I’ve noticed in NWN Explorer that in the worst-offending models, the root dummy is set much further below the actual model than with other creatures that appear at the right height in marsh terrains - could that have something to do with the problem?
Anyway, as Mmat requested, here’s the relevant info from CEP 2.70’s appearance.2da:
N.B. All models are of the jfk fish series and none use supermodels - all the animations are built-in.
3532 Fish: Bullhead jfk_bullhead.mdl
3536 Fish: Coho jfk_coho
3538 Fish: Pike jfk_pike
3539 Fish: Trout jfk_trout
I should add that all these models are compiled, so I had to export them from NWN Explorer as ASCII files.
Tested the coho and the bullhead in CEP, Codi Swamp. The bullhead works fine.
But the coho definitively needs wings
node dummy rootdummy
parent jfk_coho
position 0 0 1.393
The position parameter in rootdummy seems to be by far too high. That’s nearly 3/4 human size. Without testing it further (leave that to you ) I would like to say that your assumptions are correct.
I would suggest to toy around with this parameter. 0.1 - 0.3 should be enough (the bullhead has 0.4 here).
Glad anyone’s still using those fish. Not sure how the coho salmon got adjusted. I’m pretty sure they all worked, but haven’t checked them out after they went into Project Q and CEP.
Thanks again for your help Mmat, and “thanks for all the fish” to JFK!!!
Given that I’ve no idea what I’m doing, I tried reducing the Z coordinate of the root dummy and all the root dummy references in the animations. No dice - the fish didn’t change its height at all.
Next I reduced the Z coordinates of all the model parts by 1.0 WITHOUT altering the root dummy nodes and voila! - Mister Coho now swims below the surface. Huzzah!
Trouble is, the animations are now off, and when killed Mr Coho’s body forms an inverted V-shape, most of which is above the waterplane!
There are actually three terrain types to take in consideration: swamp (water up to the knees of a human), shallow beach (water surface at the breast) and deep water … I don’t think that you can create a model, which is suited well for all 3 types of terrain, except those which are very near to the ground (like the bullhead).
Howdy Mmat,
Thanks muchly for continuing to look into this!
To clarify, I’m hoping to end up with three separate models for each fish type, based on waterplane height:
jfk_coho.mdl (for Shallows & walkable Deep Water)
jfk_coho1.mdl (for “Basic Marsh” in my ZeonCRF, TBForest and Deadlands tilesets)
jfk_coho2.mdl (for my BTH Swampy Forest and BTH Swamp tilesets)
My thinking is, once I understand what I need to do to an ASCII file to lower a creature’s Z position AND its animations in any SINGLE type of terrain, I can use that model to make modified copies to suit the other terrains.
So, it’s all about getting the technique sorted - after that, it’s just a matter of tinkering…
Coho salmon migrate to freshwater streams to spawn. We get them here in Michigan, and sometimes they are in such shallow waters their backs are sticking right out. So, they could conceivably get into shallow waters, but of course an actual swamp that was unconnected to a stream or river wouldn’t have any.
Thanks for your kind words on the model. I had fun making those fish and struggling at learning to use Gmax back then.
Awesome!!!
I CANNOT believe you did this Mmat!!
How on earth did you produce your version with the much cleaner truncated numbers?
Did you use some sort of utility, because I’m presently using your instructions to turn the smallest of JFK’s Catfish models (jfk_catfiah1.mdl) into one that will swim nicely in my swamps, and I’ve spent almost six hours using Windows Notepad and Calculator to alter all the Z numbers!!!
There are 488 verts, and even using Notepad’s “Find” ability I’m still less than halfway through!!
Anyway, thanks SO much for showing me what to do! You are a star!
Oh, I suppose I should come clean about the Coho. It was never intended for the swamp terrains - I was just using it as a test case.
I’m using notepad, but the most important instrument is Excel with some VBA-Macros to get the things right. If you have all the z’s in one column, it’s easy to decrement all instances by a certain number. Then there is NWN-Explorer and Excel Diagrams to visualize things, some other tools to work with textures etc. Meanwhile I create simple models from scratch this way, but creatures are still most commonly too complex to be done this way.
For me, this little project supported my learning process well.
So, copy all vertices into column A of an excel spreadsheet, use text to columns to get the values separated and amend the numbers. Column A gets emptied this way. Insert a formula in column A to concatenate the numbers into a string after you’re done and copy this column back to the mdl.
Thanks to you, I’ve just tested JFK’s Catfish in my various swamp terrains using a rootdummy height of 0.144742 borrowed from a Giant Leech that worked nicely in the swamps.
Amazingly, given that I did it all without Excel (of which I have a mordid fear!) it worked perfectly!!
All the anims seemed right too, so Happy Days!!
Once again, I can’t thank you enough for taking the time to help and to teach me a new skill.
All the best,
PT