Page 1 of 1

Abilities ?

Posted: 28 Jul 2006, 14:42
by Crampman
Well, could it be possible to add a spectial abilities system, a la Dawn of War, or warcraft ?
I mean : a special action (special attack, like Dgun, by exemple) wich can be used by a unit. To use an ability, players just would have to click on an icon in the GUI.

The abilities should be defined into tdf files, like this :

Code: Select all

[MY_ABILITY]
{
	[Definition]			
	{			
	Description=My first ability !          // The description of the ability	
	ActivationType=<instant/delay/toggle>;  //The ability activation type
	Duration=2;	     // The ability duration (If ActivationType=delay)
	ReloadTime=60;	  // The ability reloadtime 
	Icon=my_icon;	   // The ability GUI icon
	Weapon=my_weapon;  // If the ability is an attack, specify the weapon used
	EnergyCost=0;      // The ability energy cost
	MetalCost=0        // The ability metal cost
	}

	[Modifiers]
	{
	// Here, all the fbi tags of the unit to modify while the ability is activated.
	}
}
Into the unit fbi file, an ability could be used like this :

Code: Select all

Ability1=MY_ABILITY;			//This unit have 1 ability


If the ability is a weapon, this weapon should be fired only when using the ability. So we can add a tag into the weapon tdf :

Code: Select all

IsAbility=1;			//This weapon is a special attack.
When an ability is activated, it shall be nice to have an animation. So we need to have a script funcion, like 'StartAbility1' wich will be called when using this ability
When using an attack ability, you would have to click on the ability icon, and then click on the target.

Now, concerning the possibilities offered by such a system :

-A nuke launcher wich can fire 2 or 3 nukes types ! With 2 or 3 ability using differents nukes weapons, this is possible !
-Metamorphosis units ! Imagine a K-bot wich can fly when using turning on an ability, or a tank capable to change his weapon !
-New cloak/shield uses ! With a timed ability, you can have a unit wich can turn on his shield/cloak for a limited time !

Posted: 28 Jul 2006, 16:44
by KDR_11k
Turning a ground unit into a flying unit wouldn't be possible even with that system. But yes, user-defined script hooks would be a nice feature.

Posted: 29 Jul 2006, 00:45
by Gnomre
And you can already base shield usage on time if you know how to script...

Posted: 31 Jul 2006, 00:42
by Pxtl
I'd just make the special abilities weapons, then focus on making weapons more versatile. Basically, have the "special ability" be a command-fire weapon like the D-Gun, but have the "fire" command appear in the build list instead of the orders list. For large actions you could make the weapon buildable like a nuke.

Posted: 31 Jul 2006, 07:21
by KDR_11k
Not necessarily the build list, I'd say script hook buttons should be listed between the order and build buttons.

Hm, I think this could be used to make turrets change weapons as seen in Earth 2150/60.

Looking at your example code again you don't seem to propose script hooks so I'll do that: Such an action should have a tag that defines which BOS function(s) to call. Optimally BOS scripts would be expanded to allow things like force firing a weapon (fire-weapon [num] at [heading], [pitch]; or fire-weapon [num] now;, the latter wouldn't reaim the weapon and simply use the rotation of the queried part).