Bay 12 Games Forum

Please login or register.

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

Author Topic: DFHack Plugin: Digging Invaders Version 0.6  (Read 30202 times)

Loud Whispers

  • Bay Watcher
  • They said we have to aim higher, so we dug deeper.
    • View Profile
    • I APPLAUD YOU SIRRAH
Re: DFHack Plugin: Digging Invaders Version 0.1
« Reply #15 on: June 15, 2013, 04:01:18 pm »

My god, this is horrific. I need it.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #16 on: June 15, 2013, 10:45:36 pm »

New version: 0.5

  • It differentiates between constructions made from boulders, and other constructions (blocks or bars).
  • You can set pathfinding costs and job delays for different creatures separately.

You still can't set costs for different castes within a race differently. Unless someone asks I'll keep it that way.
Logged

Jiri Petru

  • Bay Watcher
    • View Profile
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #17 on: June 16, 2013, 03:34:27 am »

You, sir, are amazing.

Can this be turned on only for certain creatures/races? I was thinking having goblins not able to dig, but allowing trolls to.

Also, is there is difference between digging through rock and digging soil? (If you wanted to be extra nifty, calculate the digging speed from the density of the material - for the first time, the densities would finally see some use.)
« Last Edit: June 16, 2013, 03:36:13 am by Jiri Petru »
Logged
Yours,
Markus Cz. Clasplashes

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #18 on: June 16, 2013, 09:32:24 am »

Yes, you can definitely set dig abilities for different races.

I could plausibly differentiate between soil and rock, but it'd be a pain and would slow things down a bit. Differentiating between types of rock would be a little excessive before there's a difference for normal digging.
Logged

Jiri Petru

  • Bay Watcher
    • View Profile
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #19 on: June 16, 2013, 05:00:34 pm »

Differentiating between soil and rock can be as easy as giving one an 1 in the pathing algorithm and the other one, say, a 5. I guess. Or not?

(And yes, rock types are very excessive, forget about that.)
Logged
Yours,
Markus Cz. Clasplashes

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #20 on: June 16, 2013, 06:19:12 pm »

Checking whether it's soil or rock is the annoying part. Also it has to dig in several parts of the code and I'd have to make entirely sure that every place they dig or consider digging, they check for soil or rock. It's one more thing that's easy to forget and could cause hard to find bugs.
Logged

ancusohm

  • Bay Watcher
    • View Profile
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #21 on: June 18, 2013, 02:35:03 pm »

Hi

This mod is amazing.  I think it's the first time I've seen someone mod DF pathfinding. 

Quick question.  How feasible would it be to change the pathfinding for your own dwarves?  Specifically, would it be possible to change the dwarves' pathfinding so that they will path through water (assuming they can breathe water)? 
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #22 on: June 18, 2013, 04:27:37 pm »

Not really, no.

edit: In more detail, there's a quick check the game does to see if pathfinding is possible before it runs the algorithm. This quick check doesn't consider water to be passable. It would not be possible to intercept this before it happens and override the pathfinding. The best you could get is pathing through water/air/whatever when you already could have gotten wherever you're going on land.
« Last Edit: June 18, 2013, 04:31:56 pm by expwnent »
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #23 on: June 18, 2013, 08:16:19 pm »

This mod is amazing.  I think it's the first time I've seen someone mod DF pathfinding. 

Question: I have the impression that you rolled your own pathfinding algorithm.  Did you hook into any of DF's pathfinding code?  (Specifically the code, not the world data.)

If you did, are you willing to share some details of the hooks?  Calls in, callbacks, caveats and best practices, etc.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #24 on: June 18, 2013, 08:53:06 pm »

That's not how it works. The mod runs its own pathfinding algorithm to find out what the diggers have to do to get to your dwarves, then it assigns jobs and the game does its own pathfinding thing to make the digger do the dig job. It's essentially impossible to replace DF's pathfinding code with your own.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #25 on: June 18, 2013, 09:24:01 pm »

I just have to ask: Any motivation to take on that Alpha Lightning System that was posted two months ago? :P

Because, you know, you already seem to have added the impossible, so why not ask for something equally hard. :P
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 - 141 countries visited :::

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #26 on: June 18, 2013, 10:24:22 pm »

Haha, thanks. I like a good challenge.

Lighting or lightning? Either way I'm not sure what you're talking about.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #27 on: June 18, 2013, 10:32:12 pm »

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 - 141 countries visited :::

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #28 on: June 18, 2013, 10:38:07 pm »

I think that's a little more impossible than I'm likely to have time for.
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: DFHack Plugin: Digging Invaders Version 0.5
« Reply #29 on: June 18, 2013, 11:52:48 pm »

That's not how it works.  [...]  It's essentially impossible to replace DF's pathfinding code with your own.

Shoot, I'd hoped you had managed it.

Yeah, it looks really, really hard.  I've been exploring it for a couple of extensions I want, but....
Logged
Pages: 1 [2] 3 4 ... 6