tomenet
tomenet copied to clipboard
Graphics: how to setup
I didnt find a place with instruction on how to set up gfx tiles so decided to make own one. This is for linux use, i will make windows version(or adjustments) later.
For example i will use 16x22tg graphics tileset here.
Tileset size
For me graphic tiles work with fonts of any size, not only with the same as graphics. Graphic tiles resized to the size of font in use.
But you must expect resize artifacts.
Linux Setup
You will need
- mapping config (.prf)
- graphics tileset (.bpm)
There are example files in the bottom.
Enable graphics in .tomenet.rc
set "graphics" to 1 set "graphic_tiles" to 16x22tg
graphics 1
graphic_tiles 16x22tg
The graphic_tiles
variable specifies basename for loaded graphics file and possible custom graphics character redefinitions.
Important: The value has to be in format {width}x{height}[{string}]
, because tile width and height is extracted from the string.
Mapping config file for graphic tiles (*.prf file)
The character redefinitions are loaded from lib/user/graphics-{os}.prf
(the "{os}" is replaced by "x11", "win", "mac", ...)
or from a custom graphics redefinition file lib/user/graphics-{graphic_tiles}.prf
, if the file exists.
For graphic_tiles 16x22tg
, the name must be graphics-16x22tg.prf
And as it's custom redefinition file, it must be put in /lib/user
folder.
Graphic tileset
If "graphics" option is enabled, the tiles can be loaded from lib/xtra/graphics/{graphic_tiles}.bmp
For graphic_tiles 16x22tg
, the name must be 16x22tg.bmp
Put it in /lib/xtra/graphics
folder.
Now graphic tileset is enabled and configured.
Example files
There are new tiles for 'p', 'D' and 'U' monster.
- graphics-16x22tg.prf
- 16x22tg.bmp
Attached in zip archive because github don't support these file types.
Idea of this tileset: Extension of Tangar's font idea
Main feature:
- hollow thorns for summoners
- solid thorns for no-summoners
'p's
- summoners have hollow thorns
- no-summoners - solid thorns
- ranged summoners(mages, etc.) - hollow thorns with an eye
Dragons:
- top tier dragons(summoners) now have hollow thorns
- Great Wyrm of Many Colors has solid thorns(as it can not summon)
Demons
- summoners have eyes
- no-summoners have no eyes
- diggers have scars
- Cyberdemon has it's own tile
Difference with current info from .tomenet.rc
## Graphics settings
## - Enable graphics in general (0 = off)
## Note: Not supported at the moment
#graphics 0
## - Specify basename for loaded graphics file and possible custom graphics character redefinitions.
## If "graphics" option is enabled, the tiles can be loaded from lib/xtra/graphics/{graphic_tiles}.bmp (Eg: lib/xtra/graphics/8x8.bmp).
## The character redefinitions are loaded from lib/user/graphics-{os}.prf (the "{os}" is replaced by "x11", "win", "mac", ...)
## or from a custom graphics redefinition file lib/user/graphics-custom-{graphic_tiles}.prf, if the file exists.
##
## Important: The value has to be in format "{int width}x{int height}[{string}]", because tile width and height is extracted from the string.
#graphic_tiles 8x8
For me lib/user/graphics-custom-{graphic_tiles}.prf
didn't work.
But without custom
it works.
Like this: lib/user/graphics-{graphic_tiles}.prf
May be @jezek can clarify this part.
@EvgenijK Hmm... when I look at the graphic tiles .prf I used for testing (and are playing tomenet with), than I'm sure that the thing with graphics-custom--{graphic_tiles}.prf
is a mistake (I may introduced and I appologize for that) and it should be fixed. You can make a PR to fix the comment. ;)
Ok, thanks)
Also, do you play with graphic tiles? I experienced some errors (packet errors mainly) and going to create an issue for that. All working ok on local server, but there are errors with remote one.
Yes I'm playing using the above mentioned graphic tiles and the tangaria graphic font mentioned in forum. I played last time about a month ago for about a hour (and tried it right now for a minute), but I've experienced no packet errors.
If there were packet errors in past, compiling newest client helped. The official europe tomenet server gets sometimes new upgrades and sometimes (very rarely) breaks some previous clients.
I made a separate issue for packet errors: https://github.com/TomenetGame/tomenet/issues/50
As first graphic tileset is in the game now i think this issue isn't needed now.
Info about graphical tileset could be found in the Guide chapter 2.5b https://tomenet.eu/guide.php?chapter=2.5b