Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 274 275 [276] 277 278 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1456130 times)

crossmr

  • Bay Watcher
    • View Profile
    • Jeonsa
Re: DFHack 0.34.11 r3
« Reply #4125 on: June 21, 2013, 02:37:46 am »

How would I make a Tigerperson that we got off the elven caravan into a proper citizen? We need her bonedoctoring skills!
From what I read, you'd need to change their race to dwarf.
you can tweak makeown them, but the game still treats them like a pet.
So you can't see them in dwarf therapist and stuff like that.
Logged

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4126 on: June 21, 2013, 02:44:18 am »

Well, at the very least I just need this tigerperson to hang out in the dining hall and actually talk to the dwarves (evidenced by raising social skills) for the purposes of the succession game.
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

CaptainArchmage

  • Bay Watcher
  • Profile Pic has Changed! Sorry for the Delay.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4127 on: June 21, 2013, 09:44:31 pm »

I'm now playing Moltenchannels with your script. There are now only 811 units in the list between citizens, pets/livestock, others, and dead/missing.

If I save the game without restoring the dead units, will I still be able to restore them?

Problem I've noticed: Lots of dwarf corpses are showing. These are the un-named beings that siege your fortress when the undead come. Is it possible to get rid of those as well?

It may help if we have a binary patch to fix this problem once and for all. However, at this rate unless we get 189 more named dead or dead dwarves, citizens, traders, or other livestock and pets, we will be OK.
Logged
Given current events, I've altered my profile pic and I'm sorry it took so long to fix. If you find the old one on any of my accounts elsewhere on the internet, let me know by message (along with the specific site) and I'll fix. Can't link the revised avatar for some reason.

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4128 on: June 22, 2013, 03:16:30 am »

I'm now playing Moltenchannels with your script. There are now only 811 units in the list between citizens, pets/livestock, others, and dead/missing.

If I save the game without restoring the dead units, will I still be able to restore them?

Problem I've noticed: Lots of dwarf corpses are showing. These are the un-named beings that siege your fortress when the undead come. Is it possible to get rid of those as well?

It may help if we have a binary patch to fix this problem once and for all. However, at this rate unless we get 189 more named dead or dead dwarves, citizens, traders, or other livestock and pets, we will be OK.

My tests worked with saving, quitting, loading and restoring the list.  As long as a list was successfully created it should work fine.

for the undead.. could try doing something like this:
Quote
      if flags1.dead and unit.race ~= dwarf_race then
         local remove = false
         if flags2.slaughter then
            remove = true
         elseif unit.enemy.undead then
            remove = true
         elseif not unit.name.has_name then
            remove = true
         ...

crossmr

  • Bay Watcher
    • View Profile
    • Jeonsa
Re: DFHack 0.34.11 r3
« Reply #4129 on: June 22, 2013, 03:31:39 am »

... unfortunately that code didn't fix them. The missing organs disappeared again.. are there any scripts out there that actually work on restoring organs?

I tried to merge the various heal scripts floating around and tested it by trying to resurrect units in one of my test worlds.  I found that setting the body_part_status wouldn't stick unless I also reset the body.components.body_layer_*** values that Urist posted about.  However, setting those with a for ipairs/pairs loop wouldn't stick either but would stick with for idx=0,length,1 do unit.body.components.body_layer_***[idx] = 0.  Getting the body_layer_*** vectors to stick, the body_part_status would then stick (with either type of loop).  Resurrecting a unit is not completely tested but appears to work at the moment.

Spoiler: fullheal.lua (click to show/hide)
EDIT: please be sure to make a backup before testing (especially when testing the resurrection part)

Okay, well so far so good. Not a lot of time to test right now, but after work I'll run it for a bit and see if it sticks.
I ran the squad around a little and he didn't break right away. I never noticed how long it took to reset before.

Just to report back, this seems to have done the trick. Spine is replaced, and after extensive play, and many dead goblins it hasn't reappeared.
Logged

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4130 on: June 22, 2013, 03:45:14 am »

...

Okay, well so far so good. Not a lot of time to test right now, but after work I'll run it for a bit and see if it sticks.
I ran the squad around a little and he didn't break right away. I never noticed how long it took to reset before.

Just to report back, this seems to have done the trick. Spine is replaced, and after extensive play, and many dead goblins it hasn't reappeared.

Awesome!

CaptainArchmage

  • Bay Watcher
  • Profile Pic has Changed! Sorry for the Delay.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4131 on: June 22, 2013, 07:18:55 am »

I'm now playing Moltenchannels with your script. There are now only 811 units in the list between citizens, pets/livestock, others, and dead/missing.

If I save the game without restoring the dead units, will I still be able to restore them?

