Modding:Basic Modding Examples: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 43: Line 43:
Some examples what you can do:
Some examples what you can do:
Let's make the fire pit emit a red light and huge particles
Let's make the fire pit emit a red light and huge particles
- Open up blocktypes/wood/generic/firepit.json. There you can see the following line:
<ul>
<li>- Open up blocktypes/wood/generic/firepit.json. There you can see the following line:<br>
"firepit-lit": [7, 7, 17],
"firepit-lit": [7, 7, 17],
These are the Hue, Saturation and Brightness values according to the VS Light Wheel (hover over any pixel to see it's HSV Value). The brightness is how far the light will spread. I'll take [0, 7, 20]:
</li>
<li>
These are the Hue, Saturation and Brightness values according to the [http://tyron.at/vs/vslightwheel.html VS Light Wheel] (hover over any pixel to see it's HSV Value). The brightness is how far the light will spread. I'll take [0, 7, 20]:<br>
"firepit-lit": [0, 7, 20],
"firepit-lit": [0, 7, 20],
</li>


- On line 36 you should see this:
<li>- On line 36 you should see this:<br>
size: { avg: 0.25, var: 0 },
size: { avg: 0.25, var: 0 },
This determines the size of the cubic glowing particles the fire pit emits, let's up the size 8 times and add some randomness to it:
</li>
<li>This determines the size of the cubic glowing particles the fire pit emits, let's up the size 8 times and add some randomness to it:<br>
size: { avg: 2, var: 0.5 },
size: { avg: 2, var: 0.5 },
</li>


Save the file and restart the your singpleplayer world, place your lit fire pit and you should see this:
Save the file and restart the your singpleplayer world, place your lit fire pit and you should see this:


[[File:Moddedfirepit.png|300px]]
[[File:Moddedfirepit.png|300px]]
Confirmedusers, Bureaucrats, editor, Administrators
1,778

edits