Jump to content

FO4edit ... possible to find Z level of landscape at given X/Y coordinates of a cell?


Recommended Posts

I'm googling it myself, but in the meantime I figured it wouldn't hurt to ask...

 

I'm working on bulk item placement and I want to pepper in things here and there without having an original reference to base the X/Y/Z on, and without hand placing them with the CK. The CK is useless when it comes to working on large scales. It takes too long.

 

Is there any way with FO4edit (the pascal scripting ... NOT papyrus) to find the "ground level" Z coordinate when you have a known X, Y, and CELL?

Link to comment
Share on other sites

I would attempt it, if I knew enough math. Getting the z value at the ground level would have been extremely useful in Skyrim, but especially more so in Fallout 4 where terrain height varies drastically.

Edited by Lisselli
Link to comment
Share on other sites

While it is possible to make automatic placement with xEdit, I don't recommend doind that. There are several problems you will need to solve.

 

Each cell consists of 32x32 grid of height points (the 33rd point is the copy of previous cell), considering 4096 game units cell size, each point covers 128x128 units area. Mind you the human height is also 128 game units, so that's quite a large area. To accurately place something in between you'll need to perform smoothing calculations between neighboring points.

 

Also each grid point can elevate from -1024 to +1016 so slope detection is also needed. Then you need to adjust the placement using object's collision, probably using object bounds OBND values.

 

This is a lot of work, trials and errors for something that can already be done automatically with CK's Region Generator

 

The only problem is that it places only statics, moveable statics and plants iirc, so if you need to place something else, you'll have to trick it. Make a static record using the nif model you need, place it using region generator, then replace base object record of REFRs with xEdit script which would be a trivial task.

Link to comment
Share on other sites

bleh, I didn't think there was quite that much math involved. I'll check out the region generator. Unfortunately, what I'm trying to place is lights, not static objects.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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