A guide to scripting - Ready at last!

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

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

User avatar
GoateeCat
Posts: 1184
Joined: Mon, 10. Mar 03, 23:50
x2

Post by GoateeCat » Wed, 12. May 04, 05:57

Well, my proxy finally let it through. I'm only a few pages in and already, BRAVO!! The nuances of the engine itself and not the code always annoyed me, but you make it all crystal clear.

I imagine when I'm done reading the whole shebang I'll have only laziness to blame for not creating scripts.

...

Laziness it is then! :)

marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty » Wed, 12. May 04, 13:35

I never meant to disrespect your guide. So, if it got perceived that way, that was not my intent. My intent was simply to provide feedback that was asked for, so I did. I noted two important things: (1) The format needed some work, and that was not your fault, but the maintainers of the site and (2) I expected a different guide. That was my expectation, and I never meant for it to reflect the quality of your guide. You meant to write a Scripting for Dummies guide, and so you achieved your objective - good show!
cool :D

no offence was intended or taken.
Well, my proxy finally let it through. I'm only a few pages in and already, BRAVO!! The nuances of the engine itself and not the code always annoyed me, but you make it all crystal clear.

I imagine when I'm done reading the whole shebang I'll have only laziness to blame for not creating scripts.

...

Laziness it is then!

ROLF :D
For everything you ever wanted to know about X2,
and more......

[ external image ]

[DLM]Jimbo
Posts: 22
Joined: Mon, 13. Sep 04, 14:53
x2

Impressive...

Post by [DLM]Jimbo » Fri, 17. Sep 04, 23:21

I actually managed to understand that. I'm looking forward to reading anything else you write as it's written in a really user friendly manner. I generally look at coding related stuff, see it in it's entirity and just get immensely confused. That managed to break it down into nice bitesized chunks and I actually feel like I could start playing with scripting a lil and see how it goes. Will play the game a lil more first to get an idea of what I really want from the game and then I'll try and script it :)

User avatar
R4v3n
Posts: 20
Joined: Fri, 12. Mar 04, 10:28
x2

Post by R4v3n » Mon, 7. Feb 05, 09:33

the address has now changed, the scripting guide can be found here:

http://www.x2source.com/index.php?act=scriptguide
Mike Dart
X Source Central
Admin/Creator

terrifiedkiller
Posts: 179
Joined: Thu, 9. Mar 06, 22:58
x4

newb scripter looking to learn how to make a script

Post by terrifiedkiller » Sun, 19. Mar 06, 23:37

hi i am trying to make me a x3 script that will give me cash for every single kill i make and i'm trying to learn how to script using the guides here in the forums but i cant understand how anyone able to explain how?

BarclayMan
Posts: 1
Joined: Wed, 8. Mar 06, 04:41

Post by BarclayMan » Tue, 28. Mar 06, 14:04

POS

Horsewhisperer
Posts: 5
Joined: Tue, 17. Jan 06, 02:58
x3

Post by Horsewhisperer » Wed, 24. May 06, 02:25

Hi Fellas,

I tried to donload this guide, but it appears that the X2Script.com site is down.

Is it just maintenance, or is it down permanently? If so, is there anywhere else I can get the guide from?


Horsey

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Wed, 24. May 06, 03:07

well, considering it was posted over a year ago, then theres a chance that its no longer supported or avaialble

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Wed, 24. May 06, 06:05

I don't know what's up with x2source.com. It must have been there a few weeks ago. I downloaded the guide only recently.

I can't really host it without permission from the author, so I've emailed it to you. Hope that's the one you were looking for.

Horsewhisperer
Posts: 5
Joined: Tue, 17. Jan 06, 02:58
x3

Post by Horsewhisperer » Wed, 7. Jun 06, 05:59

Thanks for that. :)

MackTracker
Posts: 3
Joined: Fri, 1. Sep 06, 05:16

Post by MackTracker » Sun, 3. Sep 06, 02:17

