HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Changing Armor/attack Types

04-06-2008, 12:40 AM#1
Selir
Hi there.

I thought of a trigger/ability or whatever that can change unit's armor/attack type during the game. Some people suggested using morphing abilities, but considering map which consists of a total of about 70+ units it's at least the least convenient solution if not impossible (taking into account 6 attack types * 7 armor types * 70+ units ...).
I've also tried "Root" ability, but when using it units cannot move and the item, to which the ability is attached, cannot be selected nor dropped.
There's also ability called "Chaos" which works quite like morphing abilities (but without timer), however it's only one-way change (unit won't get back to what it was before using it).
And so here's my question - is it possible to make something I've mentioned? I'm not interested in morphing abilities for some reasons (they use alternate unit etc), I won't mind being given JASS function(s).

For a long while I was wondering if it's possible at all... but I thought that someone more experienced than I could think for a while.

Thanks in advance for your time and answers.
04-06-2008, 02:16 PM#2
Spec
Hmm... no, unfortunately changing attack & armor types is available only via morph (or "chaos") abilities and using alt unit.
But, probably, you can create your own damage system (or use ready systems), because it will be more effective in your case ( and you will evade from horrible number of abilities ^^ )
04-06-2008, 02:57 PM#3
Selir
Sounds interesting, but this brings another question. ;)
Is this system (or any of such systems) flexible enough to make it react on different groups of items equipped?
For example:
- my unit picked up Sword and should now deal Slice damage. While attacking, Damage System converts his type of dmg to Slice and then deals appropriate amount of dmg to a victim.
- the same unit, who dropped Sword and picked up Bow should now deal Pierce dmg. Damage System will now recognize his type of dmg as Piercing (due to item equipped) and will deal such type of dmg to a victim.
In both cases armor type and dmg reduction is taken into consideration.
Is it possible to be done? If so, won't it lag too much in multiplayer game?
04-06-2008, 03:02 PM#4
Sabertooth_X
It could be done with unique units through variables per hero for their current armor and attack types.
But I cant think of anything for such a massive scale.
04-06-2008, 03:32 PM#5
Spec
There are some variables, needed for this:
- Int array, that stores attack type for each unit
- Int array, that stores armor type for each unit
- Real array (stores amplifiers for damage)
i.e. you have 6 attack types & 7 armor types so here should be 42 entries. 6*[1..7]

So, when some unit damages the target, we get info about attack type from attacker and armor type from victim, then we deal additional (or reduce) damage with amplifier.
Array index for amplifier is [AttackTypeNumber * ArmorTypeCount + ArmorTypeNumber]

EDIT: >> (by the way, you can use one int array instead of two :) )
04-06-2008, 05:52 PM#6
Selir
Quote:
Originally Posted by Sabertooth_X
It could be done with unique units through variables per hero for their current armor and attack types.
But I cant think of anything for such a massive scale.
So what's your idea considering smaller scale? Does it mean creating variables for each hero? I'm curious, maybe that would give someone idea on how to create it for bigger groups of units.

PS. I'm actually going to make all units hero-type, so that they would be equally important on the battlefield and the more they'll fight the better they'd be. Changing their weapons/armors during the game would bring quite unique experience of custom gameplay, but the further I think of possible solutions the harder it is to imagine it. :(


Spec, could you please describe your idea a bit? I'm not sure if I'm thinking of the same thing after I read that.
04-07-2008, 04:59 AM#7
Hydrolisk
Why don't you just cannibalize standard melee unit data?

The game probably has to load them anyways for every map, so logically you would only be saving space by cannibalizing that data.
Unless, of course, you've already cannibalized the around-500-units that the standard melee provides you with... Which I highly doubt (or you need that data, which I also highly doubt).

Or, unless there's some sort of evil thing that causes mapmakers to despise cannibalizing melee unit data, such as lost memory... or something highly doubtful such as that.
04-07-2008, 06:37 AM#8
Jazradel
Store the default attack and armour types for each unit, then when a unit is damaged, adjust the damage to match the difference in reductions between the units default type and the type it's given.
04-07-2008, 07:43 AM#9
Spec
So, Jazradel shorty and simply described work of the system I mean, Selir. I hope you understand at least his post ^^
Hydrolisk, I'm frightened by your language >_<
04-07-2008, 08:51 AM#10
Selir
Quote:
Originally Posted by Spec
I hope you understand at least his post ^^
I understood all of your posts (now except Hydrolisk's one with cannibalizing data (idea of this solution is quite clear, but I'm interested in how it's done) - have to read something about that thing :P), however I was hoping for not being forced to use this kind of damaging system. It won't be that much problem, but it'll take a lot of time.

Thank you all for help, I'll start creating/adjusting Damage System as fast as possible. :)
04-07-2008, 10:39 AM#11
Fledermaus
Well you can change armor type via the upgrade Reinforced Defenses.
04-07-2008, 10:59 AM#12
Selir
I don't want to change armor for every unit of that type, but for single unit when he picks up armor/weapon.
04-07-2008, 10:09 PM#13
Hydrolisk
What I meant was just reuse standard melee units so you don't have to create entirely new units.
Such as converting the normal Footman to a Satyr God of Ultimate Lolcat. I don't know, but it would save space unless you need normal melee units.
04-08-2008, 07:18 AM#14
Spec
Hydrolisk,
Hmm, I doubt that changing standard unit data will save space, because, as I know, any object changes in OE are written into war3map.w3o. I.e. changing footman max hp and attack is approximately equal to creating new footman with changed stats.
And, as I understood, your method still uses morphing => have tons of "morph"-type abilities.
Attached Images
File type: jpgButman16.jpg (2.4 KB)
File type: pngblplab.png (3.2 KB)
04-08-2008, 07:36 AM#15
Valdez
I don't know if its been said or discussed yet as I have not fully read every detail in thi thread but rather skimmed over it very quickly. Have you considered using upgrades? I know an upgrade would affect any unit who uses it but u could just make a seperate upgrade for every (unit) and have that upgrade learned via trigger for the aquiring unit and vice versa. This idea won't really work if you have a player who can use multiple units for each unit type though. Other than that I have no idea as I don't have WE on this compuer but I will look later for other possibilities.