igroglaz / Tangaria

Tangaria – free open-source multiplayer roguelike game based loosely on Tolkien’s lore and powered by PWMAngband. ~~~~~~~~~~~~~~~~~~~~~~~~~
https://tangaria.com
39 stars 6 forks source link

lift closing tag for colors in news #23

Closed igroglaz closed 2 years ago

igroglaz commented 3 years ago

right now I'm trying to add new news.txt screen and I've noticed that we have quite fiddly color tags there. in PWMA we need to add open and close tags for colors (btw, table of our colors: https://tangaria.com/gamedesign/ ):

{light green} text1 {/}{White} text2 {/}

I found in PernMAngband such system: there is no closing tag for color. also colors represented in short codes, eg the same stuff as above there:

#G text1 #W text2

example of Pern's news.txt screen: https://github.com/angbandplus/AngbandPlus/blob/PernAngband/lib/file/news.txt (I'm trying to adapt it in Tangaria atm)

It's so much easier to modify Pern's tags. Will be fun to implement something like this as in future it will be fun to add loads of ASCII art in game screen (eg when you speak to certain NPCs; or made a quest)

Pern repo: http://angbandplus.github.io/AngbandPlus/pernangband.html

===

In Pern they had to use: ## to draw: # which is not too comfortable too, as # is one of the main sources of ASCII drawing.

TomeNET uses { symbol, eg {R {y {w ... I suppose it the best way to implement it

===

[16:33] flambard: all ASCII-based system run into escaping problems, the { in tomenet is actually ascii 254 or something like that [16:34] flambard: (at least on protocol level, not sure about text parsers) [16:35] flambard: just saying you probably want to use \ escape sequence

igroglaz commented 2 years ago

it's not only in news, so it will be better to change it in PWMA to have compatibility... or don't change at all