GAME INFORMATION
- GAME BUILD #: 101.101.47820.0 6624001
- GAME PLATFORM: Steam
- OPERATING SYSTEM: Windows 10
ISSUE EXPERIENCED
In the Scenaro Editor,
The effects Change Object Attack/Armor
and the Modify Attribute
effect for the attributes Attack/Armour
cannot change the attack/armor of a class that the unit does not have by default.
Other, related bugs:
effect_amount
in RM Scripting and xsEffectAmount
in XS Scripting also suffer from the same bug when trying to change the attack/armor of a unit.
For example, trying to give militia 100 attack on the attack class 5 (War Elephants) does not give them 100 damage against war elephants.
Trying to give militia 0 armor on the armor class 5 (War Elephants) does not make halberdiers deal 28 extra damage to them
Note that the effect works correctly when the armor/attack class being modified is already possessed by the unit.
FREQUENCY OF ISSUE
- 100% of the time / matches I play (ALWAYS)
REPRODUCTION STEPS
Here are the steps to reproduce the issue:
Using XS Scripts:
- Write the following code in an XS Script:
const int SET_ATTRIBUTE = 0;
const int MILITIA = 74;
const int ATTR_ARMOR = 8;
const int ATTR_ATTACK = 9;
const int WAR_ELEPHANT_CLASS = 5;
void main() {
xsEffectAmount(SET_ATTRIBUTE, MILITIA, ATTR_ARMOR, WAR_ELEPHANT_CLASS*256+0);
xsEffectAmount(SET_ATTRIBUTE, MILITIA, ATTR_ATTACK, WAR_ELEPHANT_CLASS*256+100);
}
- Add the XS Script to a scenario or RMS (skip step 3 in case of an RMS)
- Add an effect in the scenario to call the
main
function via theScript Call
effect - Place down a militia, an enemy war elephant and a halberdier.
- When tested, the militia does not gain 100 attack against the war elephant nor does the halberdier deal the additional 28 damage that it should to the militia.
Using The Scenario Editor
Using The Modify Attribute Effect
- Create the following two effects in a trigger in the editor:
Modify Attribute
Quantity: 0
Armour/Attack Type: 5
Object: Militia
Source Player: Player 1
Operation: Set
Object Attributes: Armor
Modify Attribute
Quantity: 100
Armour/Attack Type: 5
Object: Militia
Source Player: Player 1
Operation: Set
Object Attributes: Attack
- Place a militia, an enemy halberdier and a war elephant.
- Test the scenario
Using The Change Object Attack/Armor effects
- Create the following effects in a trigger in the scenario editor:
Change Object Armour
Quantity: 0
Armour/Attack Type: 5
Object: Militia
Source Player: Player 1
Operation: Set
Change Object Attack
Quantity: 100
Armour/Attack Type: 5
Object: Militia
Source Player: Player 1
Operation: Set
- Place a militia, an enemy halberdier and a war elephant.
- Test the scenario
EXPECTED RESULT
The militia should deal 100 additional damage to the war elephant, and it should receive 28 additional damage from the halberdier
GAME FILES (SAVE / RECORDING)
Since .aoe2scenario
is not an allowed extension, I’ve renamed them to be record files but they are actually scenario editor files. Simply rename them to have the .aoe2scenario
extension and you should be able to use them in the editor to test the bug mentioned above.
Using Modify Attribute:
modify attribute.aoe2record (909 Bytes)
Using Change Object Attack/Armor
change object attack or armor.aoe2record (912 Bytes)
Using XS Script:
xs.aoe2record (931 Bytes)