Hello fellow scenario makers, I am sharing a partially finished project I started this summer, which focused on extending and providing utilities for XS scripting.
Unfortunately, this project is in an unfinished state but I am hoping it will provide some reference material or someone will be inspired to make their own better more completed version. If you are curious about xs scripting I recommend you look through it for inspiration or simply copy any part you deem useful. I may continue to finish it next summer but for now I am busy with work and school.
This project includes:
- A (C-like) XS preprocessor written in python. Allows you to use “#include” other xs files into your main xs script and merge them, also allows you to define macros with “#define” and expand them with “@macro-name@”. I made this because even if XS currently allows you to use an “include” command, only the main XS script will be shared in your online scenario, which means you would have to manually copy paste all your scripts into one.
- XS library scripts with functions which are usually expected in a programming language but are missing from XS, notably: negation operator, bitwise operations, additional array operations such as “push”, “find”, “sort”, “erase” and more.
- Game data arrays for objects/technologies which can be initialized in your XS script.
- Sample XS scenario scripts which may be used for reference to create your own scripts.
- List of resource links related to XS scripting.
- Python scripts for reading in JSON game data and generating the game data arrays.
Warning : There are still obvious bugs and I would not deem this project ready for public use. I am leaving it here to hopefully help any XS scripting explorers. I may improve the docs and fix any bugs if there is any requests here on this post - but I doubt that will be the case.