A guide to scripting - Ready at last!
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 1184
- Joined: Mon, 10. Mar 03, 23:50
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!
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!
-
- Posts: 270
- Joined: Mon, 23. Feb 04, 15:03
coolI 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!
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
-
- Posts: 22
- Joined: Mon, 13. Sep 04, 14:53
Impressive...
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
-
- Posts: 20
- Joined: Fri, 12. Mar 04, 10:28
the address has now changed, the scripting guide can be found here:
http://www.x2source.com/index.php?act=scriptguide
http://www.x2source.com/index.php?act=scriptguide
-
- Posts: 179
- Joined: Thu, 9. Mar 06, 22:58
newb scripter looking to learn how to make a script
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?
-
- Posts: 5
- Joined: Tue, 17. Jan 06, 02:58
-
- 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!
-
- Moderator (Script&Mod)
- Posts: 22254
- Joined: Sun, 14. Nov 04, 23:26
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
-
- Posts: 39
- Joined: Wed, 7. Mar 07, 09:11
-
- Posts: 210
- Joined: Mon, 14. Jan 08, 16:50
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: 6
- Joined: Tue, 22. Apr 08, 13:54