Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: Automatic mining: Is it possible and has it been done?  (Read 6982 times)

Cyborgman

  • Bay Watcher
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #15 on: November 10, 2009, 09:51:08 pm »

I tried it on an existing vein of lignite but nothing happened... Does it need to be in the same folder as dwarfort.exe and does the vein need to be newly discovered for it to work?
Also, where can I learn to write that type of application?
Logged

Shades

  • Bay Watcher
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #16 on: November 11, 2009, 04:09:38 am »

Also, where can I learn to write that type of application?

Your best bet would be to ask nicely for the source and play around with it until how it works makes sense to you. This assumes you have at least some basic knowledge of whatever language it is in.
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

Cyborgman

  • Bay Watcher
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #17 on: November 11, 2009, 05:11:34 am »

I do like to play with source code... (Hint)

Whatever language it is I will learn it. I like learning new scripting languages. By learn I mean, fiddle with.

Hey Darius,
If you wouldn't mind could I view the source for your program?
Logged

Danarca

  • Bay Watcher
  • [MILL_CHILD:ONLY_IF_GOOD_REASON]
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #18 on: November 12, 2009, 02:50:04 pm »

I'm using d11 and stumbled upon a galena vein while digging for ores for testing :)
The .exe is located in the same folder as dwarffort.exe.

Nothing happened when I dug the first square out, even though 3 others was revealed next to it.

I then paused, designated another galena tile to be dug out, unpaused and quickly made the diggersdream.exe window the active window.
Nothing.

I am using Windows 7 x64, and 40d11.
Any other information you need?
Logged
Clutter god the god of godly gods.
Om Nom nom nom nom
Ah yes the god of stone stockpiles, long randomly generated names, and gods.

wagawaga

  • Bay Watcher
  • He is utterly unaware of his own intentions.
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #19 on: December 23, 2009, 11:52:56 am »

Is it possible to make it tell between different veins?
It just messed up my fortress, carving a hole through my wall of microcline during a siege, while i were only trying to dig a single tile.
Logged

Shurhaian

  • Bay Watcher
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #20 on: December 23, 2009, 12:21:05 pm »

My guess is that anything with a "You have struck ____!" message is fair game for this tool. If you have a generic rock cluster that you're digging through, be very careful with it, watch the mining area closely, or shut down DD until you're done.

Edit - as a suggestion: is it possible to check the type of stone and see if that stone is reserved for economic use? That's the best way I can think of to restrict DD's activity to useful veins, while being compatible with modded games. This would make sense to do in the first stage of checking, i.e. the tile that's being dug, rather than for the surrounding tiles(which won't be designated anyway if it's a different type, right?).

Further edit, after some more work with it: Digger's Dream causes a noticeable slowdown on my (marginal) machine while digging, making it that much more important to turn it off when you're digging rooms and passages and might not want to follow veins. However, when digging veins, it makes up for that slowness by not needing to pause every few frames to re-designate. It's not perfect - sometimes the "designated" tiles aren't properly designated and will not be dug unless re-designated - but by and large it works well, and deserves to be put somewhere sticky.
« Last Edit: December 23, 2009, 03:38:05 pm by Shurhaian »
Logged
Working on: drakes - making the skies(mostly) a bit more varied

My guards need something better to do than make my nobles happy with hugs and justice.

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #21 on: December 23, 2009, 06:10:56 pm »

Have an idea how to update: 0x454580 this is better address, because that other gets called every time dwarf picks a wall and this gets called when he finishes. As for source code... Really hard to do because all my projects use same code and it's a HUGE mess (as all my projects start as toys for me only :) )
Edit:
There done: File
Maybe this will help. As for digging through everything. Yeah exactly like Shurhaian said " anything with a "You have struck ____!" message is fair game for this tool. " because everything else are layers. But this is designed not to dig through smoothed walls, engraved walls, fortifications and etc. Only natural rock (ore, gems).
« Last Edit: December 23, 2009, 06:46:01 pm by darius »
Logged

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #22 on: January 16, 2010, 05:10:57 pm »

*casting a necro spell*
wanted to point out I uploaded source for this program if anyone would be interested:it's here
Logged

Eagle0600

  • Bay Watcher
  • Highly Confused
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #23 on: January 17, 2010, 01:57:04 am »

Would it be possible for this to only run when you actively want it to? For instance: You press a button on DD and then the next digging designation will have it's location remembered (or the locations of every tile designated). Then, when those are dug, it does the same to similar tiles around it.
A way to avoid digging into other chambers might be good too: It could remember tiles that are "good to dig from" (ie. tiles that were part of the original side of the excavation or that were dug out by this method, which would be forgotten once no more marked tiles were next to it) and not dig out tiles that are next to an open, revealed tile not remembered as being part of the excavation. This way it would stop before going into another chamber, or outside.
Logged
GENERATION 21:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

NRN_R_Sumo1

  • Bay Watcher
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #24 on: January 17, 2010, 11:08:36 am »

perhaps have it not dig into low traffic tiles for the chambers?
Logged
A dwarf is nothing but an alcohol powered beard.

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #25 on: January 17, 2010, 11:21:15 am »

Still not intuitive enough. Not sure if there is a way to make this comfortable. Pressing a button on DD and then next will be autodig would not work (as this works when tile is mined out, not when it is designated) Maybe economic stones method when setting which stone is economic which isn't could work? Then you could choose not to mine microcline and mine gold veins. As for low traffic, could be done. But it's a nuisance to designated them.
Logged

Eagle0600

  • Bay Watcher
  • Highly Confused
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #26 on: January 17, 2010, 09:17:45 pm »

You say that this works when it is dug, that is true, but couldn't you store a tile's coordinates in a table and then have this check if a tile is on the table?
Logged
GENERATION 21:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Eagle0600

  • Bay Watcher
  • Highly Confused
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #27 on: January 30, 2010, 04:52:54 am »

Bumped because I realised that this will automatically dig wet and hot tiles. Is there a way to make sure they're not wet or hot first?
Logged
GENERATION 21:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Automatic mining: Is it possible and has it been done?
« Reply #28 on: January 30, 2010, 10:35:17 pm »

Will look into it ASAP. As far as i recall it was easy (measuring temp to be above some normal temp) and for damp tiles there was a flag.
Logged

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch
Re: Automatic mining: Is it possible and has it been done?
« Reply #29 on: January 31, 2010, 01:29:25 am »

Great work here as always, I will be watching for the updated version. Designating veins manually is a pain
Logged
Pages: 1 [2] 3