Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 130 131 [132] 133 134 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1459250 times)

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1965 on: June 22, 2012, 11:03:24 am »

Makes me wonder if something similar would be possible with lua.  Maybe a script that looks at all the tiles designated for mining and removes the wet/hot tags from them?

Er actually now that I think about it, DF probably keeps those accurate in real time doesn't it.  Or else freshly flooded areas would never get those tags.  If that's how it works, DF would probably just change them back next tick.   Hm...there has to be some way...
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

Makbeth

  • Bay Watcher
  • His lower body is melted.
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1966 on: June 22, 2012, 12:01:16 pm »

In that case I wonder if turning temperature off would disable the hot tags...

I was thinking about suppressing those tags earlier, but I couldn't even find them in any of the structures xml files.  Maybe it's possible to do something similar to autolabor, and reassign the designation when it's cancelled...  I'm not very good at scripting though.  Need to look into how that could work.

EDIT:  Well, it's not quite the fix I would like, because it will only work for digging and not ramps, stairs, etc, but dig cancellations are most annoying for digging rooms so it will at least make things better.  It looks like one could make a plugin that, when enabled, will take warm and/or wet rock cancellation announcements, and apply the dig designation tag at the coordinates of the announcement.

Most lua scripts I've seen are one-shot deals, whereas this would require running in the background for as long as it's enabled, like autolabor.  I'm guessing it would have to be an actual DFhack plugin then. 

Maybe I can take a look at the code for autolabor and see if I can splice this in.
« Last Edit: June 22, 2012, 12:14:01 pm by Makbeth »
Logged
Diso Faintpuzzles was born in 120.  Although accounts vary it is universally agreed that Diso was chosen by fate as the vanguard of destiny.

In the early spring of 143 Diso began wandering the wilds.

In the early spring of 143 Diso starved to death in the Horn of Striking.

Tierre

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1967 on: June 22, 2012, 12:05:57 pm »

Damn i am asking about how to repair XXthingsXX with DFhack for third time already and nobody even sees it:( Nobody would even say it is impossible - just silence:(
Logged

Mr S

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1968 on: June 22, 2012, 12:08:27 pm »

To set your mind at ease, yes, I did see it.  No, I don't know how to fix it.  I'm getting my head wrapped around some modding, but haven't gotten deep enough into the data structures for things like that yet.  Srry.
Logged

Tierre

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1969 on: June 22, 2012, 12:10:07 pm »

I just saw smebody saying that it is possible through changeitem command. But never figured how:(
Logged

chronicpayne

  • Bay Watcher
  • The graveyards are full of indispensable men.
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1970 on: June 22, 2012, 12:13:12 pm »

Ahhh thanks
« Last Edit: June 22, 2012, 12:14:55 pm by chronicpayne »
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1971 on: June 22, 2012, 12:14:04 pm »

I don't know about any wet/hot tags at all - that is most probably computed just by checking if there is water or magma in adjacent tiles.
Logged

Tierre

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1972 on: June 22, 2012, 12:16:53 pm »

AG you are wrong. It is computed from temperature of a stone. So if a stone is hot and he is surrounded by other stone - then it will remain hot as in a heat sink. Dumpnes is really about adjustent water though. But i can see a lot o hot stone after i obsidian casted something. It remains there for months and years.
Logged

Makbeth

  • Bay Watcher
  • His lower body is melted.
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1973 on: June 22, 2012, 12:25:19 pm »

Alright, I'm going to try to look at the source for workflow and see if I can repurpose the code so it assigns dig designation flags to the coordinates of any warm or wet cancel announcement while enabled.  Unfortunately this won't preserve stair or ramp designations, but we'll at least be able to dig rooms and hallways.  Seems the easiest way to do this because I couldn't find any code dealing with the actual cancellations themselves, just the announcements.
« Last Edit: June 22, 2012, 01:06:30 pm by Makbeth »
Logged
Diso Faintpuzzles was born in 120.  Although accounts vary it is universally agreed that Diso was chosen by fate as the vanguard of destiny.

In the early spring of 143 Diso began wandering the wilds.

In the early spring of 143 Diso starved to death in the Horn of Striking.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1974 on: June 22, 2012, 12:34:51 pm »

Why not reveal designated tiles, and only them?

Edit: Or a 'reveal rectangle' function - when the designation ui is in the middle of rectangle selection, the selection_rect global contains the coordinates of the first selected point, and cursor the current cursor position as usual.
« Last Edit: June 22, 2012, 12:40:58 pm by ag »
Logged

Tierre

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1975 on: June 22, 2012, 12:44:36 pm »

Revealing a tile will not change it's remperature. Reveal is just a simple flag - it has nothing to do with hot stone. You must change temperature of a tile for this. And i am not sure how can you do it.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: DFHack 0.34.10 r1
« Reply #1976 on: June 22, 2012, 12:47:16 pm »

Revealing a tile will not change it's remperature. Reveal is just a simple flag - it has nothing to do with hot stone. You must change temperature of a tile for this. And i am not sure how can you do it.
But it will stop the cancelation. because you already discovered it.
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1977 on: June 22, 2012, 12:49:20 pm »

Cancellations only occur when a designated tile is revealed during digging. So, revealing them yourself immediately after designating would prevent it.

To reveal a tile from lua you can do:

Code: [Select]
dfhack.maps.getTileBlock(x,y,z).designation[x%16][y%16].hidden = false
If the number of tiles is reasonable, as would be if you only loop over a limited rectangle on one z level, it should be fast enough. For whole-map scans lua is generally too slow, since there are millions of tiles to process - but see scripts/fix/item-occupancy.lua for an example.
« Last Edit: June 22, 2012, 12:52:39 pm by ag »
Logged

Tierre

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1978 on: June 22, 2012, 12:52:17 pm »

Might give that to liquids or tiletype tool:)

Also - can anybody answer my question about XXitemsXX?
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1979 on: June 22, 2012, 12:56:49 pm »

Using a virtual method from actual DF binary:

Code: [Select]
dfhack.gui.getSelectedItem():setWear(0)

or with manual field changes

Code: [Select]
dfhack.gui.getSelectedItem().wear = 0
dfhack.gui.getSelectedItem().wear_timer = 0
Logged
Pages: 1 ... 130 131 [132] 133 134 ... 373