• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Custom Attack Types

Status
Not open for further replies.
So... after perusing the Data Editor, I noticed that SC2 does not support custom attack types.

Is this true, or is there a way to add new attack types without having to replace the entire combat system with a Galaxy combat system?


I want to be able to do things like add 20 fire damage for a weapon that applies itself for 3 seconds and then have defenses that might reduce fire damage by 6.


That's all, tx ^_^.

edit
It also looks like you can't add multiple of the same weapon to a unit? wtf?

Code:
native void         UnitWeaponAdd (unit inUnit, string inWeapon, string inTurret);
native void         UnitWeaponRemove (unit inUnit, string inWeapon);

edit
I really want to do things like fire elementals, but it's looking like I have to write an entire combat system from scratch for them. They would absorb fire damage, take 0 physical, and reduce certain elemental damages, take double water damage, etc.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Behaviours can do what you want in a small scale. You can see what Blizzard did with the Void Ray so it deals more damage to massive units.

For complex type systems this might become unmaintainable and error prone.

A possible idea is to trigger enhance various effects. When you deal damage with an effect representing "fire" no damage is done but instead you divert the damage from it using a trigger to a single "fire damage effect" which can then deal damage to units. If behaviours cannot modify this specific damage source in the nescescary ways you could then resolve the resistances of a unit (eg, charges of a behaviour) and apply the damage corrections in the trigger.

Stopping all damage from a unit is as simple as a buff behaviour. Of course you add your elemental damage effects to the exclusions list but those are very few and the same buff behaviour would be used for all combat units.

Yes it will probably need triggers to be done well, but it is likely no where near as complicated as you might think. With StarCraft II a lot of un-supported features can be added quite easilly with a few simple triggers which work together with supported features from data.

An example is a complete tactical point capture system is possible with about 5 data entries and 2 triggers (which execute only 1-2 lines of code).

It also looks like you can't add multiple of the same weapon to a unit? wtf?
You sure about that? Remember that a unit can only carry out 1 attack at any time, but that does not prevent it from having multiple weapons firing at the same time. If multiple weapons of the same type are not supported it is likely due to how they are mapped to the units.
 
Status
Not open for further replies.
Top