# Questions about XS

**URL:** <https://forums.ageofempires.com/t/questions-about-xs/290770>\
**Category:** II - Discussion\
**Created:** [October 24, 2026, 10:14pm UTC](https://forums.ageofempires.com/t/questions-about-xs/290770 "2026-10-24T22:14:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rass](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/rass/32/146888_2.png) [@Rass](https://forums.ageofempires.com/u/Rass)\
**Post date:** [October 24, 2026, 10:14pm UTC](https://forums.ageofempires.com/t/questions-about-xs/290770/1 "2026-10-24T22:14:05Z")

</div>

I seen some newly added features like configuring resource, deduct type. Since there is no official documentation, i’m trying to figure out how it works through testing. I’m trying to configure an empty technology, but it’s not working in xs script! I simply can’t configure the resource, even though this option is supposed to be available! Here’s a sample code snippet:

```auto
int tech = 1180; // Blank Technology 00

for(playerId = 1; < xsGetNumPlayers()) {
    // Resource manipulations does not work for me
    xsEffectAmount(cModifyTech, tech, cAttrTypeFirstCost, cAttributeFood, playerId);
    xsEffectAmount(cModifyTech, tech, cAttrAmountFirstCost, 50, playerId);
    xsEffectAmount(cModifyTech, tech, cAttrDeductFlagFirstCost, 1, playerId); // 1 = deduct

    xsEffectAmount(cModifyTech, tech, cAttrSetTime, 10, playerId);
    xsEffectAmount(cModifyTech, tech, cAttrSetLocation, 109, playerId);
    xsEffectAmount(cModifyTech, tech, cAttrSetButton, 2, playerId);
    xsEffectAmount(cModifyTech, tech, cAttrSetState, 2, playerId); // Enable tech
}

```

This code should assign 50 food units to the first resource and deduct the cost but technology is still free. Am i doing something wrong or is this feature not works in xs?

---

<div class="post-metadata">

**Author:** ![Thire7](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/thire7/32/171912_2.png) [@Thire7](https://forums.ageofempires.com/u/Thire7)\
**Post date:** [October 24, 2026, 11:19pm UTC](https://forums.ageofempires.com/t/questions-about-xs/290770/2 "2026-10-24T23:19:57Z")

</div>

I can’t see anything wrong with what you have there. All I can suggest is just messing around and seeing if anything changes.
