Page 1 of 1

Defining different properties for different factions.

Posted: Sun May 29, 2016 2:44 pm
by SoScared
First post in the modding subforum!

So I posted an idea of mine here and wanted to try it out on a modded map. I've already tried a bit through some trial and error without luck.

Question: Is there a way to define different properties for a unit for different factions? I'm looking for the medium tank 2TNK to cost 1050 for Germany and 850 for France/England. Also I'm looking for the 90mm weapon to do different damage for different factions as well. I've recently delved into map modding so I'm currently on a steep learning curve :)

Posted: Sun May 29, 2016 3:48 pm
by AmericanBlunt_
You can, for example, crate a new unit and give it the same properties as the tank you seek.
As for production of your unit maybe look into production queue for war fac?

Posted: Sun May 29, 2016 4:31 pm
by SoScared
I managed to make a German Medium Tank inherit the regular Medium Tank and fix prerequisites as to make it exclusive to Germany, plus make the regular Medium Tank exclusive to the remaining Allied factions.

Looking good!

The 90mm weapon change was easy in comparison:

German Medium Tank:

Code: Select all

	2TNK:
		Buildable:
			Prerequisites: fix, ~vehicles.allies, ~!vehicles.germany, ~techlevel.medium	
		
	2TNK.Germany:
		Inherits: 2TNK
		Buildable:
			Prerequisites: fix, ~vehicles.germany, ~techlevel.medium
		Valued:
			Cost: 1050
		Tooltip:
			Name: German Medium Tank
			Description: German Main Battle Tank.\n  Strong vs Vehicles\n  Weak vs Infantry, Aircraft
		Turreted:
			TurnSpeed: 4
		Armament:
			Weapon: 90mm.Germany
		RenderSprites:
			Image: 2tnk
German 90mm.

Code: Select all

	90mm.Germany:
		Inherits: 90mm
		Warhead@1Dam: SpreadDamage
			Versus:
				Heavy: 125	
Didn't think modding would be so rewarding!

Posted: Sun May 29, 2016 4:47 pm
by Graion Dilach
SoScared: I'd like to bump in with telling that indeed that is the way to do it. Good luck going on and have fun.

Re: Defining different properties for different factions.

Posted: Sun May 29, 2016 7:20 pm
by scorp
SoScared wrote: First post in the modding subforum!
*achievement unlocked: succesfully opened pandora's box*

Posted: Sun Jun 05, 2016 11:57 am
by SoScared
Thanks for the support! Wouldn't be possible without the helpful nature of the community.