BradinDvorak, The Expert Scrivener
Member Since
Last Activity
EXP Points
Post Count
Storygame Count
Duel Stats
Order
Commendations
My hope is that these eventually become obsolete.
CYSCE (CYS Chrome Extension)
CYSFFE (CYS Firefox Extension)
CYSFiddle (page script testing environment)
CYSugar (syntactic sugar for CYS Script)
But, uh, totally go ahead and use them in the meantime.
art by Arkenrall
Trophies Earned
Storygames
Do you know what happens to knights who dare oppose me? They’re soundly beaten, torn to shreds, reduced to mere ashes, utterly and completely obliterated. No one can defeat the great and mighty (and—dare I say—quite handsome) Knarr'ator. I’m the best, most awesomest dragon there ever is, was, and will be. And yet here you stand, just a character in my story, challenging me like the fool you are. If you think you stand a chance against me, you’ve got another think coming.
But by all means, go ahead and try.
It seems you’ve found yourself within
The troublesome affair
Of trekking through the timberland
To slay the dragon there.
They claim it a ferocious fiend;
However will you fare?
My entry for the December 2016 Ballad Contest.
Illustration: Der Kampf mit dem Drachen by Ludwig Richter
___ ___ ____ ___ ____ _____ _______. _____ ___ ____ ___ ____ _____ ____ _ ____ _________ ____ ___ _____. _ ____ ______ ____ _ ___ __ _______, ___ ___'_ ___ ___ ___ ____ __ ___ ______ ______ _____! ___ __? _____? __, _____ ____.. _____ ____, ____ ____ ___ ____!
French dragons.
Lorem ipsum dolor sit amet, iudico mucius praesent eu vim. Cu has indoctum maiestatis referrentur. Vix eu omnes explicari, unum tacimates has et. Mei cu recteque hendrerit, an esse voluptua nam.
Te per impedit percipit consetetur, mel cu quaeque convenire. Liber utinam probatus cu eam. Id vulputate voluptatum sed. Mentitum adipisci postulant no mel. Esse omnis quaestio et eos.
Vides meam barbam, et amas eam!
Image by Acrid.
Dvořák? Check.
Dragon? ...Check.
Kobold? Chick.
Test Test Test Test Test Test Test Test Test Test Test Test Test
The only thing I want is the last thing I need.
Recent Posts
How to add "double quotes"+$PAGETEXT on 5/17/2024 4:54:03 PMYou can use "
IF %VAR = 1 THEN $PAGETEXT := ""Name,"
CSS and Javascript Questions on 2/22/2024 10:47:48 PM
Pretty simple fix. You're using the element itself instead of its value.
const astring64 = document.getElementById('pbForm').elements.SS.value;
I'd also say consider using alternatives to document.write
(it has some weird behaviors). In this case, you can write the string to the inspect element console with console.log()
CSS and Javascript Questions on 2/21/2024 10:43:45 PM
Yeah, all the info is stored in the one story state input. The system will interpret a lot of variable names as valid, so that's the safest portion to modify. Even if they're too long or oddly named they'll still persist over page changes; however, if it's got a weird name don't expect it to work in a CYS script.
CSS and Javascript Questions on 2/21/2024 10:34:21 PM
Oh yeah. The old method of one letter per variable would not have cut it there lol.
CSS and Javascript Questions on 2/21/2024 7:54:41 PM
It's possible! The story's state is always present on the page in a hidden input, document.getElementById("pbForm").elements.SS
Its value is a base64-encoded string. If you decode it with atob()
you'll see it's got five pipe-separated groups of values:
- The story id and the current page id
- A history of every page id visited ordered from most to least recent
- Key/value pair of link id and # of times clicked
- Key/value pair of item id and # of times used
- Key/value pair of variable name and value
The first two are comma separated, but for the last three, the pairs are separated by semicolons and the key and value themselves are separated with commas.
If you're storing an integer, it's as easy as parsing that string, changing the variable, reincoding with btoa()
, and updating the input's value.
If you're trying to save noninteger values, it's more involved but doable. Internally, variable's names are not strictly enforced, so you can actually store data in a variable's name (just remember to still give it a dummy value). You could for instance include the key/value pair JS:eyJ4IjozMiwieSI6MCwieiI6MTZ9,0
and that would persist a stringified JSON object of xyz coordinates.
I don't have time to provide a bigger snippet of code right now, so I hope this information is usable! I do have a simple example of it being used here (the long variables page, not the multi-variables one).
Infinite Craft - new timewaster on 2/11/2024 7:34:15 PM
I'm the first to discover Gay Dragon Husband so I've won as far as I'm concerned.
Suranna's Last Minute AP Art Homework on 4/25/2023 2:30:54 AM
Declaring variables on 4/7/2023 5:50:37 PM
You can make up a variable on the fly. It will default to zero and any value it's given will persist like any other variable.
Checking Multiple Variables? on 3/29/2023 12:29:18 AM
Gryphon and Mizal are right about nesting. AND, OR, and NOT work with = and !=, but there's a bug that breaks them when less/greater thans are involved.
drawing to drown out the sadness on 1/25/2023 6:01:30 PM
I don't believe you.