What "overwrite_occupied_size" in landmarks does?

From reading the code, the modding guide, and old posts here, it basically means a number of objects that the landmark is allowed to spawn on top. So if you have an area with too many trees, the landmark can only spawn there if it has a big enough “overwrite_occupied_size”.

Thing is, I pumped this value over 100 already and the desired landmark is not spawning anywhere…

The landmark does work! If I set it to spawn in mountains (basically empty land) it works. But it is refusing to spawn in plains, the desired location.

So, what “overwrite_occupied_size” does?

1 Like

I’m not sure :thinking:

In the guide it says that for a landmark to be placed on top of a 2x2 tree it’d need an overwrite_occupied_size of 5 (which makes me think it’s the center of the landmark what is trying to get placed, but I could be wrong - it actually reminds me of how we can’t place certain summon stones from the geomancer if their bounding box touches any entity).

Malley said anything above 6 would spawn anywhere, but I don’t know which landmark size is that referring to. How big is your landmark? And what kind of entities do you have in your plains? Are they cluttered or do you see empty places where it could perfectly spawn?

Perhaps @malley or @max99x remember.

I’ve tried with a landmark from the stonehearth mod, increasing the overwrite_occupied_size to its diameter (128) and increased its weight to 200 for testing, and it’s definitely spawning in the plains quite frequently.

1 Like

The plains is full of entities (swamp biome, I’m working on lowering the entity count), but the landmark is also set to foothills. Flat areas are plenty, even though the landmark is big, 64x64

1 Like

Heyo!

I’m not super clear on this as it was something Max added, but the way my brain is remembering it is like this:
A tree that is the size of 2x2 terrain voxels is actually 4 voxel of “occupied size”, a 3x3 object would be 9, 4x3 = 12, etc.

So when you place a landmark, it tries to find an area of open terrain (based on the type of terrain - not the things on it), then it asks “what objects are here and how big are they?” So if there is a forest with a bunch of 2x2 voxel trees (remember these are terrain voxels), then you would need a value for “overwrite occupied size” that is greater than 4 (so 5 as @Relyss stated). But if there is a single tree that is 2x3 (6 voxels), the same value of 5 would fail to place here.

I remember that I tried just having a value like 10 or 20 or something, thinking that everything would be fine - that it would just overwrite whatever little objects were in the way - but this had some sort of bad result that I don’t remember. It may have placed too many landmarks, or been strange in ways that didn’t make sense (you can try it out yourself, it shouldn’t break your computer or anything).

Again this is just what I remember - it could be wrong, my memory is my worst trait ; D. Best suggestion I have for any of the landmark fields is to just try different values, some may give you strange results but you’ll probably be able to guess at what they’re doing : ).

It must be something else then, because I tried many ranges, 1, 5, 6, 12, 100, 100000…
I also tried omitting it.

For some reason, it could only spawn (with easy, lots in the map) in mountains and in water. Plains and foothills are not accepting it, even though I have flat areas that could fit landmarks around 128x128 in size… The number of objects is also low too (the workshop version not though, that one is still crowded, but I should update it soon), it probably has less trees than the temperate foothills.

1 Like

Are other landmarks spawning in the plains? Perhaps it’s conflicting with them (“unique” property, or a lower weight compared to that habitat or category, idk…). As long as you’re saving the correct file, it should have made effect :thinking:

Sometimes it’s a matter of luck, but I’m sure you’ve tried enough times already. It’s not even that big to need much space. Perhaps we can check the files later once you update the mod.

1 Like

Tru dat.

2 Likes

I miss you Max : )

3 Likes

Sounds like it could be an issue other than ‘overwrite occupied size’, generally I would suggest leaving this value at ~6 or 7. I agree with Relyss’ assessment: could there be some other issue? Do other landmarks place? What happens if you take your 128x landmark and make it a 64x (with no other changes)?

Yes, all others are spawning fine, except this two bigger ones. (the others are all 32x, these two are 64x)

It should be updated on the workshop now. Though I made two small changes, I added them to mountains (the only place that they worked) and unique:true, to avoid all mountains getting them.
The landmarks in case are the 64x_ ones, all others are 32x_.

Yes, I tested many ranges (1,5,100,100000) with no difference, but it worked in others biome, so it must be something with this biome.

