Modding:Modding Efficiently: Difference between revisions

From Vintage Story Wiki
No edit summary
No edit summary
Line 8: Line 8:
* Use <code>.tfedit</code> to modify the lookings of your item/block inside the GUI, Hands or on the ground - with live preview.
* Use <code>.tfedit</code> to modify the lookings of your item/block inside the GUI, Hands or on the ground - with live preview.
* Use <code>.bsedit</code> to edit block selection and collisionboxes ingame - with live preview.  
* Use <code>.bsedit</code> to edit block selection and collisionboxes ingame - with live preview.  
* Once you added a bunch of new content and want to properly name blocks and items you can use the command <code>/expclang</code> which will generate a neatly preformatted list of language entries destined for your en.json. The file generated will be called collectiblelang.json and placed in the folder where the VintageStory.exe is. It creates language entries for any block or item that currently has no translation.
* Use the <code>/expclang</code> command to generate a neatly pre-formatted list of language entries destined for your en.json, it's placed in a file named collectiblelang.json in the same folder where VintageStory.exe is. It creates language entries for any block or item that currently has no translation. Can save you a ton of time by not needing to handwrite your en.json file.
* Use the error reporter activated via <code>/errorreporter 1</code> to save yourself the work of finding and scouring through the log files for problems. This feature will make it so that a dialog pop ups during start up of the game if any errors were encountered.
* Use the error reporter activated via <code>/errorreporter 1</code> to save yourself the work of finding and scouring through the log files for problems. This feature will make it so that a dialog pop ups during start up of the game if any errors were encountered.
* If you are doing programming tasks
* If you are doing programming tasks

Revision as of 12:11, 28 February 2019

Modding and even Game development itself usually requires a lot of trial & error. The more time you can save on those iteration times the better, as it accumulates quickly. Besides being quick to start up, VS offers a bundle more tricks to help you mod fast and efficiently. Here are some of the tricks every serious modder should use:

  • Use macros! Switching from/to creative/survival mode and /time set day bound to a keyboard shortcut is a must have. Hit CTRL+M to open the macro manager which will let you set those up!
  • Don't fully restart the game to test out changes! In 95% of cases its enough to just leave the game world and rejoin or use ingame reload commands.
  • Don't restart/rejoin at all if you are doing trial&error on textures and shape files. These can be reloaded with the commands .reload textures and .reload shapes. The latter may require you to place&remove a block so that the chunk gets redrawn
  • Set up a quickstart.bat script, that contains e.g. VintageStory.exe -oTestWorld -p3 - this will insta-launch you into a super flat creative world named "TestWorld"
  • Leave your mod unpacked in the mods folder! No need to zip it up, i'll load up just fine unpacked :-)
  • Use .tfedit to modify the lookings of your item/block inside the GUI, Hands or on the ground - with live preview.
  • Use .bsedit to edit block selection and collisionboxes ingame - with live preview.
  • Use the /expclang command to generate a neatly pre-formatted list of language entries destined for your en.json, it's placed in a file named collectiblelang.json in the same folder where VintageStory.exe is. It creates language entries for any block or item that currently has no translation. Can save you a ton of time by not needing to handwrite your en.json file.
  • Use the error reporter activated via /errorreporter 1 to save yourself the work of finding and scouring through the log files for problems. This feature will make it so that a dialog pop ups during start up of the game if any errors were encountered.
  • If you are doing programming tasks
    • Use break points for debugging.
    • You can use edit&continue feature of Visual Studio to modify code while the game is running!
    • If you don't already use the RedirectLogs mod during testing to see the log output live in the Visual Studio output window
    • If you are working with shaders, you can reload them with .reload shaders
    • If you do not use Visual Studio, you may have limited success with the /reloadmods command to reload source code mods during runtime.