• 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.

Multiplier Trigger

Status
Not open for further replies.
Level 5
Joined
Oct 5, 2012
Messages
67
I want to create a trigger that mulitplies the stats of some items and abilites (take a basic +3 strength item for example)... If you write "-2x" it should have +6 strength, if you write "-3x" it should have + 9 strength... Is this possible WITHOUT creating 3 new items? Is it possible to change the stats of an item with triggers ?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I want to create a trigger that mulitplies the stats of some items and abilites (take a basic +3 strength item for example)... If you write "-2x" it should have +6 strength, if you write "-3x" it should have + 9 strength... Is this possible WITHOUT creating 3 new items? Is it possible to change the stats of an item with triggers ?

Technically no, you can't change the stats of items midgame.
However, there are ways around this, such as trigger stat gains from items.
 
Level 5
Joined
Oct 5, 2012
Messages
67
Technically no, you can't change the stats of items midgame.
However, there are ways around this, such as trigger stat gains from items.

explain pls, im new too editor :)

e./ in DOTA there is a WTF mode (as you may know) that sets all abilites to mana costs 0 and 0 second cooldown. Isn't that changeing abilites in midgame too? Any clue how this works?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
explain pls, im new too editor :)

If you are new to editor, then my way is probably too hard.

However, since you asked, then I will try to explain.

Firstly, you can probably do all this in GUI(normal trigger editor), but it will be even harder. That's because GUI is somewhat limited(no local variables, mainly).

Basically the best way known to me, for changing stats midgame, is using a bonusmod.

What is a bonusmod?
It's a system that uses a bunch of abilities to modify the attributes of units. This especially goes for values that do not even have trigger functions by default(such as armor).
The abilities that a bonusmod uses are always based on powers of 2(1,2,4,8,16,32...) - Why? Because this takes the lowest amount of abilities of any way known to me.

What does this have to do with changing how much an item gives you attributes? - Basically you make 3 triggers. In the first you use variable arrays to define some items. Something like:
  • Set ItemType[1] = Claws of Attack
  • Set ItemDamage[1] = 5
  • Set ItemTypes = 1
That way you define all the items and what attributes you want to give them.
In the second trigger you detect when an item is picked up and then give the unit abilities, according to what stats you want to give and how much.
In the third trigger you turn this process around - You detect when an item is lost and reduce the stats back.

Note that some things can be changed through simple GUI functions(probably), such as hero str/agi/int. However, most stats can not.

The map attached contains my own BonusMod and a variety of other systems that I will not bother to remove from it. They might also turn out to be useful to you, if you figure out how they work.
In order to use this map you need JNGPE. This is a modified editor that makes triggering much easier in JASS and also enables vJASS(which makes some things easier). However, vJASS also makes maps unopenable to the normal editor, since the usual editor can't understand vJASS at all.

I could talk about all this way longer, but first I need to know exactly what you can and can't do now. Then I will know how to present all this information and whether you even want it.
 

Attachments

  • Map Template v0.02t.w3x
    61.4 KB · Views: 57
Level 5
Joined
Oct 5, 2012
Messages
67
thanks, no worries, I'm not THAT new, but noob compared to most people here in the forum. I think I'm able to realize what you said, sounds good to me..

I edited my post, any clue how the WTF mode in dota is scripted? This could help me very much, because i want to x2 part also to effect abilites...
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
thanks, no worries, I'm not THAT new, but noob compared to most people here in the forum. I think I'm able to realize what you said, sounds good to me..

I edited my post, any clue how the WTF mode in dota is scripted? This could help me very much, because i want to x2 part also to effect abilites...

Well, I am very sure that cooldown can not be modified midgame. So dota uses multiple abilities.
It seems quite likely, since they already have 6 kinds of items. (glyph, disabled,normal,courier, etc)
 
Level 5
Joined
Oct 5, 2012
Messages
67
I got a idea how to trigger the abilites: Just spawn x dummy-units (x is the modifier) and let them cast the ability too... sounds like it might work...
 
No. Not even hero dummies. Besides, what prevents you from using the GUI function that only takes one line of the code?

Also, if you really want to use dummies, think of it this way. Dummies are created upon cast of the hero. Hero doesnt cast. You create dummies. How do you read the minds of people who want to cast but their abilities are on cooldown? Who do you target?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I think I just figured out how to mess with cooldowns a little.
Engineering upgrade is the key. It replaces abilities, while keeping their "status" intact. This means that you can, for instance, switch between 2 versions of the same ability, but with different stats.
 
Level 5
Joined
Oct 5, 2012
Messages
67
No. Not even hero dummies. Besides, what prevents you from using the GUI function that only takes one line of the code?

Also, if you really want to use dummies, think of it this way. Dummies are created upon cast of the hero. Hero doesnt cast. You create dummies. How do you read the minds of people who want to cast but their abilities are on cooldown? Who do you target?

Easy - i wasn't talking about the WTF mode anymore, but about my start-topic. The idea that every spell deals 3 times the damage ;).
 
Level 5
Joined
Oct 5, 2012
Messages
67
Couldnt i just do the same with items? Just add the item ability x-times to the hero since item abilities dont show up anyway?
and later remove them, if item is dropped?

e:/ or just make every item stackable and if hero picks item up he gets x -1 extra stacks?
 
Last edited:
Level 21
Joined
Mar 27, 2012
Messages
3,232
Couldnt i just do the same with items? Just add the item ability x-times to the hero since item abilities dont show up anyway?
and later remove them, if item is dropped?

e:/ or just make every item stackable and if hero picks item up he gets x -1 extra stacks?

No ability can be added multiple times. Items are also a widget and using them is kind of like using the ability of another unit. Items can have multiple abilities, but you can only add them in OE.
 
Status
Not open for further replies.
Top