(http://i.imgur.com/tRPR5Iv.png)
Made a bit of progress with this, I think.
@klassekatze: i think way easier way to do that is just look over adventurer items and make your own gui without basing anything on vanilla screens. Inventory management is easy enough to rewrite from ground up.
Yep, that's my plan. I'm afraid that leaves esoteric bits like snow and filling water and whatnot hanging out to dry but I can at least do picking up items in the same square with confidence (that it won't be accidentally cheating).
It was never about basing it on the screens, so much as whatever secret rules they use to decide "can i make a campfire to the northwest" and so on, not to mention actions I'm not aware of.
I've actually been using units.active[0], though its probably in both places.
I've actually finished the inventory in and of itself. Drag and drop actually moves things wherever they ought to be in df, right click equip also working using a block of code straight from forceequip. (except for weapons, for some reason, though i can't wear those in game either w/out drop & pick up - a bug maybe? don't care enough to look it up). I could hardcode the weapons if it comes to it.
(http://i.imgur.com/YTIUhzj.png)
I'm undecided as to whether to do eating/drinking, items on ground, or some sort of realtime health display next.
Anyway, I encourage you to put whatever you come up with on Github, to make it easier to integrate into DFHack if it reaches that stage, or at least to help other people looking to accomplish similar things. (If Rafal99 had done that, it would save a lot of time.)
I do plan to upload all this to github or something eventually. Would be a terrible waste otherwise. Probably once I can pick up/drop stuff vs the ground, at least, maybe?
Anyway, I encourage you to put whatever you come up with on Github
https://github.com/klassekatze/dwarfgui (https://github.com/klassekatze/dwarfgui)
https://github.com/klassekatze/dfhack (https://github.com/klassekatze/dfhack)
As it stands: (http://i.imgur.com/H2eQSzE.png)
Yeah I dunno. It works but now I'm kind of flagging in interest (Adventure mode makes me kinda mad because the feedback is nonexistent. You swing the sword at the easiest, most solid bodyparts and they always dodge and bleed you out somehow even if you are in iron and a demigod and you have no idea why...)
That being said, it is very trivial to expand this based on the functions I have implemented for inventory to bridge any arbitrary code in a plugin all the way to Javascript in the webpage. Even if the programmer doesn't like Go, they can just bang on the boilerplate until they get that much in and the rest is web design cake.
In other words can easily be expanded into a external GUI for just about anything in Dwarf Fortress adventure mode or otherwise, even if my interest falls out.
I don't know if I should bother with a proper thread/release for this yet when all it does is allow you to observe/search/reorganize adventurer inventory and equip items.