Page 1 of 1

Adding New Building or Unit in Red Alert

Posted: Thu Mar 11, 2021 2:22 pm
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)

Re: Adding New Building or Unit in Red Alert

Posted: Thu Mar 11, 2021 10:40 pm
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.

Re: Adding New Building or Unit in Red Alert

Posted: Fri Mar 12, 2021 1:10 am
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

Re: Adding New Building or Unit in Red Alert

Posted: Sat Mar 13, 2021 6:21 am
by Punsho
Somewhere under agun2