Cannot use xs scripts from mods: EXTERN(1): XS: Error 0354: failed to open file 'wtf.xs'

:arrow_forward: GAME INFORMATION

:point_down: These details are CRITICAL; DO NOT skip them or your issue may not be reviewed.

  • GAME BUILD #: 101.101.44834.0 6148570
  • GAME PLATFORM: Steam
  • OPERATING SYSTEM: Linux

:arrow_forward: ISSUE EXPERIENCED

:point_down: DESCRIBE THE ISSUE IN DETAIL (below). LIMIT TO ONE BUG PER THREAD.

I want to include an xs script (e.g. wtf.xs) in a rms script (e.g. TradeCartNothing.rms). Both scripts are part of a local mod.
When I launch a game with the rms script, I get the error:

EXTERN(1): XS: Error 0354: failed to open file ‘wtf.xs’.

and the modifications from the xs script are not applied.

If I place the xs script directly into the xs folder in the game files, it works.

:arrow_forward: FREQUENCY OF ISSUE

:point_down: How often does the issue occur?

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

:arrow_forward: REPRODUCTION STEPS

:point_down: List CLEAR and DETAILED STEPS we can take to reproduce the issue ourselves… Be descriptive!

Here’s the steps to reproduce the issue:

  1. Create a new folder named test in your local mod folder (Games/Age of Empires 2 DE/mods/local) and create a valid info.json file inside it
  2. Inside that test folder, create an resources/_common/xs folder
  3. Inside that xs folder, create an xs script called wtf.xs
  4. Inside the test folder, create a resources/_common/random-map-scripts folder
  5. Inside that random-map-scripts folder, create a random map script called TradeCartNothing.rms, which includes the line #includeXS wtf.xs
  6. Start the game and make sure that the new local mod is enabled
  7. Start a game against the AI on the TradeCartNothing map
  8. Receive the attached error message

EXTERN(1): XS: Error 0354: failed to open file ‘wtf.xs’.

:arrow_forward: EXPECTED RESULT

:point_down: What was SUPPOSED to happen if the bug you encountered were not present?

The game should find the xs script and execute it.

:arrow_forward: IMAGE

:point_down: ALWAYS attach a PICTURE (.jpg, .png, .gif) or VIDEO (.mp4, YouTube link) that highlights the problem.

errormessage

2 Likes

This is the mod layout:
modlayout

Just to add to this report:

This also happens in scenarios. If you add an xs script in the scenario and load it up using multiplayer lobby, it’ll work for you but not for any other player that doesn’t have the XS script. Even though the main xs file is saved INSIDE of the scenario file. So it is available, just not used. Include statements do break it either way though, as they aren’t stored in the scenario. Which I guess is a bug on it’s own…

Bumping this report, right now I’m writing in my mod instructions that players need to copy and paste the xs file from the mod into their local files.

2 Likes

Has this been fixed yet?

How to fix? I found that if add absolute path to xs file when starts without error, but this is wrong because in multiplayers mod will be broken. Maybe this is path problem? xs folder must be in another path?

Was this fixed, its a shame to have xs scripting feature and not being able to use it in custom scenario

Just for clarity, the game looks for the xs inside the global resources\_common\xs instead of the folder inside the mod itself

Hello everyone!

Sorry for the delay. Thank you for letting us know this! We are already tracking this issue ヾ(^∇^)