Problem I've noticed: Lots of dwarf corpses are showing. These are the un-named beings that siege your fortress when the undead come. Is it possible to get rid of those as well?

It may help if we have a binary patch to fix this problem once and for all. However, at this rate unless we get 189 more named dead or dead dwarves, citizens, traders, or other livestock and pets, we will be OK.

My tests worked with saving, quitting, loading and restoring the list.  As long as a list was successfully created it should work fine.

for the undead.. could try doing something like this:
Quote
      if flags1.dead and unit.race ~= dwarf_race then
         local remove = false
         if flags2.slaughter then
            remove = true
         elseif unit.enemy.undead then
            remove = true
         elseif not unit.name.has_name then
            remove = true
         ...


Thanks! Is there a way to stop dwarf corpses from the undead legions being placed in tombs?

How do you create binary patches? I've seen these have been used to fix the hospital overstocking. Is it possible to use binary patches to fix dwarves not getting married if the difference in age is more than 10 years, or the immigration slowing down after enough units arrive or walk into cage traps?

EDIT: THANK THE LORD! The dead units list is no longer dominated by previously undead dwarf corpses and arms. Now we can have 361 more dead citizens and pets, and live pets and merchants and citizens before stuff goes wrong. We can also get the carnage list on demand.
« Last Edit: June 22, 2013, 07:29:14 am by CaptainArchmage »
Logged
Given current events, I've altered my profile pic and I'm sorry it took so long to fix. If you find the old one on any of my accounts elsewhere on the internet, let me know by message (along with the specific site) and I'll fix. Can't link the revised avatar for some reason.

scamtank

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4132 on: June 22, 2013, 07:37:06 am »

How do you create binary patches? I've seen these have been used to fix the hospital overstocking.

You just use a hex editor and adjust certain values according to the instructions that Quietust or some other codelord posted somewhere like the bug tracker. I personally use the Notepad++ plugin.
Logged

Mr S

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4133 on: June 22, 2013, 08:53:28 am »

That's not so much a binpatch as using a hex editor to get your hands dirty yourself.  Both do the same thing in the end, but a pre-packaged binpatch keeps you from fat fingering your own edits.

CREATING said binpatch is another question.  There are a couple of ways to make one, and I suppose depends on what method of applying the patch will be used.  As always, be careful of error checking, garbage collection and edge cases whenever possible.
Logged

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4134 on: June 22, 2013, 12:34:57 pm »

Is it possible to
A) change the flags of an off-site unit, if their ID is known

and

B) kill them, making the game think they were killed by someone in particular
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

sonerohi

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4135 on: June 22, 2013, 03:54:38 pm »

So, I am back with more questions. To save myself a little time and frustration, I made a text document called dfhack.init in my main dwarf fortress folder. The text for it is the following
Spoiler (click to show/hide)

It applies the armory fix on start up, but nothing else. I'm guessing I did not do it right, but I'll be honest about not understanding what is wrong. If someone could show me an example that would fix the binpatches, and one for the tweaks then I can apply the changes across the rest. Also, not sure if I did growthbug right. It is called growthbug.lua in my scripts folder, and is just a text document containing Putnams code. And when I say text documents, by the way, I mean they open with notepad and have the .txt ending.
Logged
I picked up the stone and carved my name into the wind.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4136 on: June 22, 2013, 04:00:01 pm »

Put them all on different lines

sonerohi

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4137 on: June 22, 2013, 04:24:40 pm »

Seriously that is all? Daaaaaang. Thank you very much for the help and for your code.
Logged
I picked up the stone and carved my name into the wind.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4138 on: June 22, 2013, 04:31:23 pm »

The growthbug should be in init.lua in the raw folder, btw; better would be to use Kurik Amudnil's ruby code and have it in your dfhack.init

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4139 on: June 22, 2013, 05:15:02 pm »

Is it possible to
A) change the flags of an off-site unit, if their ID is known

and

B) kill them, making the game think they were killed by someone in particular

possibly, but its complicated.  The unit would have to be found in units.all.  change their unit.flags1.dead to true, choose a cause of death, create a death_info, giving the unit the death_info.id.  If unit is a historical figure then the historical figure would need to be updated with time of death, and create a histrory_event_hist_figure_diedst.  The history event could probably be ignored but then engravers wouldn't be able to make artwork related to the event.  There might also be other considerations too (weapon used?) but that is a rough outline.

EDIT:  if the unit doesn't exist in units.all then they can only die by way of historical figure and history event.  If not a historical figure, then no way to kill them. However, the slayer may have someplace to record the deed.
« Last Edit: June 22, 2013, 05:26:48 pm by Kurik Amudnil »
Logged
Pages: 1 ... 274 275 [276] 277 278 ... 373