Defining different properties for different factions.

Information and discussion for custom maps and mods.
Post Reply
User avatar
SoScared
Posts: 1116
Joined: Wed Apr 11, 2012 6:16 pm
Location: Oslo
Contact:

Defining different properties for different factions.

Post 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 :)

AmericanBlunt_
Posts: 56
Joined: Wed Apr 02, 2014 8:42 pm
Location: Mars

Post 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?

User avatar
SoScared
Posts: 1116
Joined: Wed Apr 11, 2012 6:16 pm
Location: Oslo
Contact:

Post 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!

User avatar
Graion Dilach
Posts: 277
Joined: Fri May 15, 2015 5:57 pm

Post 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.
Image
Image
Image
AS Discord server: https://discord.gg/7aM7Hm2

scorp
Posts: 96
Joined: Sat Mar 08, 2014 9:35 pm

Re: Defining different properties for different factions.

Post by scorp »

SoScared wrote: First post in the modding subforum!
*achievement unlocked: succesfully opened pandora's box*

User avatar
SoScared
Posts: 1116
Joined: Wed Apr 11, 2012 6:16 pm
Location: Oslo
Contact:

Post by SoScared »

Thanks for the support! Wouldn't be possible without the helpful nature of the community.

Post Reply