Modding:JSON Patching: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 72: Line 72:
In this second example, we'll skip straight to the path. You'll notice the label '''drops''' and then a dash. '''Dash -'''
In this second example, we'll skip straight to the path. You'll notice the label '''drops''' and then a dash. '''Dash -'''


This dash means add to the front of the array. This is useful because it prevents us from overwriting another drop and we may not know the number of drops if other mods added drops as well.
This dash means append to the end of the array. This is useful because it prevents us from overwriting another drop and we may not know the number of drops if other mods added drops as well.


For the value, there is an entire section showing that the value doesn't just have to be a number or text. In this case, we added the stick to the drops but by specifying a domain in front of stick like we do for the file it could be a stick from any mod!
For the value, there is an entire section showing that the value doesn't just have to be a number or text. In this case, we added the stick to the drops but by specifying a domain in front of stick like we do for the file it could be a stick from any mod!
Confirmedusers, Bureaucrats, editor, Administrators
1,778

edits