<div dir="ltr"><div>...fair enough. Mainly I couldn't decide whether I would prefer c or col, so was thinking of allowing both.</div><div>But I guess very short codes are a bit obscure. Can you make out what these mean?</div><div>f, bg, lm, rm, hl, u, s, rgn<br></div><div>I get the picture: I guess we should avoid one-character codes (but no harm when the bbcode is one character already) and aim for 3-4 characters.</div><div>So: b, i, s, u, font, col, bg, sp, tab, lmargin, rmargin, wave, shake, var (variant), big, small.<br></div><div></div><div>left/right margin could maybe be called lgap/rgap. Or ldent, rdent, or lm, rm. I don't know.</div><div>(big/small: I'm planning to add markup to go to the font defined as the next size up/down, which avoids assigning numerical sizes to fonts.)</div><div><br></div><div>And more markup for controlling display of text, like pausing, waiting for key, or showing text all at once.<br></div><div></div><div>Wait for...[.w] half a second by default...[.w2.5] or longer.</div><div><div>[.nowait]Show this text all at once[/nowait]</div></div><div>Press a key[.wkey]</div><div>I guess the rpgmaker codes for these (all single characters), have too much of a learning curve, they're less readable.</div><div><br></div><div>Aside, I am considering a binary form of each tag for file and in-memory storage. The binary form of most codes will be two bytes. This will make it practical to use markup in numerous length-limited strings like textbox choices, global text strings, attack captions and descriptions, even item names (because item names are stored as 8 characters in 16 bytes, which I mentioned I wanted to change) without needing to replace file formats.</div><div>So the textual length doesn't matter.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 7 Jun 2020 at 01:49, James Paige <<a href="mailto:Bob@hamsterrepublic.com">Bob@hamsterrepublic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I like this plan [.col14]very much![/col]<div dir="auto"><br></div><div dir="auto">The only possible modification I would suggest is maybe we only need the short versions of codes. What is the benefit of having the long ones too?</div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 6, 2020, 5:27 AM Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>bbcode was my preference too. I've been thinking about how backcompat could be maintained with a bit, and I've decided it's just too much trouble. Instead I propose the syntax [.col3]...[/col]. That's just as easy to type as bbcode, because even international keyboard layouts will all have easy access to ".", and very unintrusive (even more so if using a proportional font.) Or as an alternative, [:col3]...[/col]. I propose [/col] instead of [./col] because there's no need for the extra character. More details at the end.<br></div><div><br></div><div>I wrote an rpgbatch script to scan the gamelists for strings. I only scanned textboxes, items, attacks, global text strings, and slices. Some totals (probably a lot of duplicate games):</div><div><br></div><div>num textboxes: 658473 attacks: 101674 items: 336286<br>num scripts with strings: 4967</div><div>strings containing [ or ]: 22539</div><div><br></div><div>And scanning for valid tags  (eg no internal spaces) like [b], [/b], <b>, </b>, [.b], <.b> I found:<br></div><div></div><div>[foo] tags: 3722</div><div><foo> tags: 482</div><div>[.foo] tags: 0</div><div><.foo> tags: 0<br></div><div>[/foo] tags: 2</div><div></foo> tags: 2<br></div><div>games containing [...] or <...>: 225</div><div><br></div><div><div>Of the two uses of [/...],  one was "[/Demo]" in Detelamane.rpg and the other was in my "1 day in IRC" game!</div><div>   [01:27] spoonweaver> [IMG]<a href="http://i46.photobucket.com/albums/f117/spoonweaver/Tim-Tim0016.png%5B/IMG%5D" rel="noreferrer" target="_blank">http://i46.photobucket.com/albums/f117/spoonweaver/Tim-Tim0016.png[/IMG]</a></div><div>Of the two uses of </...>, "</whisper>" and again 1day irc.rpg:</div><div>  [11:25] C9X[Homework]> <blink> <img src="facepalm.jpg"> </blink></div></div><div><br></div><div>Now, <blink> is actually a markup I might add some day, but 1day irc.rpg used its own text system using box border sprites (those strings are in scripts), so those occurrences are irrelevant.</div><div><br></div><div>I also scanned for some other character sequences<br></div></div><div><br></div><div>Many uses of [$ especially as e.g. [${C0}]</div><div>4 games used \]</div><div>4 games used [! (never as would-be-valid markup like [!foo])<br></div><div>Two games used <! (never as would-be-valid markup)</div><div>One game used <. (never as would-be-valid markup)</div><div>12 games used [. particularly for "[...]" and e.g. "[...no?]"  (never as would-be-valid markup)</div><div>No games used [:</div><div>A handful of games had binary characters < 32 due to corrupt data. Also some contained ASCII 13 (\r), apparently we didn't strip those out when importing textboxes.<br></div><div><br></div><div>So a more complete specification:</div><div><br></div><div>Markup looks like [.<TAG><ARGS>] or [/<TAG>]<br></div><div>TAG: A tag name is case insensitive, containing only a-zA-Z.</div><div>Tags would usually have a short and a long spelling, eg sp and space, b and bold.</div><div>ARGS: Some tags take one or more arguments.</div><div>An argument is either a number, or a string not containing ], comma or whitespace.<br></div><div>ARGS can optionally start with =, mandatory for string arguments<br></div><div>Multiple arguments are separated with commas.<br></div><div><br></div><div></div><div>If a tag doesn't meet the above syntax or isn't a recognised tag name or has the wrong number of arguments then it's displayed literally.</div><div></div><div><br></div><div>[/foo] doesn't need to follow [foo]. It undones the last [foo], and tags can be closed in a different order than they were opened.</div><div>If a tag can't be undone (e.g. [space]) then the closing tag is ignored and displayed literally.</div><div><br></div><div>Escaping: [\. can be used to display as [.</div><div>\[. would be a bad choice of escape sequence because appending markup to arbitrary text wouldn't be safe.<br></div><div>I probably wouldn't bother to actually implement this escape code until later.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 2 Jun 2020 at 10:31, James Paige <<a href="mailto:Bob@hamsterrepublic.com" rel="noreferrer" target="_blank">Bob@hamsterrepublic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I have been thinking about this today.</div><div><br></div><div>There are pros and cons for different markup styles, but [color=10][/color] with backcompat-optional bbcode markup would probably be most familiar to people, and easiest to type. [img#.#] for images/sprites. [sp#] for horizontal spacing</div><div><br></div><div>Any of the styles will actually be fine-- but if you need help breaking the tie and settling on one, that is my 2 cents :)</div><div><br></div><div>---</div><div>James</div><div><br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 1, 2020 at 5:55 AM Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" rel="noreferrer" target="_blank">teeemcee@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I want to finally expose the ability to use text markup and non-8x8 fonts to users. Even before all the menus and slice collections are updated, and before the textbox file format or any others are replaced. Therefore there will be graphical problems and shortcomings, but we need that in order to find and fix what needs fixing. It can be marked experimental.<br></div><div></div><div><br></div><div>(I have a plan for textboxes: just repurpose the 304 bytes used to store the existing 8 lines of text as a single autowrapped 304 byte string, plus an extra 200 bytes or so tacked onto the end of each SAY record so there's plenty of spare space to actually use markup/compact fonts.)<br></div><div><br></div><div>But this means we need to finalise the markup. I'm very undecided. Sorry, lots of waffle.</div><div><br></div><div>Previously:<br></div><div><br></div><div>On Friday, January 27, 2017, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" rel="noreferrer" target="_blank">teeemcee@gmail.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 28 January 2017 at 13:10, Ralph Versteegen <span dir="ltr"><<a rel="noreferrer">teeemcee@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div></div>Also, I decided that it's best not to use ${...} codes for markup supported by printstr such as color and font. ${...} should be exclusively for inserting a string variable in the text, as in many programming languages. Instead I was thinking of using #{...}, or maybe quite different syntax which has (optional) closing tags, like $[col45]...$[/col], since closing tags really are needed (right now I'm using -1 to mean 'restore previous'). Other tag names could include colbg, pal, spc (no closing tag), font, indent, indentr, and even link=.<br></div></div></div></blockquote><div><br></div><div>Plus also no-argument $[b], $[i], $[h] tags, which switch to the bold/italic/highlight font.<br></div><div>Actually, maybe we can just use [b], [col45], etc, or <b>, <col45>... and add a backcompat bit to enable them, and use a $ prefix to escape them</div></div></div></div></blockquote><div><br></div><div>Godot also uses bbcode: <a href="https://docs.godotengine.org/en/stable/tutorials/gui/bbcode_in_richtextlabel.html#reference" rel="noreferrer" target="_blank">https://docs.godotengine.org/en/stable/tutorials/gui/bbcode_in_richtextlabel.html#reference</a></div><div><br></div><div>I like the idea of allowing both short and long forms of markup, eg both [c10] and [col10] and [color10], because there will be a lot of codes. But it makes parsing harder. So I'll just list long forms below.<br></div><div><br></div><div>Options include:</div><div>-#{color10} #{/color}</div><div>-or some other variant like :{color10}, !{color10}.<br></div><div>-[color=10] [/color]  or [color10]    (= is optional)<br></div><div>-just [color=10] [/color]  (= is mandatory if there's an arg)</div><div>-$[color10] $[/color]</div><div>-<color10> </color>, or <color=10> </color>. Not quite XML.<br></div><div>-RPG Maker uses \C[10] and a lot of other one-character backslash codes (see attachment) for other things like pauses.</div><br><div>Two-argument tags are also required, for embedding image n frame m. E.g. <spr4,8><br></div><div><br></div><div>I already notice that I find it really easy to accidentally type ${i} instead of #{i}.</div><div><br></div><div>Markup beginning with ! or with : has a problem: the ! or : is easily mistaken as part of the preceding text, eg "Gold:{C10} ${V2}"</div><div><br></div><div>$ is used for string operators and embed codes, and I wanted the syntax $"Gold: ${gold}" to embed a local or global variable by name. so Using $ neerd<br></div><div><br></div><div><div></div><div>Note that the text renderer doesn't process markup that doesn't have a valid tag name or argument. So there's less backcompat risk<br></div><div><br></div></div><div>Nonetheless If we were to use bbcode, a backcompat bit to disable it seems warranted. If we used anything else, like #{i} then I see no need for a bit. That would simplify a lot of code since we wouldn't need to pass the backcompat bit as "withtags" all over the codebase, which seems pretty horrible, and especially for text slices in slice collections. Should probably rule out bbcode just for this, unless the backcompat only affected textboxes (and maybe plotstrings) and nothing else. That's probably already good enough to avoid all backcompat problems. I guess I should run rpgbatch.py to extract textboxes and other strings and see what I find.</div><div><br></div><div>bbcode or <color10> are easiest to type. That's important.</div><div><br></div><div>bbcode or angle brackets may be a nuiscance on forums, wikis, or help pages.<br></div><div><br></div><div>And then I also want to support mediawiki markup, for help pages. That would be an optional per-slice setting, available to users too. But mediawiki isn't a popular markup. Markdown is. Honestly if easy typing is a concern, optional markdown seems like the ultimate solution for italics/bold/underline/strikethrough/indent. This comparison of markup languages is interesting: <a href="http://hyperpolyglot.org/lightweight-markup#text-style" rel="noreferrer" target="_blank">http://hyperpolyglot.org/lightweight-markup#text-style</a></div><div><br></div><div>And then there's the tag names to use.<br></div><div>[i] should mean italic, but I also wanted i for icon. Hmm, ico or icon. And img for sprites... or spr? spr is probably too similar to spc, for horizontal space (in pixels). I suppose s would be strike-through not space or sprite?<br></div><br><div><br></div></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" rel="noreferrer" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" rel="noreferrer" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" rel="noreferrer" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div>