Azaghal's Script Library

The place to discuss scripting and game modifications for X²: The Threat.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

azaghal
Posts: 393
Joined: Wed, 21. Mar 07, 13:19
xr

Azaghal's Script Library

Post by azaghal »

Well, while working on my first ship upgrade, I've made some scripts along the way that perform some basic or not so basic stuff. I decided to slowly build-up this script library that would provide scripts that would be useful to be called from withing other scripts. This first release contains:

-aasetup.TIT.POS.xml - Sample script that uses add.upgrade.to.docks script.
-add.upgrade.to.docks.xml - Adds upgrade to equipment docks, and much more. Inspired by Xai Corp. lib.Xai.Setup script (probably the best thing in this current pack).
-convert.permilleToPercentText.xml - Converts permille into percentage with dot (ie 251 into 25.1), it doesn't add % at the end, though.
-get.all.sectors.xml - Returns an array with ALL the sectors in the universe (not hard-coded), or all player-known sectors in universe (there's an argument to it).
-get.all.stations.by.type.xml - Returns an array of all the stations of given type in universe (type as in factory, trading station etc), eventually being provided with a race (in which case it only returns stations of that race).
-get.sectors.xml - Returns an array of sectors based on: starting sector, minimum jump range, maximum jump range, and optional "only known to player" argument.
-get.stations.xml - Returns an array of stations in a sector, taking argument for specifying if enemy stations should be excluded, and optionally ignoring one race's stations.
-get.wares.xml - Returns an array of tradeable wares in a station, based on category (product, primary resource, secondary resource, misc), minimum and maximum permille availability of stock.
-x2script.xsl - Included for conveniance. Your standard xsl file from any X2 copy ;)


:arrow: DOWNLOAD LINK


Now, at this point there's still no versioning. Consider this pack to be early alpha. What I'd like to hear is opinions about these scripts from more experienced modders (I'm especially tacky about error checking I employed, looks kind of ugly).

The ultimate idea, though, is to build kind of a framework (to as much extent as the scripting engine allows) for custom BBS, maybe stock exchange (both for company actions (?) and actual goods), to add some more life to the galaxy employing AL engine etc.

So, what do you think, people? I'm taking ideas, and suggestions about existing scripts, and new ones.

P.S.
I won't host files on RapidShare permanently, it's just for start.

Return to “X²: The Threat - Scripts and Modding”