Operating System: Windows 10 1909
Gamertag: Brave PJMaster
A villager that was created and added a certain amount of HP via a trigger in a scenario is losing that HP and resetting itself back to base HP.
Here’s how to reproduce the problem:
- Create a basic custom scenario (easiest is 2 players with some resources for every player).
- Create a trigger for with two effects. First effect will Create Object (Villager - male or female) somewhere in the map. Second effect will Change Object HP. Select any value for Operation. Set any value for Quantity.
- Test the scenario.
- At this point the villager shows up with correct (changed) HP value.
- Command the villager to build something. The villager HP gets reset back to 40.
Link to video: Video
Looks like how the Hero monks reset into normal monks when they pick up relics. Also not fixed in DE.
That’s because “Monk” and “Monk with relic”, much like ‘villager’ and ‘villager building’ are two separate units. You practically (for stats purposes, because aggro works nonetheless) spawn in a new unit on the spot when you pick up a relic or build something with a villager. For your custom scenario to work, you need to add the variant units and write exception triggers for them (add the variant units to your data file with Advanced Genie Editor (warning: no SSL encryption)). I know it’s a hassle, but there’s no other way. Ask for help in the Aok heavengames discord if you don’t know how to.
Again, an exception as solution could be to modify any new civilian unit that pops up.
Use Advanced Genie Editor to add the ‘villager building’ units to the data file, for all the civs.
If you only have 1 of those supervils at any given time in you scenario, you can then include something along the lines of:
Trigger 1: (enabled, not looping)
COND: "Own Objects" | 1 villager
EFFECT: apply modifier
EFFECT: enable Trigger 2
Trigger 2: : (disabled, not looping)
COND: "Own Objects" | 1 villager building
EFFECT: apply modifier
EFFECT: enable Trigger 1
Mark this post as solution if this satisfies you as a solution to your issue. If you really want more vils per player, you’re going to have to come up with a more creative solution (like using variables to keep track of your supervils and change their hp accordingly)
Or you could consider the behavior a feature instead of a bug for your scenario. Vils become weak when they build, so make sure to protect them while they do. This would prevent abuse in the form of supervils sneaking inside enemy base to build without military support.
@GunTh0r thanks for your reply. I am a little confused for a two reasons.
First, this is not how it used to work in the original game (AoC). Villagers could be modified their HP back then and they would retain it even after building. This is what led me to believe this is an actual bug. The custom scenario in question is called EXCALIBUR (you can find the mod by this name). Two super villagers with 1500 HP would pop up, one at 500 kills, and another one at 600 kills. No data mod was required to make this work.
Second, assuming your workaround is the way to go, based on the behavior of the exception triggers you provided, the villager’s HP would reset back to 1500 every time villager is building or every time a villager is NOT building? If so, this doesn’t work for me players need to be able to weaken/kill the villager.
I appreciate your input and if you have any more ideas, please let me know!
The map could itself be modified with genie, you don’t necessarily need a datamod for everything.
Or I don’t know was it genie or what but you could edit the maps outside of the map editor anyways. I never did it myself though, but I can 100% guarantee you I’ve played some maps with just normal datasets and there’s been some wacky modified stuff in there.
Genie Editor doesn’t edit maps, afaik. You don’t need a modified dataset to actually play the scenario. It’s just so you can easily select the unit variant from the ingame list when setting up the triggers.