Difference between revisions of "SDK URP Upgrade Guide"

From Holdfast: Nations At War
Jump to navigation Jump to search
Line 5: Line 5:
 
* Fixed models using URP-shaders (modded uniforms, custom props) not throwing shadows.
 
* Fixed models using URP-shaders (modded uniforms, custom props) not throwing shadows.
 
* Fixed missing shadows in SDK and artifacts on modbundle trees.
 
* Fixed missing shadows in SDK and artifacts on modbundle trees.
 +
* Fixed modbundle browser filter logic being inverted.
 
* Added "Deprecated" filter to modbundle browser.
 
* Added "Deprecated" filter to modbundle browser.
 
* Added Empire props to modbundle.
 
* Added Empire props to modbundle.

Revision as of 15:15, 15 March 2024

v2.17 (WIP)

Changelog

  • Fixed officer lines drawing over modded uniforms.
  • Fixed models using URP-shaders (modded uniforms, custom props) not throwing shadows.
  • Fixed missing shadows in SDK and artifacts on modbundle trees.
  • Fixed modbundle browser filter logic being inverted.
  • Added "Deprecated" filter to modbundle browser.
  • Added Empire props to modbundle.
  • Updated some miscellaneous props in the modbundle.
  • Updated "Uniform System Window":
    • Added generic first person model support (See new settings: "Default First Person Model", "Default First Person Cuff Color", "Default First Person Sleeve Color").
    • Removed "PersonalFaction" enum, the UI that required this has been removed.
    • Renamed "Uniform Data" to "Uniform Random Variants"
    • Removed "Uniform Sprite" from "Uniform Random Variants", they weren't being used.
    • Renamed "Class Sprite" to "Uniform Sprite".
    • Renamed "Class Greyed Out Sprite" to "Head Sprite".
    • "Voice Language" is now disabled if "Faction" is not a Frontlines faction.
    • "Head Sprite" is now disabled if "Use Global Head System" is enabled.
    • "Special Carryable Object" is now disabled if "Player Class" is incompatible.
    • Clarified tooltips to match the new in-game UI.

Uniform Mods

It's no longer necessary to create a first person model per modded uniform. You can now pick from 4 generic first person models (2 Nations At War & 2 Frontlines) and a variety of color variants. This is an optional change, if your modded uniform includes a custom first-person model, that model will be used instead.

The new first person models allow us to dedicated more texture space and mesh detail to the pieces of the character that the first person camera actually sees. In addition, it uses less memory as we can now recycle the same model for all the uniforms. We recommend that modded uniforms make use of the new system.

v2.15

Unity Upgrade

Upgrade your Unity Editor from version 2020.3.34f1 to 2022.3.11f1.

  1. Backup your project files! Move your "old" SDK folder to another location! We don't recommend an in-place upgrade
  2. Update the SDK
  3. Move your mods back to the new SDK
  4. Follow the flow charts below

Changelog

  • Upgraded the SDK from "Built-In Render Pipeline" to "Universal Render Pipeline"
  • Removed MicroSplat from the SDK, the free version only exists for the "Built-In Pipeline", for URP you need to purchase the asset.
  • Removed "Holdfast" shaders, since all their functionality is now natively supported by URP.
  • Added support for using assets from the modbundle as grass on terrain (Add script "HoldfastModTerrainGrassData" to your terrain).
  • Removed requirement for "greyed out" sprite for uniforms, these are no longer used ingame.
  • Added Austria to FactionCountry enum (this time for real).
  • Added support for uploading to Beta workshop from the SDK.
  • Added support for dedicated servers to download from the Beta workshop. From the command line (takes priority): -betaWorkshop. From the server config: use_beta_workshop [true/false].
  • Added interfaces "IHoldfastGame" and "IHoldfastSharedMethods" for calling native game methods.
» Instead of injecting commands into the game console UI element, use "IHoldfastSharedMethods.ExecuteConsoleCommand(...)". This method returns if the console command executed successfully, the output and [optional] parsing exception for error handling.
» This new interface allows us to expose native game methods directly to modders, without having to rely on rc commands.

Uniform & Flag Mods

How to upgrade uniform and flags to URP

Mod Maps

How to upgrade maps to URP

Script Mods

How to upgrade scripts to URP

Glossary

* Common Shaders list

For backwards compatibility, these are auto-converted on mod load to URP shaders. This doesn't work for every case, so we recommend rebuilding your mod using URP shaders.

  • Holdfast/Standard (Specular setup) - Stencil 15
  • Holdfast/Standard - Stencil 15
  • Holdfast/Standard (Specular setup) Double Sided - Stencil 15
  • Holdfast/Standard Double Sided - Stencil 15
  • Holdfast/Cloth-DoubleSided - Stencil 15
  • Standard (Specular setup)
  • Standard
  • Mobile/Bumped Specular
  • Mobile/Bumped Diffuse
  • UBER - Specular Setup/ Core
  • UBER - Metallic Setup/ Core
  • UBER - Metallic Setup/2 Sided/ Core
  • Cloth-DoubleSided
  • Legacy Shaders/Diffuse
  • Legacy Shaders/Bumped Diffuse
  • Legacy Shaders/Specular
  • Legacy Shaders/Bumped Specular

** Converting materials to URP

We upgraded our SDK from the "Built-in Render Pipeline" (BP) to the "Universal Render Pipeline" (URP), this means the old materials & shaders will no longer work.

If your materials no longer render or they are pink, this indicates that they are incompatible with URP.

Use Unity's upgrade tool (Edit>Rendering>Materials>Convert Selected Built-In Materials to URP) to automatically convert "built-in" materials to their URP counterparts, this only works for Unity standard shaders.

If you use the old Holdfast shaders, for example "Holdfast/Standard - Stencil 15", first convert them to "Standard" then use the Unity upgrade tool (Edit>Rendering>Materials>Convert Selected Built-In Materials to URP).

If you use 3rd party assets you'll need to obtain the URP version from the Unity store and then remap the materials manually.

*** Reporting script mod issues

We switched from Unity 2020 to 2022, alongside which, Mono was updated. We also swapped from ".NET Framework" to ".NET Standard 2.1". This might have an impact on how your mod operates.

If the behaviour of your script mod has changed, isolate the issue in a small example mod and send the source-code to us. Note: We won't guarantee a patch and won't be looking into issues without a replication project.