• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Dynamically Change Armor and Attack Type

Status
Not open for further replies.
Level 11
Joined
Jun 2, 2013
Messages
613
Just a quick question. This has probably been asked before, but is there a way to dynamically change armor/attack type for a unit in-game through triggers?

Suppose I have a units based on a Footman which has Normal Damage and Heavy armor by default.

Is there a way through triggers to change his Attack Type and/or Armor Type, or would I literally need to make all kinds of custom units?

I would like for the trigger to set these randomly, which I could easily do IF there is a way to actually change the armor/damage.
 
Level 11
Joined
Jun 2, 2013
Messages
613
I think it is possible via upgrades to change armor and attack type. Check that. Of course, even if it is possible you're still limited as you cannot decrease research, only increase them.

True, that is somewhat limited, but that's still probably more efficient than just units. I'll check that out, thanks.

Edit*
SO if that is possible...
In a Tower defense, for each wave you give the unit two upgrades, one for armor and one for damage.
Then, I'm wondering If you could create those two upgrades with multiple 'levels' with each level representing a different armor/damage type.

If you could do that then you could randomly set the upgrades level to change the armor/damage for each wave.

So in a 30 wave TD that would be 60 total upgrades each with ~7 levels - though tooltips and such wouldn't matter.
60 upgrades is still better than 210 units... At least it reduces the object editor clutter.
 
Last edited:
Level 11
Joined
Jun 2, 2013
Messages
613
Because I want every single wave to have a different attack and armor type each game. The hitpoints and actual unit model for a wave won't change but the armor and attack type would, if that makes sense.

Though, on another note I could just make several units with different armor and then set their hitpoints through triggers or upgrades. But I don't think that is as dynamic as I'm wanting.
 
Level 11
Joined
Jun 2, 2013
Messages
613
For the most part I'm not sure how I want to do it.. I'm still rummaging through different options. Whatever I do decide, I want to be as diverse as possible.

Edit**

I can change unit's armor via upgrades but not attack...Any additional thoughts on changing the attack type or is that something that just can't be done except for object editor?
 
Last edited:
Level 11
Joined
Jun 2, 2013
Messages
613
You can use the second attack field in the OE and use the warclub ability to enable the second attack. Set number of attacks to 0 and it will be permanent.

But why bother? Just create more unit types and select which one you need.

Let's assume there are 30 waves. Now let's also assume I want each wave to have a random armor type, and attack type, damage, and hitpoints.

So each wave I would have to create every possible unit: Seige-heavy, Siege-Light, Siege-Medium, Siege-Unarmored, Siege-Heroic etc etc...
Essentially, If I did it that way, with 6 Attack Types and 5 armors - assuming it's only 30 waves, that's 900 Custom units.

To answer your question, I'm wanting to find the efficient solutions to creating dynamic wave's each game. Object editor clutter reduction is the goal. While I do want there to be several base unit models for the waves, I want as few static stats as possible.


However you are correct, I could just make 60 base units with different armor/damage and then simply alter the hitpoints and damage for the respective wave.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Essentially, If I did it that way, with 6 Attack Types and 5 armors - assuming it's only 30 waves, that's 900 Custom units.
Where did you do calculations?

If I boil potatoes, and I do one, it takes me 10 minutes to make them ready.
If I boil 50 potatoes, does it take me 8 hours and 20 minutes?

If I want one wave of total random attack type and armor type, I would need 6X5=30 different unit types.
If I want 30 waves of total random attack type and armor type, I would need 6X5=30 different unit types.

Now I aint no good in maths, but I am good with logics.
 
Level 17
Joined
Dec 11, 2014
Messages
2,004
Where did you do calculations?

If I boil potatoes, and I do one, it takes me 10 minutes to make them ready.
If I boil 50 potatoes, does it take me 8 hours and 20 minutes?

If I want one wave of total random attack type and armor type, I would need 6X5=30 different unit types.
If I want 30 waves of total random attack type and armor type, I would need 6X5=30 different unit types.

Now I aint no good in maths, but I am good with logics.

Truth.
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
Where did you do calculations?

If I boil potatoes, and I do one, it takes me 10 minutes to make them ready.
If I boil 50 potatoes, does it take me 8 hours and 20 minutes?

If I want one wave of total random attack type and armor type, I would need 6X5=30 different unit types.
If I want 30 waves of total random attack type and armor type, I would need 6X5=30 different unit types.

