Page 3 of 3

Posted: Mon Apr 15, 2013 6:12 pm
by raminator
secret did you use the template for 360° camera or the building-camera i posted aeons ago?

Posted: Mon Apr 15, 2013 6:21 pm
by secret
Damn it. Didn't notice there was an update.

Well, will re-work the stuff.

Posted: Sun May 12, 2013 8:46 pm
by secret
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:

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
Then I created postrules:

Code: Select all

3TNK:
	-RenderUnit:
	RenderSprites:
		PlayerPalette:redalert2
	RenderVoxel:
Added unittem.pal to art folder. Created the entries for the new folder and the new .yaml files.
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
Error code:

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)
Any help would be much appreciated.

Posted: Mon May 13, 2013 5:32 am
by Sleipnir
Change

Code: Select all

3TNK:
	-RenderUnit:
	RenderSprites:
		PlayerPalette:redalert2
	RenderVoxel:
to

Code: Select all

3TNK:
	RenderUnitTurreted:
		PlayerPalette:redalert2
or just add the PlayerPalette property to the original 3tnk definition.

Posted: Mon May 13, 2013 12:29 pm
by secret
Thanks! It really worked.

Time for awesome stuff...

Posted: Fri Jun 28, 2013 7:22 pm
by secret
Small issue on the vanilla mod. I tried using a blank shellmap, but it loads it, and gives me a 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)

Posted: Sat Jun 29, 2013 12:43 am
by Sleipnir
Remove `DefaultShellmapScript` - this will be looking for actors that don't exist in your map.