Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adv-fort future plans #4502

Open
warmist opened this issue Apr 22, 2024 · 3 comments
Open

Adv-fort future plans #4502

warmist opened this issue Apr 22, 2024 · 3 comments
Assignees

Comments

@warmist
Copy link
Member

warmist commented Apr 22, 2024

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:

  • have overlay indicate we are in "adv-fort mode" and display info e.g. that there is a job in progress
  • have interface overlays for e.g. interaction (the get, set fire, etc menu) if it's on workshop for workshop jobs
  • allow way more keypresses and mouse clicks through for e.g. picking up items and dropping them. Ideally it should feel as if you are playing simple adventure mode most of the time
  • redo code to use coroutines instead of "call same function 3 times with different arguments" style. I have an example how it would look like in the end: example. This way a more complicated job would be easier to add and understand.
  • as a powergoal think about adding support for companions: they could be ordered around and/or perform most of the work. This however is a bit of a stretch as it needs a way different interface.
@warmist warmist self-assigned this Apr 22, 2024
@JonathanLochridge
Copy link

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.

@warmist
Copy link
Member Author

warmist commented Apr 24, 2024

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

@JonathanLochridge
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants