 |
View previous topic :: View next topic |
 |
|
|
|
|
Author |
Message |
|
|
|
|
|
marklaverty
Joined: 23 Feb 2004 Posts: 270 on topic

|
Posted: Fri, 7. May 04, 16:55 Post subject: A guide to scripting - Ready at last! |
|
|
The scripting guide is ready
32 pages of it covering......
1) Introduction
2) Activating and Accessing the Script Editor
3) Basic Script Editor use and Variables
4) Basic Concepts :-
More variables
Arguments
Script calls
Time outs
While, While Not and GO TO
If, If Not, and Expressions
Arrays DONE
http://www.x2source.com/scriptguide.php
*edit- burianek* new address per site owner's instructions:
http://www.x2source.com/index.php?act=scriptguide
Let me know what you think 
_________________ For everything you ever wanted to know about X2,
and more......
 |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
JustHere4Coffee

Joined: 06 Nov 2002 Posts: 1070 on topic

|
Posted: Fri, 7. May 04, 18:10 Post subject: |
|
|
yay for doing it, eh for making it a single page rather than a group of pages that'd make for easier digestion, and wtf for making the downloadable a pdf instead of a nice simple doc or txt or html page...
still, it's about a zillion times better than anything I've contributed, so overall our survey says 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Burianek

Joined: 29 Dec 2003 Posts: 2925 on topic Location: Chicago, IL

|
Posted: Fri, 7. May 04, 19:29 Post subject: |
|
|
Very nice, thank you!
You know if you want to give up your intellectual property rights, I'd be willing to wager that if you mailed it to BurnIt!, with your permission, you'd see large chunks of this appear in the 'official' script editor documentation.
Pretty sure he'd appreciate the effort. I do. 
_________________ "Nature's first green is gold" . . . stay golden.
Join the Guild Wars: X Universe Guild! |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
kryptyk
Joined: 05 Dec 2003 Posts: 392 on topic Location: MoNW

|
Posted: Fri, 7. May 04, 20:23 Post subject: |
|
|
Now that's handy info!
Where can I find the downloadable version....I seemed to have missed the links..... 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
JustHere4Coffee

Joined: 06 Nov 2002 Posts: 1070 on topic

|
Posted: Fri, 7. May 04, 20:27 Post subject: |
|
|
at the very top of the text, where it says "or you can download it here" 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
kryptyk
Joined: 05 Dec 2003 Posts: 392 on topic Location: MoNW

|
Posted: Fri, 7. May 04, 20:29 Post subject: |
|
|
| JustHere4Coffee wrote: |
at the very top of the text, where it says "or you can download it here"  |
man...I'm going blind..... 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Shara
Joined: 24 Feb 2004 Posts: 234 on topic

|
Posted: Fri, 7. May 04, 20:57 Post subject: Re: A guide to scripting - Ready at last! |
|
|
| marklaverty wrote: |
Let me know what you think  |
The only thing I want to say about the content is that I was hoping for something more along the lines of X2Scripting in a Nutshell, and this is more like X2Scripting for Dummies.
Knowing that, I still have gripes, and they deal exclusively with presentation. The site that is hosting this is crap for color/font selection. It makes your guide hard to read. There's zero font/color differentiation for code blocks, and they aren't set apart from the rest of the text. The section headings are in italics. They need to be bold, and larger than the rest of the text fonts.
The code blocks really need to be distinguished in some way, much the way quotes are handled in this message board (except maybe without the indentation). Like so:
##############################################
Delete all of the line in the ‘code’ section except for <new line> and return null. Next insert a new line above the ‘return null’, highlight it and hit return. Go into ‘General commands’ and select the ‘<retvar/if><expression>’ function. Then choose ‘if’ from the list of selections. You should now have
| Quote: |
Arguments
Ship <Var/ship> Ship
Code
If <?> …
return null
<new line>
|
Highlight <?> and hit return, highlight ‘ship’ and hit return. You should now have...
| Quote: |
Arguments
Ship <Var/ship> Ship
Code
If $ship …
return null
<new line>
|
Highlight ‘…’ and hit return, select ‘= =’ and hit return. Now your script should look like …
| Quote: |
Arguments
Ship <Var/ship> Ship
Code
If $ship = = …
return null
<new line>
|
Highlight ‘…’ and hit return, select ‘PLAYERSHIP’ and hit return. This should give you…
| Quote: |
Arguments
Ship <Var/ship> Ship
Code
If $ship = = [PLAYERSHIP] …
return null
<new line>
|
Insert a new line above ‘return null’, select it and hit return. Go into the ‘logbook commands’ section and pick ‘write to player logbook <value>’ then hit return. Select <string> from the list of selections and hit return. Type in ‘this is your ship’ and hit return. You should be taken back to your script which will now look like …
| Quote: |
Arguments
Ship <Var/ship> Ship
Code
If $ship = = [PLAYERSHIP] …
Write to player logbook ‘this is your ship’
return null
<new line>
|
#############################################
See how this is easier to read?
Get the hosts of that site to do your guide a favor, and format it like a regular coding guide. It will help your readers.
_________________ Buy from your own factories only: http://users.genesee-id.com/cholmes/x2/BuyResourceBest.zip |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Nanook Moderator (English)


