draconisPW / PWMAngband

A free, multi-player roguelike dungeon exploration game based on Angband
36 stars 12 forks source link

lift closing tag for colors in news #130

Closed igroglaz closed 3 years ago

igroglaz commented 4 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

igroglaz commented 4 years ago

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

igroglaz commented 4 years ago

[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