in reply to Re: Game Nicknames to HTML
in thread Game Nicknames to HTML

Thanks for the quick reply.
From the game I have found the following definition: Use the following codes to format your nickname:

$i: italic
$s: shadowed
$w: wide spacing
$n: narrow spacing
$m: normal setting
$g: default color
$t: changes the text to capitals
$z: reset all
$$: to write a "$"

So $s should be "shadowed".
I understand your example HTML code but I am looking for a converter that does this. The players are changing the names quite often and I sometime have to deal with 30 new names.
Thanks
Thomas

Replies are listed 'Best First'.
Re^3: Game Nicknames to HTML
by dsheroh (Monsignor) on Mar 29, 2009 at 13:59 UTC
    What's the name of the game engine? If it's something that's been used widely1, a search on that name might turn something up. Otherwise, you'll probably have to go from the game's documentation (or its source code) to identify the codes and their meanings, then write something to convert them to HTML.

    Alternately, if users are running it entirely through a web interface, you could tell them it's time to abandon the legacy formatting codes and switch to BBCode (or raw HTML, if you trust them enough) to format their names.

    1 ...this decade. The style of the codes gives me the impression that this may be a converted BBS door game and I have a feeling there aren't too many of those still running around these days.

      The game is called "Virtual Skipper" (http://www.virtualskipper-game.com/en/) and because it is a sailing race simulator there are just about 100000 users. I found another game that seems to use the same coding. It is called Trackmania and I have found a converter there but it is PHP code. Perhaps I will use this code and port it to perl (http://www.tm-forum.com/viewtopic.php?f=28&t=14924).
      The software is not a web based application so I can't change anything there.

      Thanks for your support

      Thomas

Re^3: Game Nicknames to HTML
by ww (Archbishop) on Mar 29, 2009 at 13:45 UTC
    OK... then one issue is "What does 'shadowed' mean and is it even important (as opposed to mere decoration)?"

    What you list is some kind of markup language, which could be tedious to deal with by hand. OTOH, given ambrus insights, it's one which you can automate with a script using CGI, one or more regular expressions, and other modules (possibly Data::Formatter and -- depending on your html and Perl skills -- one of the templating solutions for creating webpages).

    But, at this point, developing a solution is yours to begin. If you get stuck, show us the code you've written and describe how it fails to achieve your goal. And it would still be well to provide a bit more detail, given that we don't know what OS (OSen?) you're using, nor how you intend to use what you originally characterized as a "scoring system." (Is the output going to a public webserver; just to your console (in which case, you can ignore CGI); or something else?)

      Ok, thank you for your support.
      I was hoping to find something existing but if there is nothing then I will see if I will do the work or just go with an extra database table to "translate" the string.
      Some further information: It will run on Win and Linux. Database is mysql. Race results are CSV Files that I parse with perl and insert results to mysql. After that another perl script is doing the math to calculate the result scores according to ISAF (International Sailing Federation). The results are stored in mysql too and the last step is to create a HTML page with the results on the web.

      It would have been nice to present the boat names as they are defined in the game but I can find ways around that. My time is limited at the moment and I am new to perl that was why I thought it would be good to ask if there is a simple solution.

      Thanks and best regards
      Thomas