Yes, all the others work except these two bigger ones. They are already 64x (in qb model and in json size).
Changing their json size to 32x worked for one (simpler rock formation), but not for the other (have water and wetstones) even with 16x
Thanks for the tip though, it even has an interesting effect when clipping with other terrains.

is there enough space in the sub-biome you’re placing it in? like, are the plains large enough to support the landmark easily?

before digging too far into strange settings, i’d suggest trying to get the landmark to work reliably with default settings - as this sounds like it could be an issue somewhere else. better to rule out simple issues in other places before getting into these.

yeah, i found that interesting as well. i don’t think we could have done anything with it at the point i wrote landmarks, but maybe if we had started with the mentality of building with landmarks in mind later we could have made it possible to “find” edges and do things with them. that’d let you create caves in the sides of mountains, have riverbeds that connect across the map, have impressive cliffs and interesting outcroppings…

1 Like

I got it to spawn by setting it to size 16 and adding “plains” to the whitelisted elevations. For some reason it was not spawning when foothills only, even though the foothills has more flat ground than the noise plains. It spawned in a little island in the swamp and now I’m just giving an extra polish to match these cases, extending down some pieces of the landmark where it end up floating, etc…

3 Likes

Honestly that seems to be a lesson that every game in this genre learns too late in its dev cycle to really take advantage of.

We always talk about narrative-driven gameplay in sandbox sim games, but making narrative-driven proc-gen terrain would be a real coup for the genre. At the start, the focus is always on “make the terrain naturally form interesting shapes and cool things to explore”, and there’s varying levels of success here. Stonehearth certainly seemed to do a good job; at least so much so that nobody really/seriously questioned whether it could do better. Minecraft is of course the grand-daddy here, people still play “nomad style” just to explore what the Minecraft world can throw at them. I know one dev going by the handle phr00t has built his entire portfolio off of exploring proc-gen’s possibilities, and he has a cult following for it. The random scattering of rocks, trees, cliffs and water pools within proc-gen sandbox games the does work to create micro-narratives, and I like many other players was simply thrilled to see that.

Something I’ve realised after rolling hundreds of Stonehearth maps (I have commitment issues to large projects/towns hahaha! :sweat_smile:) though, is a lack of “intelligent” placement of these features and (later the landmarks too) which leads to a ton of “near miss” situations where there’s almost a really great story wrapped up in the terrain… it’s just slightly off. For example, imagine a pool of water with a bunny statue nearby; only the bunny statue is facing away from the pool at right-angles. If the bunny faced towards the pool, great – clearly it’s a sacred spring which the Rabbitfolk use for cleansing rituals, or something like that, and would be a perfect place to later transplant the sugarbells they gift you or farm some of their strange, ancient fruit. But with the bunny facing away, chances are that it’s just a bunny statue near a pool of water (of course the player can intervene and change the terrain, but that’s the player driving/creating the narrative not the narrative driving the gameplay.) Or, in another example, the Gary face appears in the middle of a field where it’s more of an obstruction than anything else; had it spawned in the mountains or an ancient forest instead it would have been much more ominous.

It’s easy to say “would have, could have, should have” on cases like this, but really, I just hope this hindsight is used in future games from this genre. Proc-gen and handcrafted elements can be uneasy bedfellows when they’re sprinkled together haphazardly; but if there’s a method behind the placement of those hand-crafted surprises then it can be absolutely amazing. After all, procedural doesn’t mean random (as much as the two are commonly conflated… I suspect the influence of Minecraft has something to say for this; although even Minecraft is learning this lesson – C/F new biome-based villages and Pillager outposts spawning near villages to create mini-narratives.)

Tile-based map design has something in common with this idea of “randomised proc-gen with overlayed non-random/reactive elements”, since the tiles naturally lend themselves to inter-linked features. And I remember a highly theoretical discussion in these forums when landmarks first debuted about the idea of dungeon complexes and such where a landmark creates further landmarks (via summon stones) which “branch off it.” That kind of potential hasn’t been tapped at all really, and I’m really excited to see what some game will eventually do with it.

