Modding:C Sharp Scripting: Difference between revisions

→‎Mod Development Setups: correct one piece of information and add cleanup note
No edit summary
(→‎Mod Development Setups: correct one piece of information and add cleanup note)
Line 35: Line 35:


== Mod Development Setups ==
== Mod Development Setups ==
{{Cleanup | These instructions were found to contain errors and need to be revised for further errors.}}
'''Modding Using Visual Studio Code (Quick Setup)'''
'''Modding Using Visual Studio Code (Quick Setup)'''


Follow these steps in order to get Visual Studio Code to correctly parse and include the base game methods in Intellisense and similar tools (assuming you have the C# VSCode Extension):
Follow these steps in order to get Visual Studio Code to correctly parse and include the base game methods in Intellisense and similar tools (assuming you have the C# VSCode Extension):


# On the Caves of Qud main menu, with Mouse Overlay UI toggled on, go to "Modding Utilities" and select "Generate JSON". This will automatically create a JSON file describing the setup needed that VSCode can read.
# On the Caves of Qud main menu, with Mouse Overlay UI toggled on, go to "Modding Utilities" and select "Write Mods.csproj File". This will automatically create an XML file describing the setup needed that VSCode can read.
#Find the Mods.json file in your CoQ Saves folder.
#Find the Mods.json file in your CoQ Saves folder.
#Move it to your main modding directory you intend to work from. It is not recommended that this be a mod folder itself, as that will include both this JSON and additional VSCode generated files in the mod itself - it is a better idea to keep mods in their own folders and place the JSON and other exterior files into a parent folder. If you want to keep your Mods folder tidy, you can create your individual Mod folder elsewhere and then create a hardlink/junction to that folder inside of the Mods folder.
#Move it to your main modding directory you intend to work from. It is not recommended that this be a mod folder itself, as that will include both this JSON and additional VSCode generated files in the mod itself - it is a better idea to keep mods in their own folders and place the JSON and other exterior files into a parent folder. If you want to keep your Mods folder tidy, you can create your individual Mod folder elsewhere and then create a hardlink/junction to that folder inside of the Mods folder.