Can I look at your code you have added to the unit?scorp wrote: ↑ and my unit works fin
New to Modding OpenRA - Crash becuase of new unit
crash when clicing on new building options
-
- Posts: 52
- Joined: Sun Mar 09, 2014 3:49 pm
this is for RA Mod (note that the code formatting will be ruined by the Forum formatting)
rules/vehicles.yaml
FTNK:
Inherits: ^Vehicle
Buildable:
Queue: Vehicle
BuildPaletteOrder: 150
Prerequisites: ftur
Owner: soviet
Hotkey: f
Valued:
Cost: 900
Tooltip:
Name: Flamer Tank
Description: Tank with Flamethrower\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft
Health:
HP: 200
Armor:
Type: Heavy
Mobile:
Speed: 6
RevealsShroud:
Range: 5
RenderUnit:
Armament:
Weapon: Flamer
AttackFrontal:
AutoTarget:
Explodes:
Weapon: SCUD
EmptyWeapon:
sequences/vehicles.yaml
ftnk:
idle:
Start: 0
Facings: 32
muzzle: gunfire2
Start: 0
Length: 5
icon: ctnkicon
Start: 0
note that i use a placeholder Icon here
and it's a non-turreted unit. sequences depend a lot on the unit type you want to add.
i think that's it. Getting a working custom Icon is still to be done. The main issue is probably the .SHP files. I got it to work for the actual unit with a lot of Trial and error so i can't advise on that subject.
Information on SHP conversion is around these Forums, maybe you can find the correct how-to.
rules/vehicles.yaml
FTNK:
Inherits: ^Vehicle
Buildable:
Queue: Vehicle
BuildPaletteOrder: 150
Prerequisites: ftur
Owner: soviet
Hotkey: f
Valued:
Cost: 900
Tooltip:
Name: Flamer Tank
Description: Tank with Flamethrower\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft
Health:
HP: 200
Armor:
Type: Heavy
Mobile:
Speed: 6
RevealsShroud:
Range: 5
RenderUnit:
Armament:
Weapon: Flamer
AttackFrontal:
AutoTarget:
Explodes:
Weapon: SCUD
EmptyWeapon:
sequences/vehicles.yaml
ftnk:
idle:
Start: 0
Facings: 32
muzzle: gunfire2
Start: 0
Length: 5
icon: ctnkicon
Start: 0
note that i use a placeholder Icon here
and it's a non-turreted unit. sequences depend a lot on the unit type you want to add.
i think that's it. Getting a working custom Icon is still to be done. The main issue is probably the .SHP files. I got it to work for the actual unit with a lot of Trial and error so i can't advise on that subject.
Information on SHP conversion is around these Forums, maybe you can find the correct how-to.
You can use
Code: Select all
to display it with indentions although there be an invalid tabs to spaces conversion.
thanks for the info. will try that in case i need to post more code...
as for my unit, i'm gonna have to convert the flamer tank Icon from CnC to the RA Format i guess so i can get rid of using the placeholder Picture i'm currently using.
*edit*
Looks like that's harder than i thought. those .tem files may be used in RA as well, but i don't get the Palette right for that cameo pic
as for my unit, i'm gonna have to convert the flamer tank Icon from CnC to the RA Format i guess so i can get rid of using the placeholder Picture i'm currently using.
*edit*
Looks like that's harder than i thought. those .tem files may be used in RA as well, but i don't get the Palette right for that cameo pic
So... this error message is too cryptic for me to figure out..
game crashes after load Screen. Mod uses a different custom unit with its own turretet sprite - the error message probably relates to that, but if anyone can give me a more accurate meaning of it, i'd be very glad
Red Alert Mod at Version release-20131223
Operating System: Windows (Microsoft Windows NT 6.1.7601 Service Pack 1)
Runtime Version: .NET CLR 2.0.50727.5477
Exception of type `System.IndexOutOfRangeException`: Der Index war außerhalb des Arraybereichs.
bei OpenRA.FileFormats.Format80.DecodeInto(Byte[] src, Byte[] dest)
bei OpenRA.FileFormats.ShpReader.Decompress(Stream stream, ImageHeader h)
bei OpenRA.FileFormats.ShpReader..ctor(Stream stream)
bei OpenRA.FileFormats.SpriteSource.LoadSpriteSource(Stream s, String filename)
bei OpenRA.Graphics.SpriteLoader.CacheSpriteFrames(String filename)
bei OpenRA.FileFormats.Cache`2.get_Item(T key)
bei OpenRA.Graphics.Sequence..ctor(String unit, String name, MiniYaml info)
bei OpenRA.Graphics.SequenceProvider.<LoadSequencesForUnit>c__AnonStorey8D.<>m__1BD(KeyValuePair`2 x)
bei System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
bei System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
bei OpenRA.Graphics.SequenceProvider.LoadSequencesForUnit(String unit, MiniYaml sequences)
bei OpenRA.Graphics.SequenceProvider.Initialize(String[] sequenceFiles, List`1 sequenceNodes)
bei OpenRA.ModData.PrepareMap(String uid)
bei OpenRA.Game.StartGame(String mapUID, Boolean isShellmap)
bei OpenRA.Game.LoadShellMap()
bei OpenRA.Mods.RA.DefaultLoadScreen.TestAndContinue()
bei OpenRA.Mods.RA.DefaultLoadScreen.StartGame()
bei OpenRA.Game.InitializeWithMod(String mod)
bei OpenRA.Game.Initialize(Arguments args)
bei OpenRA.Program.Run(String[] args)
bei OpenRA.Program.Main(String[] args)
game crashes after load Screen. Mod uses a different custom unit with its own turretet sprite - the error message probably relates to that, but if anyone can give me a more accurate meaning of it, i'd be very glad
Red Alert Mod at Version release-20131223
Operating System: Windows (Microsoft Windows NT 6.1.7601 Service Pack 1)
Runtime Version: .NET CLR 2.0.50727.5477
Exception of type `System.IndexOutOfRangeException`: Der Index war außerhalb des Arraybereichs.
bei OpenRA.FileFormats.Format80.DecodeInto(Byte[] src, Byte[] dest)
bei OpenRA.FileFormats.ShpReader.Decompress(Stream stream, ImageHeader h)
bei OpenRA.FileFormats.ShpReader..ctor(Stream stream)
bei OpenRA.FileFormats.SpriteSource.LoadSpriteSource(Stream s, String filename)
bei OpenRA.Graphics.SpriteLoader.CacheSpriteFrames(String filename)
bei OpenRA.FileFormats.Cache`2.get_Item(T key)
bei OpenRA.Graphics.Sequence..ctor(String unit, String name, MiniYaml info)
bei OpenRA.Graphics.SequenceProvider.<LoadSequencesForUnit>c__AnonStorey8D.<>m__1BD(KeyValuePair`2 x)
bei System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
bei System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
bei OpenRA.Graphics.SequenceProvider.LoadSequencesForUnit(String unit, MiniYaml sequences)
bei OpenRA.Graphics.SequenceProvider.Initialize(String[] sequenceFiles, List`1 sequenceNodes)
bei OpenRA.ModData.PrepareMap(String uid)
bei OpenRA.Game.StartGame(String mapUID, Boolean isShellmap)
bei OpenRA.Game.LoadShellMap()
bei OpenRA.Mods.RA.DefaultLoadScreen.TestAndContinue()
bei OpenRA.Mods.RA.DefaultLoadScreen.StartGame()
bei OpenRA.Game.InitializeWithMod(String mod)
bei OpenRA.Game.Initialize(Arguments args)
bei OpenRA.Program.Run(String[] args)
bei OpenRA.Program.Main(String[] args)
i understand this might be a rather generic exception log ...
Red Alert Mod at Version release-20131223
Operating System: Windows (Microsoft Windows NT 6.1.7601 Service Pack 1)
Runtime Version: .NET CLR 2.0.50727.5477
Exception of type `System.InvalidOperationException`: TypeDictionary does not contain instance of type `OpenRA.Mods.RA.ValuedInfo`
bei OpenRA.FileFormats.TypeDictionary.Get[T]()
bei OpenRA.Mods.RA.Widgets.BuildPaletteWidget.DrawProductionTooltip(World world, String unit, int2 pos)
bei OpenRA.Mods.RA.Widgets.BuildPaletteWidget.DrawPalette(ProductionQueue queue)
bei OpenRA.Mods.RA.Widgets.BuildPaletteWidget.Draw()
bei OpenRA.Widgets.Widget.DrawOuter()
bei OpenRA.Widgets.Widget.DrawOuter()
bei OpenRA.Widgets.Widget.DrawOuter()
bei OpenRA.Widgets.Widget.DrawOuter()
bei OpenRA.Widgets.Widget.DrawOuter()
bei OpenRA.Game.Tick(OrderManager orderManager)
bei OpenRA.Game.Run()
bei OpenRA.Program.Run(String[] args)
bei OpenRA.Program.Main(String[] args)
i made a structure buildable that previously wasn't. When i go to the production Queue and mov the mouse cursor over the structure's Icon, the game crashes.
to me it does Sound like something's wong with the Cameo, but the Cameo is shown correctly (and came with RA)
Glad for any help
*Edit*
on a sligthly related note, what are valid InitialActivity entries for a free actor? thanks
Red Alert Mod at Version release-20131223
Operating System: Windows (Microsoft Windows NT 6.1.7601 Service Pack 1)
Runtime Version: .NET CLR 2.0.50727.5477
Exception of type `System.InvalidOperationException`: TypeDictionary does not contain instance of type `OpenRA.Mods.RA.ValuedInfo`
bei OpenRA.FileFormats.TypeDictionary.Get[T]()
bei OpenRA.Mods.RA.Widgets.BuildPaletteWidget.DrawProductionTooltip(World world, String unit, int2 pos)
bei OpenRA.Mods.RA.Widgets.BuildPaletteWidget.DrawPalette(ProductionQueue queue)
bei OpenRA.Mods.RA.Widgets.BuildPaletteWidget.Draw()
bei OpenRA.Widgets.Widget.DrawOuter()
bei OpenRA.Widgets.Widget.DrawOuter()
bei OpenRA.Widgets.Widget.DrawOuter()
bei OpenRA.Widgets.Widget.DrawOuter()
bei OpenRA.Widgets.Widget.DrawOuter()
bei OpenRA.Game.Tick(OrderManager orderManager)
bei OpenRA.Game.Run()
bei OpenRA.Program.Run(String[] args)
bei OpenRA.Program.Main(String[] args)
i made a structure buildable that previously wasn't. When i go to the production Queue and mov the mouse cursor over the structure's Icon, the game crashes.
to me it does Sound like something's wong with the Cameo, but the Cameo is shown correctly (and came with RA)
Glad for any help
*Edit*
on a sligthly related note, what are valid InitialActivity entries for a free actor? thanks
okay... this Crash (see log below) i can't really tie it to any changes i made. happened in the midst of a battle, can't tell what exactly triggered it
Red Alert Mod at Version release-20131223
Operating System: Windows (Microsoft Windows NT 6.1.7601 Service Pack 1)
Runtime Version: .NET CLR 2.0.50727.5477
Exception of type `System.OverflowException`: Das Negieren des minimalen Wertes einer Ergänzungszahl ist unzulässig.
bei System.Math.AbsHelper(Int32 value)
bei OpenRA.WAngle.ArcTan(Int32 y, Int32 x, Int32 stride)
bei OpenRA.Traits.Util.GetFacing(WVec d, Int32 currentFacing)
bei OpenRA.Mods.RA.Effects.Missile.Tick(World world)
bei OpenRA.World.<Tick>m__B8(IEffect e)
bei OpenRA.WorldUtils.<DoTimed>c__AnonStorey61`1.<>m__142(T x)
bei OpenRA.Exts.Do[T](IEnumerable`1 e, Action`1 fn)
bei OpenRA.WorldUtils.DoTimed[T](IEnumerable`1 e, Action`1 a, String text, Double time)
bei OpenRA.World.Tick()
bei OpenRA.Game.TickInner(OrderManager orderManager)
bei OpenRA.Game.Tick(OrderManager orderManager)
bei OpenRA.Game.Run()
bei OpenRA.Program.Run(String[] args)
bei OpenRA.Program.Main(String[] args)
Red Alert Mod at Version release-20131223
Operating System: Windows (Microsoft Windows NT 6.1.7601 Service Pack 1)
Runtime Version: .NET CLR 2.0.50727.5477
Exception of type `System.OverflowException`: Das Negieren des minimalen Wertes einer Ergänzungszahl ist unzulässig.
bei System.Math.AbsHelper(Int32 value)
bei OpenRA.WAngle.ArcTan(Int32 y, Int32 x, Int32 stride)
bei OpenRA.Traits.Util.GetFacing(WVec d, Int32 currentFacing)
bei OpenRA.Mods.RA.Effects.Missile.Tick(World world)
bei OpenRA.World.<Tick>m__B8(IEffect e)
bei OpenRA.WorldUtils.<DoTimed>c__AnonStorey61`1.<>m__142(T x)
bei OpenRA.Exts.Do[T](IEnumerable`1 e, Action`1 fn)
bei OpenRA.WorldUtils.DoTimed[T](IEnumerable`1 e, Action`1 a, String text, Double time)
bei OpenRA.World.Tick()
bei OpenRA.Game.TickInner(OrderManager orderManager)
bei OpenRA.Game.Tick(OrderManager orderManager)
bei OpenRA.Game.Run()
bei OpenRA.Program.Run(String[] args)
bei OpenRA.Program.Main(String[] args)