Modding:Basic Modding Examples: Difference between revisions

From Vintage Story Wiki
No edit summary
Line 3: Line 3:
== Changing sleep duration in beds ==
== Changing sleep duration in beds ==


Beds in the Vanilla game are pretty limited, more often than not players want to skip the whole night. To change that open the file <code>assets/blocktypes/wood/generic/bed.json</code>
Beds in the Vanilla game are pretty limited, more often than not players prefer to skip the whole night. To achieve that open the file <code>assets/blocktypes/wood/generic/bed.json</code>


Line 7-11 should contain these lines:
Line 7-11 should contain these lines:
Line 15: Line 15:


The <code>sleepEfficiency</code> attribute is specific to the bed. In this case a value of 1 means the player can sleep half the day. The hay bed has a value of 0.25, which means the player can sleep for 12 * 0.25 = 3 in-game hours. Change the value to anything between 0...1 and start the game or leave and re-enter your singleplayer world. Next time you sleep in the bed you will be skipping that amount of time.
The <code>sleepEfficiency</code> attribute is specific to the bed. In this case a value of 1 means the player can sleep half the day. The hay bed has a value of 0.25, which means the player can sleep for 12 * 0.25 = 3 in-game hours. Change the value to anything between 0...1 and start the game or leave and re-enter your singleplayer world. Next time you sleep in the bed you will be skipping that amount of time.


== Playing around with world generation ==
== Playing around with world generation ==
Confirmedusers, Bureaucrats, editor, Administrators
1,778

edits