Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 13 14 [15] 16 17 ... 61

Author Topic: [SUGGESTIONS] for DFhack plugins  (Read 141562 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [SUGGESTIONS] for DFhack plugins
« Reply #210 on: May 05, 2013, 01:38:58 pm »

I know, but that still does not limit the reaction. I meant it for item production, for example only your legendary weaponsmith can do a specific reaction for a special weapon, or your legendary alchemist can create a build-mat that you need for a new magical building.

That would make balancing techtrees and a slow, steady advancement a lot easier to write.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Maklak

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #211 on: May 06, 2013, 07:41:12 pm »

OK, I see your point now. The closest thing I can imagine is periodically iterating over all active jobs and ejecting the Dwarves who aren't qualified, but it wouldn't be fully foolproof.
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #212 on: May 10, 2013, 03:17:17 am »

A script/plugin to prevent dwarfs from choosing food/drink for eat/drink jobs from inappropriate sources.
may need to mark which food/drink stockpiles as being an appropriate source for eat/drink jobs.
may need to select an item from the appropriate source (search stockpile for first available food/drink item inside/outside container?).
may need to account for when appropriate sources are empty, or not so that new food/drink has a chance to get transported to the stockpile.
may need to make decisions on proximity to dinning area (more than one food pantry? if so, closest to the intended dinning area? closest to the dwarf?)
should allow dwarfs to keep food they are already carrying/eating/drinking

Why?  so that dwarfs will use the food stockpiles next to the dinning room rather than the food waiting for transport by minecart, or food waiting to be cooked at the kitchen, and use designated drink stockpiles rather than newly brewed drink at the still

sweitx

  • Bay Watcher
  • Sun Berry McSunshine
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #213 on: May 22, 2013, 09:51:48 am »

Several burrow related suggestions.
1. Dwarf Manipulator style interface for burrow assignment
Basically, use the interface we have for Dwarf Manipulator. But instead of having labors have columns, have burrows.
Obviously, we're going to have issue with that burrows can have arbitrary names and it will be difficult to fit into a single character (unlike labor, which can fit into single character column by having 2 letters representing the labors).
A solution would be to use the burrow symbol as column headers, and display the name of the highlighted burrow (like how Dwarf Manipulator displays the full name of the labor when the column is highlighted).

2. Extension to above, profession based auto-burrowing.
Allow automatically assign burrow based on activated labor.
For example, if a dwarf has the "weaver" labor active, he/she is automatically assigned to the weaver burrow (to prevent him/her from grabbing spider web from unsecured regions in the cavern).

Current DFHack capability to search for dwarf in the burrowing window is very helpful already. But I believe that my first suggestion would be helpful in giving an "at-a-glance" status on your fortress' burrow statuses. Also, since currently you cannot check which burrows a single dwarf belongs to by just looking ('v') at a dwarf, the above suggestion would be helpful at "debugging" burrow assignment.
Logged
One of the toads decided to go for a swim in the moat - presumably because he could path through the moat to my dwarves. He is not charging in, just loitering in the moat.

The toad is having a nice relaxing swim.
The goblin mounted on his back, however, is drowning.

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #214 on: May 23, 2013, 09:33:25 pm »

Ideas for UI plugins, roughly in ascending order of difficulty. 

1. DFHack GUI:  keybinding for a popup where commands can be typed, instead of finding another window.  Good for immersion, and makes fullscreen less of a pain.  Maybe Ctrl-Alt-H to open, and close with Esc?

2. Automate tree farming, by setting an area to re-designate tree cutting (or plant gathering) once per month.  Using a zone somehow would be cool, but burrows might be easier - for example:  at the start of each month, apply cut-trees designation to any burrow with 'TREE-CUT' in the name, and apply plant gathering designation to any with 'PLANT-GATHER' in the name.   I'm not sure how it might work with zones, but I'll leave it here anyway. 

3. Clickable menu options.  Falconne's mousequery plugin apparently makes playing on a windows 8 touchscreen possible, and this would make it even cooler.  Besides a step toward a mobile edition, it could also be pretty helpful for getting people into the game when the key mapping is most intimidating. 
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

expwnent

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #215 on: May 24, 2013, 11:29:43 am »

2. Automate tree farming, by setting an area to re-designate tree cutting (or plant gathering) once per month.  Using a zone somehow would be cool, but burrows might be easier - for example:  at the start of each month, apply cut-trees designation to any burrow with 'TREE-CUT' in the name, and apply plant gathering designation to any with 'PLANT-GATHER' in the name.   I'm not sure how it might work with zones, but I'll leave it here anyway. 

Would be relatively simple, actually. I'll add that to my to do list. The same interface would work for autodigging obsidian farms. Unless burrows automatically remove new obsidianized walls, which I don't think they do.
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #216 on: May 24, 2013, 07:50:09 pm »

2. Automate tree farming
I'll add that to my to do list.
Awesome! 


Another suggestion, which I forgot to put in the other post: export-all from legends mode
I'd think that this shouldn't be too tricky to implement and it's been on feature request lists for years, but seems low-priority for Toady since it's basically a UI issue and mostly useful for legends or mapping utilities. 
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #217 on: May 25, 2013, 02:18:52 am »

2. Automate tree farming
I'll add that to my to do list.
Awesome! 


Another suggestion, which I forgot to put in the other post: export-all from legends mode
I'd think that this shouldn't be too tricky to implement and it's been on feature request lists for years, but seems low-priority for Toady since it's basically a UI issue and mostly useful for legends or mapping utilities.

I was recently thinking about how I would go about doing an export of all maps.  My thoughts on how to do it went something like this:

psudeo lua code

I don't know if lua can send key presses to a df viewscreen or be able to successfully wait for dwarf fortress to do its stuff.

*edit: inspired to work on this some more and found that yes I can send key events .. took some time to find the right ones.  Now I am having trouble figuring out how to let the game process while waiting for the new viewscreen to popup

*edit2: Ok, I think I have this working now.  I think it has some room for improvement (such as not exporting all, but a subset, or cancel after starting, or not starting if already in progress) but it seems to do the job for me.  Place in hack/scripts/exportmaps.lua

Code: ( "hack/scripts/exportmaps.lua") [Select]
-- Export all detail maps from legends
gui = require 'gui'

local vs = dfhack.gui.getCurViewscreen()
local i = 0

local MAPS = {
[0] = "Standard biom+site map",
"Elevations including lake and ocean floors",
"Elevations respecting water level",
"Biome",
"Hydrosphere",
"Temperature",
"Rainfall",
"Drainage",
"Savagery",
"Volcanism",
"Current vegitation",
"Evil",
"Salinity",
"Structures/fields/roads/etc.",
"Trade",
}
function wait_for_legends_vs()
vs = dfhack.gui.getCurViewscreen()
if i < 15 then
if df.viewscreen_legendsst:is_instance(vs) then
gui.simulateInput(vs, 'LEGENDS_EXPORT_DETAILED_MAP') -- "d" on screen some number internally
dfhack.timeout(10,'frames',wait_for_export_maps_vs)
else
dfhack.timeout(10,'frames',wait_for_legends_vs)
end
end
end
function wait_for_export_maps_vs()
vs = dfhack.gui.getCurViewscreen()
if df.viewscreen_export_graphical_mapst:is_instance(vs) then
vs.anon_13 = i -- anon_13 appears to be the selection cursor for this viewscreen
print('Exporting:  '..MAPS[i])
i = i + 1
gui.simulateInput(vs, 'SELECT') -- 1 internally, enter on screen
dfhack.timeout(10,'frames',wait_for_legends_vs)
else
dfhack.timeout(10,'frames',wait_for_export_maps_vs)
end
end

if df.viewscreen_legendsst:is_instance( vs ) then -- dfhack.gui.getCurFocus() == "legends"
wait_for_legends_vs()
elseif df.viewscreen_export_graphical_mapst:is_instance(vs) then
wait_for_export_maps_vs()
else
dfhack.printerr('Not in legends view')
end

to run:
[DFHack]# exportmaps
then go grab a sandwich or two

* uploaded to DFFD http://dffd.wimbli.com/file.php?id=7696
« Last Edit: May 25, 2013, 06:26:56 am by Kurik Amudnil »
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #218 on: May 25, 2013, 07:19:44 am »

Semicheating mod: get rid of machine delays. Pressure plates reset instantly, bridges activate instantly, etc. I'm not quite sure what I want, but the most I'd do is make everything instantaneous. This would allow for repeaters up to 50 times faster (assuming you can design one), faster dwarfputing, more reliable pressure plate detection of units / flow, etc. Thoughts?
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #219 on: May 25, 2013, 09:47:06 am »

[DFHack]# exportmaps

Legendary.  (he he he)

Edit: tested it, and it works beautifully.  Thanks!
« Last Edit: May 26, 2013, 12:57:52 am by PeridexisErrant »
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

scamtank

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #220 on: May 25, 2013, 09:50:54 am »

I'd still give my left kidney for the ability to alter/replace vanilla reactions.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #221 on: May 25, 2013, 10:41:53 am »

I'd still give my left kidney for the ability to alter/replace vanilla reactions.

I think warmist had something kind of like that. It was related to adventure fort. Could be remembering wrong.
Logged

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #222 on: May 25, 2013, 12:51:21 pm »

I'd still give my left kidney for the ability to alter/replace vanilla reactions.

I don't know if it is applicable here, but according to the dfhack lua api
Quote
2. removeNative(shop_name)

    Removes native choice list from the building.

  3. addReactionToShop(reaction_name,shop_name)

    Add a custom reaction to the building.

In any case, I doubt it removes a moods choice of output

drayath

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #223 on: May 27, 2013, 03:50:24 pm »

Allow a stockpile to automatically dump any items added to it.
Can then use various stockpile filters to select garbage items, and them automatically dumped to a garbage disposal system.

Working proof of concept below. Modified version of autotrade plugin.
Have some concern about performance with large forts with lots of items (checks items each 500 ticks)
Idealy: Monitor completed jobs, if a haul job to a tagged stockpile then mark the item to dump. Then remove the ontimer code.
Note: Enabling dump on a stockpile will immediatly mark all items, disabling autodump ona stockpile will remove the dump flag from items unless a dwarf is already on the way to dump them.

Download: www.brightsoft.net/autostockdump.plug.zip

Spoiler (click to show/hide)
« Last Edit: May 27, 2013, 05:03:51 pm by drayath »
Logged
Drayath's Gem Splitting Workshop - Split large gems and gem trinkets into numbers of small gems.
Drayath's Seed Brewery - Convert bags of spare seeds into useful booze.

Brilliand

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #224 on: May 29, 2013, 12:51:07 pm »

Quote
Portal buildings. Enter building #1, worker is teleported to building #2
- Possible: YES
 - Quickly travel across the map.
 - Reinforcements for deep layers, like the circus.
 - More tactics, ambush invasions yourself.
 - Enter otherwise walled-off areas, without opening doors for enemies.
This one was intended for military purposes, I think adding it to the pathfinding of the game, so that haulers would use it, is way to tricky. I was mostly thinking of these deep curious underground structures, with the squads barely making it to the lower levels before turning around for a drink/meal. Or fighting in the third cavern/circus.

The portals would probably be more useful (particularly for sending out the military) if they teleported all dwarves in the vicinity (probably within 3 tiles, since that's the precision of a move order).  Or rather, teleport all units within the building, and leave it to the modders to make their military teleporters 7x7.

Also, for multiple buildings: It should be possible to ignore forbidden buildings when choosing a destination portal - that would make having more than 2 portals workable (just forbid any portals you're not using at the moment).
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.
Pages: 1 ... 13 14 [15] 16 17 ... 61