Open wormzjl opened 6 years ago
The filler is what Lost Cities will use to close doors if needed and to fill the ground level for the bottommost part of the building. It is usually the same block you would use for the outer walls.
The range indicates for which levels that part is appropriate and selectable. So if you want a certain part to be only used in levels 1 to 5 for example you could do that with range.
Metadata is specific data that depends on the context on how it should be interpreted. For highway parts there is a meta 'support' that is used for the block to support highway bridges to the ground below. z1 and z2 I don't remember atm. That's a bit exotic. With 'dontconnect' you can make building floors that don't connect (through doors) to adjacent building parts. The 'nowater' meta for parts indicates that empty space inside the part should not be filled with water in case the part is submerged in water.
When there are multiple parts for a single condition (like the 4 parts with "top"=true) then that means the system will pick one randomly. This is always the case. When a condition (like range, top, ...) results in multiple matches a random one is selected. The shopping center is a 2x2 building (meaning it is 2x2 chunks). But every chunk is described independent from the others.
yes you can use parts with private palettes and integrate them into a city.
Thank you very much for your detailed reply. I've tried to add a "palette" for my custom building like this
{ "type": "building", "name": "building6", "filler": "#", "palette": [ { "char": "D", "block": "minecraft:dirt" }, { "char": "G", "block": "minecraft:grass" }, { "char": "e", "block": "minecraft:concrete" }, { "char": "C", "block": "minecraft:chest", "loot": "chestloot" } ], "parts": [ { "top": false, "part": "p0" }, { "top": false, "part": "p1" }, { "top": false, "part": "p2" }, { "top": false, "part": "p3" }, { "top": true, "part": "p4" } ] },
However I'm still getting java.lang.RuntimeException: Could not find entry 'e' in the palette for part 'p2'!
error.
Must the palette be put under the definition of "part" not the "building"?
Hello McJty, recently I’ve been working on a project which aims at adding customized structures to the lost cities, but I’m having difficulties understanding some elements in the asset files. Since these information cannot be found on the wiki and I’m not really good at understanding the code, could you please explain a bit how stuff works ?
Here are my questions : • One can find that there is a "Filler" property in buildings definition, what does it represent actually?
• Same as the "range" property in many building assets, for example shopping00_r1 part which is associated with building shopping00, in file library.json. My first guess is that there is a chest somewhere in this part, but after checking the specific part it does not appear to be so.
• In building parts definitions, there is a property called meta and is normally associated with a "dontconnect" boolean key. Also in stairs definition the meta is associated with "z1" "z2" which is an integer. What does they represent in the system ?
• For the shopping center multibuilding, I see that it’s composed of 4 different buildings : shopping00, shopping01, shopping10, shopping11. My question is how does these 4 buildings, alone with its parts, assembled into a single multibuilding ? For example, the building shopping00, shopping01 and shopping10 has 4 parts with "top" = true (one building with 4 tops ?), but the building shopping11 only have 1 part with "top" = true. Also shopping01, shopping10 and shopping11 have "parts2" property, while shopping00 doesn’t have such. This appears to be a bit mysterious for me.
• A big question : is there a simple way of integrating customized structure (with modded blocks) exported with lc_exportbuilding command into existing assets ? So far as I understood It’s not as easy as putting the exported json file into the assets list, one have to make a compatible "palette" first. But with many modded blocks I’m not sure if the charecters that can be used in the palette is enough, since the palette is associated with the citystyle. So could a fixed, standalone building be associated with its private palette and integrated into cities?
Thank you !