Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 66 67 [68] 69 70 ... 244

Author Topic: DFHack 50.14-r1.1  (Read 893700 times)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1005 on: April 19, 2018, 12:30:21 pm »

It doesn't "catch" anything - it always kills the selected unit. It just points out that you got the gender wrong.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1006 on: April 19, 2018, 03:15:13 pm »

It doesn't "catch" anything - it always kills the selected unit. It just points out that you got the gender wrong.
Hm, I was fairly sure I've had to change the gender in the command and try again when it said it was wrong. Ah well.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1007 on: April 20, 2018, 06:08:10 am »

Agreed. I'll add those and get rid of the message.
You included "this" as one of the alternatives to "this" in the description. :P

The in-game help also needs to be changed at line 121.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1008 on: April 20, 2018, 10:54:30 am »

Is there a built in method for detecting fired projectiles? Right now I check every tick to see if df.global.proj_next_id has changed. If it has I go through the df.global.world.proj_list until I find the projectile with the correct id and then go from there. Just wondering if this is the best way to do it. I thought about using the eventful onProjItemCheckMovement but I wasn't sure if that would be faster/slower or what.

Also, I've been looking at reports in order to add report triggering to an action-trigger script. This became needed because the Dodge action does not get registered as a proper unit.action but does generate a combat report, so it should be possible to trigger off of that (some other things that would be fun to trigger on are charges, wrestling moves, knock outs, etc...). The trouble is the combat reports don't seem to store any information besides the type, the message, and the location it was triggered at (and a couple other things), and what we really need is the unit ids. Now it is possible to get the unit ids from the message by checking the names, but this isn't a full proof method and it requires we hard code the report message for each report type. So I was wondering if anyone else has looked at getting unit ids from reports? I feel like it should be easy, but maybe that information never becomes available?

EDIT: I already know about the onReport eventful trigger, but that only gives me the report ID which only gives me the information mentioned above
« Last Edit: April 20, 2018, 11:00:18 am by Roses »
Logged

Naia

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1009 on: April 22, 2018, 04:37:53 pm »

Is it possible to add a hotkey for changevein, similar to the one that already exists for digv ?

I like the main parts of my fortress having same wall and floor colours, so I use the changevein feature quite often to get rid of ore/gems. And while it's working perfectly, it might be something I do 50 - 100 times.
So I'm just wondering if there is a possible way to avoid bringing up the dfhack window, type the command, then switch back to df.
Logged

Xyon

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1010 on: April 22, 2018, 06:08:15 pm »

I'm trying to figure out, is there any way to create aquifers? I was trying to use tiletype but its not that intuitive to figure out.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1011 on: April 22, 2018, 07:45:09 pm »

Is it possible to add a hotkey for changevein, similar to the one that already exists for digv ?

I like the main parts of my fortress having same wall and floor colours, so I use the changevein feature quite often to get rid of ore/gems. And while it's working perfectly, it might be something I do 50 - 100 times.
So I'm just wondering if there is a possible way to avoid bringing up the dfhack window, type the command, then switch back to df.
Yes, use the keybinding command. That's how the one for digv is set up - take a look at dfhack.init.

I'm trying to figure out, is there any way to create aquifers? I was trying to use tiletype but its not that intuitive to figure out.
An adjusted version of the drain-aquifer script might work. Getting it to show up just where you want would be tricky. It looks like it uses the "water_table" tile flag, and I'm not sure if tiletypes can change that.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Naia

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1012 on: April 22, 2018, 09:02:34 pm »

Is it possible to add a hotkey for changevein, similar to the one that already exists for digv ?

I like the main parts of my fortress having same wall and floor colours, so I use the changevein feature quite often to get rid of ore/gems. And while it's working perfectly, it might be something I do 50 - 100 times.
So I'm just wondering if there is a possible way to avoid bringing up the dfhack window, type the command, then switch back to df.

Yes, use the keybinding command. That's how the one for digv is set up - take a look at dfhack.init.



