Cryzone1 Posted August 31 Report Posted August 31 Im looking to create some custom structures for players to find, how do all the Meta blocks work? i have a general idea of the spawner block but stuff like the music, filler, above ground etc does not have enough information on how to use them. for example is it possible to add blocks that would "generate" as normal terrain to make a structure import into terrain seamlessly, or the opposite of forcing a area to generate air for underground structures
Solution Professor Dragon Posted August 31 Solution Report Posted August 31 (edited) EDIT - Read the "EDIT EDIT" first I've left the prior rantings here in case useful ________________________________________ I don't know if there is a lot of information out there. I'm guessing that our modders over at the modding forum might be in this category. Use Cntrl F4 to see Meta blocks, then manipulate them in Creative Mode. One place to start would be to look at code from an existing Mod that makes extensive use of Meta blocks, and try and understand what they are doing. I think* that the Mod "Better Ruins" is the premiere example in class. It might be too big to learn from, but it would also contain a wealth of information. This is the only other thread on this forum that I found a snippet of information on Meta Blocks. The Command Handbook (.chb) may advise on specific commands, but you kind of need to know what you're looking for. P.D. * I'm not sure. For example, here is a code snippet from their stackrandomizer-betterruins.json. "maxstacksize": 1, "texture": { "base": "item/meta/randomizer/{type}" }, "creativeinventory": { "meta": ["*"] }, "materialDensity": 600 EDIT Sorry. Maybe someone else with experience sees this thread. I haven't given as much information as I would have liked by a long shot, and I've used up your "0 replies" counter which may have attracted more responses. I've tried playing around in Creative, and I can't even interact with the "Meta (Music)" block in place, unlike the other Meta blocks, so I dunno. ___________________________________________________________ EDIT EDIT Ah. Bug reports to the rescue! Found out how to use the Meta (Music) Block by searching the Issue Tracker on that keyword. I suggest you try the same for the other blocks. For example: https://github.com/anegostudios/VintageStory-Issues/issues/4379 This is how it SHOULD work - just read through the notes on the thread for the wrinkles. I also found you can get help on these Meta blocks via the "help" command as follows. For example, for the Meta Music block, the help command is: /help dev musictrigger Professor Dragon Edited August 31 by Professor Dragon 1
Cryzone1 Posted September 1 Author Report Posted September 1 Thank you! A couple of the metablocks like pathway and above ground i assume to be specifically used for generating structures during worldgen
Professor Dragon Posted September 1 Report Posted September 1 1 hour ago, Cryzone1 said: Thank you! A couple of the metablocks like pathway and above ground i assume to be specifically used for generating structures during worldgen You could be right about the worldgen part. There is an Issue logged for the meta block pathway not connecting the structure to a cave, and it includes sample code (worth having a look at). The structure schematics are included in a section called "worldgen." Unfortunately, I am NOT a modder. In over my head here, honestly. Can't help but think if this thread was in the modding section, you maybe might have got help from someone with more skill and less enthusiasm. Best I can recommend is to experiment a bit more, search through existing Mods and the modding guides, and see how people have used these commands.
Novadegree Posted Sunday at 12:08 PM Report Posted Sunday at 12:08 PM (edited) Idk about using Meta blocks for seamless integration but you can look at this code for some tips. I use the meta air blocks to try and keep rooms filling with grass and dirt. These lines: "rockTypeRemapGroup" and "replacewithblocklayers" are the terrain blenders so to say. if you want to try and blend your structure more to the surrounding terrain just build the terrain into your schematic, IE if you want your house on a hill, build the house on a hill and export the whole thing as one schematic. I'm new to modding myself so take my advice with a grain of halite. Feel free to use my mod to experiment with, it's drag and drop as far as schematics go, change the code, try different code, re-name some things and make it your own (with your own structures). I hope it helps you on your modding journey. [ // FIRST ENTRY: Adds the temperate/standard empty village structure { "op": "add", // The operation type: appends new data "path": "/structures/-", // Target array path; the "-" means "insert at the end" "value": { "code": "temperatevillage", // Unique internal identifier for this specific structure "group": "emptyvillage", // Group name; helps control spawning limits with similar structures "mingroupdistance": 2500, // Minimum distance (in blocks) required between structures of this group "chance": 0.5, // 50% probability that the game tries to spawn it in an eligible region "placement": "surface", // Dictates where it spawns; generates on top of the terrain "mintemp": 0, // Minimum temperature requirement for the biome (0°C) "maxtemp": 25, // Maximum temperature requirement for the biome (25°C) "minrain": 0.25, // Minimum rainfall multiplier required (0.25 = moderate moisture) "maxrain": 1.0, // Maximum rainfall multiplier allowed (1.0 = heavy rain/wet biomes) "minforest": 0.25, // Minimum forestation density requirement for the biome "maxforest": 1.0, // Maximum forestation density allowed (can spawn in dense woods) "suppresstrees": true, // Deletes existing trees in the spawn zone so they don't clip into buildings "suppresswaterfalls": true, // Stops nearby water sources from generating messy waterfalls over the town "schematics": ["surface/evillages/*"], // Path to the folder containing the physical .json blueprint designs "offsety": -1, // Sinks the structure 1 block into the ground for a natural foundations look "rockTypeRemapGroup": "standard", // Automatically adapts structural stones to match local biome rock types (use granite blocks) "replacewithblocklayers": [ // Flags specific schematic blocks to dynamically match the surrounding biome "game:soil-medium-normal" // Swaps medium-fertility grassy soil out for local sand, snow, or native grass ], "blockmapping": { "game:meta-filler": "game:air" // Converts structural placeholder blocks from the schematic into empty air } }, "file": "game:worldgen/structures.json" // The target core file that this modding patch modifies }, Edited Sunday at 12:21 PM by Novadegree 1
Recommended Posts