diff --git a/JotunnLib/BuildProps/JotunnBuildTask.props b/JotunnLib/BuildProps/JotunnBuildTask.props index 8fd1c879f..868fbad9e 100644 --- a/JotunnLib/BuildProps/JotunnBuildTask.props +++ b/JotunnLib/BuildProps/JotunnBuildTask.props @@ -2,10 +2,13 @@ - + + + + diff --git a/JotunnLib/BuildProps/JotunnLib.props b/JotunnLib/BuildProps/JotunnLib.props index 2efe7df04..02576ae77 100644 --- a/JotunnLib/BuildProps/JotunnLib.props +++ b/JotunnLib/BuildProps/JotunnLib.props @@ -1,425 +1,16 @@  - - - This project needs a Environment.props file with the path to your Valheim installation. See https://github.com/Valheim-Modding/JotunnModStub. {0} is missing. - - - - + true - - - $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_googleanalytics_publicized.dll - false - - - $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_guiutils_publicized.dll - false - - - $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_lux_publicized.dll - false - - - $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_postprocessing_publicized.dll - false - - - $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_simplemeshcombine_publicized.dll - false - - - $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_steamworks_publicized.dll - false - - - $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_sunshafts_publicized.dll - false - - - $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_utils_publicized.dll - false - - - $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_valheim_publicized.dll - false - - - False - false - $(VALHEIM_INSTALL)\BepInEx\core\BepInEx.dll - - - False - false - $(VALHEIM_INSTALL)\BepInEx\core\BepInEx.Harmony.dll - - - False - false - $(VALHEIM_INSTALL)\BepInEx\core\BepInEx.Preloader.dll - - - False - false - $(VALHEIM_INSTALL)\BepInEx\core\HarmonyXInterop.dll - - - $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_googleanalytics.dll - false - - - $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_guiutils.dll - false - - - $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_lux.dll - false - - - $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_postprocessing.dll - false - - - $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_simplemeshcombine.dll - false - - - $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_steamworks.dll - false - - - $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_sunshafts.dll - false - - - $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_utils.dll - false - - - $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_valheim.dll - false - - - $(VALHEIM_INSTALL)\unstripped_corlib\Mono.Security.dll - false - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AccessibilityModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AIModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AndroidJNIModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AnimationModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ARModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AssetBundleModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AudioModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ClothModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ClusterInputModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ClusterRendererModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.CoreModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.CrashReportingModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.DirectorModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.DSPGraphModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.GameCenterModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.GridModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.HotReloadModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ImageConversionModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.IMGUIModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.InputLegacyModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.InputModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.JSONSerializeModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.LocalizationModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ParticleSystemModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.PerformanceReportingModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.Physics2DModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.PhysicsModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ProfilerModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ScreenCaptureModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SharedInternalsModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SpriteMaskModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SpriteShapeModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.StreamingModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SubstanceModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SubsystemsModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TerrainModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TerrainPhysicsModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TextCoreModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TextRenderingModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TilemapModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TLSModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UI.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UIElementsModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UIModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UmbraModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UNETModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityAnalyticsModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityConnectModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityTestProtocolModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestAssetBundleModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestAudioModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestTextureModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestWWWModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.VehiclesModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.VFXModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.VideoModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.VRModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.WindModule.dll - - - False - false - $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.XRModule.dll - - + - - + - + \ No newline at end of file diff --git a/JotunnLib/BuildProps/JotunnLibRefs.props b/JotunnLib/BuildProps/JotunnLibRefs.props new file mode 100644 index 000000000..5fff5074c --- /dev/null +++ b/JotunnLib/BuildProps/JotunnLibRefs.props @@ -0,0 +1,405 @@ + + + + $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_googleanalytics_publicized.dll + false + + + $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_guiutils_publicized.dll + false + + + $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_lux_publicized.dll + false + + + $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_postprocessing_publicized.dll + false + + + $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_simplemeshcombine_publicized.dll + false + + + $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_steamworks_publicized.dll + false + + + $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_sunshafts_publicized.dll + false + + + $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_utils_publicized.dll + false + + + $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_valheim_publicized.dll + false + + + False + false + $(VALHEIM_INSTALL)\BepInEx\core\BepInEx.dll + + + False + false + $(VALHEIM_INSTALL)\BepInEx\core\BepInEx.Harmony.dll + + + False + false + $(VALHEIM_INSTALL)\BepInEx\core\BepInEx.Preloader.dll + + + False + false + $(VALHEIM_INSTALL)\BepInEx\core\HarmonyXInterop.dll + + + $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_googleanalytics.dll + false + + + $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_guiutils.dll + false + + + $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_lux.dll + false + + + $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_postprocessing.dll + false + + + $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_simplemeshcombine.dll + false + + + $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_steamworks.dll + false + + + $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_sunshafts.dll + false + + + $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_utils.dll + false + + + $(VALHEIM_INSTALL)\BepInEx\plugins\MMHOOK\MMHOOK_assembly_valheim.dll + false + + + $(VALHEIM_INSTALL)\unstripped_corlib\Mono.Security.dll + false + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AccessibilityModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AIModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AndroidJNIModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AnimationModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ARModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AssetBundleModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AudioModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ClothModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ClusterInputModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ClusterRendererModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.CoreModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.CrashReportingModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.DirectorModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.DSPGraphModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.GameCenterModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.GridModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.HotReloadModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ImageConversionModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.IMGUIModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.InputLegacyModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.InputModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.JSONSerializeModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.LocalizationModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ParticleSystemModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.PerformanceReportingModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.Physics2DModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.PhysicsModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ProfilerModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ScreenCaptureModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SharedInternalsModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SpriteMaskModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SpriteShapeModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.StreamingModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SubstanceModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SubsystemsModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TerrainModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TerrainPhysicsModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TextCoreModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TextRenderingModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TilemapModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TLSModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UI.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UIElementsModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UIModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UmbraModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UNETModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityAnalyticsModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityConnectModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityTestProtocolModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestAssetBundleModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestAudioModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestTextureModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestWWWModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.VehiclesModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.VFXModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.VideoModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.VRModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.WindModule.dll + + + False + false + $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.XRModule.dll + + + \ No newline at end of file diff --git a/JotunnLib/Documentation/index.md b/JotunnLib/Documentation/index.md index 29473d62e..35fbaebf6 100644 --- a/JotunnLib/Documentation/index.md +++ b/JotunnLib/Documentation/index.md @@ -7,12 +7,15 @@ Jötunn (/ˈjɔːtʊn/, "giant"), the Valheim Library was created with the inten We have lots of features planned for the future, and did hold back on what we wanted to release with so that we could focus on house keeping post-merger, however I hope the features we have implemented thus far prove to be a useful base and provide an idea of the consistency we aim to deliver moving forwards. ## Source code -The source code for Jötunn (and the accompanying test/demo mod) is available on GitHub, [here](https://github.com/Valheim-Modding) +The source code for Jötunn (and the accompanying test/demo mod) is available on [GitHub](https://github.com/Valheim-Modding). + +## Getting started +A quick overview of the prerequisites to start using Jötunn for beginners and advanced users can be found [here](tutorials/getting-started.md). ## Tutorials -This section contains tutorials on how to get started with using JötunnLib, and how to create a basic mod. View it [here](tutorials/intro.md) +This section contains tutorials on how to get started with Valheim modding using Jötunn. View it [here](tutorials/intro.md) -_note: the tutorial uses the [Mod Stub](https://github.com/Valheim-Modding/JotunnModStub) to work towards creating the final [Example mod](https://github.com/Valheim-Modding/JotunnModExample)._ +_note: the tutorial uses the [Mod Stub](https://github.com/Valheim-Modding/JotunnModStub) to work towards creating the final [Example mod](https://github.com/Valheim-Modding/JotunnModExample) from scratch. If you just want to look up some of the concepts of Jötunn skip the intro part and browse to the specific topic you are interested in._ ## Conceptual This section contains information about how Valheim itself works, as well as how JötunnLib interfaces with the game. There likely will not be many code examples here, but rather high level overviews of how various systems work. View it [here](conceptual/intro.md) diff --git a/JotunnLib/Documentation/tutorials/getting-started.md b/JotunnLib/Documentation/tutorials/getting-started.md index 30f39c8b1..1b180f976 100644 --- a/JotunnLib/Documentation/tutorials/getting-started.md +++ b/JotunnLib/Documentation/tutorials/getting-started.md @@ -1,5 +1,10 @@ -# Getting started +# Getting started +If you already have a mod for Valheim and want to switch to Jötunn or did use legacy JötunnLib or ValheimLib before all you need to do is to install the latest release of Jötunn from [nuget.org](https://www.nuget.org/packages/JotunnLib) into your project and start using it. Jötunn uses [MMHooks](https://github.com/MonoMod/MonoMod), so make sure you have build the detour dlls and reference them in your project. + +Jötunn offers some PreBuild tasks to automate certain housekeeping duties for you. Skip the first part if you already have an environment setup but still want to learn about the automations. + +If you want step-by-step instructions to start a Valheim mod from scratch using Jötunn continue reading as we guide you through the process of setting up everything you need to get going. ## Development Environment @@ -14,9 +19,12 @@ * In visual studio, in the right hand toobar, select `Git Changes`, and then `Clone Repository`, and paste the URL provided by the previous step. Name your project and place it accordingly.
![VS Clone forked stub](../images/getting-started/vs-CloneForkedStub.png) -* Browse to your solution directory. Create a new file called `Environment.props` and place the following contents inside, modifying your `` to point to your game directory. Right click on your project in the solution explorer, and select reload project: +## Setting up Jötunn PreBuild automations + +### Add project references + +Jötunn can automatically set references to all important libraries needed to mod the game on your project. To use this feature browse to your solution directory. Create a new file called `Environment.props` and place the following contents inside, modifying your `` to point to your game directory. This sets up references in your project to BepInEx, the publicized dlls, the unstripped corlibs from Unity and MMHook dlls. -Example: ```xml @@ -27,10 +35,11 @@ Example: ``` +**WARNING:** *This prebuild task will add references to your current project. If you already have setup that references it most certainly will duplicate them.* -If you want the publicised and MMHOOK dlls automatically created, then set `ExecutePrebuild` in [DoPrebuild.props](https://github.com/Valheim-Modding/JotunnModStub/blob/master/DoPrebuild.props) to true. If you opt not to utilise this automation, it is suggested that you generate your method detours and publicised assemblies, and add them to your projects references manually. +### Publicize and MMHook Valheim assemblies -**WARNING:** *This prebuild task will automate the generation of monomod method detours and publicising of game assemblies. By enabling this, you understand that you will be generating new publicised assemblies and method detours upon PreBuild **IF** the binaries have been updated since the last time the PreBuild has run.* +If you want the publicised and MMHOOK dlls automatically created, then set `ExecutePrebuild` in [DoPrebuild.props](https://github.com/Valheim-Modding/JotunnModStub/blob/master/DoPrebuild.props) to true. Create that file if you are not using the ModStub but still want Jötunn to create the Hooks for you. If you opt not to utilise this automation, it is suggested that you generate your method detours and publicised assemblies, and add them to your projects references manually. ```xml @@ -41,20 +50,17 @@ If you want the publicised and MMHOOK dlls automatically created, then set `Exec
``` +**WARNING:** *This prebuild task will automate the generation of monomod method detours and publicising of game assemblies. By enabling this, you understand that you will be generating new publicised assemblies and method detours upon PreBuild **IF** the binaries have been updated since the last time the PreBuild has run.* +### Manual setup -**NOTE**: If for whatever reason you disable the prebuild, you will need to: +If for whatever reason you disable the prebuild, you will need to: - acquire and install [HookGen](https://valheim.thunderstore.io/package/ValheimModding/HookGenPatcher/) - launch the game to generate event wrappers - add the `/BepInEx/plugins/MMHook/assembly_*` files to your project references. -- grab the [Assembly Publiciser](https://github.com/CabbageCrow/AssemblyPublicizer) *(drag drop your `/BepInEx/plugins/MMHook/assembly_*` files ontop of the publiciser)* -- and add the resulting assemblies to your stub project. -- Build the stub, make sure it compiles and automates the postbuild tasks, producing compiled binaries in your plugin directory -- Create a new project template of this project. You will then be able to duplicate this project to create a multi-plugin solution, convenient for maintaining multiple mods. - -* Build your solution. Check your `BepInEx/plugins/yourtestmod/` folder for the `yourtestmod.dll.mdb` monodebug symbols file. - -* You may now proceed to one of the [Tutorials](intro.md) +- grab the [Assembly Publicizer](https://github.com/CabbageCrow/AssemblyPublicizer) *(drag drop your `/BepInEx/plugins/MMHook/assembly_*` files ontop of the publiciser)* and add the resulting assemblies to your stub project. +- Build the stub, make sure it compiles and automates the postbuild tasks, producing compiled binaries in your plugin directory `BepInEx/plugins/yourtestmod/` folder and also generated a `yourtestmod.dll.mdb` monodebug symbols file. +- You may now proceed to one of the [Tutorials](intro.md) ## Customising your project @@ -73,9 +79,9 @@ If you want the publicised and MMHOOK dlls automatically created, then set `Exec * Your project base is now ready for use! You can proceed to []() or select a specific section to learn about from our [Tutorials]() -# Build automations +# Post Build automations -Included in this repo are a PowerShell script `publish.ps1`. The script is referenced in the project file as a build event. Depending on the chosen configuration in Visual Studio the script executes the following actions. +Included in the ModStub and ModExample repos is a PowerShell script `publish.ps1`. The script is referenced in the project file as a post build event. Depending on the chosen configuration in Visual Studio the script executes the following actions. ## Building Debug diff --git a/JotunnLib/JotunnLib.csproj b/JotunnLib/JotunnLib.csproj index 85423dde4..4321d4618 100644 --- a/JotunnLib/JotunnLib.csproj +++ b/JotunnLib/JotunnLib.csproj @@ -62,23 +62,19 @@ $(VALHEIM_INSTALL)\valheim_Data\Managed\publicized_assemblies\assembly_valheim_publicized.dll false - - False + $(VALHEIM_INSTALL)\BepInEx\core\BepInEx.dll false - - False + $(VALHEIM_INSTALL)\BepInEx\core\BepInEx.Harmony.dll false - - False + $(VALHEIM_INSTALL)\BepInEx\core\BepInEx.Preloader.dll false - - False + $(VALHEIM_INSTALL)\BepInEx\core\HarmonyXInterop.dll false @@ -130,313 +126,258 @@ - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AccessibilityModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AIModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AndroidJNIModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AnimationModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ARModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AssetBundleModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.AudioModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ClothModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ClusterInputModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ClusterRendererModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.CoreModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.CrashReportingModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.DirectorModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.DSPGraphModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.GameCenterModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.GridModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.HotReloadModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ImageConversionModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.IMGUIModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.InputLegacyModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.InputModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.JSONSerializeModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.LocalizationModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ParticleSystemModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.PerformanceReportingModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.Physics2DModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.PhysicsModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ProfilerModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.ScreenCaptureModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SharedInternalsModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SpriteMaskModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SpriteShapeModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.StreamingModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SubstanceModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.SubsystemsModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TerrainModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TerrainPhysicsModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TextCoreModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TextRenderingModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TilemapModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.TLSModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UI.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UIElementsModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UIModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UmbraModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UNETModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityAnalyticsModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityConnectModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityTestProtocolModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestAssetBundleModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestAudioModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestTextureModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.UnityWebRequestWWWModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.VehiclesModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.VFXModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.VideoModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.VRModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.WindModule.dll false - False $(VALHEIM_INSTALL)\unstripped_corlib\UnityEngine.XRModule.dll false - + + + This project needs a Environment.props file with the path to your Valheim installation. See https://github.com/Valheim-Modding/Jotunn. {0} is missing. + + + + @@ -477,6 +418,7 @@ +