[RA][Semi-TC] CnC: Crisis
Right, whilst fixing the buildings, I've been working on SHP vehicles using the RA2 palette. I've come to a point where I don't know precisely what to do, so if anyone can help me, it would be brilliant. I've been using 20121019 build.
Created Prerules:
Then I created postrules:
Added unittem.pal to art folder. Created the entries for the new folder and the new .yaml files.
Vehicle code
Error code:
Any help would be much appreciated.
Created Prerules:
Code: Select all
Player:
PlayerColorPalette@redalert2:
BasePalette: redalert2
BaseName: redalert2
RemapIndex: 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,21
World:
PaletteFromFile@redalert2:
Name:redalert2
Filename: unittem.pal
ShadowIndex: 4
AllowModifiers: false
Code: Select all
3TNK:
-RenderUnit:
RenderSprites:
PlayerPalette:redalert2
RenderVoxel:
Vehicle code
Code: Select all
3TNK:
Inherits: ^Tank
Buildable:
Queue: Vehicle
BuildPaletteOrder: 40
Prerequisites: fix
Owner: soviet
Valued:
Cost: 1150
Tooltip:
Name: Heavy Tank
Description: Soviet Main Battle Tank, with dual cannons\n Strong vs Tanks, Light Vehicles\n Weak vs Infantry, Aircraft
Health:
HP: 550
Armor:
Type: Heavy
Mobile:
Speed: 5
Crushes: wall, atmine, crate, infantry
RevealsShroud:
Range: 5
Turreted:
ROT: 5
AttackTurreted:
PrimaryWeapon: 105mm
PrimaryRecoil: 3
PrimaryRecoilRecovery: 0.9
PrimaryLocalOffset: 2,0,0,0,0, -2,0,0,0,0
RenderUnitTurreted:
AutoTarget:
Explodes:
Weapon: UnitExplodeSmall
EmptyWeapon: UnitExplodeSmall
LeavesHusk:
HuskActor: 3TNK.Husk
Selectable:
Bounds: 30,30
Code: Select all
3TNK.Husk:
Inherits: ^Husk
Tooltip:
Name: Husk (Heavy Tank)
RenderUnit:
Image: 3tnk
ThrowsParticle@turret:
Anim: turret
Spread: 3,3
Speed: 6
AnimKey: turret
Code: Select all
Exception of type `OpenRA.FileFormats.YamlException`: Actor type 3tnk: Bogus yaml removals: [RenderUnit, False]
at OpenRA.ActorInfo..ctor(String name, MiniYaml node, Dictionary`2 allUnits)
at OpenRA.Rules.<LoadRules>m__34(MiniYamlNode k, Dictionary`2 y)
at OpenRA.Rules.<LoadYamlRules>c__AnonStorey28`1.<>m__3E(MiniYamlNode kv)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
at OpenRA.Rules.LoadYamlRules[T](String[] files, List`1 dict, Func`3 f)
at OpenRA.Rules.LoadRules(Manifest m, Map map)
at OpenRA.ModData.PrepareMap(String uid)
at OpenRA.Game.StartGame(String mapUID, Boolean isShellmap)
at OpenRA.Game.LoadShellMap()
at OpenRA.Mods.RA.RALoadScreen.TestAndContinue()
at OpenRA.Mods.RA.RALoadScreen.StartGame()
at OpenRA.Game.InitializeWithMods(String[] mods)
at OpenRA.Game.Initialize(Arguments args)
at OpenRA.Program.Run(String[] args)
at OpenRA.Program.Main(String[] args)
Change
to
or just add the PlayerPalette property to the original 3tnk definition.
Code: Select all
3TNK:
-RenderUnit:
RenderSprites:
PlayerPalette:redalert2
RenderVoxel:
Code: Select all
3TNK:
RenderUnitTurreted:
PlayerPalette:redalert2
Small issue on the vanilla mod. I tried using a blank shellmap, but it loads it, and gives me a error.
The map code:
The error:
The map code:
Code: Select all
Selectable: False
MapFormat: 5
Title: shellmap
Description:
Author:
Tileset: INTERIOR
MapSize: 128,128
Bounds: 16,16,96,96
UseAsShellmap: True
Type: Conquest
Players:
PlayerReference@Neutral:
Name: Neutral
OwnsWorld: True
NonCombatant: True
Race: allies
PlayerReference@Creeps:
Name: Creeps
NonCombatant: True
Race: allies
Actors:
Smudges:
Rules:
World:
DefaultShellmapScript:
LoadWidgetAtGameStart:
Widget: MAINMENU
Sequences:
Weapons:
Voices:
Notifications:
The error:
Code: Select all
Exception of type `System.Collections.Generic.KeyNotFoundException`: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at OpenRA.Mods.RA.DefaultShellmapScript.Tick(Actor self)
at OpenRA.World.<Tick>m__C7(TraitPair`1 x)
at OpenRA.WorldUtils.<DoTimed>c__AnonStorey56`1.<>m__133(T x)
at OpenRA.Exts.Do[T](IEnumerable`1 e, Action`1 fn)
at OpenRA.WorldUtils.DoTimed[T](IEnumerable`1 e, Action`1 a, String text, Double time)
at OpenRA.World.Tick()
at OpenRA.Game.Tick(OrderManager orderManager)
at OpenRA.Game.Tick(OrderManager orderManager, Viewport viewPort)
at OpenRA.Game.Run()
at OpenRA.Program.Run(String[] args)
at OpenRA.Program.Main(String[] args)