Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 277 278 [279] 280 281 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1456160 times)

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4170 on: June 26, 2013, 11:33:12 pm »

it looks to me that the cpp matgloss is the mat_type mat_index pair.

so I think that this might be more of what you are looking for:
Code: [Select]
item.mat_type == cons.mat_type and
item.mat_index == cons.mat_index then

or something to do with dfhack.matinfo.decode(type,index)

 
« Last Edit: June 26, 2013, 11:37:27 pm by Kurik Amudnil »
Logged

Brilliand

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4171 on: June 27, 2013, 12:52:00 am »

it looks to me that the cpp matgloss is the mat_type mat_index pair.

so I think that this might be more of what you are looking for:
Code: [Select]
item.mat_type == cons.mat_type and
item.mat_index == cons.mat_index then

or something to do with dfhack.matinfo.decode(type,index)

I changed:

Code: [Select]
item->getMaterial() != cons->material ||
item->getMatgloss() != cons->matgloss)

To:

Code: [Select]
item.getMaterial(item) == cons.mat_type and
item.getMaterialIndex(item) == cons.mat_index then

If "matgloss" is the mat_type mat_index pair, then I'm left with the question of what "material" is (I assumed it was mat_type).
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.

azrael300

  • Bay Watcher
  • WERE GOING TO LIVE :)
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4172 on: June 27, 2013, 01:49:10 am »

is it possible to use df hack to spawn a vampire? like spawn a vampire hedgehog pet? i want to be a vampire in adventure mode.
Logged
Edit. Oh Jesus Christ, Necro would be proud. The second horse in the caravan came in and immediately caught on fire. I looked into his inventory and found a burning pig tail fiber bag. Curious, I looked inside.
quote above is by yuriruler90

Brilliand

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4173 on: June 27, 2013, 02:00:09 am »

is it possible to use df hack to spawn a vampire? like spawn a vampire hedgehog pet? i want to be a vampire in adventure mode.

It could be done in Lua, though it would be fairly complicated.  I don't think there's an existing DFHack plugin that makes it easy.  Modding something readily available (such as chicken meat) to turn you into a vampire when you eat it would probably be easier.
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.

azrael300

  • Bay Watcher
  • WERE GOING TO LIVE :)
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4174 on: June 27, 2013, 02:01:03 am »

is it possible to use df hack to spawn a vampire? like spawn a vampire hedgehog pet? i want to be a vampire in adventure mode.

nevermind, i already found a way...

Logged
Edit. Oh Jesus Christ, Necro would be proud. The second horse in the caravan came in and immediately caught on fire. I looked into his inventory and found a burning pig tail fiber bag. Curious, I looked inside.
quote above is by yuriruler90

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4175 on: June 27, 2013, 02:02:30 am »


given the original
Code: [Select]
if (item->getType() != cons->item_type ||
            item->getSubtype() != cons->item_subtype ||
            item->getMaterial() != cons->mat_type ||
            item->getMaterialIndex() != cons->mat_index)
            continue;

I get this translation (basicly the same as what you have, but using the : tail call )
Code: [Select]
if item:getType() == cons.item_type and
            item:getSubtype() == cons.item_subtype and
            item:getMaterial() == cons.mat_type and
            item:getMaterialIndex() == cons.mat_index  then
    -- destroy item, mark construction as "no build item"
end


the getMaterial vmethod returns the item mat_type, but according to the df.item.xml, getActualMaterial returns actual material never race, so by inference getMaterial might return a race for a creature mat.  I didn't see any matgloss value being used.
« Last Edit: June 27, 2013, 02:06:54 am by Kurik Amudnil »
Logged

Brilliand

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4176 on: June 27, 2013, 02:21:50 am »


given the original
Code: [Select]
if (item->getType() != cons->item_type ||
            item->getSubtype() != cons->item_subtype ||
            item->getMaterial() != cons->mat_type ||
            item->getMaterialIndex() != cons->mat_index)
            continue;

I get this translation (basicly the same as what you have, but using the : tail call )
Code: [Select]
if item:getType() == cons.item_type and
            item:getSubtype() == cons.item_subtype and
            item:getMaterial() == cons.mat_type and
            item:getMaterialIndex() == cons.mat_index  then
    -- destroy item, mark construction as "no build item"
end


the getMaterial vmethod returns the item mat_type, but according to the df.item.xml, getActualMaterial returns actual material never race, so by inference getMaterial might return a race for a creature mat.  I didn't see any matgloss value being used.

Where did you get that original?  I got mine from quietust's branch of DFHack:

https://github.com/quietust/dfhack-23a/blob/master/plugins/cleanconst.cpp
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4177 on: June 27, 2013, 03:10:30 am »

Where did you get that original?  I got mine from quietust's branch of DFHack:

https://github.com/quietust/dfhack-23a/blob/master/plugins/cleanconst.cpp

from https://github.com/quietust/dfhack/blob/master/plugins/cleanconst.cpp



In other news, I have managed to create cleaning jobs and assign them to workers in two ways.

One way is by spawning stagnant water.  Issues:  Will be deleted at the beginning of each season (I am not sure if it will take other contaminants with it),  might disappear if hit by a rain drop, might freeze or evaporate according to environment.

