Modding/Tutorial/Adding Badge Equipment

The following guide covers how to add equipment badges to the uboat as a skin.

Setup Unity Project (see modding)

1. Create a Mask To Be applied to a in game texture
	1. Make a texture called: TestBadge.png
	2. Import into Unity
		* The path of your custom texture or mask should be placed in the same location as the original texture
		* Take note of the GUID id within TestBadge.png.meta
		* Ensure within Inspector: Texture Type: Default
		* Ensure within Inspector: Alpha Is Transparency is enabled

Note:

* If Applying a Mask on top of the texture ( ie a Badge texture) the badge only needs to be visible on the mask the rest of the texture can be left transparent
* If completely replacing a texture ensure you use the original texture as a reference
* The Mask Should Match the same image height and width of the Texture it is being applied to otherwise you will have to account for the scale difference (if the original texture is 1024px by 1024px our mask should be the same size)
* For large textures crunch compression (Medium Quality should be applied)

Create New Empty Game Object

1. Select GameObject>Create Empty
	* Lets call the game object 'Badge TestBadge'

* Transform: <Leave alone>

* Add Game Object Prefab Script Component to Game Object (Add Component: Search > Game Object Prefab)
	+ Prefab Path: Equipment/Badge TestBadge
	+ Children
		- Size: 1
		- Element 0:
			* ID: 0
			* Game Object: 'Badge TestBadge'

Note: you must have at least one Child Object (Size: 1 or more) to see the Element 0 in the Inspector

* Add Skin Script Component to Game object (Add Component: Search > Skin)
	+ Type: <blank is fine>
	+ Affected Equipment Slots
		- Size: 1
		- Element 0: Conning Tower
	+ Replacement Data
		- Size: 4 ( in this case it is for the 4 Conning Tower Textures we will be applying a mask to)
		- Element 0: 84aaf432495408b40892be127bff4c5b [Conning Tower Albedo Texture]
			* Replaced Albedo GUID: 84aaf432495408b40892be127bff4c5b
			* Mask GUID: abc123 <The GUID of 'TestBadge.png'>
			* Metallicity Occlusion Smoothness GUID: abc123 <The GUID of 'TestBadge.png'>
			* Metallicity Occlusion Smoothness GUID: <in this case blank>
			* Normal Map GUID: <in this case blank>
			* Height Map GUID: <in this case blank>
		- Element 2: cf9764f5b673a5d49b710ed9aafc537a [Conning Tower Turm I Albedo Texture]
		- Element 3: a969b1c64a5d3f841a3e152909b81697 [Conning Tower Turm II Albedo Texture]
		- Element 4: c075f5ad848b69d4faf6ff19afff0896 [Conning Tower Turm IV Albedo Texture]

> Note: if creating a replacement submarine skin, uboat interior, flag, or entirely replacing the textures of a material you will likely need to provide all of the new GUIDS for each of the requested GUIDS.
>
>

1. Bring in Game Object Prefab into Assets/Packages/<mod name>/Equipment

Ensure you have a working or recreated Assets/Packages/<mod name>/Manifest

* If it is working: Tools > Validate Asset Bundles Manifests
* If not
	+ delete the default Manifest
	+ RMC>Create>Asset Bundle Descriptor
	+ Tools > Validate Asset Bundles Manifests
* Ensure Assets/Packages/<mod name>/Manifest contains items for your TestBadge.png and Equipment/Badge TestBadge

Create Equipment Data

within Assets/Mods/<Mod Name>/DataSheets:

* Create Entities.xlsx
	+ Create an Equipment tab + Header row (use vanilla game data sheets as a template only don't include vanilla data unless you know what you are doing)
	+ Create a record for your equipment

* Create Sandbox.xlsx
	+ Create a Tasks Tab + Header row (use vanilla game data sheets as a template only don't include vanilla data unless you know what you are doing)
	+ Create Production record for your Equipment
	+ Create Research record for your Equipment (Optional)

* Create Locals.xlsx
	+ Create Activators Tab + Header Row
		- Add Badge Locals (Key + Description values)

Tools>Build Mod

Enable Mod in Launcher

Run Game with Mod [ Uboat Inspector ]

* within Assets Tab:
	+ Ensure you can see your custom in <Texture Path>/TestBadge.png
	+ Ensure you can see your custom Equipment: Equipment/Badge TestBadge

Additional Note: Creating a Badge will allow you to equip the badge to the uboat. however in order to un-equip the badge you must also make a "empty" badge equipment (with a blank .png texture) so that the player can select the blank badge equipment to return the hull to the original state.