So... I'm inputting POF into CYS and I'm using the exact same coding as I've always used in every other game I've ever made and... It doesn't work.
In the original, this would show up as just "boy" if gender was set to 1, or "girl" if gender was set to 2... But in the game I'm making now, it's showing up as "%%GENDER%=%1%boy%%%%GENDER%=%2%girl%%"... What is up with that?
... This should be working, right? Did I miss something at all? Is there something else I need to do to get the script to work?
Yey! My favourite penguin's back! ^v^
Uhh... I have no idea what ascii is. I know! I'll add you as a co-author. Then you can fix it for me!
All of them... Try the stats page first. Can you see anything wrong with it? If I know why it's not working, I should be able to fix the rest myself. ^_^
Well, I'm clicking "Paste as plain text" every time, so I assumed it would work. (If there's one thing I'm REALLY going to miss about CoG, it's the simple as hell coding.)
I don't know! I just don't know!
Oh! Yeah, it's working now. Thanks miz!
But... What's a span?
Well, now I'm even more confused. The whole thing is in source mode now, and I can't turn it off.
You guys are good at knowing stuff. ^_^
Dec? Oh don't you worry, I'll put my hands on him alright! ... Is Ant here too?
If RTE (Rich Text Editor) is turned off, then you will only see the source code. The issue with RTE is that it ends up adding in stuff you cannot see without looking at the source, which can mess up the on page script stuff.
If I recall, you can have the RTE on and then press some button to view the source code, which may help in seeing if all the things around the %'s are clear/appropriate.
ASCII is a way that computers represent stuff, and because html (the thing web-pages are made with) uses certain characters in it's 'coding', such as < and > you cannot type them out yourself (in some conditions) without it getting read as html by the browser, which means they won't show up as you want. However, you can type out something else instead which will let the browser know to interpret it as the symbols without thinking of them as part of the html (& l t ; for less than, without the spaces, & g t ; for greater than).
As I recall, some things the RTE puts in are literally just invisible ASCII, things no one will see but that can mess with on page scripting if they end up being in certain spots, which makes the storygame code get interpreted wrong (or I should say not at all).
A span is something used in html to separate stuff, it is super generic and probably something the RTE put in by itself for whatever reason. Not necessary at all as far as I'm aware (for making a storygame).
Worth mentioning that one of the reasons RTE is so often suggested to be turned off is because the functionality it provides is easy enough to just do yourself by typing the html into the source, as the basic things are simple enough to learn, <p> </p> for paragraphs, <b> for bold </b> (or use strong instead of the b), i or em for italics, <br> for a paragraph break (like shift-enter in word), etc. As such, there ends up being very little reason to use the RTE, but it does make global font changing (and color changing) a bit easier, but they can still be done without it (and global scripts are a thing).
Anyway, the more complex html stuff can also be implemented (as far as I'm aware) and is in fact easier to deal with without the RTE messing you up constantly.
TL;DR Just me attempting to explain some things that came up in this thread, because I felt people weren't explaining it as much as they could. Granted, I might have gotten something wrong, in which case I await people to correct me. Also, with RTE turned off, the only thing you'll see is the source code (which probably shows that what you were copying pasting wasn't clean [or became corrupt after pasting into RTE]).
P.S. Right click a page then 'inspect' or 'view page source' to get a glimpse into web creation with html + css. It will probably be messy... but might be interesting to take a glance at (you might even find a span or hundred).
That... Most certainly didn't register. I pretty much just heard, "Blah, blah, blah, code, code, code, blah, blah, computers, blah, scripting, blah, blah, blah, it will probably be messy..." Wait, what will be messy? Dude! Totally inappropriate! >.<
Ah, well it probably wasn't the best explanation regardless.
- ASCII is like an alphabet for computers.
- Without RTE, source code is what you'll be seeing.
- With RTE, a letter may be added where you don't want one, so then the script won't be read properly, it is like misspelling a word.
- So to misspell words less, you can turn off RTE.
- However now you are seeing stuff that may look weird, because you are seeing ASCII letters as well as English ones.
Hopefully this makes more sense.
I should add that you can pretty much write plain English into source code (along with the %%VAR%=%1%TEXT%% script) and have it work fine.
Only the formatting may be lacking. That is why I mentioned some HTML things.
HTML = Hyper Text Markup Language.
So think of it as a computer language. Stuff that changes things (such as bolding a word) but isn't actually writing.
The <p>paragraph</p> <b>bold</b> <i>italics</i> <br> break (no closing for this one) are the main ones I imagine might be used. You put paragraphs in the paragraph tags, you put bolded words in the bolded tags, italics in the italics tags, and break can replace the enter key (mainly for being used inside the text area of "%%VAR%=%1%TEXT%%" to have paragraphs, if you want). If there is other things (like changing color) you can always google "html changing text color" and copy the tags they show you.
There, a simpler explanation.
TL;DR Err, HTML can be used for formatting when writing straight into 'source'.
P.S. You learnt the CoG coding, this is the same thing, just more universal (ASCII and HTML aren't site specific). I'd say you only really need to know that HTML is used to format stuff, as opposed to site specific 'coding' doing that. Offering 'inspecting' via right click was probably not the best idea on my part tho (and viewing page source is even worse, since there are heaps of unmentioned tags, and this site is old so it is not a prime example of HTML anyway).
Oh! I think my tiny, blonde brain actually took some of that in. Thank you! Yeah, basically... If you're trying to explain anything to me about coding, just imagine that you're trying to explain it to a five year old. (Would probably help if you bring a colourful picture book and a couple of hand puppets.) ^_^
Okey dokey. If I ever try to add something simple to the game and it doesn't work, at least I'll know why. ^_^
Damn, mizal! You like to live life on the edge!