Now I aint no good in maths, but I am good with logics.

False, I disagree. I love Maths and it's time to tell ya why you're wrong.
Let's simplify it. We got 30 waves which means 30 different creeps. The attack types are 6 and armor types are 5 which means there are 30 possible combinations (6x5) for every type of creep, meaning that 900 custom units would be needed (30x30). Basically, each creep would have 29 clones but with different attack types and armors.
 
Level 11
Joined
Jun 2, 2013
Messages
613
False, I disagree. I love Maths and it's time to tell ya why you're wrong.
Let's simplify it. We got 30 waves which means 30 different creeps. The attack types are 6 and armor types are 5 which means there are 30 possible combinations (6x5) for every type of creep, meaning that 900 custom units would be needed (30x30). Basically, each creep would have 29 clones but with different attack types and armors.

^^^^
This


I understand the logic that I could create 30 different types of units each with a different weapon/armor combo to cover all 30 waves and then set one wave to one of those units...

What If I wanted the game to randomly generate the actual unit too? Where there is a possibility that wave 1 could be a Footman AND wave 24 could be a footman but the armor and attack type are set randomly for the respective waves.

You wouldn't want every wave to be a Footman, so you would still need to create different models for diversity. If you used 30 base models and wanted to effectively cover all combinations for each model you used that would be 900 total units.
Even if you wanted wave 1 to ALWAYS be a Footman, You would still need 30 Custom Footmen to cover EVERY possible combination of attack/armor just for that wave.

I knew from the beginning it could "technically" be done with just 30 unit's :)
I was basically theorizing generating enemy waves with a little more diversity.
 
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,657
False, I disagree. I love Maths and it's time to tell ya why you're wrong.
Let's simplify it. We got 30 waves which means 30 different creeps. The attack types are 6 and armor types are 5 which means there are 30 possible combinations (6x5) for every type of creep, meaning that 900 custom units would be needed (30x30). Basically, each creep would have 29 clones but with different attack types and armors.

From what I understand, all waves have the same unit.
However each wave a random attack-type and armor-type is chosen for those units. It be unit specific or everyone from the same wave, the same stats, I dont care.
But he said that there is one unit type, so 30 units will do.

However, there is one question...
Why do you want to change their attack and armor type?
The ONLY reason is NOT the damage.
The ONLY reason is that icon in their HUD when you selected them.
(Next to the fact that TDs never have their waves attack anything at all.)
The damage done can be simply modified with a DDS.
The icons are a bit harder.
 
Level 11
Joined
Jun 2, 2013
Messages
613
From what I understand, all waves have the same unit.
However each wave a random attack-type and armor-type is chosen for those units. It be unit specific or everyone from the same wave, the same stats, I dont care.
But he said that there is one unit type, so 30 units will do.

However, there is one question...
Why do you want to change their attack and armor type?
The ONLY reason is NOT the damage.
The ONLY reason is that icon in their HUD when you selected them.
(Next to the fact that TDs never have their waves attack anything at all.)
The damage done can be simply modified with a DDS.
The icons are a bit harder.

I never said all the waves would use the same unit. I said it COULD be done with 30, but this is undesirable.

Legion TD is an example of what I want to emulate and an example of a tower defense where the waves do attack. However I also want more diversity within the attacking the waves, thus the reason for wanting to change armor And attack type.
 
Level 11
Joined
Jun 2, 2013
Messages
613
It has to do both. The damage/armor reduction from gameplay constants is necessary for the functionality of the tower defense and the players should also be able to see the different icons with the tooltips describing the damage type/armor to distinguish them apart. This is mainly the reason a DDS isn't really what I need, I had already considered one.
 
You could try using object generation and/or lua so you don't have to force your editor to load 900 objects every time you want to edit your work.

You could also do it a way nobody's thought of yet, disable selection when wave starts and re-enable when it ends. Use special effects with models of each attack/armor type to hover over each unit then combine a DDS. Tuh da, infinite possibilities with minimal work. You could achieve the same with dummy units, but using a custom .mdx file might increase file size... Sure beats using up your players memory.

However.... There is just no *Edit: Easy* possibility(bug/hack) known for dynamic armor/attack types besides what I suggested. Trust me, I have explored it for several years, no findings yet.
 
Status
Not open for further replies.
Top