# Need Help with modding - Mill worker count mod

**URL:** <https://forums.ageofempires.com/t/need-help-with-modding-mill-worker-count-mod/289168>\
**Category:** III - Modding\
**Created:** [August 30, 2026, 6:18pm UTC](https://forums.ageofempires.com/t/need-help-with-modding-mill-worker-count-mod/289168 "2026-08-30T18:18:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TitledVase30170](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/titledvase30170/32/29735_2.png) [@TitledVase30170](https://forums.ageofempires.com/u/TitledVase30170)\
**Post date:** [August 30, 2026, 6:18pm UTC](https://forums.ageofempires.com/t/need-help-with-modding-mill-worker-count-mod/289168/1 "2026-08-30T18:18:54Z")

</div>

Hello there,

i would like to build a mod showing the current worker count on a mill or a plantation.

However I am new to modding AoE3. Maybe somebody can help me fixing my problems. The mod is displayed within the mod interface in the game but I am not sure whether it is even noticed by the game. I tried writing some wrong code into the .xml. Since it didnt crash I think my code is not used instead of the vanilla code of Data.XMB like it should be possible in AoE3 DE.

Is there a way to test if Additive Data Mods is working properly?

[https://support.ageofempires.com/hc/en-us/articles/360062106732-Additive-Data-Mods](https://support.ageofempires.com/hc/en-us/articles/360062106732-Additive-Data-Mods)

# Thanks for some advice!!

My folder structure looks like this:

…\Age of Empires 3 DE\76561198013146205\mods\local\WorkerDisplayMod  
C:.  
│ mod.png  
│ modinfo.json  
│  
├───Data  
│ protomods.xml  
│  
├───resources  
│ └───scripts  
│ worker\_display.xs  
│  
└───ui  
└───ingame  
worker\_display.xml

# modinfo.json

{  
“name”: “WorkerDisplayMod”,  
“version”: “1.0”,  
“description”: “Zeigt Arbeiterzahl über Mühlen und Plantagen an.”,  
“author”: “Weizen”,  
_ **“type”: “Data”** _  
}

# protomods.xml

```auto
<unit name="Plantation">
    <UIOverlay file="ui/ingame/worker_display.xml"/>
</unit>

```

# worker\_display.xs

// ===============================  
// Arbeiter zählen  
// ===============================

int GetWorkerCount(int buildingID)  
{  
int count = 0;  
int i = 0;

```auto
int total = kbUnitCount(cUnitTypeSettler);

for (i = 0; i < total; i++)
{
    int id = kbUnitGetIDByIndex(cUnitTypeSettler, i);

    if (kbUnitGetTargetUnitID(id) == buildingID)
    {
        count++;
    }
}

return count;

```

}

// ===============================  
// Anzeige aktualisieren  
// ===============================

rule UpdateWorkerDisplay  
minInterval 1  
active  
{  
// Gebäude-IDs holen  
int mill = kbUnitGetIDByType(“Mill”);  
int plantation = kbUnitGetIDByType(“Plantation”);

```auto
// Arbeiter zählen
int millWorkers = GetWorkerCount(mill);
int plantationWorkers = GetWorkerCount(plantation);

// UI aktualisieren
uiSetText("WorkerDisplayTextMill", "Mühle (" + millWorkers + ")");
uiSetText("WorkerDisplayTextPlantation", "Plantage (" + plantationWorkers + ")");

```

}

# worker\_display.xml

```auto
<Text id="WorkerDisplayTextPlantation"
      style="OverlayText"
      position="0.0 0.0"
      anchor="CENTER"
      color="255 255 255"
      fontsize="100"/>

```

The “Mill”-syntax is from Data.XMB from protoy.xml.xmb - Intentionally I didn’t write id=“287”.

 ![grafik](https://forums.ageofempires.com/uploads/default/original/3X/1/a/1acfdedeeeb94f984aaef518f68434338ffe6ba3.png)
