Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 324 325 [326] 327 328 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1459049 times)

Thundercraft

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4875 on: November 22, 2013, 11:19:59 am »

is it possible to use dfhack to make a dwarf give birth?

Are they already pregnant?  If so, open the Lua interpreter and run this after putting the cursor over the unit:

Code: [Select]
dfhack.gui.getSelectedUnit().relations.pregnancy_timer = 0

I think that's the code for it, but if not it should be pretty similar..  It's been a while.

If they're not already pregnant, you could use the DFHack empregnant tool to make the dwarf that way.
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4876 on: November 22, 2013, 04:40:56 pm »

Yeah, they do, but I don't know where you'd store them to exclude them from future checks.  I know DFHack supports saving things to your world save somehow, but it had limited storage if I recall and would probably run out quickly.

The storage is unlimited, but rather costly: to store a string key with a string value plus a few ints, it uses a whole historical figure structure. If you don't mind the overhead and complexity of serializing and parsing, you can store about 10000 characters as that single string value though.
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4877 on: November 23, 2013, 09:43:19 pm »

https://github.com/angavrilov/df-structures/blob/master/df.ui.xml#L618

unk6 in the dead_citizens vector is ghost_type (see https://github.com/angavrilov/df-structures/blob/master/df.units.xml#L202 )
I suspect the timer is used for ghost spawning.

Ghost types are set upon creature death. They eventually silently spawn at the locations of their deaths. No announcements are made unless they do something. I updated http://dwarffortresswiki.org/index.php/DF2012:Ghost . In general, strange moods, insanity, or some personality traits lead to certain ghost types. You also always get a murderous ghost if you deconstruct the slab of a ghost which was previously "put to rest", causing it to return some time later.

I haven't waited around to see if it works, but in theory one could DFHack a new entry onto the vector, making the game create murderous ghosts of dead goblins etc. Tinker at your own risk.

falconne

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4878 on: November 24, 2013, 02:46:21 am »

I haven't been following the updates lately but there now seems to be a DFHack r4 out there... is that a release candidate? When is the official release?

I noticed that most of my plugins are out of date in Peterix's repo, having last been merged months ago; a number of bugfixes have been done since then. If anyone's still updating the central repo I now have a DFhack_r4 branch in my repo, created from the r4 tag in the central repo, where I've merged my master branch into. If not I guess I'll wait till the official release then these updates can go into r5.
Logged
Utility plugins for DFHack, for improving Dwarf Fortress' user interface.

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4879 on: November 24, 2013, 01:12:46 pm »

I've got a few questions on DFhack commands.

1. How do I look at the adventurers histfig/entity info using DFhack? Quietust mentioned about it in a bug report, but really though, what's the command?

2. How do I do a pre-fishing population check with DFhack? UristDaVinci said he did that in a bug report about the bug with cave fish, but nobody explained how to do that.

3. How is the removewear command supposed to work? I tried it once and it didn't work.

Also, the readme should be updated as theres some new stuff that is not on there.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4880 on: November 24, 2013, 03:09:29 pm »

To answer 1: gui/gm-editor df.historical_figure.find(df.global.world.units.active[0].hist_figure_id)

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4881 on: November 24, 2013, 09:42:24 pm »

...
2. How do I do a pre-fishing population check with DFhack? UristDaVinci said he did that in a bug report about the bug with cave fish, but nobody explained how to do that.
...

Like this:

Code: (chkfish.lua) [Select]
--list all local vermin populations in fisherdwarf's region tile
unit=dfhack.gui.getSelectedUnit()
if unit==nil then
print ("No unit under cursor!  Aborting!")
return
end

test=dfhack.maps.getTileBlock(unit.pos)

for k,v in pairs(df.global.world.populations) do
if v.type==1 and v.population.region_x==test.region_pos.x and v.population.region_y==test.region_pos.y then
if df.global.world.raws.creatures.all[v.race].flags.VERMIN_FISH then

print(df.global.world.raws.creatures.all[v.race].creature_id)
--printall(v)
print("Local population in this region:",v.quantity)
printall(v.population)
print(" ")
end
end
end

It identifies the local fish populations based on the location of the selected creature. Typically, river fish have feature_idx 0.

Yaotzin

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4882 on: November 25, 2013, 09:26:25 am »

Probably a trivial problem but I suck at searching.

I'd like dfhack to read a long list of commands, basically read a text file I guess. How can I do so? Specifically I want to input a long list of workflow constraints.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #4883 on: November 25, 2013, 01:17:41 pm »

Hey, just heard about the dfhack r4 "outside-only" plugin. Thanks for that :) I dont know who wrote it, but that is a nice utility to have, for example for wind/sun-related buildings, farms and orchads and the like. Could a "inside-only" plugin be added to that? Thinking of evil races or underground races, like Antmen and the like.
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 - 148 countries visited :::

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4884 on: November 26, 2013, 10:15:42 am »

