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 ... Limitedly

18 years ago

Great news everybody, Scripting has finally arrived!

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?
Because there is little to no explanation of what scripting is in the Help Section (we're currently working on that), this is a limited feature, open to only a few Beta Testers. So, if you're interested in helping out, do let me know and I will enable the feature for you.

I think I'll wait, when will it be ready?
A few weeks maybe. It's all about how quickly we can get the help and sample script guides working. In the mean time, I'll be working to bring some other Advanced Editor features, such as Item Classes, Advanced Item Dropping, Equippable Items, and so much more. And don't worry, if this scripting thing isn't for you, these features will all be avaiable with the Advanced Editor.

So with all this Advanced stuff, what about Classic Storygames?
We're still dedicated to the classic editor. In fact, as soon as good round of advanced features are developed, we're going straight back to the Classic Editor to bring you Printable Storygames. Check out the Feature Wishing Well for deatils on that.

Scripting Is Here ... Limitedly

18 years ago

article will be worked on tomorrow alex, well actually this post is 2AM, so i will say in the afternoon, I have to do some community service (Ontario Standard for Diploma) in the morning adn i will be available (or i should be available) during the afternoon.

solo

Scripting Is Here ... Limitedly

18 years ago
wow um, hurry with that solo!!!!

Scripting Is Here ... Limitedly

18 years ago
Dude, I can't wait for these new features! I'll finally be able to make so many more games!

Scripting Is Here ... Limitedly

18 years ago

"...so many more ADVANCED games!"

Anyways, I could use this if I figured out how to do it.  Question though:  When I use an item and it dosen't go to a page, the the variable thing work?

Scripting Is Here ... Limitedly

18 years ago

Yes, the Item Script is run every time, regardless of whether you defined an effect. But, you can account for that in your code.

IF $DEST = @NONE THEN
  BEGIN
     // do stuff when an effect hasn't been defined ///
  END
ELSE
  BEGIN
     // do stuff when an effect has been defined ///
  END

 

So anyone interested in Beta TEsting this with solostrike?

Scripting Is Here ... Limitedly

18 years ago
Is it on the test site?

Scripting Is Here ... Limitedly

18 years ago

No its on the live site but I need to enable feature by username for whomever is interested in this beta test.

Scripting Is Here ... Limitedly

18 years ago
Sign me up.  I'll try it with Valhalla.

Scripting Is Here ... Limitedly

18 years ago

Can you add it so we can do this:  4d5 and possibly 4d%VARIABLE.  I get the following error:  Can't understand "d" at Col # and Row #.  If you can't program it for the "d" than you could use one of these other symbols: ! ^ ~

Also, it's showing Row: 18.6666666666666666666667 for some reason.  That's what I've found.

Also, could you include some type of comment tag?  <--comments--> for HTML.

Scripting Is Here ... Limitedly

18 years ago
try // for comments, though i doubt it will work. and ! is a symbol that is used. It means NOT.  the symbol ^ means the exponential value of... (or atleast involves exponents) and ~ is some symbol thats function is unknown to me. To make a random variable, do it in variable changes menu.

Scripting Is Here ... Limitedly

18 years ago

I didn't program in any comments, good idea though. I was thinking of using # symbol for comments, Any objections?

To clarify, !, ^, ~ are not defined as symbols. There are, however:

  • != which means not equal to ( "3 != 4" is true)
  • NOT means "the opposite of the following condition" (so, "NOT 3 != 4" would be false)

 

Scripting Is Here ... Limitedly

18 years ago
That's great, but I can't change tabs on the Syntax page.  Could you make it so that it can be minimized?  I want to get to all the Syntax I need.

Scripting Is Here ... Limitedly

18 years ago

This is my reply to your PM regarding this:

That won't work, nor is it something I can program at this time (that would take a lot of effort to do). You'll have to use a work around for now:

%DICESIDES := 1D5 + 3 [that's between 4 and 8]
IF %DICESIDES = 4 THEN %HIT := 1D4
IF %DICESIDES = 5 THEN %HIT := 1D5
IF %DICESIDES = 6 THEN %HIT := 1D6
IF %DICESIDES = 7 THEN %HIT := 1D7
IF %DICESIDES = 8 THEN %HIT := 1D8

Also, a thing to note, in Script Code, you can use any variable you want: you don't have to "declare" it first on the Varaibles page. Though the variable will be remembered between pages, it will not be avaible to you as an author in the drop down lists (like variable changes and stuff).

Scripting Is Here ... Limitedly

18 years ago
Oh gold Anubis dont, make one good game rather then 189057q34789578924i572896722789468934879839579034756789387=903567835873856-=90783=07 friekesh games.

Scripting Bug

18 years ago

Alright, i have started the article. Currently i am working on explaining syntax and the functions. Then  i will get into how to put that knowledge into use. This article teaches the basics, but what do you about this alex?

Article: Syntax and Functions - explains ONLY what each function is (btw i am refering function to $DEST, $ITEMSTATE, etc)
Article: Basic uses - How to use scripting using the "basic" option in the editor (i believe that is link scripts)
Article: Advanced uses - How to use scripting using advanced options (i believe that includes page scripts)

What do you think?

Scripting Bug

18 years ago

Awesome! I'll just share my comments too ...

BASIC USES is a great idea, and I think a great place to start. In that article, I would introduce Scripts as a reaction to clicking on a link or using an item (since those are the only two avaiable in BASIC mode). Also, in that article, all I would focus on are CONDITIONALS, VARIABLES, and, maybe, ITEMUSED. I believe that will cover 80% of what authors would want to do with scripting.

SYNTAX AND FUNCTIONS  (maybe we can call it REFERENCE GUIDE?) a great idea too and perfect for people who already understand programming (such as you and I) and wouldn't need to be explained what an IF ELSE block is. In fact, let's work on that one together, I've read enough reference guides to have an idea of what ours should look like.

ADVACNED USES - should cover just about everything else

Scripting Bug

18 years ago
alright, so check my begiinning scripting article, its pretty messy and disorganized but tell me if that is what you want for the referencing.

Scripting Bug

18 years ago
I can't do 1D-3.  Can you try to allow it?  Once that's done, I will finally have a working battle script.

Scripting Bug

18 years ago

What is 1D-3 supposed to mean? Do you mean 1D3?

OR do you want -3? How can you have a dice with negative sides?

Maybe you want -1 * 1D3 ?

Scripting Bug

18 years ago
That works.

Scripting Bug

18 years ago
Alex, i have added a chapter called randomevent in the Script Testing game within my account, there is one page in there that is for you, it contains an explanation on what i am doing with random events. Please read it, I have not actually done it but it is obvious that it will work, no? so if you like it, maybe it can be used in the Basic article, or sample scripts article that i PMed you about...

Scripting Bug

18 years ago
Wow, your article better be good ;)

Scripting Bug

18 years ago
I have a sample script in the Advanced Editor Thread.  Why won't anyone reply to it?  Anyways, Scripts are excellent.  There's just one more thing I would like to be changed:

... + ( -1 ... ) ... dosen't work.  It says reduction error: :=--.

Scripting Bug

18 years ago

Not everyone has scripting enabled, and since it's a new/advanced topic, very few will jump on it.

What is the syntax you are using to get that error?

Scripting Bug

18 years ago
Sign me up for scripting!

Scripting Bug

18 years ago
and me...

Scripting Bug

18 years ago

I'd like to include scripting as well, please.

Scripting Bug

18 years ago
you mean youd liek to be signed up?

Scripting Bug

18 years ago
No, I just found out the thing I wanted scripting for I could do without it, so don't worry about scripting for me. I'll just wait for it to come out to the public.

Scripting Bug

18 years ago
oh okay.

Scripting Is Here ... Limitedly

18 years ago
Anubis' games are fine JJJ. There's no reason to call them freakish.

Scripting Is Here ... Limitedly

18 years ago
Well hes done better then you, tahts true. but no they arent good quality at all.  not horrible either.