Non-threaded

Forums » News & Updates » Read Thread

Keep up with the latest contests and find out what's been changing with the site.

Scripting Is Here!

18 years ago

Great news everybody, Scripting has finally arrived! For real this time :-).

What is Scripting?
Scripting allows you, as an author, to have much greater control over what happens in your storygame. Just about everything that the StoryViewer "remembers" from page to page (Items, Variables, etc) is avaiable for you to test with just a few lines of script code.

Script Code, eh? What's that?
Unfortunately, writing out a good definition of Script Code is going to take some time. So, instead of that, I'll just show you a few examples ...

Item Script - changes some variables when that item is used
%HEALTH := %HEALTH + 10
%STRENGTH := %STRENGTH - 5

Another Item Script - takes user to save page if he has enough money when item is used
IF %MONEY >= 1 THEN
  BEGIN
    %MONEY := %MONEY - 1
    $DEST := @SAVE
  END

Link Script - Change the times Item #4 was used back to zero and subtract money
%MONEY := %MONEY - 10
$ITEMUSED4 := 0

I think I follow that, so how do I get started?
Take a look at the following articles:
 - Basics of Scripting (http://chooseyourstory.com/help/articles/article.aspx?ArticleId=45)
 - Intermediate Scripting (http://chooseyourstory.com/help/articles/article.aspx?ArticleId=46)

More articles are coming soon, including scripting scenarios you can use in your storygames. In the mean time, post a message in the Advanced Editor forum for help with scripting.

Good luck!

Scripting Is Here!

18 years ago
OH MY GOD IM STARTIGN TO GET THIS QWOOHOOOO

Scripting Is Here!

18 years ago
Yep.. what a shame the links have the same ID though, so if you delete page four, all the rest will stay the same and there is a gap. I'll try it out soon, could come in handy. How long does it usually take to learn how to do scripting?

Scripting Is Here!

18 years ago
Well, you need to learn the basis of scripting, which takes a day.  It's quicker to learn a language if you already know another one.  It shouldn't take too long though, as it is specialized for this site.

Scripting Is Here!

18 years ago
And how much HTML should I learn before tackling scripting?

Scripting Is Here!

18 years ago
HTML is basically just a bunch of "tags" that enclose text. It doesn't have any expressions or anything, so I doubt it will be necessary or helpful to learn scripting. This stuff is actually relatively simplistic; even javascript looks a lot more complicated. The built in validator is great. You'll probably just do best practicing with this stuff, unless you really want to learn something else.

Scripting Is Here!

18 years ago
I got past the basics of scripting. Now its the intermediate stuff that's got me puzzled. Where do you put the system variables and where do you put all the different things? It's all confusing.

Scripting Is Here!

18 years ago
Hey.

Well, for instance in the case of this part of the intermediate article:

IF %SCORE <= 100 THEN
 $DEST := @P98
ELSE
 $DEST := @P99

You can just put that in the link. In other words, instead of making two links and then changing their restrictions so that one = score <100 and the other >100, you can just click that little thing next to the link and up will pop a script window. Using your understanding, type that in.

What I did to learn was just modify expressions that existed in the articles and then expand them if necessary. I haven't been writing here in a while so I can't think of the scripts I'm talking about, but I'd be happy to find some for you if you want.

Scripting Is Here!

18 years ago
THE GREAT MADGLEE IS ALIVE!

Scripting Is Here!

18 years ago
Hehehe! Damn, when I didn't hear from you for a while I thought the horde of orcs got you. You probably figured the meese brutally murdered me.

Scripting Is Here!

18 years ago

Turned out they met halfway and we were both cowering like ... cowards under our bed.  Then we realised taht theyd killed eachother off.

TRUCE GREAT WARLORD?

Scripting Is Here!

18 years ago
TRUCE!

Scripting Is Here!

18 years ago

AND THE WORLD REJOICED AS PEACE SET ONTO THE LAND.

 

Side note, these magor cities are still under reapair by engineeers due to random meese charges and the occasional orc raid.

New york
Vancouver
New Jersey
St. Louis (THATS RIGHT MADGLEE)
Hongkong (yeah i did sorta accidently send them across the world...)
Boston
Philadelphia
Toronto
Ottawa
Montreal
Washington D.C.
AND even Antarctica (yes that is a city.... I KNOW ITS NOT A CITY DONT GET ME WRONG. but it is a city

Scripting Is Here!

18 years ago

Famous Casualties:

Pavel Bure

Scripting Is Here!

18 years ago
I'm confused, you both have the same avatar.

Scripting Is Here!

18 years ago
Well long story really.