Androrc wrote...
So... I would like to change the point of origin of the "arrow" that appears at the placeable in the toolset. It seems to me that is defined within the .mdl file; how would I change it?
What you're thinking of is the "use node". When a placeable is usable and a player clicks on it, the engine walks the player to the use node and then whatever is going to fire OnUsed, fires. However, if there is no use node on the model, the engine defaults to trying to walk the player to the model base, which is at X/Y/Z location 0.0, local to the model itself. If it can't reach that location, or get close to it, the player will appear to make rudely amorous advances to the placeable and OnUsed
usually won't fire- but any OnHump events probably would, if they existed.
The "arrow" in the toolset is really misleading but the non-pointy end appears to start at the model base and some arbitrary amount of height off the ground.
I want to use the town placeables from this pack.
I want to make it so a script fires when characters use the placeable, but the placeable's "point of arrow origin" is at it's very center, which is unreachable for the characters to use it, as the placeable is almost a tile large.
These models were made without use nodes. They have to have use nodes added to them to be usable. They're too big for the player to get to the (fallback) model base, or at least the one you describe is.
Can I change this through text-editing the .mdl file?
I don't think you can because these also appear to need new PWK files too.
As you probably know, a PWK determines where a player
can't walk. It prevents players from walking through placeables and is generally a 2D plane in the outline of where the placeables is likely to meet the
ground. Some people make PWK's which are simple boxes and there may be convincing arguments as to why this should be done (as opposed to a 2D plane), but I haven't seen them yet and 2D PWK's have not failed me so far.
Here is a basic bed placeable (you're looking up at it from the foot of the bed) and its PWK, side by side, from official BioWare content:
Also, see those white cones above? Those are nodes. I think one of the ones you see on the right hand side (PWK) is the use node for the bed. Anyway, now take a look at one of the models from that pack you're using:
See the problem there? No use nodes and the PWK appears to be just a full 3D copy of the model which is extremely wasteful of space (doubles the model's filesize) and it's also bound to screw with the poor engine, which is expecting far simpler (and 2D) data to splice into the walkmesh. You can see the model base in all of the pictures as a blue box. Its present in all of these pictures, you can just see it most easily in the pictures above because the model is smaller.
As screwed up as these models seem to be, you can probably fix them fairly quickly by using the NWN Creator rollout in Vel's Tools. It would go something like this:
1.Using something like NWN Explorer Reborn, export the model you want to fix to your override directory (NOT the PWK)
2.Import the model into G/Max
3.Delete the model base leaving just the model
4.On Vel's Tools go to the NWN Creator rollout, give the placeable a name (1), change type to placeable (2), click Create button (3)
Like
thisAll the nodes, the PWK, etc, will have been created for you by Vel's Tools. Attach the model to the new base, adjust PWK size and node placement as needed and do a ResetXForm on the PWK if you scaled it and I think that's basically it.
But I don't think you can do that sort of repair in notepad. There's just too much going on.
Modifié par OldTimeRadio, 04 septembre 2011 - 07:32 .