Modding:Preparing For Code Mods: Difference between revisions

From Vintage Story Wiki
(Created page.)
 
(Started writing...)
Line 4: Line 4:
__FORCETOC__
__FORCETOC__


This page is in progress. Please come back later.
There is a small number of steps that must be followed before you can create a code mod. These steps only have to be done once - If you have completed this tutorial before, you may start from [[Modding:Creating A Code Mod|Creating a Code Mod]]. For more information on what can be achieved with a code mod, see [[Modding:Code Mods|Code Mods]].


'''This tutorial is suitable for Windows users'''. If you are using a differing operating system, please view the older [[Modding:Setting up your Development Environment|Setting up your Development Environment]] tutorial page.
== Installing an IDE ==
When developing a code mod, it is extremely important to choose a suitable IDE. For Vintage Story, it is highly recommended that you use [https://visualstudio.microsoft.com/vs/community/ Visual Studio Community] - A free and powerful development environment that is used by the Vintage Story team to develop the game. When installing Visual Studio, you should also install the '''.NET desktop development''' workload, which can be done during installation or by following [https://learn.microsoft.com/en-us/visualstudio/install/modify-visual-studio?view=vs-2022 these steps]. 
Although some other IDEs are suitable, this tutorial will assume you are using Visual Studio. If you cannot use Visual Studio, please view the older [[Modding:Setting up your Development Environment|Setting up your Development Environment]] tutorial page.
== Installing .NET 7.0 SDK ==
An '''SDK''' (Software Development Kit) is used to help you develop programs and code for specific platforms. Since Vintage Story relies on the '''.NET 7.0 SDK''', it is important that you download and install this too. This SDK is sometimes referred to as ''dotnet.''
Download and install the latest [https://dotnet.microsoft.com/en-us/download/dotnet/7.0 .NET 7.0 SDK], ensuring you select the version that is correct for you. This will likely be the ''Windows x64'' version.
When the SDK has finished installing, it is recommended to check it has installed. Launch a command prompt in Windows, either by searching for '<nowiki/>''cmd''<nowiki/>' or '''powershell''<nowiki/>' in Windows' search bar, and enter the following command:<syntaxhighlight lang="powershell">
dotnet --list-sdks
</syntaxhighlight>This should give you a list of installed SDKs. If there is an entry that starts with ''7.0.,'' then you may continue.
{| class="wikitable mw-collapsible mw-collapsed"
|SDK not showing or getting an error?
|-
|Restart your PC, and redo the given command in the command prompt or powershell. If it is still not visible, then repeat the installation for this section.
|}
</translate>
</translate>
{{Navbox/codemodding}}
{{Navbox/codemodding}}

Revision as of 08:39, 20 May 2024

Other languages:
  • English

This page was last verified for Vintage Story version 1.19.8.


There is a small number of steps that must be followed before you can create a code mod. These steps only have to be done once - If you have completed this tutorial before, you may start from Creating a Code Mod. For more information on what can be achieved with a code mod, see Code Mods.

This tutorial is suitable for Windows users. If you are using a differing operating system, please view the older Setting up your Development Environment tutorial page.

Installing an IDE

When developing a code mod, it is extremely important to choose a suitable IDE. For Vintage Story, it is highly recommended that you use Visual Studio Community - A free and powerful development environment that is used by the Vintage Story team to develop the game. When installing Visual Studio, you should also install the .NET desktop development workload, which can be done during installation or by following these steps.

Although some other IDEs are suitable, this tutorial will assume you are using Visual Studio. If you cannot use Visual Studio, please view the older Setting up your Development Environment tutorial page.

Installing .NET 7.0 SDK

An SDK (Software Development Kit) is used to help you develop programs and code for specific platforms. Since Vintage Story relies on the .NET 7.0 SDK, it is important that you download and install this too. This SDK is sometimes referred to as dotnet.

Download and install the latest .NET 7.0 SDK, ensuring you select the version that is correct for you. This will likely be the Windows x64 version.

When the SDK has finished installing, it is recommended to check it has installed. Launch a command prompt in Windows, either by searching for 'cmd' or 'powershell' in Windows' search bar, and enter the following command:

dotnet --list-sdks

This should give you a list of installed SDKs. If there is an entry that starts with 7.0., then you may continue.

SDK not showing or getting an error?
Restart your PC, and redo the given command in the command prompt or powershell. If it is still not visible, then repeat the installation for this section.
Icon Sign.png

Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.

Modding
Modding Introduction Getting Started Theme Pack
Content Modding Content Mods Developing a Content Mod Basic Tutorials Intermediate Tutorials Advanced Tutorials Content Mod Concepts
Code Modding Code Mods Setting up your Development Environment
Property Overview ItemEntityBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsWorld properties
Workflows & Infrastructure Modding Efficiency TipsMod-engine compatibilityMod ExtensibilityVS Engine
Additional Resources Community Resources Modding API Updates Programming Languages List of server commandsList of client commandsClient startup parametersServer startup parameters
Example ModsAPI DocsGitHub Repository