Modding:Modding Efficiently: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
Line 23: Line 23:
* 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])
* 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])
* If you don't know it already, the [https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/ LINQ] extension, part of the .net framework, is an extremely powerful tool to make code more expressive.
* If you don't know it already, the [https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/working-with-linq LINQ] extension, part of the .net framework, is an extremely powerful tool to make code more expressive.
* Use the [https://devblogs.microsoft.com/dotnet/introducing-net-hot-reload/ Hot reload] feature of Visual Studio to modify code while the game is running, to see your changes immediately without restarting the world.
* Use the [https://devblogs.microsoft.com/dotnet/introducing-net-hot-reload/ Hot reload] feature of Visual Studio to modify code while the game is running, to see your changes immediately without restarting the world.
** Note that this feature works if you use the [[Modding:Setting_up_your_Development_Environment|official mod template]] and set up your mod as a "compiled" mod. It does not work if you set up your mod as a "source" mod, and it may not work with all other development environment setups.
** Note that this feature works if you use the [[Modding:Setting_up_your_Development_Environment|official mod template]] and set up your mod as a "compiled" mod. It does not work if you set up your mod as a "source" mod, and it may not work with all other development environment setups.
Confirmedusers, Bureaucrats, editor, Administrators
1,795

edits