User:Nateonus

From Vintage Story Wiki
This page contains changes which are not marked for translation.
Other languages:

Welcome to the most important page on the wiki. This is where all the magic happens.


So, navigation needs to be seperated into tiny little navboxes with hierachical lists. Problem is, what is the hierachy?

Obviously, the parent of all is 'Modding'.

  • Modding Basics
  • Content Mods
  • Code Mods
  • Asset Types
  • VS Model Creator
  • Troubleshooting
  • Engine Details
Modding the Game
Vintage Story is created in a way that allows anyone to add their own content to the game. For more information and where to begin, visit the Getting Started modding page. The links below will take you to various landing pages for modding subjects.
Content Mods Code Mods Other



Modding the Game

Please read the Using The Modding Wiki guide before continuing.

Code Modding

Links:



Modding Basics


Modding the Game

Please read the Using The Modding Wiki guide before continuing.

Navbox without translate markers: <noinclude> <languages/> </noinclude>__NOTOC__ {| class="wikitable frontbasegame" style="background: #EAD3B3; border: 2px solid; border-color: #382b1e;" |+ ! valign="top" style="background-color: #5E462A; color: #EAD3B3; text-align: center;| <translate> Modding the Game</translate> |- |<gallery widths="250" mode="nolines" style="text-align: center;" heights="200"> File:Wrench-copper.png|'''[[:Category:Modding:Basics|<big><translate>Modding Basics</translate></big>]]'''|link=Category:Modding:Basics File:Log-oak.png|'''[[:Category:Modding:Content|<big><translate>Content Mods</translate></big>]]'''|link=Category:Modding:Content File:Conditionalblock.png|'''[[:Category:Modding:Code|<big><translate>Code Mods</translate></big>]]'''|link=Category:Modding:Code File:Cloth-plain.png|[[:Category:Modding:Asset Types|'''<big><translate>Asset Types</translate></big>''']]|link=Category:Modding:Asset Types File:Grid Copper pickaxe.png|[[:Category:Modding:Model Creator|'''<big><translate>VS Model Creator</translate></big>''']]|link=Category:Modding:Model Creator File:Creature-drifter-double-headed.png|[[:Category:Modding:Troubleshooting|'''<big><translate>Troubleshooting</translate></big>''']]|link=Category:Modding:Troubleshooting File:Gear-rusty.png|[[:Category:Modding:VS Engine|'''<big><translate>Engine Details</translate></big>''']]|link=Category:Modding:VS Engine </gallery> |}


Testing patches

With errors

The game is generally very good at highlighting not only the fact that a patch is broken but also pinpointing the exact location of the error.

Let's suppose that you recreated the wolf patch found in Advanced Patching as an exercise but accidentally used the array index "8" instead of the correct index "9".

When you load into a world with the patch mod activated, you will immediately notice an error printed in the Story log. For your convenience, this information can also be found in the "server-main" log file.

server-main.log
[Error] Patch 0 (target: game:entities/land/wolf-male.json) in mymodid:patches/wolfdamageanddrops.json failed because supplied path /server/behaviors/8/aitasks/0/damage is invalid: The json path /server/behaviors/8/aitasks/0/damage was not found. Could traverse until /server/behaviors/8, but then 'aitasks' does not exist. Full json at this path: {
 "code": "emotionstates",
 "states": [
   {
     "code": "fleeondamage",
     "duration": 60,
     "chance": 0.75,
     "slot": 2,
     "priority": 5,
     "accumType": "max",
     "whenHealthRelBelow": 0.3
   },
   {
     "//comment": "Full json abridged for your convenience."
   }
 ]
}

While this error message might be overwhelming at first, in it you will find all the information needed to fix your patch.

To make this example easier, highlighted in bold you will find the most important information.

Patch 0 tells you which patch in a file causes an error. Like array indices (or sections), patches start counting at 0. Consequently, this means that "Patch 0" is the first patch in the file.
This is already valuable information because your wolf patch file contains two patches.

mymodid:patches/wolfdamageanddrops.json. This section tells you the exact location of the patch file itself. In this example you can see that the faulty patch can be found in the mod with the mod ID "mymodid", inside a folder called "patches", with the name "wolfdamageanddrops".

Could traverse until /server/behaviors/8, but then 'aitasks' does not exist.. This line tells you that the game was able to follow the path you provided until a certain point, at which it then failed to locate "aitasks", attaching data it found instead. With this information, you know that you made an error directly after "/server/behaviors/", which you now can use to navigate your target file to investigate where you went wrong.