Jump to content

[Help Request] Player ship's shields recolor


tholwin

Recommended Posts

Hello,

 

I'm trying to do a "simple" mod to replace the player ship's default shields, with blue ones (same design, just a recolor).

(This is my first attempt at modding with Blacksmith and Forger.)

 

 

 

I've located the diffuse maps. (with Blacksmith)

I can export them. (with Blacksmith)

I can edit them. (with Gimp)

I think I found the Offsets for Forger. (Hex editor)

But when I try to activate my patch, I encounter a "Memory stream is not expandable" error.

I have the same error without editing the files I exported.

 

I think it's because the DSS files are not the same size as the original ones. But I can't figure how to export them so they remain the same size.

Or it could also be one of the offsets I got wrong.

 

Does anyone has an idea of what I'm doing wrong and how I could fix it?

Or a reference to a tutorial?

 

VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap

VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap_TopMip_0

VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap_TopMip_1

{
	"Format": "ForgerPatch2",
	"GameEXE": "ACValhalla",
	"CollectionTitle": "Longship shields",
	"CollectionVersion": 1,
	"CollectionID": "Longship shields",
	"Patches":
	[
		{
			"PatchTitle": "Longship shields - Blue Raven Shields",
			"PatchDescription": "Replaces the turquoise raven shields, with blue ones",
			"PatchID": "TEST_1",
			"PatchVersion": 1,
			"Targets":
			[
				{
					"File": "DataPC_SharedGroup_00.forge",
					"FileID": 1990876552226,
					"Edits": 
					[
						{
							"OffsetHex": "52",
							"DataFile": "VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap_TopMip_0-1990876552226.dds",
							"DataFileOffset": "80"
						}
					]
				},
				{
					"File": "DataPC_SharedGroup_00.forge",
					"FileID": 1990876552228,
					"Edits": 
					[
						{
							"OffsetHex": "52",
							"DataFile": "VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap_TopMip_1-1990876552228.dds",
							"DataFileOffsetHex": "80"
						}
					]
				}
			]
		}
	]
}

 

 

Edited by tholwin
Link to comment
Share on other sites

*sigh* I forgot to replace "DataFileOffset" with "DataFileOffsetHex" in the first edit...

 

 

Now it works, but only at close range. Because I only managed to replace the mipmaps 0 and 1.

 

If I'm not mistaken, the other mipmaps are inside VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap (Datatype:TextureMap), which is embedded inside the material file...

I identified the Offset inside the material file, but I don't know how to generate a TextureMap.

Link to comment
Share on other sites

Success! :dance:

https://www.nexusmods.com/assassinscreedvalhalla/mods/48

 

 

It's a bit of a draft, but here is how to replicate what I did :

 

 

All the game assets are inside the Forge files.
You need a specialised soft to be able to Open those files : Blacksmith

I found the assets I wanted to edit inside the Forge DataPC_119_dlc.forge :
VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap_TopMip_0
VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap_TopMip_1
VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap


The first 2 are direct entries inside the Forge.
But the 3rd one is a subentry of "VHL_SHP_MAIN_01_Default01_Shield" which makes edits a bit more difficult.


VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap_TopMip_0 is the highest definition texture (this one is 1024x1024)
VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap_TopMip_1 is the same texture, 50% smaller (this one is 512x512)
VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap are the other mipmaps (for this one, the first is 256x256, then 128x128, ...)


With Blacksmith, extract VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap_TopMip_0.dds
Import it in your image editor.
Recolor it
Export as DDS with "BC1/DXT1" compression. (This will be the new DiffuseMap_TopMip_0.dds)
Scale a copy to 50% and export as DDS with "BC1/DXT1" compression. (This will be the new DiffuseMap_TopMip_1.dds)
Scale a copy to 50% (25% of the original) and export as DDS with "BC1/DXT1" compression, but this one is special, you need to activate the option "Generate mipmaps". (This will be the new DiffuseMap.dds)



For textures, ACV files are almost the same as DDS files. The first bytes are different, and the ACV as a few more bytes at the end, but the main content is identical.
This means we can use Forger to copy this content from the DDS files to the ACV files. But we need to define offsets.

For the first 2 files,
Using an hexadecimal editor, you need the address of the first byte following the "header" of the DDS file. In my files it was 0x80.
Same for the ACV file. In my files it was 0x52. (I think I got this value from an existing mod.)

For the 3rd one,
Because it is a subentry of "VHL_SHP_MAIN_01_Default01_Shield", we have to find where "VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap" is located inside "VHL_SHP_MAIN_01_Default01_Shield".
Extract "VHL_SHP_MAIN_01_Default01_Shield.acv" and "VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap.acv"
Open both with an Hexadecimal editor
Search the content of "VHL_SHP_MAIN_01_EivorClan_Shield_DiffuseMap.acv" inside "VHL_SHP_MAIN_01_Default01_Shield.acv"
Note the address where it starts and add the same offset as the 2 first files (0x52).
In my case : 0x2fdf8 + 0x52 = 0x2fe4a
(Use a Calculator in Programmer mode and Hexadecimal, and ommit the "0x".)

 

 

Edited by tholwin
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...