Joined: 15 May 2003 Posts: 22503 on topic Location: In the X-Universe spanning two millenia

|
Posted: Sat, 8. May 04, 00:13 Post subject: |
|
|
Excellent job and thanks for putting it into a nice universal format. I much prefer pdf over some potentially incompatible text or doc format. 
_________________ Having an Acronym Attack? See the Ego FAQ. Also now for Terran Conflict. |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
marklaverty
Joined: 23 Feb 2004 Posts: 270 on topic

|
Posted: Sat, 8. May 04, 01:53 Post subject: |
|
|
Thanks for the feedback , much appreciated
JustHere4Coffee -> Thanks I did pass Raven a .doc and a .pdf for downloading. I'll ask him to put the .doc up aswell.
Burianek -> Again, cheers dude . The guide is still incomplete and there is alot of stuf still to go in. I hadn't really dared consider it good enough to be part of the official documentation!
kryptyk -> Glad it helped
Shara -> I take your point and yes it would make it alot easyier to read *nods in agreement*. I'll ask for the code to be formatted in code blocks. In fairness I did just give him a load of unformatted text on a word document and let him sort it, out then tidyied it up for the pdf
On the other point. if it comes accros as a 'scripting for dummies guide' instead of a 'x2 scripting in a nutshell' guide then I've suceeded in what I set out to do. An x2 scripting in a nutshell would be more like 300 pages long instead of 32, and I don't know anywhere near enought to begin compiling one. The guide will grow with me as I get time to update it and learn new things (already loads more to go in ) then it should turn into a 'scripting in a nutshell' guide.
It was done for the sole purpose of giving anyone who knows absolutely nothing about scripting/programming a helping hand to get started. I remember how hard it was when I started and some of the time I work with relational databases and a querey language (ms sql server) as part of my day job.
Nanook -> Glad you like it 
_________________ For everything you ever wanted to know about X2,
and more......
 |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Argonaught.

Joined: 06 Nov 2002 Posts: 1575 on topic Location: Omnipotence rules!

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Sir Crashalot
Joined: 06 Nov 2002 Posts: 2009 on topic Location: Castle Aaaaaaaaaargh

|
Posted: Sat, 8. May 04, 03:01 Post subject: |
|
|
Good work !
An excellent beginners guide to scripting. 
_________________ If you can`t dazzle them with dynamics, then baffle them with bullsh*t  |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Burianek

Joined: 29 Dec 2003 Posts: 2925 on topic Location: Chicago, IL

|
Posted: Sat, 8. May 04, 09:46 Post subject: |
|
|
| marklaverty wrote: |
Burianek -> Again, cheers dude . The guide is still incomplete and there is alot of stuf still to go in. I hadn't really dared consider it good enough to be part of the official documentation!
|
I think you may be surprised. It's my impression that these guys are swamped with work beyond what most of us would figure. Every time I've seen Bernd in the chat rooms and someone has asked him about scripting guides and the like the answer is always:
'Scripting is an unsupported feature. Since we don't even have enough time to finish all of the things that we absolutely have to finish, it will have to be placed on the back burner as there aren't enough hours in the day. If anyone out there would like to contribute and take a shot at writing something, please do and send it to me.'
I've even seen him (Bernd) offer access to higher level people to get questions answered to a german forum member that was considering putting together a modder's guide.
A first attempt is better than no attempt, and while I certainly don't have any say in anything important, this stuff may be more well received than you think it would be.
Just something to think about.
_________________ "Nature's first green is gold" . . . stay golden.
Join the Guild Wars: X Universe Guild! |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
marklaverty
Joined: 23 Feb 2004 Posts: 270 on topic

|
Posted: Sat, 8. May 04, 11:06 Post subject: |
|
|
Thanks everyone, glad its ok and easy to understand
Burianek -> I'll send an E-mail and see what happens 
_________________ For everything you ever wanted to know about X2,
and more......
 |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
kryptyk
Joined: 05 Dec 2003 Posts: 392 on topic Location: MoNW

|
Posted: Sun, 9. May 04, 00:22 Post subject: |
|
|
maybe they'll look at it, maybe add some more info and use it as the unofficial documentation
ya never know..... 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Witchking

Joined: 24 May 2003 Posts: 340 on topic Location: Somewhere right behind you....ok then Ireland

|
Posted: Sun, 9. May 04, 14:53 Post subject: |
|
|
On behalf of all morons everywhere I would like to thank you for the Scripting Guide, I just dl'd it and was extremely relived to discover that it's not written in Swahili as most of the scripting tuts I've tried to understand seem to be. Great work man thanx again
Happy chappie 
_________________ My Music: http://www.reverbnation.com/thisturbulentpriest
YouTube Channel: http://www.youtube.com/user/TheDerekCarroll |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
|
|