Adding New Building or Unit in Red Alert

Can't add new unit

Information and discussion for custom maps and mods.
Post Reply
v4015
Posts: 2
Joined: Thu Mar 11, 2021 2:17 pm

Adding New Building or Unit in Red Alert

Post by v4015 »

Newbie in modding here. Tried to make a new unit and building in red alert
I copied the aagun and called it agun2 I also copied agun sequence and called in agun2 but when I fire up the game I get the error below.

OpenRA engine version playtest-20210131
Red Alert mod version playtest-20210131
on map 392a852f1d9713910a6fd2be0a6e73483ddfcbf9 (Ritual Circle 2 by james.bong).
Date: 2021-03-11 14:19:44Z
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type `System.InvalidOperationException`: Unit `agun2` does not have any sequences defined.
at OpenRA.Graphics.SequenceProvider.GetSequence(String unitName, String sequenceName)
at OpenRA.Graphics.Animation.PlaySequence(String sequenceName)
at OpenRA.Graphics.Animation.PlayThen(String sequenceName, Action after)
at OpenRA.Mods.Common.Widgets.ProductionPaletteWidget.RefreshIcons()
at OpenRA.Mods.Common.Widgets.Logic.ClassicProductionLogic.<>c__DisplayClass2_0.<SetupProductionGroupButton>b__1(Boolean reverse)
at OpenRA.Mods.Common.Widgets.ButtonWidget.HandleMouseInput(MouseInput mi)
at OpenRA.Widgets.Widget.HandleMouseInputOuter(MouseInput mi)
at OpenRA.Widgets.Ui.HandleInput(MouseInput mi)
at OpenRA.DefaultInputHandler.<>c__DisplayClass5_0.<OnMouseInput>b__0()
at OpenRA.Sync.RunUnsynced[T](Boolean checkSyncHash, World world, Func`1 fn)
at OpenRA.Platforms.Default.Sdl2Input.PumpInput(Sdl2PlatformWindow device, IInputHandler inputHandler, Nullable`1 lockedMousePosition)
at OpenRA.Platforms.Default.Sdl2PlatformWindow.PumpInput(IInputHandler inputHandler)
at OpenRA.Renderer.EndFrame(IInputHandler inputHandler)
at OpenRA.Game.RenderTick()
at OpenRA.Game.Loop()
at OpenRA.Game.Run()
at OpenRA.Game.InitializeAndRun(String[] args)
at OpenRA.WindowsLauncher.WindowsLauncher.RunGame(String[] args)

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

Re: Adding New Building or Unit in Red Alert

Post by abcdefg30 »

You probably need to define

Code: Select all

RenderSprites:
	Image: agun
in the rules of your agun2. It is hard to tell without seeing the entire yaml though.

v4015
Posts: 2
Joined: Thu Mar 11, 2021 2:17 pm

Re: Adding New Building or Unit in Red Alert

Post by v4015 »

Thanks, where would I "define" it. Sorry if this seems stupid.

I did the same method in dune2000 and it worked so wonder what is missing when I do this is ra

User avatar
Punsho
Posts: 143
Joined: Wed Jul 18, 2018 2:56 pm
Location: Lithuania

Re: Adding New Building or Unit in Red Alert

Post by Punsho »

Somewhere under agun2

Post Reply