https://github.com/angavrilov/df-structures/blob/master/df.ui.xml#L618

unk6 in the dead_citizens vector is ghost_type (see https://github.com/angavrilov/df-structures/blob/master/df.units.xml#L202 )
I suspect the timer is used for ghost spawning.

Ghost types are set upon creature death. They eventually silently spawn at the locations of their deaths. No announcements are made unless they do something. I updated http://dwarffortresswiki.org/index.php/DF2012:Ghost . In general, strange moods, insanity, or some personality traits lead to certain ghost types. You also always get a murderous ghost if you deconstruct the slab of a ghost which was previously "put to rest", causing it to return some time later.

I haven't waited around to see if it works, but in theory one could DFHack a new entry onto the vector, making the game create murderous ghosts of dead goblins etc. Tinker at your own risk.
it's less spawn and more they convert the dead unit into a ghostly type.
Spoiler: semantic rant (click to show/hide)
good find Da Vinci

Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #4885 on: November 26, 2013, 12:01:08 pm »

Does any of that ghost-business result in useable scripts, like a workshop to banish all ghosts, or call all ghosts, something like that? Or cursed items that bring all ghosts back for a few days, before all of them are automatically banished. That would be fun.
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 - 148 countries visited :::

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4886 on: November 27, 2013, 10:26:23 am »

Does any of that ghost-business result in useable scripts, like a workshop to banish all ghosts, or call all ghosts, something like that? Or cursed items that bring all ghosts back for a few days, before all of them are automatically banished. That would be fun.

1. Setting the timer to 400000 causes that ghost to appear once the game is unpaused. This number is based upon a "lucky guess" and not any kind of research or disassembly-reading.

2. Setting the unk6 (ghost type) before the ghost appears will alter the type of ghost that appears.

3. Erasing the entries in the dead citizens vector appears to prevent those dead citizens from coming back as ghosts. 

4. I will attempt to cause more FUN with this and let everyone know.

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4887 on: November 27, 2013, 03:59:51 pm »

I'm using the latest DFhack that is with r41 of Peridexis's LNP and stripcaged is behaving a bit differently now and is confusing me a little, is it supposed to not dump the goblins clothes? Before, it dumped everything and now when I used stripcaged on some goblin thieves, it only dumped the bags and daggers.
« Last Edit: November 27, 2013, 04:12:33 pm by smjjames »
Logged

KroganElite

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4888 on: November 27, 2013, 04:20:49 pm »

Can someone please help me. Stonesense is not working. I run DF, load up my fortress, type "stonesense" in dfhack and it just opens a window. There is literally nothing inside the window, it copies whatever is behind the window and when you drag it it just smears the image all over. Please help. I've tried multiple fresh installs and it still doesnt work.

edit:
Using the R3 DFhack doesnt work but i tried R1 and it works?
« Last Edit: November 27, 2013, 04:58:10 pm by KroganElite »
Logged

catvanbrian

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4889 on: November 27, 2013, 05:39:09 pm »

how do you spawn a forgotten beast with the dfhack command "spawn"?
Logged
Pages: 1 ... 324 325 [326] 327 328 ... 373