Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 259 260 [261] 262 263 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1456807 times)

ORCACommander

  • Bay Watcher
  • [ETHIC:TORTURE_ELVES: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3900 on: May 31, 2013, 09:21:55 am »

ya i just marked 91 turkies for slaughter.... thank you autobutcher
Logged

kingubu

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3901 on: May 31, 2013, 11:37:00 am »

ya i just marked 91 turkies for slaughter.... thank you autobutcher

Did they produce any bones?  I'm trying to track down a growth bug.  If they were all born in the fort there should have been zero bones produced.  TIA!
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3902 on: May 31, 2013, 01:25:55 pm »

Was body.physical_attr_tissues mislabeled/misidentified in DFHack? It currently returns a vector of STRENGTH, AGILITY, TOUGHNESS, ENDURANCE, RECUPERATION, and DISEASE_RESISTANCE. However, the behaviour as described above doesn't quite match.

Misidentified is a too strong word. You should understand that unless some relevant code was directly checked (and sometimes even then), everything is a guess based on what the values looked like when checked. From the history it follows that the contents looked as if correlated to the attributes; and then later I noticed the first two values were correlated to the amount of muscle & vascular (blood) tissue, hence the current name. In general, a somewhat wrong but substantiated guess is better than just 'unknown', because it represents at least some information.

If you can figure out more about these fields, it can be updated and made even better ;)

Edit: IIRC, the specific reason it was renamed from physical_attr_unk to physical_attr_tissues is because I reverse-engineered this bit of code from the unit speed calculation, and using 'unknown' vars in code doesn't look nice:

https://github.com/peterix/dfhack/blob/master/library/modules/Units.cpp#L1213
« Last Edit: May 31, 2013, 01:32:56 pm by ag »
Logged

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3903 on: May 31, 2013, 01:53:34 pm »

Was body.physical_attr_tissues mislabeled/misidentified in DFHack? It currently returns a vector of STRENGTH, AGILITY, TOUGHNESS, ENDURANCE, RECUPERATION, and DISEASE_RESISTANCE. However, the behaviour as described above doesn't quite match.

Angavrilov investigated this and made the change (from "unknown") back in Sep 09, 2012 to df.units.xml.

Misidentified is a too strong word. You should understand that unless some relevant code was directly checked (and sometimes even then), everything is a guess based on what the values looked like when checked. From the history it follows that the contents looked as if correlated to the attributes; and then later I noticed the first two values were correlated to the amount of muscle & vascular (blood) tissue, hence the current name. In general, a somewhat wrong but substantiated guess is better than just 'unknown', because it represents at least some information.

If you can figure out more about these fields, it can be updated and made even better ;)

Edit: IIRC, the specific reason it was renamed from physical_attr_unk to physical_attr_tissues is because I reverse-engineered this bit of code from the unit speed calculation, and using 'unknown' vars in code doesn't look nice:

https://github.com/peterix/dfhack/blob/master/library/modules/Units.cpp#L1213

Thank you for clarifying the history of the naming.

If anyone wants to verify my results, this is approximately what I did:

for pressure plate size:
build a pressure plate with a creature trigger (I included the citizen flag), pasture the creature in question on the pressure plate.  set the pressure plate's plate_info.unit_min and plate_info.unit_max = unit.body.physical_attr_tissues[0], advance one frame and observe that plate.state == 101, vary plate.plate_info.unit_min and unit_max to not include unit.body.physical_attr_tissues[0] (advance a frame after changes) and observe plate.state begins to decrease as the trigger is no longer satisfied.  Return to plate.plate_info.unit_min == plate.plate_info.unit_max == unit.body.physical_attr_tissues[0] and plate.state returns to 101, vary unit.body.physical_attr_tissues[0] outside the unit_min unit_max range and plate_state again will count down to zero.

for butcher product results:
set unit.body.blood_max = 282 , unit.body.physical_attr_tissues[1] = 282, butcher, receive no bones
set unit.body.blood_max = 283 , unit.body.physical_attr_tissues[1] = 282, butcher, receive no bones
set unit.body.blood_max = 282 , unit.body.physical_attr_tissues[1] = 283, butcher, receive stack of 4 bones
set unit.body.blood_max = 1, unit.body.physical_attr_tissues[1] = 1000000, butcher, receive lots more stuff

