Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 234 235 [236] 237 238 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1454059 times)

StephenJacob

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3525 on: April 05, 2013, 01:56:21 pm »

I've been trying to reattach my left leg for a few hours and I can't seem to get it right .
I finally found the missing part flag in unit.body.components.body_part_status (I was looking in unit.body.body_plan.body_parts ...duh ) but it only reattaches the limb and not its layers (skin,bone,muscle) .
I tried changing any variable I could find with "layer" in its name but so far nothing ...
Does anyone know where I can find those flags, if they even exist ?
dfusion has a heal unit script that will repair your legs, you need to select your adventurer to get it to work.

Yeah, but it heals every wound. Your post gave me an hint as to where the layers were but it doesn't answer my question .
I can't seem to make sense of this organization. I've found that body_layer_338 seems to control skin and bones states and body_layer_348 takes care of the fat , I have no idea what all the other layers do as changing some of their value doesn't seem to affect my adventurer's description .
Now the problem is there are 88 body parts in body.body_plan.body_parts and using their index I can reattach them setting myAdv.body.components.body_part_status[bodyPartIndex].whole to 0 .

I've devised this code to do so :
Code: [Select]
function reattachLimb(name)
    for k,v in pairs(myAdv.body.body_plan.body_parts) do
        if v.name_singular[0][0]==name then
for i,j in pairs(myAdv.body.components.body_part_status[k]) do
                myAdv.body.components.body_part_status[k][i] = false
            end
        end
    end
end


But I can't apply the same technique to the body layers, the length of body_layer_338 and 348 are 245, which isn't a multiple of 88 so I assume some body parts don't have bone or don't have skin or some stuff like that but then how am I supposed to find the index of the specific body part's skin, bone and fat ?

Again any insight appreciated .
Logged

hurtmypony

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3526 on: April 05, 2013, 02:21:26 pm »

Hello!

Not sure if I should put this as an independent message or keep it here, since I am using DFHack to defeat a DF bug of sorts.

I was having issues with the population cap not being respected by my game.  I haven't played in a couple of years, and I wanted to keep the population under 23. 

I have child cap at 0:0
I originally had the pop cap at 23.
I am using LazyNewb, but I updated DFHack manually to 34.11 R3.  It shows as the correct version in the command prompt.


Since I was having population issues in my other maps, I started a new one with the settings above.

Immediately upon starting the game, I tried to run the script "population-cap". 
Since it was a new game and no caravan had visited yet, it threw the error and told me to run "fix/population-cap" script. 
I did that, adn I got the "home civ notified" message.

I got my first two waves, before any caravan, which put me right at 23. 
Each time after, I ran "population-cap" script.  Got the confirmation message.
So far, so good.
Now a season or so after the first dwarf Caravan, and immediately after the first elf one, I got another wave of 14 or so dwarves, putting me at 32 dwarves.  Well over my set 23.


Did I do something wrong?  Is there any way to stop the inflow?  I would rather manage my population at my own pace with my first game back in years.  Does anyone have any advice?  I'd appreciate it.



Logged

tahujdt

  • Bay Watcher
  • The token conservative
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3527 on: April 05, 2013, 09:53:28 pm »

Where can I fiind the dfusion embark plugin? The new dfusion doesn't show it in any menus.
Logged
DFBT the Dwarf: The only community podcast for Dwarf Fortress!
Tahu-R-TOA-1, Troubleshooter
Quote
I suggest that we add a clause permitting the keelhauling of anyone who suggests a plan involving "zombify the crew".
Quote from: MNII
Friend Computer, can you repair the known universe, please?

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3528 on: April 06, 2013, 02:34:25 am »

Where can I fiind the dfusion embark plugin? The new dfusion doesn't show it in any menus.
hack/lua/dfusion.

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

tahujdt

  • Bay Watcher
  • The token conservative
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3529 on: April 06, 2013, 01:07:14 pm »

Yes, but what command?
Logged
DFBT the Dwarf: The only community podcast for Dwarf Fortress!
Tahu-R-TOA-1, Troubleshooter
Quote
I suggest that we add a clause permitting the keelhauling of anyone who suggests a plan involving "zombify the crew".
Quote from: MNII
Friend Computer, can you repair the known universe, please?

Cavgunner

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3530 on: April 06, 2013, 08:48:53 pm »

Hey guys,

