How to use Scripting to Improve your Story
If you were wondering about scripting's awesome capabilities, then this is the article for you. In here you will find 5 uses of scripting (in no order) and the many ways that they can improve your stories, and maybe even get them featured!
Make sure you have read both The Basics of Scripting and Intermediate Scripting before you read this article.
Battles are a great way to improve your story for the better, I am planning to use them myself in some of my own stories and they are used in many other advanced storygames around the site. An example of one is BerkaZurka's Dungeon Stompage which features many fights, including a boss battle at the end. This was a featured story, and many other stories with battles have been successful. Overall battles improve the 'feel' of actually being in control of the game and can make your storygame seem much more realistic. you can make them using basic scripting that you should have learned already from The Basics of Scripting by alexp.
Page Text Editing
Page text commands allow you to control what text a player/reader sees on a certain page of your story. Used with other scripting methods, this can really make the reader feel like they are in the game. For example, when used with item scripting, if you have the item 'torch' you could put the text 'I think it's time I got out that torch' in a dark scene of your story. This would be represented by the script:
IF $ITEMSTATE4 = 1 THEN
$PAGETEXT := $PAGETEXT + "I think it's time I got out that torch"
This is great as it allows you to link the text on the page to variables, items, and other things in your story.
With scripting you can also give the main character 'stats' and have these affects the level of reaction in certain situations. These can be things like strength, agility and persuasion that can help the player during game objectives, depending on the 'level' of that stat. Lets say that 'strength' is the stat that can help in a battle situation of the story, you can use a script to inflict a certain amount of damage on an opponent depending on the level of the 'strength' stat:
%DAMAGE := %STRENGTH + %WEAPON
A simple yet affective script to change a battle situation dramatically and all in accordance with with the users strength, I find scripting so amazing sometimes. These stats can also be used in more complicated situations, for example if you are arguing with a guard to let you past a gate, you need persuasion at a certain level to argue past the situation or strength at a certain level to fight your way through, you could you this script:
IF %PERSUATION > 4 THEN
$PAGETEXT := "Oh, I guess I can let you past."
$DEST := @P34
IF %STRENGTH > 5 THEN
$PAGETEXT := "This guard isn't getting in your way! You punch him and knock him out, then open the gate and continue your journey"
$DEST := @P34
You can also put 'stat pages' in your story which allow the player to see the level of each one of their stats and maybe upgrade them with an in-game currency.
I will not go into to much trouble about this one as it is explained in depth in October's Scripting: Items, but I will show a few ways it can help you with your story gaming. Item used is a commonly used feature for games with 'reloads' or specific limitations on items. It can even be used to give items a 'wear and tear disadvantage' lets say you have the weapon dagger, to put in a wear and tear effect you could use the script:
%WEARANDTEAR := $ITEMUSED2
%DAMAGE := %DAMAGE - %WEARANDTEAR
This sets the variable 'wearandtear' to the amount of times the dagger has been used and then subtracts that from the amount of damage it can do.
Item state can change the page text or variables depending on whether the player has the specific item, this was used in the example in the Page Text Editing section. These combined can make sure resources aren't unlimited and therefor give a realistic effect to your story, as well as allowing a knowing of a users inventory that can in turn change the path of the story.
Destination Editing is a commonly used feature that is great for making other scripting features come to life. it can allow you to retrace your steps and go back to the last page in your game, make random encounters, explained in Random Encounters/Events: A Scripting Scenario by solostrike and much more. $DEST can change a links page destination according to variables, item states or random events. It can really help your story by letting links join the scripting party and allow past events to effect where a certain link will go later on in the story.
I hope this helped with anyone wondering whether they should use scripting in their story, and given advice on different scripting techniques and how they can help to those who already have scripting enabled. If you have any questions just PM me and I'll be happy to help. -Squatter