UpgradeObjEditing
Sourceclass UpgradeDefinition
Source
Use this class to create upgrade definitions. Constructors provide a "Clean"
upgrade definition, without any research cost or effects. Using the
addEffectXXX() methods will add additional effects, with a limit of 4
effects. Do not use the setEffect methods from the W3Q baseclass.
int effectCount
Source
function addEffectAbilityLevelBonus(int base, int increment, string abilCode)
Source
Increases the level of an ability
function addEffectAddUltravision()
Source
Allows effected units to see as far at night as they see during the day.
function addEffectApplyAttackUpgradeBonus()
Source
Increases the base damage of units by their "Attack Upgrade Bonus" field
function addEffectApplyDefenseUpgradeBonus()
Source
Increases the defense of units by their "Defense Upgrade Bonus" field
function addEffectAttackDamageBonus(int base, int increment)
Source
Bonus to base damage of attacks. Supports negative bonuses.
function addEffectAttackDamageLoss(int base, int increment)
Source
Increases the unit's damage loss by a set amount. This effects line or bounce attacks!
function addEffectAttackDiceBonus(int base, int increment)
Source
Increases the number of Attack Dice on attacks
function addEffectAttackRangeBonus(int base, int increment)
Source
Increases the attack range of attacks
function addEffectAttackSpeedBonus(real base, real increment)
Source
Percentage increase on attack speed. Note: 0.1 = 10%.
function addEffectAttackSpillDistanceBonus(int base, int increment)
Source
Upgrades the distance "Artillery (Line)" attack types travel. For example
Glaive Throwers use this.
function addEffectAttackSpillRadiusBonus(int base, int increment)
Source
Upgrades the radius of "Artillery (Line)" attack types (over the distance
they travel).
function addEffectAttackTargetCountBonus(int base, int increment)
Source
Increases the number of attack targets that a Missile (bounce) weapon type will bounce to.
function addEffectAuraDataBonus(real base, real increment)
Source
This is used to increase the damage of Kodo's command auras in melee. Use
at your own risk on other auras.
function addEffectDefenseTypeChange(int base)
Source
Changes the effected units' armor type by *adding or removing this value
from their current armor type*.The following table describes the index
for each armor type:
small = 0
medium = 1
large = 2
fortified = 3
normal = 4
hero = 5
divine = 6
unarmored = 7
Resulting armor type indexes under 0 or greater than 7 will result in
broken unit armors. Negative integers also do work.
Examples. Unit has "Large" armor. You upgrade a type change of 1, the unit
now has fortified armor (this is what Orc Reinforced Burrows does). Having
an armor type of large and applying 7 to it will give the unit an undefined,
breaking their armor type.
function addEffectEnableAttacks(AttacksEnabled base)
Source
Changes the attacks enabled for the effected units.
function addEffectEnableAttacksRooted(AttacksEnabled base)
Source
Changes the attacks enabled for the effected units when rooted.
function addEffectEnableAttacksUprooted(AttacksEnabled base)
Source
Changes the attacks enabled for the effected units when rooted.
function addEffectGoldHarvestBonus(int base, int increment)
Source
Increases gold harvested by Harvest abilities.
function addEffectGoldHarvestBonusEntangle(int base, int increment)
Source
Increases gold harvested by Gold Harvest Entangled abilities. Apply to the
entangled mine.
function addEffectHitPointBonus(int base, int increment)
Source
Flat increase to hitpoints.
function addEffectHitPointBonusPercent(real base, real increment)
Source
Percent increase to base hitpoints. Note: 0.1 = 10% increase
function addEffectHitPointRegeneration(real base, real increment)
Source
Percent bonus increase to hitpoint regeneration. Note: 0.1 = 10% increase
function addEffectLumberHarvestBonus(int base, int increment)
Source
Increases lumber capcity on "gather" type abilities.
function addEffectMagicImmunity()
Source
Adds magic immunity to unit's effected
function addEffectManaPointBonus(int base, int increment)
Source
Flat bonus to max mana points.
function addEffectManaPointBonusPercent(real base, real increment)
Source
Percent bonus to max mana. Note: 0.1 = 10%.
function addEffectManaRegeneration(real base, real increment)
Source
Percent bonus to mana regeneration. Note: 0.1 = 10%.
function addEffectMovementSpeedBonus(int base, int increment)
Source
Flat bonus to movement speed.
function addEffectMovementSpeedBonusPercent(real base, real increment)
Source
Percent bonus to base movement speed. Note: 0.1 = 10%.
function addEffectRaiseDeadDurationBonus(int base, int increment)
Source
Increases the lifetime of skeletons raised via the Raise Dead ability.
function addEffectSightRangeBonus(int base, int increment)
Source
Increases sight range of units effected.
function addEffectSpikedBarricades(int base, int increment)
Source
Damage dealt by the Spiked Barricades ability to melee enemy attackers on attack.
function addEffectUnitAvailabilityChange(boolean available, string unitId)
Source
Changes availabilty of units. Note: the unit MUST have this upgrade as
an "Upgrade Used" or it will have no effect. Look at Troll Berserker upgrade
for an example of this usage.
function getEffectCount() returns int
Source
function setEffect(int effectIndex, UpgradeEffectType effectType, real base)
Source
function setEffect(int effectIndex, UpgradeEffectType effectType, real base, real increment)
Source
function setEffect(int effectIndex, UpgradeEffectType effectType, real base, real increment, string codeId)
Source
function setEffectBase(int effectIndex, real value)
Source
function setEffectCode(int effectIndex, string value)
Source
function setEffectIncrement(int effectIndex, real value)
Source
function setEffectType(int effectIndex, UpgradeEffectType effectType)
Source
class W3QDefinition
Source
int baseId
Source
ObjectDefinition def
Source
int levels
Source
int newId
Source
function getBaseId() returns int
Source
function getLevels() returns int
Source
function getNewId() returns int
Source
function presetEditorSuffix(StringLevelClosure lc)
Source
function presetHotkey(StringLevelClosure lc)
Source
function presetIcon(StringLevelClosure lc)
Source
function presetName(StringLevelClosure lc)
Source
function presetRequirements(StringLevelClosure lc)
Source
Comma separated list of ids for tech requirements.
function presetRequirementsLevels(StringLevelClosure lc)
Source
Comma separated list of ints corresponding to list of tech requirements
provided by setRequirements.
Source
Source
Source
Source
function setClass(UpgradeClass value)
Source
function setEditorSuffix(int level, string value)
Source
function setEffect(int effectIndex, UpgradeEffectType effectType, real base)
Source
function setEffect(int effectIndex, UpgradeEffectType effectType, real base, real increment)
Source
function setEffect(int effectIndex, UpgradeEffectType effectType, real base, real increment, string codeId)
Source
function setEffectBase(int effectIndex, real value)
Source
function setEffectCode(int effectIndex, string value)
Source
function setEffectIncrement(int effectIndex, real value)
Source
function setEffectType(int effectIndex, UpgradeEffectType effectType)
Source
function setGoldCostBase(int value)
Source
function setGoldCostIncrement(int value)
Source
function setHotkey(int level, string value)
Source
function setIcon(int level, string value)
Source
function setLevels(int value)
Source
function setLumberCostBase(int value)
Source
function setLumberCostIncrement(int value)
Source
function setName(int level, string value)
Source
function setRace(Race value)
Source
function setRequirements(int level, string value)
Source
Comma separated list of ids for tech requirements.
function setRequirementsLevels(int level, string value)
Source
Comma separated list of ints corresponding to list of tech requirements
provided by setRequirements.
function setTimeBase(int value)
Source
function setTimeIncrement(int value)
Source
Source
Source
function setTransferWithUnitOwnership(boolean value)
Source