Page 1 of 1
Missing sequences?
Posted: Tue Feb 02, 2016 7:02 am
by devilslayersbane
So, I've been looking to go and make use of some of my free time by learning how to mod this game. So, firstly I've been looking on how to copy a vehicle and I've run into a problem. I want to copy the Medium tank (2tnk) over to the soviet sides and I have it labeled as an htnk in the .yaml file
in the sequences i have also copied the 2tnk entries and re-labled them htnk. It no longer crashes now until I build the unit itself, as there is no turret sequence defined. Where and what do I need to copy in order to use the medium tank's turret sequences?
Thanks in advance,
dsb
Posted: Tue Feb 02, 2016 11:45 am
by abcdefg30
Could you post the crash log and your unit definiton (rules + sequences), please?
Posted: Tue Feb 02, 2016 12:17 pm
by devilslayersbane
Here you go.
Code: Select all
Red Alert Mod at Version release-20150919
on map 423fa77621877215619d896beebba33bc00ef96b (Snow Town by MicroBit).
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type `System.InvalidOperationException`: Unit `htnk` does not have a sequence named `turret`
at OpenRA.Graphics.SequenceProvider.GetSequence(String unitName, String sequenceName)
at OpenRA.Graphics.Animation.PlayRepeating(String sequenceName)
at OpenRA.Mods.Common.Traits.WithTurret..ctor(Actor self, WithTurretInfo info)
at OpenRA.Mods.Common.Traits.WithTurretInfo.Create(ActorInitializer init)
at OpenRA.Actor..ctor(World world, String name, TypeDictionary initDict)
at OpenRA.World.CreateActor(Boolean addToWorld, String name, TypeDictionary initDict)
at OpenRA.World.CreateActor(String name, TypeDictionary initDict)
at OpenRA.Mods.Common.Traits.Production.<DoProduction>c__AnonStorey1.<>m__0(World w)
at OpenRA.World.Tick()
at OpenRA.Game.InnerLogicTick(OrderManager orderManager)
at OpenRA.Game.LogicTick()
at OpenRA.Game.Loop()
at OpenRA.Game.Run()
at OpenRA.Program.Run(String[] args)
at OpenRA.Program.Main(String[] args)
exception.log
Code: Select all
HTNK:
Inherits: ^Tank
Buildable:
Queue: Vehicle
BuildPaletteOrder: 120
Prerequisites: fix, ~vehicles.soviet, ~techlevel.medium
Valued:
Cost: 850
Tooltip:
Name: XM1 Abraham
Description: Allied Main Battle Tank.\n Strong vs Vehicles\n Weak vs Infantry, Aircraft
Health:
HP: 475
Armor:
Type: Heavy
Mobile:
Speed: 80
Crushes: wall, mine, crate, infantry
RevealsShroud:
Range: 5c0
Turreted:
ROT: 5
Armament:
Weapon: 90mm
Recoil: 128
RecoilRecovery: 38
LocalOffset: 720,0,80
MuzzleSequence: muzzle
AttackTurreted:
WithMuzzleFlash:
WithTurret:
AutoTarget:
LeavesHusk:
HuskActor: 2TNK.Husk
SelectionDecorations:
VisualBounds: 28,28
ProducibleWithLevel:
Prerequisites: vehicles.upgraded
new tank entry (still wip)
Code: Select all
2tnk:
idle:
Facings: 32
turret:
Start: 32
Facings: 32
muzzle: gunfire2
Length: 5
icon: 2tnkicon
2tnk.destroyed:
idle: 2tnk
Facings: 32
ZOffset: -512
turret: 2tnk
Start: 32
Facings: 32
ZOffset: -512
htnk:
idle:
Facings: 32
turret:
Start: 32
Facings: 32
muzzle: gunfire2
Length: 5
icon: 2tnkicon
htnk.destroyed:
idle: htnk
Facings: 32
ZOffset: -512
turret: htnk
Start: 32
Facings: 32
ZOffset: -512
vehicles.yaml in the sequences folder
Posted: Tue Feb 02, 2016 12:21 pm
by Graion Dilach
htnk doesn't have artwork for that sequence.
You want
Code: Select all
htnk:
idle: 2tnk
Facings: 32
turret: 2tnk
Start: 32
Facings: 32
muzzle: gunfire2
Length: 5
icon: 2tnkicon
htnk.destroyed:
idle: 2tnk
Facings: 32
ZOffset: -512
turret: 2tnk
Start: 32
Facings: 32
ZOffset: -512
Posted: Tue Feb 02, 2016 12:27 pm
by devilslayersbane
Ah, ok. That makes sense. Thank you.
Posted: Wed Feb 03, 2016 5:03 am
by devilslayersbane
So that definitely worked. Thank you very much. I'm going further and now creating a soviet flame tank based off of the T-34 chassis. Currently, the code for it looks like this:
Code: Select all
FLTK:
Inherits: ^Tank
Buildable:
Queue: Vehicle
BuildPaletteOrder: 50
Prerequisites: ~vehicles.soviet, ftur, ~techlevel.low
Valued:
Cost: 800
Tooltip:
Name: T34/55F Flame Tank
Description: Soviet Flame Tank, good for scouting.\n Strong vs Infantry\n Weak vs Tanks, Aircraft
Health:
HP: 250
Armor:
Type: Heavy
Mobile:
Speed: 100
Crushes: wall, mine, crate, infantry
RevealsShroud:
Range: 4c0
Turreted:
ROT: 5
Armament:
Weapon: Fireball Launcher
Recoil: 50
RecoilRecovery: 25
LocalOffset: 768,0,90
MuzzleSequence: muzzle
AttackTurreted:
WithMuzzleFlash:
WithTurret:
AutoTarget:
LeavesHusk:
HuskActor: 1TNK.Husk
ProducibleWithLevel:
Prerequisites: vehicles.upgraded
Unit code
Code: Select all
fltk:
idle:1tnk
Facings: 32
turret:1tnk
Start: 32
Facings: 32
muzzle: gunfire2
Length: 2
icon: 1tnkicon
fltk.destroyed:
idle: 1tnk
Facings: 32
ZOffset: -512
turret: 1tnk
Start: 32
Facings: 32
ZOffset: -512
Sequences
Code: Select all
Exception of type `System.Collections.Generic.KeyNotFoundException`: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at OpenRA.ReadOnlyDictionary`2.get_Item(TKey key)
at OpenRA.Mods.Common.Traits.Armament..ctor(Actor self, ArmamentInfo info)
at OpenRA.Mods.Common.Traits.ArmamentInfo.Create(ActorInitializer init)
at OpenRA.Actor..ctor(World world, String name, TypeDictionary initDict)
at OpenRA.World.CreateActor(Boolean addToWorld, String name, TypeDictionary initDict)
at OpenRA.World.CreateActor(String name, TypeDictionary initDict)
at OpenRA.Mods.Common.Traits.Production.<DoProduction>c__AnonStorey1.<>m__0(World w)
at OpenRA.World.Tick()
at OpenRA.Game.InnerLogicTick(OrderManager orderManager)
at OpenRA.Game.LogicTick()
at OpenRA.Game.Loop()
at OpenRA.Game.Run()
at OpenRA.Program.Run(String[] args)
at OpenRA.Program.Main(String[] args)
Posted: Wed Feb 03, 2016 9:45 am
by Graion Dilach
Code: Select all
Exception of type `System.Collections.Generic.KeyNotFoundException`: The given key was not present in the dictionary.
[...]
at OpenRA.Mods.Common.Traits.Armament..ctor(Actor self, ArmamentInfo info)
The actual weapon doesn't exist. I would also advise you to not use spaces in definitions/ids. I might be wrong and OpenRA is fine with it but the Westwood originals were never fine with it and so am I.
Posted: Wed Feb 03, 2016 12:57 pm
by devilslayersbane
Graion Dilach wrote: ↑Code: Select all
Exception of type `System.Collections.Generic.KeyNotFoundException`: The given key was not present in the dictionary.
[...]
at OpenRA.Mods.Common.Traits.Armament..ctor(Actor self, ArmamentInfo info)
The actual weapon doesn't exist. I would also advise you to not use spaces in definitions/ids. I might be wrong and OpenRA is fine with it but the Westwood originals were never fine with it and so am I.
Oh! ok. Thank you. The space is what did it, just without the space.
Posted: Tue Mar 08, 2016 3:09 am
by devilslayersbane
Ok, well, everything has gone pretty well, however, I cannot seem to get this mod running on any computer but the one I've been developing on. My girlfriend was kind enough to let me use her computer as a testing environment with a clean install of openRA. however, still it did not work.
This is the most common error message:
Code: Select all
ed Alert Mod at Version release-20151224
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type `System.InvalidOperationException`: Cannot locate type: WithMuzzleFlashInfo
at OpenRA.ObjectCreator.<MissingTypeAction>m__5(String s)
at OpenRA.ObjectCreator.CreateObject[T](String className, Dictionary`2 args)
at OpenRA.ObjectCreator.CreateObject[T](String className)
at OpenRA.Game.CreateObject[T](String name)
at OpenRA.ActorInfo.LoadTraitInfo(String traitName, MiniYaml my)
at OpenRA.ActorInfo..ctor(String name, MiniYaml node, Dictionary`2 allUnits)
at OpenRA.RulesetCache.<Load>m__0(MiniYamlNode k, Dictionary`2 y)
at OpenRA.RulesetCache.<LoadYamlRules>c__AnonStorey1`1.<>m__0(MiniYamlNode wkv, Dictionary`2 wyy)
at OpenRA.RulesetCache.<LoadYamlRules>c__AnonStorey1`1.<>m__1(MiniYamlNode kv)
at OpenRA.Exts.ToDictionaryWithConflictLog[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, String debugName, Func`2 logKey, Func`2 logValue)
at OpenRA.RulesetCache.LoadYamlRules[T](Dictionary`2 itemCache, String[] files, List`1 nodes, Func`3 f)
at OpenRA.RulesetCache.Load(Map map)
at OpenRA.ModData.<ModData>m__2()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at OpenRA.ModData.get_DefaultRules()
at OpenRA.Map.<PostInit>c__AnonStorey2.<>m__0()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at OpenRA.Map.PreloadRules()
at OpenRA.ModData.PrepareMap(String uid)
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.Mods.Common.Widgets.Logic.InstallLogic.<InstallLogic>c__AnonStorey0.<>m__0()
at OpenRA.Mods.Common.Widgets.Logic.DownloadPackagesLogic.<ShowDownloadDialog>c__AnonStorey3.<>m__8()
And here are the files that are necessary to run the mod. Keep in mind, you'll want to save a backup of your openRA ra mod due to the fact that I haven't separated them yet. Just install these in your RA mod folder.
http://www.mediafire.com/download/9wzm3 ... dfiles.zip
Posted: Tue Mar 08, 2016 11:17 am
by Sleipnir
Exception of type `System.InvalidOperationException`: Cannot locate type: WithMuzzleFlashInfo
This is the key part of the exception message. The WithMuzzleFlash trait was renamed to WithMuzzleOverlay in the December release to make it consistent with the rest of the rendering traits.
It looks like you are developing against the older September release, which means you will need to update your mod to make it compatible with the December release. We ship a utility with the game that mostly automates this process, but it is poorly documented. Somebody at
http://webchat.freenode.net/?channels=openra will be able to help you (unless you join at the wrong time of day!).