"Own objects" condition in editor is not working consistently when counting villagers

:arrow_forward: GAME INFORMATION

:point_down: These details are CRITICAL; DO NOT skip them or your issue may not be reviewed.

  • **GAME BUILD #: 78174
  • **GAME PLATFORM: Steam
  • **OPERATING SYSTEM: Windows 11 Home

:arrow_forward: ISSUE EXPERIENCED

In the scenario i have attached, i have placed a trigger which deactivates villager production when a player has 50 villagers.

The trigger is named “p1 vill disable” and is located at the bottom of the triggers list
The condition is “own objects” for villager (male) and quantity of 50
and the effect is Enable/Disable objects : villager (male)

The issue is that this trigger is activating inconsistently. In one test it won’t activate at all, in another it will activate when the player has 110 villagers, in another when he has 55 etc, with no changes to the map in between. So far it has never activated on 50 villagers, which make me believe that there must be a bug when counting villager numbers.

I have used the same trigger to limit fishing ships and trade carts, and it has worked normally

:arrow_forward: FREQUENCY OF ISSUE

:point_down: How often does the issue occur? CHOSE ONE; DELETE THE REST!

  • 100% of the time / matches I play (ALWAYS)

:arrow_forward: REPRODUCTION STEPS

:point_down: List CLEAR and DETAILED STEPS we can take to reproduce the issue ourselves… Be descriptive!

Here’s the steps to reproduce the issue:

  1. Test the scenario
  2. Build villagers until you cannot anymore

:arrow_forward: EXPECTED RESULT

:point_down: What was SUPPOSED to happen if the bug you encountered were not present?
Normally when the player reaches 50 villagers, any further production of them should be disabled

:arrow_forward: IMAGE

:point_down: ALWAYS attach a PICTURE (.jpg, .png, .gif) or VIDEO (.mp4, YouTube link) that highlights the problem.


:arrow_forward: GAME FILES (SAVE / RECORDING)

:point_down: Attach a SAVE GAME (.aoe2spgame) or GAME RECORDING (.aoe2record) of the match where you encountered the issue. Link it below if using an external file service.

Diplomacy-map-europe-v1.aoe2scenario (483.3 KB)

I just ran the test, it worked just fine as long as you don’t (or the AI) task the created villagers.

What is causing the issue is that Tasked villagers (i.e. “lumberjack”, “farmer”, “gold miner” etc.) are not accounted in the calculation of the condition. So everytime the condition checks for the said number of Villagers, it will ONLY count the untasked villagers who still display the name “Villager”.

So if you have, say, 100 villagers total, but 80 of these are tasked and are lumberjacks, farmers or whatnot, it means that the condition will understand you still only have 20 Villagers, and thus still lacking 30 to trigger the effects.

That is not working properly indeed and should be fixed.

Thank you for checking it out.
I would have never imagined this was the problem, i certainly hope it gets fixed.

I talked with the team about this :slight_smile:

This is not a bug. The trigger does what it says it does.

What you want to do is go to “Own Objects,” set “Object Group” and/or “Object Type” to “Civilian” without choosing “villager” or any other specific unit on the object list. This covers all male and female villagers performing any possible task, and doesn’t include ships or carts.

That wouldn’t work since “Civilian” does include other unit types than Villagers only, namely Trade units (carts and cogs alike), fishing ships or even herdables… I just ran the test just to be sure, all trade units are counted as “Civilians” and herdables too.

Sorry, I phrased it slightly incorrectly the first time going from memory. Although if you’d done both it would have worked.

What you need is the “Object Group” to be set to civilian (with or without selecting an “object type”). Then it does what I described earlier.

Again though, this is not a bug. Object List is for selecting a specific unit, or “form of a unit” in the case of villagers. Which makes it useful because you could, e.g. have a trigger that conscripts only male villagers, or provide some economic reward for having X Farmers or Gold Miners.
Object type is very for broad classes and object group is for fairly specific (but still broad in the case of “villager”) classes. You’ll notice “Trade Boat,” “Trade Cart,” and “Fishing Boat” appearing in their own categories there.

Edit: The only game change I would recommend that’s related to this discussion is for the “Object Group” category of “Civilian” to be renamed to “Villager,” since it has a more exclusive meaning than the more intuitive “Object Type” usage of “Civilian.”

1 Like

I tested it and you’re correct. I never had to use a “villager count condition” of any sort so far so the problem never rose to me before. But yeah, I was sure the “civilian” from Object Type and Object Group was the very same. It should indeed be renamed to “Villagers” for clarity sake I guess.

But yes: putting Civilian in Object Group only counts villagers (tasked or not) like you said and thus the issue is settled.

@Dallakos you can tick the entry “solved”.

1 Like

Hm yes can confirm it myself as well, thank you all for your time!