The other way is by hooking a custom reaction and using the worker who completes the reaction and a burrow created for assigning cleaning designations to get a location.  Issues:  cannot use cleaning labor on custom reaction, unit will take time related to skill level, (i guess they take their time at the janitors closet, grumbling about having to do janitorial work), and can't detect if the unit cancels the job en-route to the destination tile (cancel due to hunger, sleep, thirst, danger), and the unit does not seem to gain skill by performing the reaction unless I put it in the hook code (haven't tested experience gain extensively).

Brilliand

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4178 on: June 27, 2013, 05:48:06 am »

Where did you get that original?  I got mine from quietust's branch of DFHack:

https://github.com/quietust/dfhack-23a/blob/master/plugins/cleanconst.cpp

from https://github.com/quietust/dfhack/blob/master/plugins/cleanconst.cpp

Okay, that looks like a more recent version.  I'm guessing matgloss is simply outdated, then.
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.

crossmr

  • Bay Watcher
    • View Profile
    • Jeonsa
Re: DFHack 0.34.11 r3
« Reply #4179 on: June 27, 2013, 05:52:38 am »

Would it be possible to create a script that hides all body parts (corpses skull/teeth/hair/bones/etc) that are on non-cavern tiles? After I wipe out a siege, I send the dwarves to clean up then go through and hide the leftover body parts.
For ambushes not a big deal, for sieges, kind of annoying and time consuming, especially with axe and sword dwarves, but when my hammerdwarf smashes someone in the mouth it just becomes difficult. 20 teeth usually go spraying all over the landscape, and it seems to be happening with increased frequency.

Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #4180 on: June 27, 2013, 07:43:54 am »

Where did you get that original?  I got mine from quietust's branch of DFHack:

https://github.com/quietust/dfhack-23a/blob/master/plugins/cleanconst.cpp

Take a closer look at that URL - that's dfhack-23a, a special fork of DFHack that's designed to work with the old 2D version of DF (namely, version 0.23.130.23a).

The version of cleanconst.cpp in there is actually non-functional because constructions didn't exist in that version (and it's excluded from compilation) - it's only there because dfhack-23a merges all commits from dfhack-40d (for version 0.28.181.40d, which itself merges commits from the current version of DFHack), where material info is referred to as material/matgloss (rather than mat_type/mat_index as it came to be called in 0.31 and later). And in case you're wondering, the cleanconst command does work in 40d - I successfully ran it on Flarechannel, but it didn't have any noticeable effect on framerate.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

PintOfBass

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4181 on: June 27, 2013, 08:12:35 am »

I looked and was unable to find a settings file.  I would like to turn off mousequery track so I don't have to do it every time I load the game.  Thanks in advance.

PoB
Logged

Dragoon209

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4182 on: June 27, 2013, 12:49:09 pm »

Hello,

I'm having trouble with the Keybindings not triggering their command when loaded from dfhack.init.  I've ensured that the keybinding commands are typed correctly, and have ensured (by running keybinding with no arguments) that I am on the correct screen to use it.

Spoiler: dfhack.init (click to show/hide)


The commands I am trying to use are Quicksave (keybinding add Ctrl-Alt-S@dwarfmode/Default quicksave) and Alternate Stock Screen (keybinding add Shift-Ctrl-Z@dwarfmode/Default "stocks show")

The commands will run if I copy and paste them from the init into the DFHack command window, keybinding list Ctrl-Alt-S shows
Code: [Select]
[DFHack]# keybinding list Ctrl-Alt-S
  @dwarfmode/Default: quicksave
[DFHack]#



the command is bound to the key combination, and keybinding shows:
Code: [Select]
[DFHack]# keybinding
Usage:
  keybinding list <key>
  keybinding clear <key>[@context]...
  keybinding set <key>[@context] "cmdline" "cmdline"...
  keybinding add <key>[@context] "cmdline" "cmdline"...
Later adds, and earlier items within one command have priority.
Supported keys: [Ctrl-][Alt-][Shift-](A-Z, or F1-F9, or Enter).
Context may be used to limit the scope of the binding, by
requiring the current context to have a certain prefix.
Current UI context is: dwarfmode/Default
[DFHack]#

What is going on here?  Any suggestions?
Logged
Check out my mini-mods:
Upgradable Leather Tiers
Block Crafting Workshop

Have you played Webfort yet?  It's a way to play Dwarf Fortress in a web browser with your friends!  Come check it out at:
Community Web Fortress

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4183 on: June 27, 2013, 02:13:15 pm »

@Dragoon209
It is my understanding that windows doesn't like honering hotkeys that use Ctrl-Z or Shift-Z or hotkeys that use Ctrl-Alt.  If you are not using windows.. I don't know.


Dragoon209

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4184 on: June 27, 2013, 02:20:06 pm »

@Dragoon209
It is my understanding that windows doesn't like honering hotkeys that use Ctrl-Z or Shift-Z or hotkeys that use Ctrl-Alt.  If you are not using windows.. I don't know.

I AM using Windows, that could be a thing.... I'll try changing them and report back.

Thanks!

EDIT:

  This DID fix my problem.  I changed the bindings to Alt-Z and Alt-S, and both worked.  Thanks!
« Last Edit: June 27, 2013, 02:35:30 pm by Dragoon209 »
Logged
Check out my mini-mods:
Upgradable Leather Tiers
Block Crafting Workshop

Have you played Webfort yet?  It's a way to play Dwarf Fortress in a web browser with your friends!  Come check it out at:
Community Web Fortress
Pages: 1 ... 277 278 [279] 280 281 ... 373