Tried adding this to dfhack.init.
Quote
##############################
# Generic dwarfmode bindings #
##############################

# show all current key bindings
keybinding add Ctrl-F1 hotkeys
keybinding add Alt-F1 hotkeys

# toggle the display of water level as 1-7 tiles
keybinding add Ctrl-W twaterlvl

# with cursor:

# designate the whole vein for digging
keybinding add Ctrl-V digv
keybinding add Ctrl-Shift-V "digv x"

# change vein to specified inorganic stonetype
keybinding add Ctrl-Z changevein SHALE

But getting this 
Quote

Syntax: changevein < inorganic material ID >

It's probably something really basic missing, so it not getting the SHALE part.
What am I doing wrong ?
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1013 on: April 22, 2018, 09:03:31 pm »

You need quotes around it, because there's a space. See the "digv x" example.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Naia

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1014 on: April 22, 2018, 10:37:18 pm »

Thank you very much. It's working fantastic !  :)
Logged

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: DFHack 0.44.09-r1
« Reply #1015 on: April 25, 2018, 07:48:20 am »

 :o Doing some testing over the strangemood pluging I have found that the potter and glazer skills had not been implemented in the code inside of the file https://github.com/DFHack/dfhack/blob/master/plugins/strangemood.cpp (as seen in lines after the line 590), even if the very similar skills glassmaker and mason are implemented.

There are some obscure technical reasons that make imposible the implementation of the skills potter and glazer in the strangemood pluging?

Or maybe they have been simply forgotten?

In https://github.com/DFHack/df-structures/blob/master/df.skills.xml (after the line 1132) those two skills are defined as Pottery and Glazing instead of potter and glazer (so the naming convention followed by most others skills is not respected). Could this have some relation ...
« Last Edit: April 25, 2018, 08:26:23 am by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1016 on: April 25, 2018, 09:06:36 am »

Neither of those skills are listed on http://dwarffortresswiki.org/index.php/DF2014:Strange_mood#Skills_and_workshops, so they probably can't be affected by moods. It definitely has nothing to do with the naming, although that should probably be fixed.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: DFHack 0.44.09-r1
« Reply #1017 on: April 25, 2018, 12:04:31 pm »

The question is that glazing and pottery produce quality levels in the decoration and in the core quality clay items respectively.

So... even if really DF does never produce mooded ceramic artifacts, it is probably unintended or forgotten by Toady.

Maybe a helper plugin as strangemood should permit clay-ceramic moods if it is feasible.

Dwarves dreams of either mastering a skill or creating a great work of art, moreover as a race or civilization they belong to the sphere of earth & stone, in this sense few things are more dwarfy than clay ceramics, except maybe cheese...

The only other skill that generates quality levels and is not in the wiki list of the moodable skills is cooking, but as it produces quality stacks of perishable food, it is easier to justify its absence.

Who would want to eat an artifact food or wine bottle two hundred years old?  ;)



« Last Edit: April 25, 2018, 12:29:24 pm by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

blackreaper666

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1018 on: April 29, 2018, 03:46:24 am »

I'm having some smaller questions about scripting.

1. Is there a way to get the year of embark? You can get the current year, but I didn't find a way to check how many years the fort already exist

2. How can I get the 'name' of a creature that doesn't have a normal name?

3. How can I get the name of my fort?

Thanks in advance! :D
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.09-r1
« Reply #1019 on: April 29, 2018, 07:33:55 am »

1. If nothing else, it should exist as a history event, probably linked to by the site.
2. If you mean the race of creatures you'd use the race element of the unit/hist fig to look the race up in df.global.world.raws.creatures.all. These entries have a name field with indices for singular, plural, and a third use (possessive?).
3. dfhack.TranslateName (df.global.world.world_data.current_site
  • .name, true).


Note that none of these have been checked, so they may be off a bit.
Logged
Pages: 1 ... 66 67 [68] 69 70 ... 244