*edit - fix wrong index for butcher products (to clarify index 0 == enum STRENGTH == pressure plate trigger / something to do with muscle mass ; index 1 == enum AGILITY == butcher product size / something to do with vascular tissue mass)
« Last Edit: May 31, 2013, 02:33:25 pm by Kurik Amudnil »
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3904 on: May 31, 2013, 01:56:28 pm »

2 - There is a bugfix script that restores guild reps and elven diplomats. I've never seen an elven diplomat show up with the caravan. I have gotten the guild rep. I've also read in other places that there is a hot fix for the exe to restore bodyguards for diplomats (and I assume guild reps). Is that hot fix compatible with DFhack or is there another way with DFhack to restore those bodyguards?

Can you give a link to this info?  (I doubt your question can be answered without it.)
Logged

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3905 on: May 31, 2013, 02:32:53 pm »

It's fixdiplomats and fixmerchants, I think.
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?

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #3906 on: May 31, 2013, 04:41:27 pm »

There is a bugfix script that restores guild reps and elven diplomats. I've never seen an elven diplomat show up with the caravan. I have gotten the guild rep.
Elven diplomats don't show up with the caravan - they show up a few weeks before or after it. They also don't show up until you have a baron.

I've also read in other places that there is a hot fix for the exe to restore bodyguards for diplomats (and I assume guild reps). Is that hot fix compatible with DFhack or is there another way with DFhack to restore those bodyguards?

