Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [DFHack] Is there some sort of GUI "middleware" plugin?  (Read 2605 times)

jeancallisti

  • Bay Watcher
    • View Profile
[DFHack] Is there some sort of GUI "middleware" plugin?
« on: November 05, 2013, 06:45:03 am »

I'll try to make my question is clear as possible :

You know the way several plugins have their own graphical output? Like Stonesense, isofortress, etc. They all have a window where they draw stuff.

BUT what I'd like to know is if there is some mutualized plugin library/toolbox (possibly higher level than SDL!) allowing plugin developers to make their own gui in a straightforwad way -- as DFHack-standardized as possible.

For example : Did stonesense completely code its graphic system, and did isofortress do the same (from scratch), each in a completely different way?
If yes (if we're in a free-for-all situation), could someone direct me to a plugin that implemented some interesting graphical features, such as buttons, menus, etc.?
Logged

rmblr

  • Bay Watcher
    • View Profile
Re: [DFHack] Is there some sort of GUI "middleware" plugin?
« Reply #1 on: November 06, 2013, 08:43:38 am »

I'll try to make my question is clear as possible :

You know the way several plugins have their own graphical output? Like Stonesense, isofortress, etc. They all have a window where they draw stuff.

BUT what I'd like to know is if there is some mutualized plugin library/toolbox (possibly higher level than SDL!) allowing plugin developers to make their own gui in a straightforwad way -- as DFHack-standardized as possible.

For example : Did stonesense completely code its graphic system, and did isofortress do the same (from scratch), each in a completely different way?
If yes (if we're in a free-for-all situation), could someone direct me to a plugin that implemented some interesting graphical features, such as buttons, menus, etc.?

Yes, all programs that display output in windows outside the dfhack console or the DF window proper, do it their own way (dwarf therapist, stonesense, isofortress etc). dfhack doesn't provide any interface for doing that, and to be honest I doubt they want to implement it. They aren't so keen on taking the game out of DF.

So, what does exist in dfhack is a lua API for adding in game GUIs. See the user docs for examples of scripts implementing custom in game interfaces. If you're keen to develop your own take a look at the existing scripts sources and read the API documentation. You can also do it in C++ as the lua API is a very convenient wrapper around dfhack's C++ screen api.
Logged

jeancallisti

  • Bay Watcher
    • View Profile
Re: [DFHack] Is there some sort of GUI "middleware" plugin?
« Reply #2 on: November 06, 2013, 09:03:51 am »

What does exist in dfhack is a lua API for adding in game GUIs. (...) You can also do it in C++.
Thanks a lot for answering. I was aware of that bit. For everyone's benefit: DFHack plugin tutorial.

all programs that display output outside DF/DFHack window, do it their own way.
Bummer. Thanks for letting me know. I'm now having a close look at Stonesense's sources.
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: [DFHack] Is there some sort of GUI "middleware" plugin?
« Reply #3 on: November 06, 2013, 09:40:00 am »

there is a gui/gm-editor

but it's really only for accessing memory data structures, not for running the commands.

command wise, one still has to run ls to list them, and then run them by typing their command in

jeancallisti

  • Bay Watcher
    • View Profile
Re: [DFHack] Is there some sort of GUI "middleware" plugin?
« Reply #4 on: November 06, 2013, 10:02:28 am »

but it's not for running the commands.
command wise, one still has to run ls to list them

I'm sirry, either I totally misunderstood your post, or you posted in the wrong thread by mistake?
Logged