Non-threaded

Forums » Newbie Central » Read Thread

Introduce yourself and get to know the community.

Adding Variables

9 years ago

First of all, Hi, I'm new here and I'd like to try out this engine to see if I can make any good stories out of it. I've written a few short stories before and made a few (largely unsuccessful) attempts at making a full length novel.

Choose your own adventure stories have always been a favorite of mine growing up and the concept of being able to track variables and give the reader not only multiple variable dependent choices, but also choices with possible different outcomes based on variable sounds amazing, but I've hit a bit of a snag.

Is there any way to add a variable to another variable? I want to create a story similar in concept to Bill Murray's Groundhogs day only over the course of multiple days with the ability to "replay" different chapters with the main character having foreknowledge of the events that will take place. It makes sense that "stats" relevant to your mental state (Intelligence, Patience, Willpower, ect...) would transfer with you, but your physical state would revert to it's state at that time. I was hoping I could use variables like CHP1CASH and CHP2CASH to track your state at different points and just set a displayed variable DOLLARS equal to that amount when starting the chapter.I think I've got a very basic background with programming and I think with a bit of experimentation I can figure out how to implement the scripts I need, but I'm still not clear on where I should be writing these scripts.

Adding Variables

9 years ago

Welcome to ChooseYourStory.com and have a nice day.

www.chooseyourstory.com/help/articles/article.aspx?ArticleId=1

Adding Variables

9 years ago

Yes, but the standard engine doesn't seem to support adding one variable to another. Now I'm sure I could write up a basic statement to do it with a little experimentation even though I don't have any previous experience with HTML, but I'm not sure where to write it.

Adding Variables

9 years ago

Ah - my mistake. I assumed you weren't in Advanced Editor. Simply go to "Game Options" and enable Advanced Editor, this will give you access to variables, items, and etcetera. From here, to enable script, 

"Enabling Scripting in the Advanced Editor
Before getting started, you'll want to make sure that you have enabled Scripting in your storygame. To do this, go to the Properties page in the Advanced Editor, and scroll down to the "Editor Features" heading. Click on the [change editor features] link and, on that page, change Scripting to Basic. As you get more familiar with Scripting, you can increase the level to Advanced.
Once Scripting has been set to Basic on your storygame, you'll notice a few new things:
A "Scripts" navigation item appears
Numbers appear next to Items and Pages
A new button will appear next to each link
A new option ([Edit Item Script]) will appear on the Edit Item page"

Adding Variables

9 years ago

Thanks. Good to know that this place has a helpful and supportive community.

Adding Variables

9 years ago
Advanced Editor:

Storygame Properties > Editor Features > [change editor features] > Variables > Advanced > Scripts > Advanced >Save changes and Return to Story Properties

If you want actual variable scripts and code and such and how to input the code into the game, go to the advanced editor forum.

Adding Variables

9 years ago

Welcome! ^_^

As the local fifth columnist, allow me to suggest Twine or ChoiceScript as other possible alternatives.

Pros and Cons:

CYS: Pro: Built-in publishing platform and audience. Items that can be used on any page. Con: Limited scripting. No string variables. No ability to download your own games or publish them elsewhere.

Twine: Pro: Visual node-based editor plus more powerful scripting. HTML output that can be hosted anywhere (including for free on Philome.la) Con: Requires additional scripting for items. Large games may get a bit unwieldly in the node-based format.

ChoiceScript: Pro: More powerful scripting. Built-in stat management. HTML output that can be hosted anywhere. Potential for commercial publication with Choice of Games. Con: No items. Output cannot be styled, and the default style isn't that stylish. 

Regardless of your choice, I hope you'll stick around! ^_^

 

Adding Variables

9 years ago

*raises lynch mob* 

DIE, TWINE SCUM!!!!

Adding Variables

9 years ago

...you know I'm working in ChoiceScript now, right? XD

Adding Variables

9 years ago

XD

 

Adding Variables

9 years ago

Welcome to CYS!