Post Thursday, 8th January 2015, 03:12

Libtcod and Python Questions

Hey Guys,

New account, but I've been a long time reader of the forums. I recently have gotten heavily into roguelike design and programming. I need a break from Unity, especially since I can't 3D model for my life. Anyway I have a few questions regarding roguelikes and libtcod.

First of all. I keep getting errors from using libtcodpy.console_set_fore libtcodpy.console_set_back and libtcodpy.console_print_left. The errors I see are: AttributeError: function TCOD_console_set_fore not found, AttributeError: function TCOD_console_set_back not found, and AttributeError: function TCOD_console_print_left not found. Either I get that or if using console_set_foreground_color I get <Module> Attribute doesn't exist. Not sure why these are happening so if anyone has an idea much appreciated.

But that's only a side question. My main, important question is this: I wanted to make a roguelike, potentially multiplayer with ether turn based, or real-time but like ADOM where there are still speed delays and turns. Regardless of how I do it, I want to know if it is possible to create something like a cutscene in a roguelike with libtcod. Just like a time where the enemy/hero would speak, displaying text, and not be able to act until it ends. I know in an ascii art game that's a roguelike that's an odd request. But I'm thinking more MUD, with roguelike elements rather than the pure english command system. Either way I want more plot development than in games like ADOM or Crawl (which I have tons of hours on). Anyway, if anyone knows any cool ways to accomplish this would be much appreciated.

I also have a final question regarding class setup for libtcod in Python. I generally have an Object base class, a fighter class for all units that fight, and then other classes that are for your specific class. Object class requires a fighter_component which is the instantiated fighter class, which in turn will instantiate a PlayerCharClass class that would contain information about the specific character class. Such as what unique abilitties it has, whether or not it has mana, How fast it's stats/mp/etc. scale.

Which brings one final question to mind, what is a good way that any of you have heard of to implement a class system. I feel my approach is a bit sloppy and will fall apart as it gets more complex. Basically I'm just asking for a structure to a roguelike libtcod project that is common used, specifically class structure not the file structure.

Thanks in advance.
Promise I won't post and run, rude.