Open warmist opened 4 months ago
are there any potential examples I could look at of other DF-hack UIs that have been given mouse-support? that aren't too complex?
I could use them as a starting place for seeing how the adv-fort controls would have to be redone.
So, by co-routines you mean like nested functions? Or having the multiple separate ones called more?
I am reading through the edited version you mentioned that is in your fork.
I am unsure what I would need to do if I wanted to run it from your fork but I can poke around. And will probably figure it out after reading some docs? Presumably I could put the script somewhere in my existing install of DF-Hack? and then be able to run it?
I expect seeing what is broken by trying to use it should help me get a better idea of how to fix it too.
The powergoal would be super cool! It is a bit of a stretch goal though. It would make a pretty big difference. But it would probably mean more functions and hooking up more stuff.
are there any potential examples I could look at of other DF-hack UIs that have been given mouse-support? that aren't too complex?
I could use them as a starting place for seeing how the adv-fort controls would have to be redone.
Quantum stockpile that myk002 has done a few days ago comes to mind. Not sure if that is a very complex thing.
So, by co-routines you mean like nested functions? Or having the multiple separate ones called more?
I am reading through the edited version you mentioned that is in your fork.
It's a sort of "pausable functions" or "multithreading without multithreading". The linked example in first post shows that the "main logic" function becomes very linear instead of relying on many callbacks for e.g. user interaction or waiting for adventurer to finish something etc...
I am unsure what I would need to do if I wanted to run it from your fork but I can poke around. And will probably figure it out after reading some docs? Presumably I could put the script somewhere in my existing install of DF-Hack? and then be able to run it?
Copying it over to the scripts/gui/adv-fort (or making adv-fort2 if you want to have the old version) should do the trick. Here is more direct link: linky How-to manual is probably best in forums ( here )
I expect seeing what is broken by trying to use it should help me get a better idea of how to fix it too.
The powergoal would be super cool! It is a bit of a stretch goal though. It would make a pretty big difference. But it would probably mean more functions and hooking up more stuff.
It probably does not need much "in depth hacking" more UI and management and general programming logic involved (e.g. you would then need a job allowed list, some sort of work tracker, repeatable jobs, probably some sort of logic where made things are put, where to look for ingredients etc...). In short: more work :D
Cool!
I will check those things out, If adding companions is mostly UI rather than anything else. Then so long as time allows, if/after I was able to understand it well enough to add the mouse support, it probably wouldn't be too much harder idea wise, just mainly a design/work challenge. Lot's of little parts rather than really difficult parts probably?
As there is no big plans (afaik) in df to add most of functionality that adv-fort provided, adv-fort is still relevant tool. However the code is quite terrible, ui was very hard to use and now with mouse support in df it's even worse.
So this is a plan to upgrade and/or remake adv-fort script.
General idea is as follows: