Adding support for sprite formats

Trying to add support for other formats to the example mod.

Information and discussion for custom maps and mods.
Post Reply
Hazael
Posts: 1
Joined: Thu Mar 28, 2024 1:22 pm

Adding support for sprite formats

Post 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?

abcdefg30
Posts: 643
Joined: Mon Aug 18, 2014 6:00 pm

Re: Adding support for sprite formats

Post 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

Post Reply