Modify Technology cost with XS does not always work

It seems that using something like this xsEffectAmount(cModifyTech, 319, cAttrAddWoodCost, 100, 1); [set wood cost for atonement to 100] will not work because the technology originally does not have a wood cost.

This does not seem to be the case if we used the trigger effect Change Technology Cost

It sees that XS code does not map directly to trigger effects, but have some middleware code that handles the transition which is sometimes buggy.

I hope the devs gives more priority to this and give us some fixes

XS scripting seems to be very useful. but is still a hit or miss for many of the functions.

Would also like to see some functions to retrieve information [like check if a certain Tech was researched], so we can easily have triggers inside the XS code

you should use the change tech cost instead of xs script,because it is more convenient.

Hi, try multiplying the tech cost with -1 for Wood, the adding the cost. Something like this works for objects in UP and XS is based on UP functionalities.

There doesn’t seem to be a way to multiply … its either set or add … where add always adds to the original price regardless of what I set the price at.

extern const int cAttrSetFoodCost = 0;
extern const int cAttrSetWoodCost = 1;
extern const int cAttrSetStoneCost = 2;
extern const int cAttrSetGoldCost = 3;
extern const int cAttrAddFoodCost = 16384;
extern const int cAttrAddWoodCost = 16385;
extern const int cAttrAddStoneCost = 16386;
extern const int cAttrAddGoldCost = 16387;

What does UP stand for ?

UP = UserPatch
If they have not included multiplying, then that exhausts my idea.