Right. im at work, its hot outside and havent had a phonecall in half an hour: lets try to get a usefull thread up
i have been looking into landmarks and i think it might be good if there is a sort of “idiots guide” to new landmarks.
this first post will be me just sniffign around and noting down what i see, maybe we can work from there (and hopefully someone with more experience with them will chime in (@BrunoSupremo you used the system to make hidden treasure right?)
things ive noticed so far:
there are models for landmarks in
stonehearth\data\models\landmark\
i -think- they get converted into a sort of “blueprint” for the terrain engine so they get painted onto the scenery as mianble blocks. ( see stonehearth\stonehearth.zip\stonehearth\scenarios\static\landmarks, specifically a json and lua file that says qb_to_terrain. json/lua )
first thing to note: there are a bunch of landmarks i have never seen ingame before. probably require more large open terrain then i usualy deploy at.
second thing to note: wait, we have underground cave systems with rivers in them? am i seeing this right? ( i assume bright pink is “air” ?)
nex thought: every collor stands for a block or item, and this is probably defined in a constant somewhere
qb to terrain.json points at “landmark_block_types” : “stonehearth:landmark_blocks”
“landmark_blocks”: lives at “file(data/terrain/landmark_blocks.json)” acording to the manifest
and that json does indeed look at a blocks collor to see what goes where. we now get how the system works!-ish
to check my above assumption that garish pink is indeed air i dropper-tooled it (FF00FF = collor)
and checked that in the list over at data/terrain/landmark_blocks.json
garish pink is “null” which i am 99% sure is air.
why is there so much cool shit here i have never seen ingame?
a giant stup! now i want to have Ygrdrasil the world tree as a landmark AAAAAH
It is pretty simple.
Model is completely converted to terrain voxels with the same color. If you use grass color, that will be considered grass.
A few colors have special meaning though, like ff00ff will remove blocks, and 00ff00 will spawn a random tree. These special cases are all defined in the landmark_block_types.
You can create your own file with the color list and special cases and use that instead.
Through a mask qb you can give meaning to some colors that does not have one. If you need a corrupt area with purple grass, you can make your main qb have the grass color, and in the mask you paint it with the real grass color, so the game knows that the purple voxels should behave as such.
You can optimize the models, the big box in qb is just a guide a guess. All my models are tight with no extra space and it works.
i presume i can also just mix new codes into the existing one so i dont have to re-do the existing collors?
thanks, thats what i was hoping for (trying to keep my mod small, but its already 30 MB sheerly by the amount of stuff in it, and we cant use zipped versions for steam workshop afaik (which is only 2 mb))
Better, simple import the colors to your file using:
"mixins" : "stonehearth:landmark_blocks",
If you do the other way, where you insert new colors to the original file and use that file, you risk another mod doing the same and overwriting your colors.
Do you mean “wasteful” in that it is a large open matrix without much inside? Nope, that was just the standard size of the matrix which is started from (I included the basic ‘template’ assets in the landmarks folder, like “64x_temperate”). I optimized some when I exported them, but not others (I was rushing to get these out and didn’t do them cleanly : /). Its not the end of the world to have a large empty matrix, but it does makes loading the file slower. Whats REALLY bad is when you have 50 matrices, each with all that empty space - like the titan had at one point. That is HUGELY wasteful and bad, this is just kinda bad but not really ; D.
True but it kinda is for mods (since we don’t have the luxury of exporting zipped mods and people’s ram isn’t infinite
Just wanted to know so I can optimise my own stuff ( some of your. Qb files do have to stay a certain size to not cause issues for instance, specifically stuff hearthlings wear, quivers that kinda stuff
That’s why I asked
It really isn’t a big deal - all this empty space is only loaded the moment the landmark is loaded in, then it goes away. That’s why its not a big deal. Even with the Titan who was a horribly large file before, after he loaded he was also fine. But you’re correct, you should optimize for quick loads : ).
Landmarks can’t spawn things after their creation, though we did recently add the ability for encounters to spawn landmarks and then you can spawn anything else you want with the encounter system. That code hasn’t gone out yet though, probably won’t get out til December.
Alternatively, if you don’t want to go through the extra coding to make a component to spawn entities from a single entity, make an unique entity that triggers an encounter and spawns on that landmark