System Bonus (unit state modification)

Cohadar

master of fugue
Reaction score
209
I updated(fixed) the Attack and Move Speed plugin.

Maximum attack speed bonus is 400% <-- this is true

EDIT:
Maximum move speed bonus is 100 <-- not true, I made error while testing.
Maximum move speed bonus is limited by gameplay constants
So if units speed is say 300 and gameplay says 522 max bonus is 522-300 = 222
 

Builder Bob

Live free or don't
Reaction score
249
Maximum move speed bonus is 100

How did you find that?

I haven't found any limit to how much move speed I can give with a single Move Speed Bonus ability. I tested with a unit with 25 default move speed and could add all the way up to 522 move speed to it.

Additionally, using SetUnitMoveSpeed() on a unit that has been buffed by the Move Speed Bonus ability, the unit's move speed will be set to UnitMoveSpeed + MoveSpeedBonus (instead of just UnitMoveSpeed which I thought initially). With a bonus of let's say 522, you can set the unit's move speed to 0, and it will still run at 522 move speed.

It doesn't affect your system much (if at all), but thought I could report my findings anyway.
 

Cohadar

master of fugue
Reaction score
209
Version 1.3
Removed textmacros, using struct interfaces now.
Much better because you can now use Bonus variables.
Believe it or not it is backwards compatible.


How did you find that?
...

Make Item Move Speed Ability and set bonus field to 200
than give it to some unit
than do:
JASS:

set current = R2I(GetUnitMoveSpeed(whichUnit))
set default = R2I(GetUnitDefaultMoveSpeed(whichUnit))
call BJDebugMsg(I2S(current-default))


and tell me what it prints.
 

Cohadar

master of fugue
Reaction score
209
I was testing the speed on Bloodmage (speed 300) and since default move capacity in wc3 is 400 the bonus was cut off. :banghead:

Remember to set your max speed to 522 in gameplay constants people....
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Hmm... Could this also be used to add attack range in-game? Just asking...
 

Builder Bob

Live free or don't
Reaction score
249
I was testing the speed on Bloodmage (speed 300) and since default move capacity in wc3 is 400 the bonus was cut off. :banghead:

I thought that might be what happened. I really don't get why it's not 522 by default.

Hmm... Could this also be used to add attack range in-game? Just asking...

Only if you know about any ability that adds attack range. I don't think it exists.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Might it be possible to use the upgrade, for rifleman, as a base for it?
 

Sevion

The DIY Ninja
Reaction score
424
Wow, Cohadar, this is really nice. Would you mind if I used this in EGUI in place of the other system I had?
 

Builder Bob

Live free or don't
Reaction score
249
Might it be possible to use the upgrade, for rifleman, as a base for it?

I've very little experience with upgrades, but as far as I know upgrades need to be specified for every unit in the object editor.
They can't be removed either, so you couldn't use Cohadar's system for this. It requires you to be able to remove abilities every time you change the bonus.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Ah, alright. Was just wondering.
 

Builder Bob

Live free or don't
Reaction score
249
Yeah, you can. The examples are misleading, as you don't really add bonuses on top of what is already there.

set Bonus_Life[whichUnit] = 4 // will set the unit's life to base life + 400 life (DELTA = 100)
set Bonus_Life[whichUnit] = 0 // will set the unit's life to base life (DELTA = 100)
 

waaaks!

Zinctified
Reaction score
255
im looking for systems like these lately, and lots of them fail, and sometimes they have bugs, i hope this perfectly works as i needed
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Is it possible to add negative movement speed?
 

Frozenhelfir

set Gwypaas = Guhveepaws
Reaction score
56
JASS:
//  EXAMPLES:
//       * set Bonus_Life[whichUnit] = 4    // will add 400 life (DELTA = 100)
//       * set Bonus_Armor[whichUnit] = 10  // will add 10 armor (DELTA = 1)
//       * set Bonus_Damage[whichUnit] = 5  // will add 25 damage (DELTA = 5)
//       * set Bonus_Evasion[whichUnit] = 4 // will add 20% evasion (DELTA = 5%)


Does the system become ineffecient if I set damage delta = 1 (so I can set damage to whatever I want), and then need to add 500 damage to a unit or some large number? I made something for my map to do this here, but I think I'll probably use this if it has the same functionality and efficiency for high numbers. Meh, yours probably has better efficiency anyway...
 

Gwypaas

hook DoNothing MakeGUIUsersCrash
Reaction score
50
How would I modify this system so it supports bigger values? I've tried doing this but no success.

JASS:
//! external ObjectMerger w3a AItg A8T0 anam &quot;Bonus Damage&quot; Iatt 1 5   ansf &quot;(binary 0)&quot;
//! external ObjectMerger w3a AItg A8T1 anam &quot;Bonus Damage&quot; Iatt 1 10  ansf &quot;(binary 1)&quot;
//! external ObjectMerger w3a AItg A8T2 anam &quot;Bonus Damage&quot; Iatt 1 20  ansf &quot;(binary 2)&quot;
//! external ObjectMerger w3a AItg A8T3 anam &quot;Bonus Damage&quot; Iatt 1 40  ansf &quot;(binary 3)&quot;
//! external ObjectMerger w3a AItg A8T4 anam &quot;Bonus Damage&quot; Iatt 1 80  ansf &quot;(binary 4)&quot;
//! external ObjectMerger w3a AItg A8T5 anam &quot;Bonus Damage&quot; Iatt 1 160 ansf &quot;(binary 5)&quot;
//! external ObjectMerger w3a AItg A8T6 anam &quot;Bonus Damage&quot; Iatt 1 320 ansf &quot;(binary 6)&quot;
//! external ObjectMerger w3a AItg A8T7 anam &quot;Bonus Damage&quot; Iatt 1 640 ansf &quot;(binary 7)&quot;
//! external ObjectMerger w3a AItg A8T8 anam &quot;Bonus Damage&quot; Iatt 1 1280 ansf &quot;(binary 8)&quot;
//! external ObjectMerger w3a AItg A8T9 anam &quot;Bonus Damage&quot; Iatt 1 2560 ansf &quot;(binary 9)&quot;
//! external ObjectMerger w3a AItg A8Ta anam &quot;Bonus Damage&quot; Iatt 1 5120 ansf &quot;(binary 10)&quot;
//! external ObjectMerger w3a AItg A8Tb anam &quot;Bonus Damage&quot; Iatt 1 10240 ansf &quot;(binary 11)&quot;
Added the binary 8, 9, 10 and 11

JASS:
    set Damage = BinaryBonus.create(&#039;A8T0&#039;, 10, 5)

Made it use 12 instead of 8

But this doesn't work, when I try to add more then 1,000 then it just start on ~100 again instead of continuing to increase.

Someone please tell me what I do wrong :) Also, if you can tell me what I do wrong then also tell me how I can lift the max bonus damage to ~30,000 - 40,000.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top