Thread: BonusMod
View Single Post
Old 10-13-2009, 09:52 AM   #1
Earth-Fury
Two Blue
 
Earth-Fury's Avatar
 
Join Date: Mar 2003
Posts: 2,179

Submissions (7)

Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)

Send a message via MSN to Earth-Fury
Default BonusMod

Zoom (requires log in)
Version 3.3.1
Introduction
BonusMod is written in vJass and requires the NewGen editor, or Jass Helper with PitzerMike's Object Merger configured for it. BonusMod requires the latest version of Jass Helper.

BonusMod is a system for applying reversible bonuses to stats, such as damage, for specific units. Most of the bonuses provided by this system show green or red numbers in the command card, much like the bonuses provided by items. BonusMod is limited in the range of bonuses it can apply. The more abilities a bonus type uses, the larger the maximum and minimum bonuses.

BonusMod can also grant bonuses through code. For example, five optional bonus types are distributed with the basic BonusMod library. They are maximum life and mana, absolute mana per second regeneration, percentage of life per second regeneration, and movement speed. Even more bonus types can be provided by external libraries. The minimum and maximum bonuses these can apply differ depending on the library providing them.

Further explanation, and a guide to the API, is in the libraries documentation.
Credits
The BonusMod Library
Requirements:
The BonusMod library comes with the following bonus types with the given minimum and maximum values:

Bonus Types and Ranges:
Bonus Constant: Minimum:Maximum:
BONUS_DAMAGE
-1024
+1023
BONUS_ARMOR
-1024
+1023
BONUS_SIGHT_RANGE
-2048
+2047
BONUS_LIFE_REGEN
-256
+255
BONUS_AGILITY
-256
+255
BONUS_STRENGTH
-256
+255
BONUS_INTELLIGENCE
-256
+255
BONUS_ATTACK_SPEED
-512%
+511%
BONUS_MANA_REGEN_PERCENT
-512%
+511%
Note that you can easily remove unused bonuses, and easily increase or decrease the range of bonuses individually. Information on how is within the libraries documentation.

To add BonusMod to your map, copy and paste the below library in to a custom-text trigger in your map.

You will want to close your map after the first time you save it with BonusMod in it, reopen it, and disable ability (re)generation in the configuration section. If you fail to do that, a small delay will be added every time you save your map.
Expand BonusMod:


Additional Bonus Types
Bonus Maximum Life / Mana
Requirements:
This library provides two new bonus types:
Bonus Types and Ranges:
Bonus Constant:
BONUS_LIFE
BONUS_MANA
The minimum bonus these bonus types can apply depends on the unit. You can apply any positive or negative bonus that does not result in a unit's maximum life or maximum mana going below 1.

To add these bonuses to BonusMod, simply copy and paste the following library in to a custom-text trigger in your map.
Expand Bonus Max Life / Mana:


Bonus Life Regen (%) and Mana Regen (Absolute)
Requirements:
This library provides two new bonus types:
Bonus Types and Ranges:
Bonus Constant:
BONUS_MANA_REGEN
BONUS_LIFE_REGEN_PERCENT
These bonuses do not have minimum or maximum values. Any bonus amount is valid.

To add these bonuses to BonusMod, simply copy and paste the following library in to a custom-text trigger in your map. You may wish to change the refresh delay of the system, to either increase or decrease the time between updates.
Expand Bonus Life Regen (%) and Mana Regen (Absolute):

Bonus Movement Speed
Requirements:
This library provides one new bonus type:
Bonus Types and Ranges:
Bonus Constant:
BONUS_MOVEMENT_SPEED
The maximum and minimum bonus depends on a unit's base movement speed, and the maximum and minimum movement speed set in the gameplay constants. A unit's movement speed can not go below or above the minimum or maximum movement speed as defined in the gameplay constants.

To add this bonus to BonusMod, simply copy and paste the following library in to a custom-text trigger in your map. You must change the constants for maximum/minimum movement speed if you change the gameplay constants from their defaults.
Expand Bonus Movement Speed:

Demo Map
Below is the demo map for BonusMod. You can download it to test out the functionality.

BonusMod 3.3.1.w3x
Change Log

BonusMod & Additional Bonuses Change Log

  • 3.3.1:
    • Movement Speed bonus added
  • 3.3.0:
    • Switched ability creation to lua
    • Minor optimizations
  • 3.0 - 3.2:
    • Complete rewrite
    • Bug fixes
  • 1.0 - 2.0:
    • Ancient versions

__________________
Useful Links:
My Resources:
Good Resources:
Search
Tutorials
Ability Guide

UnitMaxState
BonusMod

AutoIndex
ARGB
TimerUtils

Earth-Fury is offline   Reply With Quote
Sponsored Links - Login to hide this ad!