Page 1 of 1

Adding support for sprite formats

Posted: Thu Mar 28, 2024 1:43 pm
by Hazael
Hi everyone, I'm still kinda new to modding OpenRA. I managed toe make some stuff in another mod but now I want to make my own mod out of this stuff. I need some help with adding support for shp formats to the example mod. The original example mod uses the following in the mod.yaml file:

Code: Select all

SpriteFormats: PngSheet
I tried adding formats like I saw it in the RA mod and changed it to:

Code: Select all

SpriteFormats: ShpD2, ShpTD, TmpRA, TmpTD, ShpTS, PngSheet
But when I launch the game now it says the following in de error log.

Code: Select all

Exception of type `System.InvalidOperationException`: Unable to find a sprite loader for type 'ShpD2'.
I'm guessing the example mod doesn't support shp files from the start. How can I add this?

Re: Adding support for sprite formats

Posted: Mon Apr 01, 2024 7:45 pm
by abcdefg30
Hi. Try adding the D2k dll to the assemblies your mod uses:

Code: Select all

Assemblies:
	^BinDir|OpenRA.Mods.Common.dll
	^BinDir|OpenRA.Mods.Example.dll
	^BinDir|OpenRA.Mods.D2k.dll