Modding:Basic Modding Examples: Difference between revisions

From Vintage Story Wiki
m
Add quotes to keys in json
(Marked this version for translation)
m (Add quotes to keys in json)
Line 55: Line 55:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
{
{
code: "meleeattack",
"code": "meleeattack",
entityCodes: ["player", "chicken-rooster", "chicken-hen", "chicken-baby", "hare-*"],
"entityCodes": ["player", "chicken-rooster", "chicken-hen", "chicken-baby", "hare-*"],
priority: 2,
"priority": 2,
damage: 8,
"damage": 8,
damageTier: 2,
"damageTier": 2,
damageType: "SlashingAttack",
"damageType": "SlashingAttack",
slot: 1,
"slot": 1,
mincooldown: 1500,  
"mincooldown": 1500,  
maxcooldown: 1500,  
"maxcooldown": 1500,  
attackDurationMs: 800,
"attackDurationMs": 800,
damagePlayerAtMs: 500,
"damagePlayerAtMs": 500,
animation: "Attack",
"animation": "Attack",
animationSpeed: 2.5,
"animationSpeed": 2.5,
sound: "creature/wolf/attack"
"sound": "creature/wolf/attack"
},
},
</syntaxhighlight>
</syntaxhighlight>
Line 80: Line 80:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
{
{
code: "seekentity",
"code": "seekentity",
entityCodes: ["player", "chicken-rooster", "chicken-hen", "chicken-baby", "hare-*"],
"entityCodes": ["player", "chicken-rooster", "chicken-hen", "chicken-baby", "hare-*"],
priority: 1.5,
"priority": 1.5,
movespeed: 0.045,
"movespeed": 0.045,
seekingRange: 15,
"seekingRange": 15,
belowTempSeekingRange: 25,
"belowTempSeekingRange": 25,
belowTempThreshold: -5,
"belowTempThreshold": -5,
animation: "Run",
"animation": "Run",
leapAtTarget: true,
"leapAtTarget": true,
leapAnimation: null,
"leapAnimation": null,
animationSpeed: 2.2,
"animationSpeed": 2.2,
leapChance: 0.01,
"leapChance": 0.01,
sound: "creature/wolf/growl",
"sound": "creature/wolf/growl",
whenNotInEmotionState: "saturated"
"whenNotInEmotionState": "saturated"
},
},
</syntaxhighlight>
</syntaxhighlight>
Line 104: Line 104:
<!--T:19-->
<!--T:19-->
Be sure to also apply the changes to the female wolf in <code>wolf-female.json</code>!
Be sure to also apply the changes to the female wolf in <code>wolf-female.json</code>!


== Playing around with world generation == <!--T:20-->
== Playing around with world generation == <!--T:20-->
Confirmedusers
27

edits