» Contents » (0) Quickstart » (1) Introduction » (2) Installation & setup » (2.7b) Graphical tilesets
» (3) Creating a character & starting to play» (4) The world » (5) Item and flag details, elements » (6) Monster details » (7) Character details » (8) Tactics & strategy » (9) Miscellanous |
(2.7b) Graphical tilesets ------------------------- Thanks to jEzEk (https://github.com/jezek) graphics tiles are now supported again, now with two colour masks (a foreground and a background mask, of which the background mask has currently no meaning, since all grids in TomeNET are always drawn with black background) and auto-scaling to font size. There is a also a third mask for'dual-mask'mode in clients newer than 4.9.2 release time. The advantage over normal fonts is that these can have many colours and thereby look much better. The graphical tileset menu is invoked in-game via '=' (options page) and there press 'g'. Inside the graphics menu then you can switch mode via 'v' key. Currently at the time of writing this (4.9.2) changes will not apply right away but require a client restart to become active. (If you want to manually enable tilesets, you can edit the TomeNET config file, usually .tomenetrc (POSIX) or TomeNET.ini (Windows) and change values for the config entries "graphics" and "graphic_tiles".) Graphical tilesets are xyz.bmp files in 24-bit format (R8,G8,B8 - and make sure to check "Don't include colour space information" in GIMP or whatever you use, or it will not work on Windows) that come with a graphics-xyz.prf mapping file. The bmp filename must be in the format "<width>x<height><custom text>.bmp" and the prf filename must be "graphics-<width>x<height><custom text>.prf". The bmp file goes to tomenet/lib/graphics and the prf file, as always, to tomenet/lib/user - or - on Windows OS to the folder 'TomeNET-user' inside your user's home folder (eg C:/Users/Tomenetplayer/TomeNET-user). Tilesets also have two designated 'mask colours': - a 'foreground mask' defined by colour R=252,G=0,B=251 (or hex 0xFC00FB) aka a strong magenta, which is treated special: It will be replaced by the actual font colour the grid would have with a normal font, thereby representing the type of floor feat, item, monster etc with its correct colour. For example a tile depicting an orc would display the mask colour in umber (ie brown) if it was a hill orc or in light green if it was a cave orc. - (Currently no effect, as all grids in TomeNET always have black background:) A 'background mask' defined by colour R=62,G=61,B=0 (hex 0x3E3D00) aka a dark, somewhat greenish ochre. Currently, TomeNET always uses black background colour for any grid it draws. (Example: A fountain in ASCII is currently a white '_' on black background. If background colours were enabled in the future, it could be a white '_' on blue background. In that case, if you switched from ASCII to a graphical tileset that maps fountains to a picture, all pixels that ought to show the blueness around the fountain would have to be 0x3E3D00.) - No effect in clients not newer than 4.9.2: A 'dual-background mask' defined by colour R=29,G=33,B=28 (hex 0x1D211C), ie a very dark green. Graphical tiles that usually take precedence over terrain, such as objects, any traps, monsters, players etc. can use this colour to become transparent for the background terrain. Terrain graphics, which are considered 'background graphics' will be visible in these pixels and therefore merged with the foreground. So you could for example see a dagger lying in a pool of water. Note that in = g the 'dual' graphics mode must be enabled for this to work and the server has to support it too. You can also manually edit your config file (eg .tomenetrc or TomeNET.ini) and set "graphics" to "2", same thing. If you use a dual-mode tileset with normal graphics settings instead, this is not a problem as it is 'backward compatible' and will interpret the dual-mask colour (ie 0x1D211C) instead as background (0x3E3D00) automatically. Svechnik (aka 'EvgenijK' on github) has worked on a major graphical tileset that can be found on his github, including instructions on how to use it: https://github.com/EvgenijK/TomeNET-Tileset At the time of 4.9.2 release, TomeNET ships with the tileset files (bmp in the lib/xtra/graphics folder and prf in the lib/user folder) from that date, and also a matching FON (in lib/xtra/font) and pcf file for POSIX systems (in lib/xtra/posix_extra_fonts) to use together with the graphical tileset. However, check out his site or our discord for updates maybe. After ensuring that the '16x22sv.bmp' tiles file is in tomenet/lib/graphics and the mapping file 'graphics-16x22sv.prf' is in tomenet/lib/user (or TomeNET-user in your user's home folder on Windows OS), don't forget to activate the tileset by putting this in your .tomenetrc (POSIX): graphics 1 graphic_tiles 16x22sv or TomeNET.ini (Windows): Graphics=1 GraphicTiles=16x22sv and then in-game make sure that the option = 1 'font_map_solid_walls' is OFF! However, you're not done yet, as you should still select a fitting font too (easiest is to use the 16x22 font Svechnik provides too for this purpose), so read on... Notes about an important difference to normal fonts: ---------------------------------------------------- Graphical tilesets require you to still select a normal font too! The way it works is: Whenever the graphical tileset provides a valid mapping for a grid, it will use the graphics, otherwise it will fall back to the text font and use its symbol instead. Since the tileset linked above is a work in progress and so far there are no known complete tilesets, that is the reason why an underlying font to work together with the tileset is still needed. At least SOME font should always be selected just to be on the safe side, as there are no drawbacks. The font should preferably have the same dimensions as the tileset, or scaling will be applied automatically (the graphical tiles will be scaled to the font's dimensions), which might not look ideal. For EvgenijK's bmp tileset which has dimensions 16x22 px/tile, he provides a 16x22 font that is located in lib/fonts, as both .FON and .pcf format, but of course you can use any other font file too, for example Tangar's 16x22TG graphical font (a text font with additional, pseudo-graphical character set). Issues: ------- As of the time of 4.9.2 release when this was written, there are still issues with graphical tiles (some listed on EvgenijK's github): - interface crash and packet errors if there is only tiles for "monsters" (issue TomenetGame/tomenet#51) - Up to client 4.9.2 there was a glitch that required you to shift all indices for 'R:' mappings downwards by a fixed offset of 12, this has been fixed.
|