Scripting is very complicated, but if used correctly, is very much worth it. Check out 'The 1st And Last Of The Ninja's' by nmelssx if you want to see what I mean.
I don't understand much, but here's a couple things I've picked up on that are things that you'll use alot if you do use scripts.
$PAGETEXT (Enable the scripting on story properties, and create variables)?
Text dependent on a variable
After you enable the scripting, a blue symbol like this ':=' should come up by the title of an open page. Click it and it'll open the $PAGETEXT thing. Okay so an example of what you would put into $PAGETEXT would be this:
IF %PARTYCIT = 0 THEN $PAGETEXT := $PAGETEXT + "Unknown<br>"
IF %PARTYCIT = 1 THEN $PAGETEXT := $PAGETEXT + "Citrior: "
IF %PARTYCIT = 2 THEN $PAGETEXT := $PAGETEXT + "Citrior: Deceased<br>"
The IF %_____ = _ THEN $PAGETEXT := $PAGETEXT + "Insert text dependent on the variable." is the general format you will use. There are variations such as IF %_____ = _ AND %_____ = _ THEN $PAGETEXT := $PAGETEXT +"Insert text dependent on both variables<br>" which you will be using for a variable depending on another.
The first %___ is where the independent variable variable goes. The smaller _ blanks are the variable values in which must be in order for the text to appear to the reader. If using the second format, the second long ___ after AND % is where the variable that depends on the first one goes. The third long blank blank is the text which shows when both variable requirements are met. There are a few other formats you can use, but these are the ones I use most often and know the most about. Any questions on this?
Automatically pick up/drop an item
In the same place.
$ITEMSTATE01 := 0
$ITEMSTATE01 := 1
Use the top script on the page you want it removed on, the bottom script on the page you want it back on. Replace the "01" part with whatever number the item is. Questions?
On Page Variable Tricks
This goes, well, on the page itself, though it won't show up when playing through. Long ___ and short _ are same as when I was explaining $PAGETEXT. The drawback on using this is that although it is simpler, it also leaves extra spacing in the story when viewed.
%%___%% is how you get the current value of that variable to show up on the page. It's useful for stats.
%%___%%=%_%Insert text dependent on that variable%%
Here, the '=' can be replaced with '>' which means that if the variable is greater than _ value, then put this text in. It's handy for stats as well.
Eventually, once you get the hang of it, you can do things like this; (copied/pasted from a post by nmelssx a while ago. I can't even begin to understand this, but it makes a random name generator.)
This is the script:
%V1 := 0
%V2 := 0
%V3 := 0
%V4 := 0
%V5 := 0
%V6 := 0
%V7 := 0
%V8 := 0
%C1 := 0
%C2 := 0
%C3 := 0
%C4 := 0
%C5 := 0
%C6 := 0
%C7 := 0
%C8 := 0
%ROLL := 1D6
IF %ROLL >= 1 THEN
BEGIN
%ROLL1 := 1D2
IF %ROLL1 = 1 THEN
BEGIN
%C1 := 1D21
%ROLL2 := 2
END
IF %ROLL1 = 2 THEN
BEGIN
%V1 := 1D5
%ROLL2 := 1
END
IF %ROLL2 = 1 THEN
BEGIN
%C2 := 1D21
%ROLL3 := 2
END
IF %ROLL2 = 2 THEN
BEGIN
%V2 := 1D5
%ROLL3 := 1
END
IF %ROLL3 = 1 THEN
BEGIN
%C3 := 1D21
%ROLL4 := 2
END
IF %ROLL3 = 2 THEN
BEGIN
%V3 := 1D5
%ROLL4 := 1
END
END
IF %ROLL >= 2 THEN
BEGIN
IF %ROLL4 = 1 THEN
BEGIN
%C4 := 1D21
%ROLL5 := 2
END
IF %ROLL4 = 2 THEN
BEGIN
%V4 := 1D5
%ROLL5 := 1
END
END
IF %ROLL >= 3 THEN
BEGIN
IF %ROLL5 = 1 THEN
BEGIN
%C5 := 1D21
%ROLL6 := 2
END
IF %ROLL5 = 2 THEN
BEGIN
%V5 := 1D5
%ROLL6 := 1
END
END
IF %ROLL >= 4 THEN
BEGIN
IF %ROLL6 = 1 THEN
BEGIN
%C6 := 1D21
%ROLL7 := 2
END
IF %ROLL6 = 2 THEN
BEGIN
%V6 := 1D5
%ROLL7 := 1
END
END
IF %ROLL >= 5 THEN
BEGIN
IF %ROLL7 = 1 THEN
BEGIN
%C7 := 1D21
%ROLL8 := 2
END
IF %ROLL7 = 2 THEN
BEGIN
%V7 := 1D5
%ROLL8 := 1
END
END
IF %ROLL >= 6 THEN
BEGIN
IF %ROLL8 = 1 THEN
BEGIN
%C8 := 1D21
END
IF %ROLL8 = 2 THEN
BEGIN
%V8 := 1D5
END
END
This is on the page:
%%V1%=%1%A%%%%V1%=%2%E%%%%V1%=%3%I%%%%V1%=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