A guide to scripting - Ready at last!
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 3
- Joined: Fri, 1. Sep 06, 05:16
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.
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 (Again I have only tested this with X3.)
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.
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 (Again I have only tested this with X3.)
Their is one in all!
actaully its not that common, most languages use the = for both.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.
the == was mainly only used by C/C++ and the languages that came from it, like java.
-
- Posts: 3
- Joined: Fri, 1. Sep 06, 05:16
-
- Posts: 27
- Joined: Sun, 19. Dec 04, 16:21
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…"
"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
-
- Posts: 1
- Joined: Wed, 9. Jan 08, 03:11
Yeah the site is giving sql errors.
On a lighter note - nice inspirational thread LV
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
Cool browser game: http://firefly28.mybrute.com
-
- Posts: 1521
- Joined: Mon, 20. Dec 04, 23:23
-
- Posts: 1
- Joined: Thu, 24. Apr 08, 06:28
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.
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.
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'.....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?
sorry, i'm just a lil' bit frustrated, i didnt want to offend someone, just releasing some pressure....
"79 bitte 28"
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.
- Lord Dakier
- Posts: 3243
- Joined: Fri, 8. Dec 06, 13:45
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
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
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