A guide to scripting - Ready at last!

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

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

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: 22197
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: 22197
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!

mstrkaratakus
Posts: 1
Joined: Thu, 24. Apr 08, 06:28
x3

Post by mstrkaratakus » Sun, 1. Jun 08, 19:34

Its funny how this game keeps going, even after X3 has come out and been running wild for awhile. I blame it on Gametap! I hadn't even heard of this game until I found it there. Then I had download it from direct2drive so I could actualy play a version I could run scripts on. You guys got me hooked. Now I need to learn to script myself and I really would LOVE to have a copy of this guide. If anyone has it hidden away in some dark corner of their hard drive, or has a link to it somewhere, I would be most appreciative if you could suppy me with said files or link. PM me and I'll supply an email addy :) Thanks in advance to anyone who can help, and a HUGE thank you to all those who have worked so hard at the scripts I'm already running in my games.

rkrisher
Posts: 23
Joined: Tue, 10. Jun 08, 02:50
x4

Post by rkrisher » Sat, 21. Jun 08, 00:31

I can't find anyones e-mail address or I'd send it. I have the Linux version of X2 It came with a mod kit to extract the scripts from the archive files and place them in the right directories and two docs, one for script editing and one for Galaxy editing. They should work for you winduhhs people too.

lutorm
Posts: 5
Joined: Wed, 12. Nov 08, 21:47

Post by lutorm » Wed, 19. Nov 08, 18:49

Me too. You start clicking the X3TC tutorial pages to X3 tutorial to X2 tutorial and you end up looking for this guide which is the point of origin for learning about scripting. And it's gone. Can someone put it at an accessible location? Please?

kel187
Posts: 15
Joined: Thu, 22. Nov 07, 02:35
x3tc

Post by kel187 » Fri, 21. Nov 08, 18:17

lutorm wrote:Me too. You start clicking the X3TC tutorial pages to X3 tutorial to X2 tutorial and you end up looking for this guide which is the point of origin for learning about scripting. And it's gone. Can someone put it at an accessible location? Please?
i absolutely agree with lutorm. we want to learn scripting, and instead of bothering the experienced scripters, we followed the tutorials, to find out that x3tc SE is very similar to x3r SE. and then, second aha, we found out that x3r SE is very close to x2 SE. and then you land here, where noobs as me should start, and finding nothin'.....

sorry, i'm just a lil' bit frustrated, i didnt want to offend someone, just releasing some pressure....
"79 bitte 28"

baubsmyth
Posts: 66
Joined: Sat, 5. Nov 05, 06:34
x4

Post by baubsmyth » Fri, 21. Nov 08, 23:54

The Community Plugins sticky has links to tools & documents, as well as mods & scripts. If you look at the bottom of the first post you will see that Moggy2 provides a link to "the scripting handbook at Xai Corp". Lot's of fantastic scripting info there.

kel187
Posts: 15
Joined: Thu, 22. Nov 07, 02:35
x3tc

Post by kel187 » Sat, 22. Nov 08, 00:31

very nice, thanks mate :) exactly what i needed. i hope i can realize what i have in mind... :D
"79 bitte 28"

tamaron
Posts: 1
Joined: Wed, 15. Jul 09, 09:24

Post by tamaron » Thu, 16. Jul 09, 09:43

Hi
could you re-upload it please?
Your website is down
Thanks in advance
PD: or someone could send me his pdf :)

Wizlawz
Posts: 66
Joined: Tue, 7. Mar 06, 02:51
x3

Post by Wizlawz » Fri, 25. Sep 09, 19:15

hi, i am a beginner for scripting,.. the page 1 top post "link" is not dead but i cant open any of the "icons" does not say when the site wil be back up.

User avatar
Lord Dakier
Posts: 3243
Joined: Fri, 8. Dec 06, 13:45
x4

Post by Lord Dakier » Sat, 26. Sep 09, 14:11

Some websites like this are either down or just simply dont work now. Especially early guides like this.

You could always head on over to Xai Corporation they may have something. Just type it in google and you'll find it.

Or checkout the X3 stuff as some things may just be the same.

User avatar
cattafett
Posts: 884
Joined: Thu, 30. Aug 07, 00:40
x3tc

Post by cattafett » Tue, 3. Nov 09, 07:36

i'm like 99.9% i've still got this somewhere if you pm me your emails i'll send it this evening. I can;t upload it as it's not mine
p.s. thank the RNG and a bad mouse as i was clicking XTC Scripts and Modding :?
those UFOs you hear about are just what you tried to explaine to me going over my head
Advanced Complex-Hub you know you need it Catta Fett's D.O.G.S Vanilla safe mod collectionyou don't need them but you want them
Friendship is like peeing on yourself: everyone can see it, but only you get the warm feeling that it brings

Post Reply

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