The diplomat bodyguard fix is a 1-byte binary patch for the Win32 version of DF and can be found in the bug report. It is currently not available for Linux or MacOS (because the patch hasn't been ported to those versions), and it doesn't come with DFHack itself (so you'll have to apply it manually).
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.

crossmr

  • Bay Watcher
    • View Profile
    • Jeonsa
Re: DFHack 0.34.11 r3
« Reply #3907 on: May 31, 2013, 06:39:25 pm »

There is a bugfix script that restores guild reps and elven diplomats. I've never seen an elven diplomat show up with the caravan. I have gotten the guild rep.
Elven diplomats don't show up with the caravan - they show up a few weeks before or after it. They also don't show up until you have a baron.

I've also read in other places that there is a hot fix for the exe to restore bodyguards for diplomats (and I assume guild reps). Is that hot fix compatible with DFhack or is there another way with DFhack to restore those bodyguards?

The diplomat bodyguard fix is a 1-byte binary patch for the Win32 version of DF and can be found in the bug report. It is currently not available for Linux or MacOS (because the patch hasn't been ported to those versions), and it doesn't come with DFHack itself (so you'll have to apply it manually).

Thanks. It was this that I'd come across:
http://dffd.wimbli.com/file.php?id=6741

It says it's compatible with Dfhack, anyone use it? Can I just replace the exe with current version of dfhack and I'm good to go?
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3908 on: May 31, 2013, 07:15:51 pm »

Yep, this does work.  I included this version in my expanded LNP with an extra hex edit to keep mouse fortress compatibility (though it's less useful now that the mousequery plugin has grown up).  Dfhack and every other utility included - which is many - still work perfectly, as far as I can tell.  It might be the most-changed vanilla version around...
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

crossmr

  • Bay Watcher
    • View Profile
    • Jeonsa
Re: DFHack 0.34.11 r3
« Reply #3909 on: May 31, 2013, 10:47:21 pm »

Does it only add bodyguards to human diplomats? Do guild reps, elven diplomats and liaisons get guards?
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #3910 on: June 01, 2013, 12:17:27 am »

Quote
still work perfectly, as far as I can tell.

I run the version with binary patches in MasterworkDF, and I include more or less all the utilities. All do work, no worries, it causes no issues.
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 #3911 on: June 01, 2013, 12:55:50 am »

OK, say we have creatures A and B. They are any creature in the game that have different BODY_SIZE. Body shape/parts doesn't matter. Each has the properties unit.body.physical_attr_tissues[X], abbreviated as A0, A1, ..., B0, B1, etc.

A0/B0 ~= BodySize(A)/BodySize(B)
A1/B1 ~= BodySize(A)/BodySize(B)
A2/B2 ~= BodySize(A)/BodySize(B)^(2/3)
A3/B3 ~= BodySize(A)/BodySize(B)^(2/3)
A4/B4 ~= BodySize(A)/BodySize(B)^(1/3)
A5/B5 ~= BodySize(A)/BodySize(B)^(1/3)

0 and 1 are identical for inorganic creatures.
2 and 3 are identical for inorganic creatures.
4 and 5 are identical for inorganic creatures.

When the three pairs are not identical (ie. organic creatures), the difference is somehow related to strength and perhaps other variables as well.

When a dwarf was given 5000 strength via RAW file:
A0/A1=2.041~=2
A2/A3=1.608~=2^(2/3)
A4/A5=1.271~=2^(1/3)

When a dwarf was given 0 strength via RAW file:
A0/A1=0.7915
A2/A3=0.857=0.7915^(2/3)
A4/A5=0.925=0.7915^(1/3)

Considering that BODY_SIZE is a volume unit, this looks like some kind of Square-cube law data. 0 and 1 are volume related, 2 and 3 are area related, 4 and 5 are length related. The difference between 0 and 1 are something like "The creature is actually this big, but has the strength and weight of something this big". Inorganic creatures don't have muscle tissue with [THICKENS_ON_STRENGTH].

EDIT:
If I disable [THICKENS_ON_ENERGY_STORAGE] and [THICKENS_ON_STRENGTH] in tissue_template_default.txt, then organic creatures suddenly have identical (0,1), (2,3), (4,5) pairs when created in the arena.

unit.body.physical_attr_tissues[0] is creature volume corrected for thickness of muscle and fat tissue.
unit.body.physical_attr_tissues[1] is base creature volume (adjusted from racial volume by appearance modifiers)
unit.body.physical_attr_tissues[2] is corrected area?
unit.body.physical_attr_tissues[3] is base area?
unit.body.physical_attr_tissues[4] is corrected length/height?
unit.body.physical_attr_tissues[5] is base length/height?

I haven't yet found any effects of changing properties 2-5.
« Last Edit: June 01, 2013, 11:35:23 am by Urist Da Vinci »
Logged

crossmr

  • Bay Watcher
    • View Profile
    • Jeonsa
Re: DFHack 0.34.11 r3
« Reply #3912 on: June 01, 2013, 01:10:32 am »

any kind of toggle we can throw on a caravan to make it think it should still trade? Some of them are so sensitive that a stiff breeze makes them stop trading.
Logged

crossmr

  • Bay Watcher
    • View Profile
    • Jeonsa
Re: DFHack 0.34.11 r3
« Reply #3913 on: June 01, 2013, 09:03:55 pm »

I'm guessing something about unit wounds changed? I just tried another script that is supposed to fix ability to stand lost
Code: [Select]
repairhim = lambda { |u|
    # dirty
    if u.body.wounds.count > 0 then
      u.body.wounds = []
      puts "supermedic: cleared all wounds."
    end
    if u.status2.able_stand < 2 then
      u.status2.able_stand = 2
      puts "supermedic: repaired lost stand ability."
    end
    if u.status2.able_stand_impair < 2 then
      u.status2.able_stand_impair = 2
      puts "supermedic: repaired impaired stand ability."
    end
    # maybe dirty
    if u.job.current_job.job_type == :Rest then
      u.job.current_job.job_type = :CleanSelf
      puts "supermedic: released from 'Rest' job."
    end
}

if him = df.unit_find then
  repairhim[him]
end
but right away it throws an error on "able_stand"
Logged

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3914 on: June 02, 2013, 01:24:11 am »

I'm guessing something about unit wounds changed? I just tried another script that is supposed to fix ability to stand lost
Code: [Select]
repairhim = lambda { |u|
    # dirty
    if u.body.wounds.count > 0 then
      u.body.wounds = []
      puts "supermedic: cleared all wounds."
    end
    if u.status2.able_stand < 2 then
      u.status2.able_stand = 2
      puts "supermedic: repaired lost stand ability."
    end
    if u.status2.able_stand_impair < 2 then
      u.status2.able_stand_impair = 2
      puts "supermedic: repaired impaired stand ability."
    end
    # maybe dirty
    if u.job.current_job.job_type == :Rest then
      u.job.current_job.job_type = :CleanSelf
      puts "supermedic: released from 'Rest' job."
    end
}

if him = df.unit_find then
  repairhim[him]
end
but right away it throws an error on "able_stand"

able_stand was renamed to limbs_stand_max and able_stand_impair was renamed to limbs_stand_count
Pages: 1 ... 259 260 [261] 262 263 ... 373