Armament@PRIMARY and Armament@SECONDARY. Difference?

Dune 2000, Dune2000, D2K

Information and discussion for custom maps and mods.
Post Reply
Adrian
Posts: 135
Joined: Wed Feb 12, 2020 5:44 pm

Armament@PRIMARY and Armament@SECONDARY. Difference?

Post by Adrian »

Armament@PRIMARY and Armament@SECONDARY. Difference?

Some units have two weapons. How do they use the weapons?
Maybe, first one — against infantry, second one — against vehicles… Or vice versa? Or something else?

Code: Select all

sardaukar:

	Armament@PRIMARY:
		Weapon: M_LMG
	Armament@SECONDARY:
		Weapon: M_HMG

fremen:

	Armament@PRIMARY:
		Weapon: Fremen_S
	Armament@SECONDARY:
		Weapon: Fremen_L
If there will be any answer, then I will write more detail about my aim.

votadc
Posts: 12
Joined: Wed Aug 23, 2017 2:02 am

Re: Armament@PRIMARY and Armament@SECONDARY. Difference?

Post by votadc »

They fire in the same time, they have two weapons because one is effective against infantry and another against vehicles.
If the two weapons have a different ValidTargets then you can get interesting results. For example troopers can have a longer range against aircraft only but keep the same range against ground units (I remember them destroying carryalls in Dune 2, in Dune 2000 they couldn't) so they won't be too powerful on land. You can also do a combat medic. Maybe you can even do something like the sardaukar centurion in Emperor...but you need two different animations for the two different weapons.

Adrian
Posts: 135
Joined: Wed Feb 12, 2020 5:44 pm

Re: Armament@PRIMARY and Armament@SECONDARY. Difference?

Post by Adrian »

Thank you very much for your detail answer!
My aim was to make unit with 2 weapons. First one — against infantry, second one — against vehicles.

Now I understand. So the trait "ValidTargets" defines target: infantry/vehicles and so on. Not Armament@PRIMARY and Armament@SECONDARY, as I supposed.

I found, sardaukars weapons made this way.
As you can see in the code above (in the first message), sardaukars have 2 weapons:
M_LMG and M_HMG.

Code: Select all

M_LMG:
	...
	ValidTargets: Infantry


M_HMG:
	...
	InvalidTargets: Infantry
--------------------------------------------------
For example troopers can have a longer range against aircraft
Very interesting example. New challenge — to make trooper, who can do it! :-)

At first sight at the code of weapons... Unit "trooper" has weapon "Bazooka".

Code: Select all

Bazooka:
	Inherits: ^Rocket
And nothing more in the code. No restrictions (about air) here.

Code: Select all

^Rocket:
...
	Warhead@3Eff: CreateEffect
		Explosions: tiny_explosion
		ImpactActors: false
		ValidTargets: Ground, Air
It is not quit understandable here... Why do troopers not inherit air targets?
Nevermind.
I suppose I will find it later. I hope...

Code: Select all

You can also do a combat medic.
It's interesting to try!
I found already the trait
ValidTargets: Heal

Thank you ones more — for big and interesting answer!

votadc
Posts: 12
Joined: Wed Aug 23, 2017 2:02 am

Re: Armament@PRIMARY and Armament@SECONDARY. Difference?

Post by votadc »

I think that troopers have small range compared to turrets and missile tanks and their weapon type is bullet and not missile. Missile have a smart tracking while bullet doesn't. Aircraft is too fast for bullets type (missile isn't the only solution, laserzap and instanthit work as well) but I think that with a slow and static aicraft (for example the kirov from RA2 or the ADP from emperor) the troopers could fight that kind of aircraft with their current weapon.

Adrian
Posts: 135
Joined: Wed Feb 12, 2020 5:44 pm

Re: Armament@PRIMARY and Armament@SECONDARY. Difference?

Post by Adrian »

Missile have a smart tracking while bullet doesn't. Aircraft is too fast for bullets type
That's right. Thank you for explanation.
I tried to make the unit in yesterday evening.
Even if I give to unit (trooper) possibility for "air", it just doesn't have time.
Aircraft is too fast, just like you said. Even if to give much bigger Range (7c0, for example) for standard trooper weapon (Bazooka) and to add TurnSpeed for trooper.

Such unit (trooper against aircraft) works with missile weapon. For example — Weapon: mtank_pri.
I tested it in game.
And it needs to change something in AutoTarget, else it has no reaction on AIR target.
If someone (besides me) interested, I can write more detail.

Post Reply