how do you make tile improvements placed on trees remove some of the tree models not all of them

ghost toast

Prince
Joined
Apr 29, 2022
Messages
477
So im making models but when placed over trees the trees poke through.

ill post some pictures of what i mean.

this models is from the future worlds mod. the tree poke through it.
upload_2022-5-27_11-48-32.jpeg


next pictures are of civ 5's camp improvement before and after placement.
you can see it remove a few trees. what i would like to know is why and how.
i would like to take advantage of this feature.
can any one help me with that.

upload_2022-5-27_11-50-25.jpeg
upload_2022-5-27_11-50-25.jpeg


if no one knows how i will eventual figure it out i haven't really looked into it yet. i'm not to worried about on this yet, it would just be good to know in advance.
 
solved you need to make a flat mesh layer then in nexus modbuddy designate that mesh as a landmarkshader_stencil material type. you can cut holes in it where you do want trees appearing
 
I'm not sure if this will be able to help you or not, but I can tell you that the file CIV5Builds.xml is where you can make changes to improvements. In the BuildFeatures section you can tell the game to either keep or remove marshes, jungles, and forests. For example, for farms:

<Row>
<BuildType>BUILD_FARM</BuildType>
<FeatureType>FEATURE_JUNGLE</FeatureType>
<PrereqTech>TECH_BRONZE_WORKING</PrereqTech>
<Time>700</Time>
<Remove>true</Remove>
</Row>

Whereas, for forts:

<Row>
<BuildType>BUILD_FORT</BuildType>
<FeatureType>FEATURE_JUNGLE</FeatureType>
<PrereqTech>TECH_BRONZE_WORKING</PrereqTech>
<Time>700</Time>
</Row>

In the case of the forts, there's no " <Remove>true</Remove>". And, having recently done some modding work related to forts, I noted that the game puts the fort on the tile without taking away all the trees--not sure if it took away some of them though.

I can't tell you for sure, but perhaps if in BuildFeatures you don't include the "remove" line the game will display less of the trees.

The other thing I noticed just now when I looked was that while the camp does appear in the Builds file, it does NOT appear in the BuildFeatures section. Maybe that could have something to do with it?

Anyway, I don't know if any of this might help you or not, but you could give it a try.


One last thing: how did you get Civ to zoom in so much in the pictures you took above? Mine doesn't zoom in nearly that far. Is there some setting you can change for that?
 
I'm not sure if this will be able to help you or not, but I can tell you that the file CIV5Builds.xml is where you can make changes to improvements. In the BuildFeatures section you can tell the game to either keep or remove marshes, jungles, and forests. For example, for farms:

<Row>
<BuildType>BUILD_FARM</BuildType>
<FeatureType>FEATURE_JUNGLE</FeatureType>
<PrereqTech>TECH_BRONZE_WORKING</PrereqTech>
<Time>700</Time>
<Remove>true</Remove>
</Row>

Whereas, for forts:

<Row>
<BuildType>BUILD_FORT</BuildType>
<FeatureType>FEATURE_JUNGLE</FeatureType>
<PrereqTech>TECH_BRONZE_WORKING</PrereqTech>
<Time>700</Time>
</Row>

In the case of the forts, there's no " <Remove>true</Remove>". And, having recently done some modding work related to forts, I noted that the game puts the fort on the tile without taking away all the trees--not sure if it took away some of them though.

I can't tell you for sure, but perhaps if in BuildFeatures you don't include the "remove" line the game will display less of the trees.

The other thing I noticed just now when I looked was that while the camp does appear in the Builds file, it does NOT appear in the BuildFeatures section. Maybe that could have something to do with it?

Anyway, I don't know if any of this might help you or not, but you could give it a try.


One last thing: how did you get Civ to zoom in so much in the pictures you took above? Mine doesn't zoom in nearly that far. Is there some setting you can change for that?


i see where you are coming from with your answer.
that is the remove tree code line.
and for the fort you are correct it does remove some of the tree's.
but that is because the model is set up correctly.

i figured it out.
you create a flat mesh in blender like for the ground decals for improvements.
then in nexus mod buddy when assigning materials to it assign it to be a landmarkshader_stencil material type.
and that flat mesh will be invisible in game but it will remove the trees in a tile only where that mesh is.
the flat mesh assigned to landmarkshader_stencil material type still keeps the forest and jungle tiles, but will remove the tree models where the flat mesh is.
holes can be cut in particular spots you would like trees to still grow.
this allow the model to show up in forest tiles correctly removing patches of trees where your building models should be.

with out that flat mesh assign to a landmarkshader_stencil material type the trees still spawn where your model is overlapping it.
 
I'm afraid I don't really understand most of that, as almost all of my modding experience is with xml's only. But I hope you can figure it :)

I am still wondering though: how do you zoom in so far in those pictures you posted? Those pictures zoom in to show a single tile in great detail, but in my my game the closest I can zoom in still shows 10 or 15 tiles. Is there some mod you downloaded to zoom in so close?
 
Top Bottom