# \["Major" Issue - XS Scripting\] Unability to edit blank technologies costs with "xsEffectAmount" and "cModifyTech"

**URL:** <https://forums.ageofempires.com/t/major-issue-xs-scripting-unability-to-edit-blank-technologies-costs-with-xseffectamount-and-cmodifytech/291210>\
**Category:** II - Report a Bug\
**Created:** [November 4, 2026, 11:20am UTC](https://forums.ageofempires.com/t/major-issue-xs-scripting-unability-to-edit-blank-technologies-costs-with-xseffectamount-and-cmodifytech/291210 "2026-11-04T11:20:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ekarlath](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/ekarlath/32/146833_2.png) [@Ekarlath](https://forums.ageofempires.com/u/Ekarlath)\
**Post date:** [November 4, 2026, 11:20am UTC](https://forums.ageofempires.com/t/major-issue-xs-scripting-unability-to-edit-blank-technologies-costs-with-xseffectamount-and-cmodifytech/291210/1 "2026-11-04T11:20:29Z")

</div>

### ▶ GAME INFORMATION

👇 _These details are CRITICAL; DO NOT skip them or your issue may not be reviewed._

- **GAME BUILD #:** #188329
- **GAME PLATFORM:** Steam
- **OPERATING SYSTEM:** Windows 11

### ▶ ISSUE EXPERIENCED

👇 _DESCRIBE THE ISSUE IN DETAIL (below). LIMIT TO ONE BUG PER THREAD._

While trying to modify the “blank technology 00”, or any other blank techs, cost type / amount / deduct, it keeps the “free” cost, using :

`xsEffectAmount(cModifyTech, 1180, cAttrTypeFirstCost, cAttributeFood, -1);`  
`xsEffectAmount(cModifyTech, 1180, cAttrAmountFirstCost, 80, -1);`  
`xsEffectAmount(cModifyTech, 1180, cAttrDeductFlagFirstCost, 1, -1);`

The technology cost stays at “free” due to the dataset values of all the costs set to -1. It seems to be similar to when we were unable to modify units graphics slots of they were set by default to -1 in the dataset.

### ▶ FREQUENCY OF ISSUE

👇 _How often does the issue occur? CHOSE ONE; DELETE THE REST!_

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

### ▶ REPRODUCTION STEPS

👇 _List CLEAR and DETAILED STEPS we can take to reproduce the issue ourselves… Be descriptive!_

Here’s the steps to reproduce the issue:

1. set technology 1180 train location on a building to test it
2. apply the script in a script call trigger / map xs file
3. run test and put mouse hover the blank tech to see the cost unchanged, still to “free”.

### ▶ EXPECTED RESULT

👇 _What was SUPPOSED to happen if the bug you encountered were not present?_

Blank technologies, and any technology infact, to be editable with the “cModifyTech” xs function without needing to make dataset edit / trigger usage.

### ▶ IMAGE

👇 _ALWAYS attach a PICTURE (.jpg, .png, .gif) or VIDEO (.mp4, YouTube link) that highlights the problem._

Can’t really screenshot the issue, or at least not in a relevant way, easy enought to reproduce.

### ▶ GAME FILES (SAVE / RECORDING)

👇 _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._

- #N/A

**Side Note:** The report is tagged “major” only because it’s a major liitation, there is no gameplay arming due to all the official scripting handled differently in campaigns.
