is there any out of game API?

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

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

sean|Bsc
Posts: 141
Joined: Sat, 7. Feb 04, 18:58
x2

is there any out of game API?

Post by sean|Bsc »

has anyone created an API or a list of the commands and functions for Scrpiting in X2?
P4 3.2Ghz Northwood 800FSB
ATI Radeon 9800Pro 128mb
Corsair 1Gb 400DDR Ram
Creative Audigy 2ZS
MSI 865PE Motherboard
User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 »

There's a command list here: www.msci-handbook.tk

I haven't finished filling in what each does, but mostly they're self evident.

API? pass
sean|Bsc
Posts: 141
Joined: Sat, 7. Feb 04, 18:58
x2

Post by sean|Bsc »

API - Application Program Interface - guess you dont program a lot.

that looks like exaclty what im after (thanks). if ya need any help in finishing it off just ask.
P4 3.2Ghz Northwood 800FSB
ATI Radeon 9800Pro 128mb
Corsair 1Gb 400DDR Ram
Creative Audigy 2ZS
MSI 865PE Motherboard
holo_doctor
Posts: 860
Joined: Fri, 26. Mar 04, 12:20
x3tc

Post by holo_doctor »

would br great if we had aceess to an external compiler and dummy sciprt inturpriter. Anyone have any clue as to how to generate the code array that the scripts run off. IF An outside X2 scripting utility was there especialy the ability to do debugging runs this would make life alot easyer tah using the SE!!!! althoug the SE is functional noting beats a good multiwindowed app with mouse access
i7-930 2.8Ghz quad core
6gig DDR3-1600 3 channel Ram
Nvida GTX470
64gig SSD / 1TB Hitachi
sean|Bsc
Posts: 141
Joined: Sat, 7. Feb 04, 18:58
x2

Post by sean|Bsc »

that could be created, but it would be a big project for one person. i created a machine emulator for a rather ancient computer a year or two ago (uni project). that would be fun to create one tho. and it would be really useful to most scripters
P4 3.2Ghz Northwood 800FSB
ATI Radeon 9800Pro 128mb
Corsair 1Gb 400DDR Ram
Creative Audigy 2ZS
MSI 865PE Motherboard
CBJ
EGOSOFT
EGOSOFT
Posts: 54300
Joined: Tue, 29. Apr 03, 00:56
x4

Post by CBJ »

The script editor is just an interface for editing an XML file. There is no underlying API that is accessible from outside the game, and no way to get between the game and the XML file to create any kind of debugging tools.

The only way to create an external editor would be to decode the underlying vocabulary used within the XML schema and build an editor around that. The only thing this would achieve would be to add a different user interface onto the editing environment.
sean|Bsc
Posts: 141
Joined: Sat, 7. Feb 04, 18:58
x2

Post by sean|Bsc »

yeah i think debugging it is close to impossible and wouldn't be worth it but a nice script (XML) editor would be easy to make and i think, still be useful
P4 3.2Ghz Northwood 800FSB
ATI Radeon 9800Pro 128mb
Corsair 1Gb 400DDR Ram
Creative Audigy 2ZS
MSI 865PE Motherboard
User avatar
JustHere4Coffee
Posts: 1075
Joined: Wed, 6. Nov 02, 20:31
x2

Post by JustHere4Coffee »

all you need to do now then is decode the associations between all the commands and their associated shorthand numbers :D
sean|Bsc
Posts: 141
Joined: Sat, 7. Feb 04, 18:58
x2

Post by sean|Bsc »

shorthand numbers???
P4 3.2Ghz Northwood 800FSB
ATI Radeon 9800Pro 128mb
Corsair 1Gb 400DDR Ram
Creative Audigy 2ZS
MSI 865PE Motherboard
CBJ
EGOSOFT
EGOSOFT
Posts: 54300
Joined: Tue, 29. Apr 03, 00:56
x4

Post by CBJ »

Yes, the text component of the XML file is just the description of the command, not the command itself. The actual commands themselves are tokenised using codes of some description.
sean|Bsc
Posts: 141
Joined: Sat, 7. Feb 04, 18:58
x2

Post by sean|Bsc »

oh right - ok i didnt know that.
P4 3.2Ghz Northwood 800FSB
ATI Radeon 9800Pro 128mb
Corsair 1Gb 400DDR Ram
Creative Audigy 2ZS
MSI 865PE Motherboard
User avatar
JustHere4Coffee
Posts: 1075
Joined: Wed, 6. Nov 02, 20:31
x2

Post by JustHere4Coffee »

my fault, I got confused and thought I'd mentioned them in this thread already; check the thread about a script not showing up in-game, we discuss it more there - http://www.egosoft.com/x2/forum/viewtopic.php?t=47545

if all you needed was an XML editor, we'd all be using them already ;)

I dunno, kids these days; you use terms like API, but you didn't expect the script to be tokenised for machine use? :lol:
sean|Bsc
Posts: 141
Joined: Sat, 7. Feb 04, 18:58
x2

Post by sean|Bsc »

i did expect it to be 'tokenised' just not inside the Xml file. it makes more sense to have a seperate file for the 'tokenised' version.

Note: API isn't a term it's an acronym.
P4 3.2Ghz Northwood 800FSB
ATI Radeon 9800Pro 128mb
Corsair 1Gb 400DDR Ram
Creative Audigy 2ZS
MSI 865PE Motherboard
User avatar
JustHere4Coffee
Posts: 1075
Joined: Wed, 6. Nov 02, 20:31
x2

Post by JustHere4Coffee »

it's an acronym for a term :P
sean|Bsc
Posts: 141
Joined: Sat, 7. Feb 04, 18:58
x2

Post by sean|Bsc »

never really thought the acronym/term/whatever 'API' was that 'advanced' - i always like the term 'polymorphism' now that sounds cool until you find out the meaning. But lets not talk semantics.
P4 3.2Ghz Northwood 800FSB
ATI Radeon 9800Pro 128mb
Corsair 1Gb 400DDR Ram
Creative Audigy 2ZS
MSI 865PE Motherboard
User avatar
JustHere4Coffee
Posts: 1075
Joined: Wed, 6. Nov 02, 20:31
x2

Post by JustHere4Coffee »

I concur - let's keep racism off the forum

:lol:

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