Page 1 of 1

Unable to add new unit shp

Posted: Wed Nov 28, 2018 3:52 am
by zeroth
Hi guys, I am new to modding and this forum so any assistance is appreciated.

I am trying to add a new unit to my TD Openra mod. I have the hmlrs.shp, hmlrsicnh.shp and hmlrst.shp files of the hover mlrs in my bit folder.

I have added the sequence in the vehicle sequence folder:

Code: Select all

		Facings: 32
		UseClassicFacingFudge: True
	turret: hmlrst
		Facings: 32
		UseClassicFacingFudge: True
	icon: hmlrsicnh
	idle: hmlrs
		Facings: 32
		UseClassicFacingFudge: True
		ZOffset: -512
	turret: hmlrst
		Facings: 32
		UseClassicFacingFudge: True
		ZOffset: -512
Then I've added the following into the vehicles rules folder:

Code: Select all

	Inherits: ^Tank
	Inherits@EXPERIENCE: ^GainsExperience
	Inherits@CLOAK: ^AcceptsCloakCrate
	Inherits@AUTOTARGET: ^AutoTargetAllAssaultMove
		Cost: 1600
		Image: HMLRS
		Name: Hover MLRS
		BuildPaletteOrder: 130
		Prerequisites: anyhq, ~techlevel.medium
		Queue: Vehicle.GDI
		Description: Prototype Hover Multiple Launch Rocket System.\nLong-range guided artillery.\n  Strong vs Infantry, Vehicles and Buildings
		Speed: 160
		HP: 120000
		Type: Heavy
		Range: 5c0
		TurnSpeed: 10
		Offset: -200,0,0
		OffsetModifier: 35
		Offset: 43, 128, 0
		ZOffset: -129
		Weapon: MammothMissiles
		LocalOffset: 213,128,0, 213,-128,0
		LocalYaw: 100, -100
		PauseOnCondition: disabled
		PauseOnCondition: disabled
When trying to launch the game, i get the following error:
OpenRA engine version release-20180923
Tiberian Dawn mod version release-20180923
on map cda847dca0c3256cb7d78e42fe0e4226d49b470a (Blank Shellmap by Paul Chote).
Date: 2018-11-28 03:40:18Z
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type `System.IO.InvalidDataException`: Resource sprites span multiple sheets. Try loading their sequences earlier.
at OpenRA.Mods.Common.Traits.ResourceLayer.WorldLoaded(World w, WorldRenderer wr)
at OpenRA.World.LoadComplete(WorldRenderer wr)
at OpenRA.Game.StartGame(String mapUID, WorldType type)
at OpenRA.Game.LoadShellMap()
at OpenRA.Mods.Common.LoadScreens.BlankLoadScreen.StartGame(Arguments args)
at OpenRA.Game.InitializeMod(String mod, Arguments args)
at OpenRA.Game.Initialize(Arguments args)
at OpenRA.Game.InitializeAndRun(String[] args)
at OpenRA.WindowsLauncher.RunGame(String[] args)
I am running the latest release.

The odd thing was, this was working prior to the new update. I can't figure out what I've missed as I can't seem to add any new .shp as new units.

Please help! Thanks!

Re: Unable to add new unit shp

Posted: Sun Dec 02, 2018 8:16 am
by MustaphaTR
The reasource images should be in the first image sheet, in other words, they should be defined as early in the code as possible. Go to sequences/misc.yaml and move the resources: part to the beginning of the file.

Re: Unable to add new unit shp

Posted: Mon Dec 03, 2018 12:58 am
by zeroth
I don't really understand the reason but your advice works! thanks MustaphaTR!