Confirmedusers
711
edits
m (Contents) |
m (→Assets) |
||
Line 21: | Line 21: | ||
== Assets == | == Assets == | ||
[[File:VisualStudioOpenAssetsFolderInExplorerNeat.png|right|frameless]] | |||
Before you get started with any coding, it is important that you create the assets for your new trampoline block. | |||
In Visual Studio, the assets folder is easy to access from the ''solution explorer.'' Right click on the folder called ''assets'', and then select ''Open Folder in File Explorer''. This will open the assets folder for your mod, which is an identical format to the assets folder in content mods. The opened assets folder should only contain another folder labeled ''vstutorial''. | |||
You need to add a few asset files for the trampoline. As always, these can be downloaded from GitHub [https://github.com/Nateonus/vsmodexamples/releases/tag/CodeSimpleBlock here]. | |||
The downloaded zip file contains a folder called ''vstutorial.'' Copy this folder over your own, and the asset files will be added. You can verify this by going back to Visual Studio, looking at the solution explorer, and expanding the assets folder. You should now have a trampoline block type, as well as a lang and texture file. | |||
Run the game, launch a world, and check the creative menu. You should see the trampoline block. It looks fancy, but has absolutely no functionality yet. | |||
{| class="wikitable mw-collapsible mw-collapsed" | |||
|Playing Vintage Story in fullscreen mode? | |||
|- | |||
|It is '''highly recommended''' to run the game in windowed mode when making code mods. If your code results in an error, Visual Studio will attempt to gain focus, and Vintage Story will stop responding. You can press F11 to easily switch between the fullscreen and windowed modes. | |||
|} | |||
</translate> | </translate> | ||
{{navbox/codemodding}} | {{navbox/codemodding}} |