I have the Lazy Newb pack installed.  I installed DF Hack separately.  However, when starting up the DF hack prompt the command window doesn't open (it very briefly appears and then disappears). 

Any thoughts as to what might be happening here?
Logged

robertheinrich

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3531 on: April 06, 2013, 10:24:43 pm »

I have the Lazy Newb pack installed.  I installed DF Hack separately.  However, when starting up the DF hack prompt the command window doesn't open (it very briefly appears and then disappears). 

First, what do you mean with "installed seperately"? You need to follow the installation instructions and copy dfhack into your DF folder (on Windows SDL.dll needs to be replaced). Second, what do you mean with "DF hack prompt"? I suspect you are trying to "start" it with the dfhack-run.exe which is wrong. Read the manual, please:

https://github.com/peterix/dfhack#getting-started

Quote
If DFHack is installed correctly, it will automatically pop up a console window once DF is started as usual on windows. Linux and Mac OS X require running the dfhack script from the terminal, and will use that terminal for the console.

NOTE: The dfhack-run executable is there for calling DFHack commands in an already running DF+DFHack instance from external OS scripts and programs, and is not the way how you use DFHack normally.
Logged

Cavgunner

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3532 on: April 07, 2013, 11:22:46 am »

Never mind, I reinstalled the whole LN pack and everything works fine now.
Logged

Nokao

  • Bay Watcher
  • [NEED ALCOHOL TO GET THROUGH THE WORKING DAY]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3533 on: April 07, 2013, 03:24:47 pm »

Hi there, is it possible to make a "watersource here" command like for magma for next versions ?

How do I do that now ?

robertheinrich

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3534 on: April 07, 2013, 09:06:09 pm »

https://github.com/peterix/dfhack#magmasource
The command is "magmasource here" with an active cursor.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3535 on: April 07, 2013, 11:01:24 pm »

"Like for magma", meaning that he wants that, but for water.

robertheinrich

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3536 on: April 08, 2013, 12:10:37 am »

Oh sorry, I read that the other way round. It's possible as well, with liquids. If you use the keybinding from the dfhack.init example you can press Alt-L (you need a cursor active), then press p a couple times until it says "River Source", and place a rectangle which then will start to spawn water.
Logged

There Is No Vic

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.05 r1
« Reply #3537 on: April 08, 2013, 11:39:08 am »

thanks, did all that.  Now what you guys think.  Where can I learn to do some dfhack plugins/scripts.  I know how to program in C++, but I'm really green.
Well, there are just a few things I can tell you:
  • the documentation is non-existent, because nobody has the time to write some.
  • Even thought there's no documentation, there's an example plugin that 'does nothing'. So you can start by looking at it. There's a source file, an empty header and a CMake file which is set up for a much bigger plugin than the skeleton one to show how things can be done with the build system.
  • You can look at the other plugins.
  • When you have the DFHack build environment set up, it generates a lot of files in library/include/df/. Those describe many of the game's data structures and are referenced by the plugins.
  • Look at the modular API stuff - sometimes it makes things easier to do or discover.

I'm a complete cpp newb, so please be patient.

Following the directions from the Windows compile doc, I managed to get an MSVC solution that is very pretty.

However, in several of the .cpp files, I find error messages for the includes, notably:
Code: [Select]
#include "df/unit.h"
#include "df/unit_soul.h"

I find unit.h on my local drive in ..\dfhack\library\include\modules\, but not in \df\.
..\dfhack\library\include\df\ contains only a directory \custom\.
unit_soul.h is nowhere on my local drive, and I cannot locate it on github.

My questions:

1) Are these missing headers cause for concern?
2) If so, how can I prestidigitate the missing headers into their proper locations?
3) Am I completely out of my depth, trying to dive into c++ by learning the mysteries of dfhack?
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3538 on: April 08, 2013, 12:18:59 pm »

Yes, but what command?
oh yeah it doesn't exist in new Dfusion...Sorry.
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

tahujdt

  • Bay Watcher
  • The token conservative
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3539 on: April 08, 2013, 12:27:28 pm »

How can I add it in?
Logged
DFBT the Dwarf: The only community podcast for Dwarf Fortress!
Tahu-R-TOA-1, Troubleshooter
Quote
I suggest that we add a clause permitting the keelhauling of anyone who suggests a plan involving "zombify the crew".
Quote from: MNII
Friend Computer, can you repair the known universe, please?
Pages: 1 ... 234 235 [236] 237 238 ... 373