[DISCUSSION+REGISTRATION] - MSCI Reference

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Orfevs
Posts: 183
Joined: Thu, 22. Jan 09, 23:03
x3tc

Post by Orfevs » Tue, 3. Apr 12, 03:36

I need a couple days to polish my plugin so I can release the thing. Once that's done, I'll start on the syntax proper. Already got a rough outline, not fit for view just yet. But the basic root is currently this:

Script
  • Comments
  • Math Operands
  • Binary Operands
  • Colors
  • Message Syntax
  • Pitfalls <- things that break your editor etc.
T Files
  • Comments
  • Colors
  • Characters
  • Codes
TCAN TC/AP Artificial Life, Menudriven Automated Ship/Station Namer
Spex: i7 4790K@4Ghz 16Gb DDR3 GTX970Strix(4Gb)
X:R 454 Hours. 15 hours unmodded.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Tue, 3. Apr 12, 03:56

@Orfevs

Suggestions :

Can you also add to both those topics, forum conventions, including documentation we keep and conventions we use. ie. we store page 17 numbers used, start numbers used, command slots used, and each modder/scripter has their own documented t file number. etc.

I'd also like to see it mentioned that we never modify t file 0001, we always use our own t file that overwrites or adds into 0001. To get it, go look at the list and select a number that hasnt been used, then get it reserved.

In pitfalls, endless loops would seem worth mentioning and the classic ways of generating them and recognising them.

As would mention of really bad coding techniques and how they are replaced by the good coders here. Not sure thats in your scope or not, but I've seen some classics over time, and the better coding technique was always worth knowing about.

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24949
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Tue, 3. Apr 12, 22:37

eladan wrote:Not sure how useful my 3+ year old knowledge will be, or how often I'll be around, but sign me up and I'll try to help.
Help is always appreciated, so welcome to the team. :)
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

Orfevs
Posts: 183
Joined: Thu, 22. Jan 09, 23:03
x3tc

Post by Orfevs » Wed, 4. Apr 12, 02:40

@apricotslice
Can you also add to both those topics, forum conventions, including documentation we keep and conventions we use. ie. we store page 17 numbers used, start numbers used, command slots used, and each modder/scripter has their own documented t file number. etc.
If only they could change the blue color..
I'm using a dark background. Hard to see :thumb_down:

"Syntax" won't exactly cover the expanded topic. Short and to the point is the best way. Broad categories gets confusing fast. But coding etiquette can be added to syntax.
So perhaps a separate index topic with 0001 pages would be better.
And btw - Isn't the list of command ID's being updated any more?
I know page 17 isn't among those, but there might be a lot more pages in 0001 to keep an eye on. (edit)So much for what I know. Page 17 is there. Just didn't see it :headbang:
I'd also like to see it mentioned that we never modify t file 0001, we always use our own t file that overwrites or adds into 0001. To get it, go look at the list and select a number that hasnt been used, then get it reserved.
You can do that yourself once we get the index straight. :D Good preface to the ID index. Although, that's not my call. I volunteered for the syntax part.
In pitfalls, endless loops would seem worth mentioning and the classic ways of generating them and recognising them.
As would mention of really bad coding techniques and how they are replaced by the good coders here. Not sure thats in your scope or not, but I've seen some classics over time, and the better coding technique was always worth knowing about.
I know of some pitfalls, but I'm not an expert at crashing the compiler, so I expect others to be pitting in as it were..

Though I'm hoping I don't have to write a "scripting for dummies" entry. I expect the modders here to be at least somewhat familiar with previous modding/programming experience. Even if it is two lines of Basic.
TCAN TC/AP Artificial Life, Menudriven Automated Ship/Station Namer
Spex: i7 4790K@4Ghz 16Gb DDR3 GTX970Strix(4Gb)
X:R 454 Hours. 15 hours unmodded.

User avatar
Juggernaut93
Posts: 2897
Joined: Sun, 17. Jul 11, 21:03
x4

Post by Juggernaut93 » Fri, 18. May 12, 11:28

Hi. I wish to register. I'd like to help with translations into Italian... :roll:

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24949
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Fri, 18. May 12, 16:54

Added you to the group, welcome to the team. :) Have a look at the Posting rules, procedures and general info-post for a general overview for translating articles. If you have any further questions, feel free to ask.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 18. May 12, 16:56

Is there a searchable MCSI index somewhere?

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24949
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Fri, 18. May 12, 17:01

It's MSCI (:P) and what do you mean with searchable?
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 18. May 12, 17:05

Cool. I guess I have been misspelling it for a long time. Thanks!

I mean like search for "task" to find the task-related commands.

The list here is nice if you know where to look, and if you know the command itself. However, if you do *not* know, then it is hard to find things.

The best that I have come up with is xai-corp.net (which Gazz links in his sig). Not sure that it is current. But, at least, it is searchable.

I was just wondering if there is an alternative, or is that it?

User avatar
Juggernaut93
Posts: 2897
Joined: Sun, 17. Jul 11, 21:03
x4

Post by Juggernaut93 » Fri, 18. May 12, 17:40

X2-Illuminatus wrote:Added you to the group, welcome to the team. :)
Thanks :wink:

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24949
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Fri, 18. May 12, 18:31

