Three per-race item chains had accumulated uncommitted. They land together because FactionMerchantCatalog.cs carries hunks from all three and cannot be split without interactive staging. Skadi (new this session): - SkadiNokkel - "Skadis Nokkel", a StaffSkeleton clone recoloured to ice, stripped of its eitr and health costs and of the skeleton summon, opening an ice-blue portal to a troll cave the player claims as their own. Crafted at the forge after Moder from a 1500-coin Greater Frost Heart, a DragonTear and a TrophySkeleton. - SkadiFrostHeart - the bought leg of that recipe, sold by the Cultist bench. - SkadiHollow / SkadiHollowPortal - claims one existing TrollCave02 in the Black Forest, half a world radius out and south of the equator, and opens a linked local portal pair to it. - RaceCaveBuilding - Skadi and Trol may build inside any troll cave. Two facts worth keeping, both paid for the hard way: - a troll cave counts as a DUNGEON, so the flag that refuses a piece there is the per-piece Piece.m_allowedInDungeons, not the per-location Location.m_noBuild. Player.m_placementStatus names the exact refusal reason and is now logged. - Object.DestroyImmediate is forbidden inside an animation event callback, and a staff cast runs in one - it fails silently there. Also carried in, from earlier sessions and unverified in game: - Dvergar contract bank and barrel (DvergarBanco*, DvergarBotte*) - Fenrir Ulvsblod trough (FenrirMangiatoia*) - the Wolf -> Ulv merchant bench move, so tameable wolves stop answering the E key with a shop window Status: compiles clean with no new warnings. The Skadi chain has NOT been confirmed working in game - the most recent fix to the troll cave detection is still untested. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
158 lines
11 KiB
XML
158 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project Sdk="Microsoft.NET.Sdk">
|
|
<PropertyGroup>
|
|
<OutputType>Library</OutputType>
|
|
<TargetFramework>net48</TargetFramework>
|
|
<RootNamespace>RacesOfValheim</RootNamespace>
|
|
<AssemblyName>RacesOfValheim</AssemblyName>
|
|
<FileAlignment>512</FileAlignment>
|
|
<Deterministic>true</Deterministic>
|
|
<LangVersion>10</LangVersion>
|
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
<Optimize>false</Optimize>
|
|
<DebugSymbols>true</DebugSymbols>
|
|
<DebugType>full</DebugType>
|
|
<WarningLevel>4</WarningLevel>
|
|
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
|
<Optimize>true</Optimize>
|
|
<DebugType>pdbonly</DebugType>
|
|
<WarningLevel>4</WarningLevel>
|
|
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<Reference Include="assembly_utils">
|
|
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Valheim\valheim_Data\Managed\assembly_utils.dll</HintPath>
|
|
</Reference>
|
|
<Reference Include="assembly_valheim">
|
|
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Valheim\valheim_Data\Managed\assembly_valheim.dll</HintPath>
|
|
</Reference>
|
|
<!-- Needed by SkadiHollow: ZoneSystem.ZoneLocation.m_prefab is a SoftReference<GameObject>,
|
|
and touching any member of it (Load/Asset/IsLoaded) does not compile unless the assembly
|
|
that declares SoftReference<T> is referenced. Nothing else in the mod uses it yet. -->
|
|
<Reference Include="SoftReferenceableAssets">
|
|
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Valheim\valheim_Data\Managed\SoftReferenceableAssets.dll</HintPath>
|
|
</Reference>
|
|
<!-- Jotunn 2.29.2 references a Unity module this build of Valheim no longer ships, and the
|
|
unresolvable reference warned on every build. Nothing here uses it. -->
|
|
<Reference Remove="UnityEngine.ProfilerModule" />
|
|
<Reference Include="System" />
|
|
<Reference Include="System.Core" />
|
|
<Reference Include="System.Xml.Linq" />
|
|
<Reference Include="System.Data.DataSetExtensions" />
|
|
<Reference Include="Microsoft.CSharp" />
|
|
<Reference Include="System.Data" />
|
|
<Reference Include="System.Xml" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<None Include="app.config" />
|
|
<None Include="packages.config" />
|
|
<None Include="README.md" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="BepInEx.Core" Version="5.4.21" />
|
|
<PackageReference Include="JotunnLib" Version="2.29.2" />
|
|
<!-- net48 reference assemblies as a NuGet package, so the plain .NET SDK can build this
|
|
without a Visual Studio install supplying the targeting pack. Build-time only: it
|
|
contributes nothing to the shipped DLL. -->
|
|
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup>
|
|
<!-- Both of these came from machine-level environment variables, which a fresh clone (or a
|
|
fresh PC) does not have: VALHEIM_INSTALL expanded to nothing, so every path built from
|
|
it started at the drive root and the build died on the first Copy. Default them to the
|
|
standard Steam install, and leave the environment variables able to override for anyone
|
|
who keeps Valheim somewhere else. -->
|
|
<VALHEIM_INSTALL Condition="'$(VALHEIM_INSTALL)' == ''">C:\Program Files (x86)\Steam\steamapps\common\Valheim</VALHEIM_INSTALL>
|
|
<BEPINEX_PATH Condition="'$(BEPINEX_PATH)' == ''">$(VALHEIM_INSTALL)\BepInEx</BEPINEX_PATH>
|
|
<VALHEIM_MANAGED>$(VALHEIM_INSTALL)/valheim_Data/Managed</VALHEIM_MANAGED>
|
|
<!-- Jotunn publicizes the game assemblies into valheim_Data\Managed\publicized_assemblies and
|
|
then references them. It reads this flag out of DoPrebuild.props, which its Paths.props
|
|
imports through $(SolutionDir) - undefined on a plain `dotnet build` of this project, so
|
|
the flag never arrived, the publicizer never ran, and every build warned about ten
|
|
references it could not resolve. Run it exactly when its output is missing: once on a
|
|
fresh machine, never again, and -p:ExecutePrebuild=true still forces it after a game
|
|
update. -->
|
|
<ExecutePrebuild Condition="!Exists('$(VALHEIM_MANAGED)/publicized_assemblies/assembly_valheim_publicized.dll')">true</ExecutePrebuild>
|
|
<!-- The one place the built mod is deployed. -->
|
|
<PLUGINS_PATH>$(BEPINEX_PATH)\plugins</PLUGINS_PATH>
|
|
<!-- SolutionDir is only defined when msbuild is handed a .sln, so it expanded to
|
|
"*Undefined*" and broke the packaging target on a plain `dotnet build` of this
|
|
project. The repo root is always one level above the project. -->
|
|
<REPO_ROOT>$(ProjectDir)..\</REPO_ROOT>
|
|
<UNITY_FOLDER>$(REPO_ROOT)JotunnModStubUnity</UNITY_FOLDER>
|
|
<!-- The Unity stub project only matters when authoring assets in the editor, and its copy
|
|
step rewrites a folder full of game assemblies on every single build. Opt in with
|
|
-p:CopyAssembliesToUnity=true when you actually need it. -->
|
|
<CopyAssembliesToUnity Condition="'$(CopyAssembliesToUnity)' == ''">false</CopyAssembliesToUnity>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="CopyToUnity">
|
|
<Message Text="Copy assemblies to Unity" Importance="high" />
|
|
<Copy SourceFiles="$(BEPINEX_PATH)/core/BepInEx.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(BEPINEX_PATH)/core/0Harmony.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(BEPINEX_PATH)/core/Mono.Cecil.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(BEPINEX_PATH)/core/MonoMod.Utils.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(BEPINEX_PATH)/core/MonoMod.RuntimeDetour.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(TargetDir)Jotunn.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(TargetDir)$(TargetName).dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(TargetDir)$(TargetName).pdb" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<!-- mdb generation doesn't work from portable pdbs, which are the only kind supported under Linux -->
|
|
<Copy Condition="Exists('$(TargetDir)$(TargetName).dll.mdb')" SourceFiles="$(TargetDir)$(TargetName).dll.mdb" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/Assembly-CSharp.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/assembly_valheim.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/assembly_utils.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/assembly_postprocessing.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/assembly_sunshafts.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/assembly_guiutils.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/assembly_lux.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/assembly_simplemeshcombine.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/assembly_googleanalytics.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/PlayFab.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/PlayFabParty.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/Splatform.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/Splatform.Steam.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/gui_framework.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/com.rlabrecque.steamworks.net.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
<Copy SourceFiles="$(VALHEIM_MANAGED)/SoftReferenceableAssets.dll" DestinationFolder="$(UNITY_FOLDER)/Assets/Assemblies" />
|
|
</Target>
|
|
|
|
<Target Name="JotunnPostBuildTask" AfterTargets="Build">
|
|
<CallTarget Targets="CopyToUnity" Condition="'$(CopyAssembliesToUnity)' == 'true' And Exists('$(UNITY_FOLDER)')" />
|
|
</Target>
|
|
|
|
<!-- The mod's only deployment target: BepInEx\plugins. Runs for Debug as well as Release, so
|
|
the build-and-launch loop needs no second step. -->
|
|
<Target Name="DeployToValheim" AfterTargets="Build">
|
|
<Warning Text="BepInEx plugins folder not found at $(PLUGINS_PATH) - the DLL was built but not deployed." Condition="!Exists('$(PLUGINS_PATH)')" />
|
|
<Message Text="Deploying $(TargetName).dll to $(PLUGINS_PATH)" Importance="high" Condition="Exists('$(PLUGINS_PATH)')" />
|
|
<Copy SourceFiles="$(TargetDir)$(TargetName).dll" DestinationFolder="$(PLUGINS_PATH)\" Condition="Exists('$(PLUGINS_PATH)')" />
|
|
</Target>
|
|
|
|
<Target Name="PackageThunderstore" AfterTargets="Build" Condition="'$(Configuration)'=='Release'">
|
|
<PropertyGroup>
|
|
<PackageOutputDir>$(REPO_ROOT)dist\</PackageOutputDir>
|
|
</PropertyGroup>
|
|
<MakeDir Directories="$(PackageOutputDir)" Condition="!Exists('$(PackageOutputDir)')" />
|
|
<Message Text="Packaging Thunderstore and Nexus zips into $(PackageOutputDir)" Importance="high" />
|
|
<!-- The version is read back out of manifest.json rather than duplicated here, so
|
|
manifest.json stays the single place a release is numbered. Written with string
|
|
concatenation because MSBuild would eat a PowerShell $(...) subexpression. -->
|
|
<Exec Command="powershell -NoProfile -Command "$v = (Get-Content '$(ProjectDir)..\manifest.json' -Raw | ConvertFrom-Json).version_number; Compress-Archive -Path '$(TargetDir)$(TargetName).dll', '$(ProjectDir)..\manifest.json', '$(ProjectDir)..\README.md', '$(ProjectDir)Package\icon.png' -DestinationPath ('$(PackageOutputDir)RacesOfValheim_Thunderstore_' + $v + '.zip') -Force; Compress-Archive -Path '$(TargetDir)$(TargetName).dll' -DestinationPath ('$(PackageOutputDir)RacesOfValheim_Nexus_' + $v + '.zip') -Force"" />
|
|
</Target>
|
|
|
|
|
|
<Target Name="JotunnPostBuildTaskUnix" AfterTargets="Build" Condition=" '$(OS)' == 'Unix' ">
|
|
<Exec Command="sh "$(SolutionDir)scripts/publish.sh" --target "$(ConfigurationName)" --target-path "$(TargetDir)" --target-assembly "$(TargetFileName)" --valheim-path "$(VALHEIM_INSTALL)" --deploy-path "$(MOD_DEPLOYPATH)" --project-path "$(ProjectDir)"" />
|
|
</Target>
|
|
</Project>
|