Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Editor Tutorial?

11 years ago

Does any kind of guide or wiki explaining exactly what the editor is capable of and how to do it happen to exist? I have basically zero knowledge of scripting, and if I want to do something specific, it would be nice if I could just look it up instead of searching through a billion old threads seeing if someone else brought up the exact same issue. Especially with my internet access being kind of unreliable right now...

Editor Tutorial?

11 years ago

http://chooseyourstory.com/help/

This page should help explain it. 

Editor Tutorial?

11 years ago

I've looked through some of those before but I suppose I can do a little more poking around. They do cover a lot but it's all kind of fragmented...really wish someone would get around to throwing it all into a wiki or even a .pdf so it'd be more easily searchable...

Editor Tutorial?

11 years ago

Okay, I already made this thread and all so for now I guess I will just throw out a couple specific questions:

 

In a story I'm writing, your character cuts their hand on a piece of metal while exploring a crashed ship. If they're on good terms with a certain NPC, I want the option to go to them for treatment to pop up. If they're not, they can try something different with a random chance of failure, in which case the hand doesn't heal properly and effects combat and certain other actions from then on. In the system I'm currently using to write this story, it's pretty straightforward to set this all up without having to split the whole thing into multiple 'almost the same but not quite' paths running parallel to each other.

Mainly I'm just trying to figure out whether I can do the same thing here without too much of a headache, or if I'm going to need to change a lot of things to make it work. 

Editor Tutorial?

11 years ago

Make a variable "GoodTerms", set it to one if the character  and then use a link restriction to make the choice of going to that NPC possible only if the variable is one. Theres a article about random variables..If the hand doesn't heal, then make another variable, "Handbad" and make it affect the fighting with something like this:

If HANDBAD=1 THEN

DMG:=DMG/2

END

To change the text in later pages use this:

%%HANDBAD%=%1%But your badly healed hand makes fighting tough. Blaha blah%%

Editor Tutorial?

11 years ago

Most important 3 articles to read are Basic, Intermediate, and advanced Scripting. Avoid the article on Variable Item Scripting by Zikira for now - it will only confuse the heck out of you ;)

Editor Tutorial?

11 years ago

Two variables:

%NPCTERMS - Used to keep track of if you're on good terms with the person. You can name it whatever you want.

%HANDSTATUS - Used to keep track of your hand.

The random chance of failure bit would have to be done with scripting. Here, it's done by "rolling dice".

%DICEROLL := 1d6

In the above line, I'm setting the variable "DICEROLL" to be the result of 1d6. 1d6 means 1 dice with 6 sides rolled. This would give me a value between 1 and 6.

2d8 = 2 eight-sided dice rolled, giving me a result between 2 and 16

7d3 = 7 three-sided dice rolled, giving me a result between 7 and 21

I think you get the idea by now for the random chance of failure part. The actual code would look something like:

%DICEROLL := 1d6

IF %DICEROLL > 4 THEN
%HANDSTATUS := 0
ELSE
%HANDSTATUS := 1

So if the dice rolls greater than 4 (5 or 6), the hand is fixed (set to 0), otherwise it remains injured (set to 1).

Editor Tutorial?

11 years ago

Thanks guys, this helps a lot. :)