[RA][Semi-TC] CnC: Crisis

Information and discussion for custom maps and mods.
raminator
Posts: 106
Joined: Tue Mar 15, 2005 6:31 pm
Location: Stuttgart

Post by raminator » Mon Apr 15, 2013 6:12 pm

secret did you use the template for 360° camera or the building-camera i posted aeons ago?

User avatar
secret
Posts: 62
Joined: Fri Aug 03, 2007 1:53 pm

Post by secret » Mon Apr 15, 2013 6:21 pm

Damn it. Didn't notice there was an update.

Well, will re-work the stuff.

User avatar
secret
Posts: 62
Joined: Fri Aug 03, 2007 1:53 pm

Post by secret » Sun May 12, 2013 8:46 pm

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&#40;MiniYamlNode k, Dictionary`2 y&#41;
   at OpenRA.Rules.<LoadYamlRules>c__AnonStorey28`1.<>m__3E&#40;MiniYamlNode kv&#41;
   at System.Linq.Enumerable.ToDictionary&#91;TSource,TKey,TElement&#93;&#40;IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer&#41;
   at System.Linq.Enumerable.ToDictionary&#91;TSource,TKey,TElement&#93;&#40;IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector&#41;
   at OpenRA.Rules.LoadYamlRules&#91;T&#93;&#40;String&#91;&#93; files, List`1 dict, Func`3 f&#41;
   at OpenRA.Rules.LoadRules&#40;Manifest m, Map map&#41;
   at OpenRA.ModData.PrepareMap&#40;String uid&#41;
   at OpenRA.Game.StartGame&#40;String mapUID, Boolean isShellmap&#41;
   at OpenRA.Game.LoadShellMap&#40;&#41;
   at OpenRA.Mods.RA.RALoadScreen.TestAndContinue&#40;&#41;
   at OpenRA.Mods.RA.RALoadScreen.StartGame&#40;&#41;
   at OpenRA.Game.InitializeWithMods&#40;String&#91;&#93; mods&#41;
   at OpenRA.Game.Initialize&#40;Arguments args&#41;
   at OpenRA.Program.Run&#40;String&#91;&#93; args&#41;
   at OpenRA.Program.Main&#40;String&#91;&#93; args&#41;
Any help would be much appreciated.

User avatar
Sleipnir
Posts: 781
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Post by Sleipnir » Mon May 13, 2013 5:32 am

Change

Code: Select all

3TNK&#58;
	-RenderUnit&#58;
	RenderSprites&#58;
		PlayerPalette&#58;redalert2
	RenderVoxel&#58;
to

Code: Select all

3TNK&#58;
	RenderUnitTurreted&#58;
		PlayerPalette&#58;redalert2
or just add the PlayerPalette property to the original 3tnk definition.

User avatar
secret
Posts: 62
Joined: Fri Aug 03, 2007 1:53 pm

Post by secret » Mon May 13, 2013 12:29 pm

Thanks! It really worked.

Time for awesome stuff...

User avatar
secret
Posts: 62
Joined: Fri Aug 03, 2007 1:53 pm

Post by secret » Fri Jun 28, 2013 7:22 pm

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&#58; False

MapFormat&#58; 5

Title&#58; shellmap

Description&#58;

Author&#58;

Tileset&#58; INTERIOR

MapSize&#58; 128,128

Bounds&#58; 16,16,96,96

UseAsShellmap&#58; True

Type&#58; Conquest

Players&#58;
	PlayerReference@Neutral&#58;
		Name&#58; Neutral
		OwnsWorld&#58; True
		NonCombatant&#58; True
		Race&#58; allies
	PlayerReference@Creeps&#58;
		Name&#58; Creeps
		NonCombatant&#58; True
		Race&#58; allies

Actors&#58;

Smudges&#58;

Rules&#58;
	World&#58;
		DefaultShellmapScript&#58;
		LoadWidgetAtGameStart&#58;
			Widget&#58; MAINMENU

Sequences&#58;

Weapons&#58;

Voices&#58;

Notifications&#58;


The error:

Code: Select all

Exception of type `System.Collections.Generic.KeyNotFoundException`&#58; The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException&#40;&#41;
   at System.Collections.Generic.Dictionary`2.get_Item&#40;TKey key&#41;
   at OpenRA.Mods.RA.DefaultShellmapScript.Tick&#40;Actor self&#41;
   at OpenRA.World.<Tick>m__C7&#40;TraitPair`1 x&#41;
   at OpenRA.WorldUtils.<DoTimed>c__AnonStorey56`1.<>m__133&#40;T x&#41;
   at OpenRA.Exts.Do&#91;T&#93;&#40;IEnumerable`1 e, Action`1 fn&#41;
   at OpenRA.WorldUtils.DoTimed&#91;T&#93;&#40;IEnumerable`1 e, Action`1 a, String text, Double time&#41;
   at OpenRA.World.Tick&#40;&#41;
   at OpenRA.Game.Tick&#40;OrderManager orderManager&#41;
   at OpenRA.Game.Tick&#40;OrderManager orderManager, Viewport viewPort&#41;
   at OpenRA.Game.Run&#40;&#41;
   at OpenRA.Program.Run&#40;String&#91;&#93; args&#41;
   at OpenRA.Program.Main&#40;String&#91;&#93; args&#41;

User avatar
Sleipnir
Posts: 781
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Post by Sleipnir » Sat Jun 29, 2013 12:43 am

Remove `DefaultShellmapScript` - this will be looking for actors that don't exist in your map.

Post Reply