The key is just to convince someone to start out their map creation with the explicit concept of “create a world where randomly allocated features interlink to create novel stories for the player to explore” rather than “use randomness to prevent monotony.” While it’s more of a mouthful, I suspect it might lead to a more intuitive map design toolset – instead of having to guesstimate how variables (e.g. noise thresholds and spawn weights) will interact, there’s more room to explicitly cultivate certain features.

Again, it’s nice to think about in hindsight… now someone just has to take the lesson and apply it to a game hahaha.

2 Likes

Lots of good points there - and yes, I hope other games (in all genres) learn a little something from us ; D.

Strongly agree with this. Your overall concept of narrative-driven proc-gen terrain is really cool, definitely something I will suggest if I am at a company making this type of terrain again ; D. Your suggestion is actually a step above what I was saying - I just wanted the ability to place a landmark where I “want”, like into a cliff or in a clearing or whatever. SH doesn’t know what a “clearing” is, nor does it understand that there is a cliff or change in elevation, etc. : /. Not that someone couldn’t figure it out somehow, but we just didn’t have time : (. Taking it a step further and having multiple landmarks that “talk” to each other when setting up would be pretty neat. Not sure how much benefit there would be for the play, but it seems like a reasonably small amount of work. Honestly the map is too large, having a smaller map with more focused and intentionally placed assets would only help imo.

Not quire related, but I found out (super late in Stonehearth’s production) that originally SH’s terrain editor was designed to allow the player to “draw” on some sort of map tool that would then generate terrain around their drawings (like: this line is a mountain, this line is a body of water, etc.). Not the same, but still really interesting. The feature was never finished (and may never had been started), but it was a goal they had at one point.

This is totally possible, though that seems like a really hacky implementation that would have a lot of limitations (and require extra work). However, I think it wouldn’t be that hard to write something in code that allowed the random placement of rooms with a lot more detail and control.
But there would be other issues which SH never solved - like fog of war underground. You could easily ‘inspect’ the whole dungeon just by having a hearthling walk around on the surface above it.
Plus a dungeon in general would have all sorts of issues with the concept of how SH represents itself visually. Meaning - what kind of “trap” would you find in a room that the player wouldn’t be able to easily sidestep/avoid/deal with? The idea of exploring a dungeon kinda turns all of SH on its head ; D. But, its a fun space to think in!

1 Like

I’m not sure but it sounds like @YetiChow is referring to a suggestion I made in a discussion. In that case the thought was to just add one or a few rooms at a time. You get your soldiers to the entrance, click on the entrance (a door or dark opening or something) and click a button to enter. The rooms are added, the enemies are fought and you get your soldiers to the entrance of the next part.
This way fog of war wouldn’t be a problem. At least not underground. You would be clearing it above ground if you hadn’t already.
It would stop you from mining directly to the treasure at the end since the end isn’t there yet. If you mine too close to an entrance so that it can’t spawn the next part then the entrance will turn out to have collapsed.
To stop the player from dealing with challenges too easily (by building or mining) workers could be restricted from entering a room until it’s safe. It would be nice to have challenges that required workers or crafters though, to involve more people than just the soldiers.

I think I suggested it just before landmarks was announced, so I wasn’t thinking of using landmarks as rooms. I just thought of it as making holes in the terrain in whatever shape that didn’t intersect anything else and throw in some props and enemies/npcs.

@BrunoSupremo was interested in trying it. Don’t know if he had the time yet.

1 Like

Wow! That’s a cool idea : ). You’re going to run into a bunch of issues though (off the top of my head anyway) when needing to verify that there is space to create rooms. Even if its way underground, you could accidentally be overwriting another landmark or scenario or something else. However, you could make a map that was specifically tailored to have this sort of dungeon generation, which sounds cool : ). I think you’d still have issues spawning creatures though - I did create a landmark that spawns some wolves in the arctic, but its cheating because the wolves are just base stats. You can’t spawn a creature which has a … something something… sorry, I can’t remember what its called. Enemy stat override? Classes and weapons and such. However, you may be able to write up new enemies and use them (maybe?).

As I said, cool idea - just be prepared to deal with a lot of edge cases : D.

1 Like

Some of that could be accomplished with the new evolve capabilities we’re adding in the next ACE update. I don’t want to type it all up right now though. :stuck_out_tongue:

2 Likes