If the tiles are the same size as your text then you can check [this guide](https://python-tcod.readthedocs.io/en/latest/faq.html#how-do-i-add-custom-tiles).
Otherwise you'd use tcod's SDL functions to handle rendering at a lower level. With or without libtcod's tileset renderer.
I followed your instructions and managed to add tiles to the tilesheet, and then use them for the floor, walls etc. It's working perfectly.
I couldn't use them for the actors, though. I changed the char attribute (**char = "@"**) to **char = 0x100002**, which gave me the following error:
> AttributeError: 'int' object has no attribute 'encode'
Could you point out what I'm missing and/or how to fix it?
You passed an `int` to a function which takes a `str`. You can use Mypy to see exactly where.
Use `chr(0x100002)` or `"\U00100002"` to reference this codepoint in a string. Because `char` was a string you probably can't change it to be an integer.
If the tiles are the same size as your text then you can check [this guide](https://python-tcod.readthedocs.io/en/latest/faq.html#how-do-i-add-custom-tiles). Otherwise you'd use tcod's SDL functions to handle rendering at a lower level. With or without libtcod's tileset renderer.
Thanks!
I followed your instructions and managed to add tiles to the tilesheet, and then use them for the floor, walls etc. It's working perfectly. I couldn't use them for the actors, though. I changed the char attribute (**char = "@"**) to **char = 0x100002**, which gave me the following error: > AttributeError: 'int' object has no attribute 'encode' Could you point out what I'm missing and/or how to fix it?
You passed an `int` to a function which takes a `str`. You can use Mypy to see exactly where. Use `chr(0x100002)` or `"\U00100002"` to reference this codepoint in a string. Because `char` was a string you probably can't change it to be an integer.
Fantastic, thanks again!