So, I've decided I do want to be a programmer when I grow up, after all. As such, I need some portfolio projects. And I'd very much like to enable CYS users to get their games off this site.. and into a different format, if they so choose.
And thus, the CYSBOT project is born. My goal is to create a bot that you can add as a coauthor to a story, then PM it a command that has it make a backup, recreate a storygame from a backup, or transpile a storygame to ChoiceScript or Twine.
This is assuming that A) anyone is interested, and B) the mods don't nix it.
So! Anyone interested? And if you are, are you more interested in backup/recreate, ChoiceScript, or Twine?
@BerkaZerka @EndMaster ...hiii mods. It'll be a very well-behaved bot, I promise. Still, I figured I should ask permission rather than forgiveness. I'd hate to spend a lot of time on this and then have my bot banned.
Morgan, this clearly goes against the Site Policy. Bots can't consent to Co-Authorship unless coerced by programming/MIND CONTROL.
Hi Sent! How ya been?
There's nothing in site policy against mind control. There is this:
While using the Web site you may not:
• ( I ) post or transmit any message under a false name;
Soooo, pretty much everyone here is violating the ToS every time they post. Myself excepted, since my name actually is Morgan. XD
I've been positively excellent, as far as I know.
Well, yeah, but it's also against the De-Facto rules to co-author someone without their consent, and those are ten times as important as the Terms of Service. Also, I'm pretty sure everyone commits murder fairly regularly even though it's technically illegal. Does that mean we should be allowed to rob banks!? Of course not, that would be madness!
I'm very glad to hear it. ^_^
I will definitely take measures to ensure that my bot doesn't rob any banks. But if someone co-authors it without its consent, well... who is breaking the rules? Not the bot, surely!
This must have been your plan all along! Forcing everyone into alternative game engines by creating a bot that gets everyone banned for co-authoring it without its permission! IT'S A TRAP! AND IT DOESN'T EVEN HAVE ANIME EYES OR A PENIS!
...are you sure?
I mean, if you are, that raises certain questions... XD
I mean, not really, but I hope I'm right. Like, if the French are allowed to assume that a guillotine has a vagina without checking to make sure, I'm allowed to assume you didn't attach sex parts and anime eyes to a Secret Death Robot.
...okay, you got me. My bot is entirely lacking in sex parts. And eyes, anime or otherwise. But, also lacking in nefarious plans and/or murderous intentions!
Python + Scrapy so far. Not sure exactly what else I'll need, but the Python ecosystem seems to be pretty damn expansive at this point. And yes, it will be open source, since "portfolio" in this case means "projects accessible on GitHub." I'll run it from my own computer during development, and eventually deploy to PythonAnywhere. (Probably. I liked them when I tried them out a couple years back, and from what I've read people still like them, so that's the tentative plan.)
As for my background... I started programming when I was in my early teens. Made some little games in Visual Basic, and later on a bot for a game called Furcadia. I thought I wanted to be a programmer when I grew up. I got about halfway through CompSci degree before switching focus to computer animation. My eventual work in that field was still fairly technical, and included software development. I wrote a domain-specific scripting language for one of our products... which was complete overkill, in retrospect, but it was a learning experience.
So, yes, this is a reasonably ambitious project, but I'm not starting from "Hello World."
Awesome. And yeah, given the small userbase here, and the even smaller percentage that would have any interest, it's definitely not worth the time/effort from that angle. But: it's educational, and I need projects, aaaand I wanna see if I can do it. I do think it's possible that there's some 'gotcha' in the differences in functionality between CYS and ChoiceScript and/or Twine, such that I won't be able to get a transpiler working. But it'll certainly be interesting to find out.
I'll definitely join you on Discord, thanks for the invite! Hopefully I won't end up badgering you too much. XD
What are you doing with Lisp? I took a class in Scheme back in college, and one of the "real" devs from my former workplace told me I should look into Clojure. Which I've started to, but... yeah. Easily distracted, especially when I'm not yet clear on why something is cool.
bradin.pw/cysfiddle for the... er, curious.
This is really neat! What does CYSugar looks like? And do you have on-page variables working yet? (I may be using the wrong terminology here, it's been awhile.... I mean something like %%VAR%% in the HTML. I tried it and it's displaying 0, even though the variables dropdown shows the value I set in the script.)
It looks a lot like plain CYS Script, but CYSugar is made slightly more brief with a few additional features. Stuff like compound operators (e.g. "+="), increment and decrement operators (e.g. "%FOO++"), headless dice notation (e.g. "D20" instead of "1D20"), and non-conditional on-page coding in strings (e.g. "Your score is %%SCORE%%").
By default, on-page coding is done before the page script, since that's how it works on CYS. I'm assuming that's why you're getting a zero instead of the intended value, but fortunately you can shift that processing to the end by enabling the "on-page post-processing" option.
And yeah, that makes sense... I grabbed the display code from a random page from an old project, and then backtracked to get code to set it. It's been long enough that I don't remember the syntax myself... or details like evaluation order, apparently. XD
Err... what? How would switching to a C language help? How would making it local help? It would still need to scrape the site, what difference does it make if it's scraping from a server or from someone's machine? I can't imagine bandwidth being a problem... we're talking about text. What am I missing?
Parsing the scripts, and turning them into different scripts, is what makes it a transpiler. Since more than half the point of this project is to have something cool to put on my resume/GitHub, that functionality is definitely something I want to try to get working. But yeah, it's definitely not a simple task.
Twine > CYS or ChoiceScript > CYS is... less viable. Consider that both of those let you set a variable to a string. And Twine lets you put links anywhere in the text.
Thanks for the offer! I may well take you up on that.
Ooooo. A thingamabob. Coding. Programming and such. Choicescript and Twine also.
I know these things.
I'm glad you approve of thingamabobs! Which kind is your favorite?
... Uh... The red one.
And how deep does the rabbit hole go? XD
... I'm actually really happy you got what I was trying to do there.
Okay, so maybe I don't know these things, but apparently Twine is better than Choicescript, so I choose that one.
Cool. Looks like people are preferring Twine so far. I do intend to do both, but since I'll have to pick one to do first, it'll be helpful if there's a consensus.
Although I don't have much knowledge in things pertaining to programming and code, it is good to see you back online and (hopefully) fully operational, Morgan! :^)
Thanks! My brain is braining okay right now. Having some insomnia, which is a definite red flag for the start of an upward spiral... buuuuut it's intermittent, when it happens I still do get some sleep, and I do actually feel tired. It's when I don't sleep and feel awesome that things really go off the rails. >_<
Twine. Choice script is for the birds
Hey Malk! How goes?
I actually do prefer ChoiceScript, so... you're right! XD
But thanks for voting. I do think Twine is very cool, and I'd be happy to start with it, if that's the general consensus.
I've always disliked ChoiceScript, mainly because the layout reminds me uncomfortably of those proficiency questionnaires that companies give you on job interviews. Given a choice, I would certainly prefer Twine.
Visual appeal is definitely not their strong suit! Thanks for voting. ^_^
...gonna go with nope to the nope, thanks anyway. :P
As far as I know as long as it isn’t spamming ads/posts, harming the site or something similar I don’t think there’s a problem with this though I imagine JJJ or Alex would probably be the people to directly ask if this is allowable, but who knows when they’ll be around again.
I'm pleased to report that CYSBOT can now crawl a Classic Editor based storygame, and generate a playable Twine HTML file. Now, this is not actually that useful on either end, since A) most storygames here are made in the Advanced Editor, and B) the generated Twine files don't have positional data for the nodes. Still, it's a start!
Hi Morgan! Just curious to see if you've made more progress on this.
I'm looking to develop my CYOA on this site ("Cabata's Quest") into an app, and the first question developers are asking me is can I "export" the file so they can play with it... ;-)
Are you using the Classic or Advanced Editor?
I'm using the advanced editor and the project is coming along! Will probably be ready to publish it (after preparing myself for immense ridicule) around the end of March. Just in time for April Fool's. LOL ;-)
Can’t help you then, unfortunately. I only got as far as Classic editor support, and I don’t think I’ll be moving forward with the project. Sorry to have raised false hopes.
Thanks anyway (and for the prompt reply)! :-)
Anybody know a smart place to export the game to once I'm done re-writing it (which I'm sure will take another year or two)? I know I'll have to export it by hand, but if my ultimate intention is to make an android and iphone app... should I move it by hand to Inkle? Quest? A plain word or notepad document?
Hope everyone's weekend is going well. :-D
You should probably repost the question as a new post so more people see it. I know CoG releases apps, but you’d need to either work with them or pay them some sort of licensing fee, as I recall.
I know this has been brought up for some stupid reason, but how old is Morgan? Isn't she "grown up" yet? I assumed she was.
The crazy old owl is probably older than two of you put together.
Probably, I recall you looking pretty old. Care to specify?
It’s honestly hard to believe sometimes. Time goes quickly... especially, I think, when one is depressed.
Ah, horrifying. Good to know.
Yup. Carpe diem, kids! Because one day you too will be thirty-somethings, ancient of days.
Fuck that, I'll die before I reach your age. Presumably doing something sick, like having a last stand against Nazis, or punching a shark, or ODing.
Steve to die by punching a Nazi shark while ODing, got it.