DrBullwinkle wrote:I mean like search for "task" to find the task-related commands.
No, I don't think there's anything like this. There are a few other MSCI references out there. But they are similar to the one here in the forum. So, they have lists of commands according to the commands section in the SE and then an article for each command. Given that Xai-Corp.net went online, when X3R was the current game and that its creator, moggy2, is inactive for a few years already, I guess most of the TC and AP commands are missing there. Not sure, if anyone is currently working on the MSCI reference.

What I often do, when I don't know if there is an appropriate command for the action I want to do, is takeing one key word and searching for that word with the browser search in the index threads.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 18. May 12, 18:37

X2-Illuminatus wrote:takeing one key word and searching for that word with the browser search in the index threads.
Yeah, I have done that, too. But there are 9 of those, and 8 pages of individual listings to search.

Would all 9 of the index pages fit onto a single forum page? That would be a HUGE improvement to the Reference. I would try it myself, but it is a private forum.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sat, 19. May 12, 01:11

Personally, I'd like to see the link pages combined into a single post. That way at least you can search for a term with some hope of finding it.

I never quite understood why this wasnt done, since half the problem with the SE is finding the commands.

User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. » Sat, 19. May 12, 06:44

I have a question on this MSCI Reference guide you guys are working on.

Is it just to be an archived reference guide or am i to take it that scipting is going to be in Rebirth and this is why it's being created?

Afaik Rebirth will be MD heavy so why no MD reference forums that folks like myself who can't script can reference?

I see no logic here unless it's for archive purposes only tbh or that MSCI will indeed be in rebirth.

Argo.
[MOD]X3TC No Fog / [MOD]X3AP No Fog / [MD]X3TC Menagerie Shipyard / [MD]X3AP Menagerie Shipyard
<==<<Argonaught>>==>

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 19. May 12, 07:00

I did a proof-of-concept page. After adding colors and urls, the text exceeds the limits of a single forum page. However, it is certainly possible to do as a single forum topic, which would fit the reference forum perfectly.

It is a five-minute copy-and-paste job for someone with forum privilege. (Maybe ten minutes if you add section headings.) It would require minor ongoing maintenance, of course, as other entries are added.

So, would somebody with forum privilege please make a searchable index topic?

Alternatively, if you give me forum privilege, I volunteer to do it.

@Argo: There is a third, middle, position: That the reference is valuable to people currently writing MSCI scripts for AP and TC. I agree that MD should be included in the forum.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sat, 19. May 12, 08:22

Its long overdue for those learning scripting.

Alas, the times I've tried to use it, the command I wanted info on hadnt been done yet.

@Argonaught, Rebirth wont use scripting in its current form, but apparently will have scripting in a more generic xml form. With luck, converting between them wont be difficult or someone will write a converter pretty quickly.

Likely the new script will have the same sort of functionality, just a different syntax.

And yes, its also way past time when the MD got the same treatment. I'd venture to say that this forum could be used as well for the MD to have it all in one place, just needs its own top threads.

Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler » Sun, 17. Jun 12, 19:04

Under Trade:
[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> add <Var/Number> units of <Var/Ware>

<RetVar/IF> = If the command is to 'return' information. If a variable is used, This command will return TRUE on success, FALSE on failure.

When using on HQ class stations the command always returns 0.


LA

User avatar
mr.bear
Posts: 444
Joined: Sat, 11. Dec 10, 01:38
x2

Post by mr.bear » Sat, 18. Aug 12, 12:02

if you want to search the msci pages quickly, just use google. you can set it up to search only a specific site, then set that page as a favorite.

i have a button on my toolbar that links to:

https://www.google.co.uk/search?as_site ... gosoft.com

i just click the button and type in a command name. plus you get any related forum posts.

mr bear
Rapunzel, Rapunzel, let down your bear...

mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren » Fri, 24. Aug 12, 10:15

Logain Abler wrote:Under Trade:
[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> add <Var/Number> units of <Var/Ware>

<RetVar/IF> = If the command is to 'return' information. If a variable is used, This command will return TRUE on success, FALSE on failure.

When using on HQ class stations the command always returns 0.


LA
Done.

The English artical has been updated with the above info. Just needs a German translator to fix the German translation.

MarCon

shanrak
Posts: 651
Joined: Wed, 25. Feb 09, 05:54
x4

Post by shanrak » Mon, 18. Apr 16, 23:12

Can someone please help with the put into environment command?

I'm trying to write a script to move a ship/station:

Code: Select all

Argument 1: target Var/Ship/Station, 'target'
Argument 2: pos, Var/Sector Position, 'position'

$x = $pos[0]
$y = $pos[1]
$z = $pos[2]
$sec = pos[3]
write to player logbook: printf: fmt='Moving %s to %s (%s, %s, %s)', $target, $sec, $x, $y, $z
$target -> put into environment: $sec ->
$target -> set position: x=$x y=$y z=$z
It will print the right target, sector, and positions to the logbook.

So the object does move to the position I specify, but it doesn't change sectors. What am I doing wrong?

The put into environment entry in the MSCI Reference seems to be missing :roll:

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”