Jump to content

How to customize object collision for placement in workshop mode?


danielmzbr

Recommended Posts

Hey there!

 

In vanilla Fallout 4, there are objects that "ignore" terrain collision and can be placed (partially) into to the ground in workshop mode. Is it possible to replicate that on custom objects? How?

 

http://i.imgur.com/kzI73KY.jpg

 

Details

 

The object pictured above is a static called "Shack Foundation" (workshop_ShackMidFloor01Foundation02), created by its respective constructible object (workshop_co_ShackWoodFoundation02). In Creation Kit, I've tried adding its same actor values (WorkshopItemOverlap=8; WorkshopPlacementAllowWater=1; WorkshopStackableItem=1) to a custom static object to see if it would clip through the ground in workshop mode, but it didn't work (image). I've also tried messing around with other actor values, including various combinations of "WorkshopOverride...XYZ...MinMax...Bounds" values, but I had no success so far. My noob guess is: whatever it is that makes a buildable object to ignore terrain collision either comes from its 3D mesh properties (from a modelling software, from Nifskope, etc) or it's hardcoded somewhere/somehow. Or maybe both...

 

There is also a chance that I simply did something wrong in Creation Kit, but then again, what directions should I follow to understand and achieve this in a mod?

 

Any help is really appreciated. Thanks a lot!

Link to comment
Share on other sites

It's a certain snap-point called P-WS-Sinkmax along the Z axis. Where ever it is on that axis is the point until which the object can sink. So if you want an object to sink a lot you would keep the snap-point pretty high.

 

 

http://i.imgur.com/3DV8B2U.png

 

 

Link to comment
Share on other sites

Great, I'll start studying from there then. I gave the link a quick look and it seems it'll help me a lot, and not just with this specific topic, but rather on understanding even* better how mesh properties work. Thank you very much for the fast response and help!

 

Regards.

Edited by danielmzbr
Link to comment
Share on other sites

Hey again, I followed your directions and it worked :smile:

 

At first, objects were invisible and couldn't be placed in-game, but I learned that it was because I didn't have my game properly setup to load loose files. All I had to do was add a few lines to my Fallout 4 .ini files (the "fix" can be found here).

 

http://i.imgur.com/OAJAPUz.jpg

 

I'd just like to share how I've done it, step by step, so people have an extra reference on how to achieve this. Just please note that since I'm still learning, there may be important steps I missed. If that's the case, please, veterans, let me know and I'll edit this reply with the necessary corrections.

 

Solution

 

I'll use the object pictured above as an example, FiddersGreenSign01.nif. It should work for other .nif files.

 

1 - Make a copy of FiddersGreenSign01.nif and rename it to workshop_FiddersGreenSign01.nif (exact name is optional).

 

2 - Make sure to place the copied file in your /Fallout 4/Data/Meshes/ folder.*

 

3 - Open workshop_FiddersGreenSign01.nif with Nifskope.

 

4 - In the Block List tab, right-click "0 NiNode", go for Node, then click Attach Extra Data.

 

5 - Select BSConnectPoint::Parents from the list that shows up.

 

6 - Select your new BSConnectPoint::Parents line, then in its Block Details right-click the line called "Name" and select Edit String Index.

 

7 - Type "CPA" (without quotes) and hit OK.

 

8 - On the second line, "Num Connect Points", right-click the value column, type 1 and hit Enter.

 

9 - On the next line, "Connect Points", click the double green arrows OR right-click the line, go for Array and select Update. It does the same thing.

 

10 - Expand the "Connect Points" line, then double-click the Value column for the "Parents" line and type "WorkshopConnectPoints" (without quotes) and hit Enter.

 

11 - Double-click the next line's, "Name", Value column, type "P-WS-SinkMax" (without quotes) and hit Enter.

 

12 - Double-click the "Translation" line's Value column and adjust the Z axis value. The object will be able to be placed into the ground up to this point.

 

13 - Double-click the "Scale" line's Value column and set it to 1.

 

14 - Back on the Block List, right-click the blank area, then go for Sanitize and click Reorder Blocks.

 

15 - Save your file.

 

From there on, you have to setup a Static Object (using the .nif file you just modified as its model) and its respective Constructible Object, which can be done in Creation Kit. People who don't know how to add new objects to the workshop will find a good starting point in this tutorial by Seddon4494.

 

Extra question

 

- Since I've used and modified a copy of a vanilla mesh, when I look at the new one in Nifskope, I notice there are some lines that still have their original names. Should I change that to match my modified filename, and how do I do that?

 

Thanks a lot! Any feedback is appreciated.

Link to comment
Share on other sites

You don`t need to change names of NiNodes and TriShapes as long as all your different nodes and shapes have not the same names and not the name of other blocks. (This mostly happens when pasting a brach from one nif into another nif. And in that case you need to check links and manually rename some blocks .Though nifskope is good at fixing this, but it can`t create a name for your bgsm file etc ). It does not matter for the game if they are called FiddlersGreen01 or IceCream1999 :wink:

 

This a really useful info and thread. I did not know that to create a "sinking" object you use snap points.

Edited by kitcat81
Link to comment
Share on other sites

Cool, thank you kitcat81!

 

Since I plan doing this on a lot of objects, it's important for me to understand that naming thing beforehand. Imagine if I had to change all the node's names later on, with dozens of objects. And I'm glad this helped you too. Being able to sink objects partially into the ground helps them blend a bit better with the environment imo.

 

Cheers!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...