Someone knows how to use the .xs functionality? Is there any documentation?

Hi everyone,

Does someone know how to use the feature announced regarding the “.xs” new functionality?
What’s that for?

2 Likes

Apparently it is similar to the XS script used for AI modding in aoe3 and aom, but restricted to fewer functions (only the xs).

This site explains the semantics and few commands for XS:

It is actually pretty cool, I have tested it. To begin with, for example, we now have infinite global variables to define and play with.
We also have arrays of int, float, string, and vector types.
One can also create rules which can fire at desired frequency.

The most interesting thing are the new functions they added for aoe2DE, which are however undocumented!!
It would be really cool for example to modify the unit values/units attributes of the dataset from the script…

I really hope they will release a little documentation, at least to know the functions signatures etc…

1 Like

Thanks for your link!
Sounds pretty cool.
I am learning from that article.

I think so as well.

1 Like

Taken from the aoe discord. From user “andi”, answering Sogomn, who had the same question as you
QUOTE:

i asked a dev about em
he gave me this short description. but no definitive guide right now

// Returns the value of Trigger Variable 0.

int getTriggerVariable()
{
return (xsTriggerVariable(0));
}

// Set Trigger Variable 0 to 100.

void setTriggerVariable()
{
xsSetTriggerVariable(0, 100);
}

// Get the food amount of player 1.

int getPlayerOneFood()
{
return (xsPlayerAttribute(1, 0));
}

// Set player 1 food to 100.

void setPlayerOneFood()
{
xsSetPlayerAttribute(1, 0, 100);
}

// Chat player 1’s food.

void chatFood()
{
int food = xsPlayerAttribute(1,0);
xsChatData(“Player one food: %d” , food);
}

1 Like

I wrote a short intro of it on aokh: https://aok.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=4,44731,,30

1 Like

In the link I have posted above a lot of xs functionalities are explained!!

1 Like

I have contacted the developers and they said that they don’t have a documentation as of now, but they noted the feedback and will see what they will be able to release.

1 Like

Thanks for your answer!
I’ll read that, as this feature was something intriguing regarding the recent changes.