This was a great walk through for anyone starting out. I know it sure helped me get started. Reading through this took me about 1 hour. Though I will say that I was already familiar with XML.

I am running X3 Reunion and I don't know if their are any differances but I would like to point out a few errors in this text if you don't mind. :D

FIRST:
I don't know if you are aware but I noticed that your final escourt routine causes the game to freeze should your target decide to land at a Station. (X3 Only, I don't know if it causes X2 to freeze)

I would surmize that this is caused by the fact that the ship's referance is nolonger availiable. This could be taken care of by a test to see wether the ship is about to dock or not.

SECOND:
With regaurd to the last program. If you follow your instructions cairfully and when you come to the part where you are initializing the $count variable, you will get the following wrather than what is printed in your guide:

"$count =<?> … " wrather than "$count <?> …"

From their if you continue you will get:

"$count = == 0 …"

Which of course creats a syntax error. It is common programming practice to use the "=" (Singal equal sign) to mean "Assign the value of x to the value of y" where y=x. Where as the "==" (Double equal sign) means to ask "Are these two values equal to eachother.

Hats off to you for all your effort in putting this walk through together for all of us. I apreciate this because I know it helped me lots. :) cheers :x3: (Again I have only tested this with X3.)
Their is one in all!

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sun, 3. Sep 06, 02:31

MackTracker wrote:It is common programming practice to use the "=" (Singal equal sign) to mean "Assign the value of x to the value of y" where y=x. Where as the "==" (Double equal sign) means to ask "Are these two values equal to eachother.
actaully its not that common, most languages use the = for both.

the == was mainly only used by C/C++ and the languages that came from it, like java.

MackTracker
Posts: 3
Joined: Fri, 1. Sep 06, 05:16

Post by MackTracker » Sun, 3. Sep 06, 02:33

True that, forgive me then. My native language is C/C++. :lol: cheers mate!

Oh and XML uses both "=" & "=="
Their is one in all!

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sun, 3. Sep 06, 02:52

yeah mine is c++ as well. but i had to use other languages while i was at collage, unfortuatlly

Gouranga Man
Posts: 27
Joined: Sun, 19. Dec 04, 16:21
xr

Post by Gouranga Man » Thu, 7. Sep 06, 17:44

thank you very much for this I havent read it but i will, love the disclaimer by the way.

"but you just got to put something in like this these days to protect you from stupid stuff. E.g., my cat died cos I forgot to feed it as I spent 2 days learning to script, so I'm going to sue you…"
Nils Illigitimi Carberundumb, Nirvana, Gouranga

BattleCommando
Posts: 1
Joined: Wed, 9. Jan 08, 03:11

Post by BattleCommando » Thu, 10. Jan 08, 04:44

Small problem... link is broken now as x2source is hosed... :evil:

Phrathum
Posts: 39
Joined: Wed, 7. Mar 07, 09:11

Post by Phrathum » Sat, 26. Jan 08, 03:00

Does anybody have a copy of this guide they'd be willing to e-mail to me?

firefly28
Posts: 210
Joined: Mon, 14. Jan 08, 16:50
x3tc

Post by firefly28 » Wed, 6. Feb 08, 19:22

Yeah the site is giving sql errors.

On a lighter note - nice inspirational thread LV :)
"Freedom is a rich mans dish, a poor mans illusion" :: Firefly28
Cool browser game: http://firefly28.mybrute.com

Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers » Thu, 3. Apr 08, 22:11

anyone have a copy of this?
Buck Rogers

Vice Admiral of Shadows Haven Alliance (SHA) visit us at:
SHA Forum
Feel free to join my DID
Too often we lose sight of life's simple pleasures. Remember, when someone annoys you, it takes 42 muscles in your face to frown. But only 4 to extend your arm and slap the bugger!

znix77
Posts: 6
Joined: Tue, 22. Apr 08, 13:54
x4

Post by znix77 » Mon, 12. May 08, 13:37

Hi, any possibility of getting a copy of the scripting guide? Am just starting out so would be great to start reading up :) Thanks!

Post Reply

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