Author Topic: An addon that converts Torque Markup Language to BBCode  (Read 833 times)

/title

I been wondering if its even possible to do this at all?

For example, if your default color was blue and you want a section to be red, you would have to do this with hex code:
Code: [Select]
<color:ff0000>Custom color text section<color:0000ff> default colorCustom color text section default color
But in BBCode, it would kinda be a lot easier:
Code: [Select]
[color=red]Custom color text section[/color] [color=blue]default color[/color]Custom color text section default color

Also if you want hex code color in BBCode you would have to do this:
Code: [Select]
[color=#0000ff]Blue hex code color[/color]Blue hex code color

Another Example would be fonts, if your default font was Arial and you wanted Impact as a custom font you would do this:
Code: [Select]
<font:Impact:20>Impact Font<font:Arial:20> Arial FontImpact Font Arial Font
In BBCode it would be this:
Code: [Select]
[size=20pt][font=Impact]Impact Font[/font] [font=Arial]Arial Font[/font][/size]Impact Font Arial Font

« Last Edit: November 07, 2015, 10:23:05 PM by mario0126 »

an add-on that does that? why?
that seems mostly pointless. I guess it would make sense if you thought it was easier to type the TML stuff, but I'm not sure what good that would do you as a blockland add-on

Well its much easier in BBCode because in color you would have to use rrggbb format/hex code.

You can size things in BBCode without needing to change the font or typing in the same font.

wouldn't you want it to convert the easier format to the more difficult format
ie BBCode to TML instead of TML to BBCode

Because of how the font tag works, converting BBC to TML simply wouldn't work as an add-on.

This would be neat as engine behaviour, because then people could change the font face without having to force everyone to see the size you set in the code, rather than the size the clients set in their options.
But as an add-on, you couldn't separate <font::> into [font=][size=pt].

But as an add-on, you couldn't separate <font::> into [font=][size=pt].
Why not?

Why not?
Well, you could easily do [font=Impact][size=12pt] => <font:Impact:12> but what do you do about just [font=Impact]? Or just [size=12pt]? You cannot just do <font:Impact> and you also can't just do <font:12>.
« Last Edit: November 08, 2015, 03:00:03 PM by Shift Kitty »

Well, you could easily do [font=Impact][size=12pt] => <font:Impact:12> but what do you do about just [font=Impact]? Or just [size=12pt]? You cannot just do <font:Impact> and you also can't just do <font:12>.
sure you can? in case where there's no font or no size specified just stick the default in

sure you can? in case where there's no font or no size specified just stick the default in
And what's the default size?
« Last Edit: November 08, 2015, 03:04:21 PM by Shift Kitty »

Well, you could easily do [font=Impact][size=12pt] => <font:Impact:12> but what do you do about just [font=Impact]? Or just [size=12pt]? You cannot just do <font:Impact> and you also can't just do <font:12>.

sure you can? in case where there's no font or no size specified just stick the default in

You can do <font:size:12>, but you can't change the font without changing the size.

And what's the default size?
probably whatever the default setting is
to my knowledge, you can't use this in a regular chat message anyway. I'm not sure about messages from scripts, but I don't recall seeing anything but colors there
so there aren't a lot of situations where it would matter
does that setting change the size of the centerprint stuff too? I guess it would be more of a problem in that case

but no matter what, it's no different than the person writing it making an assumption about the default font size
being able to choose relative font sizes would be nice, but based on some of the stuff being said here it doesn't sound like a whole lot of thought was put into this TML thing

Events are fully capable of using TML in chat by default. The setting only affects chat, but it's still incredibly annoying when people assume the default size is their own setting. I use the smallest font in order to have more chat lines without blocking half my screen during gameplay. I don't even really see a point in changing the font in the chat anyways. I ended up making this to fix my problem.

Back on topic though. I really don't like the idea of assuming a default size. And now that I think about it, separating the size from font would probably be a better idea than adding BBC.

Seems like a cool idea.
/support