Announcement: Remember: you are giving away your fantastic ideas for free, and somebody else might even make money from them (or appear to). That's just how the world works! If you're worried about it, maybe you shouldn't post your ideas here.


Caravel Forum : DROD Boards : Feature Requests : Can anyone make a really GOOD scripting tutorial?
New Topic New Poll Post Reply
Poster Message
13th Slayer
Level: Disabled
Avatar
Rank Points: 27
Registered: 09-28-2007
IP: Logged
icon Can anyone make a really GOOD scripting tutorial? (0)  
Can anyone make a really GOOD scripting tutorial?
08-20-2008 at 08:29 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
zex20913
Level: Smitemaster
Avatar
Rank Points: 1723
Registered: 02-04-2003
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
Thanks for not saying Subj.

____________________________
Click here to view the secret text

08-20-2008 at 09:03 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
kyevan
Level: Disabled
Rank Points: 54
Registered: 08-29-2007
IP: Logged
icon you mean thanks for not saying Subj. (0)  
Subj.

(I'm sorry! >_>)
08-20-2008 at 09:57 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
slimm tom
Level: Smitemaster
Avatar
Rank Points: 1228
Registered: 10-14-2006
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
Have you actually TRIED to find some scripting help on the forum? I'm sure there are plenty of topics regarding scripting in Architecture. And BTW, DROD scripting is pretty straight-forward, in my opinion.
08-20-2008 at 09:58 PM
View Profile Send Private Message to User Show all user's posts High Scores Quote Reply
AtkinsSJ
Level: Master Delver
Avatar
Rank Points: 107
Registered: 12-23-2005
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
The manual seems pretty detailed at describing what the various commands do. It's bound to be more useful than a tutorial, as that would probably only be useful for a small number of situations.
08-20-2008 at 11:13 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
Timo006
Level: Smitemaster
Avatar
Rank Points: 518
Registered: 07-19-2006
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
Besides, it will probably be hard to show you how to add a command to a script.

____________________________
Drod Number: 3034; 8th person to see the Second Sky
08-21-2008 at 10:49 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
zwetschenwasser
Level: Master Delver
Avatar
Rank Points: 200
Registered: 05-22-2007
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
There could be a room with a lot of long scrolls packed with scripting information, and then a room with the results of the scripts? :glasses

____________________________
Currently working on GaTEB and KDD (never finished the silly thing). :yahoo:
08-21-2008 at 11:32 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 1305
Registered: 06-14-2005
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
Okay. I could do that...
However, to learn how to really script you need to understand program flow, and other basic programming skills, which I am not good enough to teach. You can learn visual basic (in Microsoft Word/Excel), which is a simple language that will get you that sort of skills. Or you could go for something like C++, which there are tutorials on the web for, like this one. The only thing that a tutorial will do is teach you how to use the commands. I can start on it, but I'm not going to guarantee anything unless people say that something like this would be useful.
08-22-2008 at 07:00 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Tim
Level: Smitemaster
Avatar
Rank Points: 1979
Registered: 08-07-2004
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
In that case I think it's probably not worth doing it (unless you want to do it as an writing exercise). I don't think anyone here wants another commands overview list; the manual does that job pretty well already.

If you really want to write a tutorial then I'd suggest you cover all the rest of the stuff as well.

But if you really want to please 13th Slayer, then it's important to write correctly, as he's only interested in that, as you can see in this thread.

____________________________
The best way to lose customers is to let little kids running loose on a forum with too many mod points.
08-22-2008 at 01:02 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
13th Slayer
Level: Disabled
Avatar
Rank Points: 27
Registered: 09-28-2007
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
Drod scripting isnt mucha straightforfard now... With all the IF's, VAR's, ELSE's, END's (which's action is messed up with Go to level entrance).
08-26-2008 at 05:45 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 1305
Registered: 06-14-2005
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
Actually, it is the most straight-forward language I know.
08-26-2008 at 07:00 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
The Architest
Level: Master Delver
Avatar
Rank Points: 254
Registered: 05-25-2008
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
Scripting is pretty easy,you know!

Its like dancing over roses!
08-26-2008 at 07:19 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Jatopian
Level: Smitemaster
Rank Points: 1842
Registered: 07-31-2005
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
The Architest wrote:
Its like dancing over roses!
Are the parts that require a bunch of repetition where variables are involved the thorns?

____________________________
DROD has some really great music.
Make your pressure plates 3.0 style!
DROD architecture idea generator
08-26-2008 at 11:51 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
AlternativePuzzles
Level: Disabled
Rank Points: 30
Registered: 08-22-2008
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
I find DRoD to be incredibly easy to script in because they use words and English sentences to replace confusing code. Also, the code behind the code is bug-free, so you don't have to worry about fixing code from a place that you can't fix code.

____________________________
You guys like DROD, eh?

Test out my hold currently in
architecture:
[url=http://forum.caravelgames.com/
viewtopic.php?TopicID=26578]Spike
Pit
08-27-2008 at 01:14 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Sillyman
Level: Smiter
Avatar
Rank Points: 339
Registered: 09-08-2006
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
The thing about scripts is that they do exactly what they say, so it's really hard to provide more explanation.

____________________________
Who, me?
FNORD
09-11-2008 at 09:22 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
slimm tom
Level: Smitemaster
Avatar
Rank Points: 1228
Registered: 10-14-2006
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
Sillyman wrote:
The thing about scripts is that they do exactly what they say, so it's really hard to provide more explanation.

Necrobump anyone?
09-11-2008 at 09:24 PM
View Profile Send Private Message to User Show all user's posts High Scores Quote Reply
Sillyman
Level: Smiter
Avatar
Rank Points: 339
Registered: 09-08-2006
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
slimm tom wrote:
Sillyman wrote:
The thing about scripts is that they do exactly what they say, so it's really hard to provide more explanation.

Necrobump anyone?

Nope. The folder was red and it was on the first page.

____________________________
Who, me?
FNORD
09-11-2008 at 09:25 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Timo006
Level: Smitemaster
Avatar
Rank Points: 518
Registered: 07-19-2006
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
Sillyman wrote:Nope. The folder was red and it was on the first page.

Actually, that means that you just haven't read the newest post in this topic. O:-

____________________________
Drod Number: 3034; 8th person to see the Second Sky

[Last edited by Timo006 at 09-12-2008 02:29 PM]
09-12-2008 at 02:29 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Sillyman
Level: Smiter
Avatar
Rank Points: 339
Registered: 09-08-2006
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
Timo006 wrote:
Sillyman wrote:Nope. The folder was red and it was on the first page.

Actually, that means that you just haven't read the newest post in this topic. O:-

I know. Bolded for point.

____________________________
Who, me?
FNORD
09-12-2008 at 07:29 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
coppro
Level: Smitemaster
Rank Points: 1308
Registered: 11-24-2005
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
Someone probably posted, thus bumping it, then deleted the post. The folder remains red. The end.
09-13-2008 at 01:16 AM
View Profile Show all user's posts Quote Reply
Sillyman
Level: Smiter
Avatar
Rank Points: 339
Registered: 09-08-2006
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (0)  
Alrighty...:

If, Else, End If: Uses the next statement as a condition, if possible. Most "Wait" statements can be used as conditions, with ignoring the statement=TRUE and waiting for one or more turns=FALSE. So can Question if there are no Answer Options, with Yes=TRUE and No=FALSE. Wait Until Var is highly useful, for what I should hope are obvious reasons. Then is implied, else is not. To close an If block, use End if. There is no command to break out of an if block, aside from GOTO.

Example (Note that this is hand-typed and cannot be pasted easily into DROD):
Wait 5
If..
Wait for player at 4,4
Speech "Muehehe"
Else
Speech "Onos!"
End if

This will wait five turns, then make a comment based on whether the player is at 4,4 or elsewhere.

Label, Goto: Sadly, GOTO is highly necessary in DROD script because there is no concept of a function. Also, all jump targets are hardcoded. You must make the target label first, then it will appear in Goto's list and can be selected. Then, when the script encounters the Goto, it jumps to the specified label.

Question, Answer Option: Question can do two different things: Either it can present a menu of options associated with labels, and selecting one jumps to that point, or it can ask a yes or no question. The second form can be used as a conditional in if statements, or as a no-op that displays a dialog box outside of them. (That is, neither answer does anything if there are no answer options and it is not being used as a condition to an If statement.) To use the first form, you must first specify a list of Answer Options, one at a time. Each answer option consists of a bit of text and a label. If answer options have been set, Question will display them as a menu, and then go to the label of the one the player selects. Afterwards it will clear the set answer options and any further question will be a Yes/No question unless they are set again.

Wait 0: Wait 0 is mostly used in keeping a script running despite infinite loops. If a script runs for too long, it is presumed to be an infinite loop and ended. If you want to check for several conditions each turn, (or probably other uses, though this is the main one), then you need a loop over If statements, with a wait 0 at the end or beginning to make it wait a turn instead of being ended. There is a difference between wait 0 and wait 1, though I can't remember it at the moment.

Everything else should do exactly what it says on the tin, IIRC... although the built-in variables in DROD RPG are tricksy...

That clear enough?

____________________________
Who, me?
FNORD

[Last edited by Sillyman at 11-01-2008 06:12 PM]
11-01-2008 at 06:11 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Sillyman
Level: Smiter
Avatar
Rank Points: 339
Registered: 09-08-2006
IP: Logged
icon Re: Can anyone make a really GOOD scripting tutorial? (+2)  
Nuntar wrote:
Now, what is the difference between "End" and "End on room exit" if there are no further instructions in the script?
There is no noticeable difference. Characters do not disappear or die when you use End. The difference between them is the fact that End stops the script right there, and End on room exit lets the script continue, but ends it when you leave.

Another possible complication is if we wish to test for two conditions being met simultaneously. I would guess you would do this:

Label StartLoop
If...
Wait for player at (4,4)
If...
Wait for player to face NW
Speech Player "Hello, I'm facing northwest today"
If End
If End
Wait 0
Goto StartLoop


Do I have the right idea?

Yes, you have the right idea. Basically, to convert an expression of Boolean Algebra to DROD script:

A OR B:

Click here to view the secret text


A AND B:

Click here to view the secret text


NOT A:

Click here to view the secret text


A XOR B:

Click here to view the secret text


And the rest should be trivial. Note that scripts do not automatically end when there are no more commands, they just wait until the player re-enters the room. (Also note that Restart on Room Entrance is off by default in DROD RPG, although a script at the end that is not set to restart may still do something via usage and fighting.)

____________________________
Who, me?
FNORD
11-02-2008 at 04:46 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Feature Requests : Can anyone make a really GOOD scripting tutorial?
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.