Modding:Modding Efficiently: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
(10 intermediate revisions by 3 users not shown)
Line 2: Line 2:


* Use macros! Switching from/to creative/survival mode and <code>/time set day</code> bound to a keyboard shortcut is a must have. Hit CTRL+M to open the macro manager which will let you set those up!
* Use macros! Switching from/to creative/survival mode and <code>/time set day</code> 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 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. You can quickly reload a world using the shortcut <code>CTRL+F1</code>
* Don't reload at all if you are doing trial&error on textures and shape files. These can be reloaded with the commands <code>.reload textures</code> and <code>.reload shapes</code>. The latter may require you to place&remove a block so that the chunk gets redrawn
* Don't restart/rejoin at all if you are doing trial&error on textures and shape files. These can be reloaded with the commands <code>.reload textures</code> and <code>.reload shapes</code>. 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. <code>VintageStory.exe -oTestWorld -p3</code> - this will insta-launch you into a super flat creative world named "TestWorld"
* Set up a quickstart.bat script, that contains e.g. <code>VintageStory.exe -oTestWorld -pcreativebuilding</code> - 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 :-)
* Leave your mod unpacked in the mods folder! No need to zip it up, it'll load up just fine unpacked :-)
* 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.  
* 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 want to create json patches, you can use ModMaker 3000™, a command line tool that ships with the game, to build the patches for you
* If you are doing programming tasks
* If you are doing programming tasks
** Use break points for debugging.  
** Use break points for debugging
** Browse through the many utility classes provided by the VS API, you might be able to save a lot of coding efforts! (e.g. [https://github.com/anegostudios/vsapi/blob/master/Math/ColorUtil.cs ColorUtil], [https://github.com/anegostudios/vsapi/blob/master/Math/GameMath.cs GameMath], [https://github.com/anegostudios/vsapi/blob/master/Util/ArrayExtensions.cs ArrayExtensions], [https://github.com/anegostudios/vsapi/blob/master/Util/DictExtensions.cs DictExtensions], [https://github.com/anegostudios/vsapi/blob/master/Util/HashsetExtensions.cs HashsetExtensions], [https://github.com/anegostudios/vsapi/blob/master/Util/JsonUtil.cs JsonUtil], [https://github.com/anegostudios/vsapi/blob/master/Util/JsonUtil.cs ReaderWriterExtensions], [https://github.com/anegostudios/vsapi/blob/master/Util/SerializerUtil.cs SerializerUtil], [https://github.com/anegostudios/vsapi/blob/master/Util/WildcardUtil.cs WildcardUtil]
** You can use edit&continue feature of Visual Studio to modify code while the game is running!
** You can use edit&continue feature of Visual Studio to modify code while the game is running!
** If you don't already use the [https://github.com/anegostudios/vsmodexamples/blob/master/RedirectLogs.cs RedirectLogs] mod during testing to see the log output live in the Visual Studio output window
** If you don't already use the [https://github.com/anegostudios/vsmodexamples/blob/master/RedirectLogs.cs 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 <code>.reload shaders</code>
** If you are working with shaders, you can reload them with <code>.reload shaders</code>
** If you do not use Visual Studio, you may have limited success with the <code>/reloadmods</code> command to reload source code mods during runtime.
** If you do not use Visual Studio, you may have limited success with the <code>/reloadmods</code> command to reload source code mods during runtime.
Confirmedusers, Bureaucrats, editor, Administrators
1,778

edits