Modding:Content Tutorial Simple Worldgen: Difference between revisions

From Vintage Story Wiki
m
no edit summary
mNo edit summary
mNo edit summary
Line 78: Line 78:


If you run the game with your mod, you will be able to see sticks generating most places in the surface. If you want to increase the spawn rate, increase the value of the ''chance'' property.
If you run the game with your mod, you will be able to see sticks generating most places in the surface. If you want to increase the spawn rate, increase the value of the ''chance'' property.
{| class="wikitable mw-collapsible mw-collapsed"
!loosesticks.json
|-
|<syntaxhighlight lang="json">
[
{
"comment": "Single loose sticks everywhere",
"blockCodes": [ "game:loosestick-free" ],
"minTemp": -2,
"minForest": 0,
"quantity": {
"avg": 4,
"var": 2
},
"chance": 3
}
]
</syntaxhighlight>
|}


=== Underground Bones ===
=== Underground Bones ===
Line 85: Line 104:
"comment": "Lots of bones and carcasses underground",
"comment": "Lots of bones and carcasses underground",
}
]
</syntaxhighlight>This file will be very similar to the previous one - Add in the following for the blockcodes, the quantity, and the chance.<syntaxhighlight lang="json">
"blockCodes": [ "game:bonyremains-cowskull-up", "game:bonyremains-ribcage", "game:drycarcass-humanoid1", "game:drycarcass-humanoid2", "game:drycarcass-tiny", "game:drycarcass-small", "game:drycarcass-medium", "game:drycarcass-large" ],
"quantity": {
"avg": 1,
"var": 0
},
"chance": 120,
</syntaxhighlight>So this will add in a random carcass or bony remains. Using a quantity average of 1 with a var of 0 means this will always spawn a single carcass.
There exists some further criteria for blockpatches. An additional ''placement'' property will allow you to define a more specific criteria on where the worldgen will place things. <syntaxhighlight lang="json">
"placement": "Underground"
</syntaxhighlight>This particular value will allow the blocks to be placed underground. Since there is now a much larger area to work with, the ''chance'' property for this entry is considerably higher. The following values can be used for placement:
* ''ReplaceSurface''
* ''OnSurface'' (Default)
* ''NearWater''
* ''Anywhere''
* ''Underground''
* ''UnderWater''
* ''NearSeaWater''
* ''UnderSeaWater''
* ''UnderTrees''
* ''OnTrees''
* ''OnSurfacePlusUnderTrees''
When this is specified, you can test the mod. You should begin seeing carcasses and other bones spawning underground.
{| class="wikitable mw-collapsible mw-collapsed"
!bones.json
|-
|<syntaxhighlight lang="json">
[
{
"comment": "Lots of bones and carcasses underground",
"blockCodes": [ "game:bonyremains-cowskull-up", "game:bonyremains-ribcage", "game:drycarcass-humanoid1", "game:drycarcass-humanoid2", "game:drycarcass-tiny", "game:drycarcass-small", "game:drycarcass-medium", "game:drycarcass-large" ],
"quantity": {
"avg": 1,
"var": 0
},
"chance": 120,
"placement": "Underground"
}
}
]
]
</syntaxhighlight>
</syntaxhighlight>
|}


== Conclusion ==
== Conclusion ==
Confirmedusers
637

edits