Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Can you customise how variables appear?

10 years ago

Hi all,

So I thought I'd finally confess my ignorance and voice one of what I'm sure will be questions to come, and also take the opportunity to introduce myself to the site! As an aspiring writer and an avid gamer interactive fiction combines two interests that are very close to my heart, and I must say this community seems very supportive.

So I've been playing around with the advanced editor (after scouring all the guides, I promise!), and was just wondering if I can "sort" variables so more key ones (e.g. health) appear before and possibly separated from the secondary traits (e.g. strength, intelligence, charisma, e.t.c). I've had a look but can't see any immediately obvious way to do it- does anybody have any suggestions, or a way they have achieved this in their own games? The editor seems to sort the variables alphabetically, which I found rather odd. Any help would be MASSIVELY appreciated!

Thanks in advance! yes

Can you customise how variables appear?

10 years ago

Moved this to the Advanced Editor forum!

You can refer to variables directly by typing %%VARIABLENAMEHERE%% on a page. For example, if you wanted a page to display how much gold a player has, and the variable GOLD is equal to 15, you would write:

"You have %%GOLD%% gold."

And this would show up as:

"You have 15 gold."

This also means that you aren't forced to display variables on every page - every time you want a variable shown you would type in the "You have %%GOLD%% gold." thing. If you want this message displayed on every page, you can edit the Global Page Script (check the Help & Info section if you're interested in learning scripting!) to make it so that your custom message appears on every page!

Unfortunately, there are no ways to rearrange the order in which variables are displayed if you want to avoid scripting and would rather just have your variables appear on every page like they are currently. They'll show up in a set order unless you customise things by referencing variables directly.

Hope this helps. If you have any more questions don't hesitate to ask!

Can you customise how variables appear?

10 years ago

OK then, that's very useful (not to mention extremely prompt!) advice. I did have the intention of delving into scripting as the story I've planned out will require the flexibility that offers, but I wanted to lay the initial groundwork and weave in complexity from there.

Thank you both very much for the guidance, I'll be sure to try that out! Just a follow-up question, if the player wanted to manually check their stats is it possible to achieve that through use of an item for example? Maybe not every one will be as neurotic as me, but I like to crunch the numbers as I play through. Haha.

Can you customise how variables appear?

10 years ago

No worries!

That's entirely possible. You could set it up so when an item is used, it will take you to a page which displays your statistics. On this page, you could have a "Previous Page" link so the reader will be returned to the page they used the item on.

Can you customise how variables appear?

10 years ago

Make the use item go to a page that lists all the stats:(put this in the page)

Youd stats are:

Health: %%HEALTH%%

Stat2: %%STAT2%%

 

Can you customise how variables appear?

10 years ago

Hmm, a way would be to use a global page script to add the variable in the text of every page:(put this in the global page script)

PAGETEXT:=PAGETEXT +"Health(or whatever you want): %%VARIABLE1%%" + "</br>" + "Health(or whatever you want):%%VARIABLE2%%"....

Can you customise how variables appear?

10 years ago

Well, I think that script should work correctly..

Can you customise how variables appear?

10 years ago

Thanks, I'll give it a spin and see how I go!