Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 361

Author Topic: DFHack 0.43.03-r1  (Read 706691 times)

FallenAngel

  • Bay Watcher
  • !!x(oᴥo)x!!
    • View Profile
Re: DFHack 0.34.11 r5
« Reply #15 on: June 20, 2014, 03:00:43 pm »

EDIT: Which plugin lets you manage jobs and check emotions? Because it doesn't seem to be on automatically.

I believe you're referring to "manipulator" (this is the ASCII version of Therapist, which you get by pressing u l) and "dwarfmonitor", which puts the colored numbers in the lower right corner of the main screen.

I was referring to the "manipulator", except pressing "u" shows no "l" option, and pressing "l" does as much as it does in normal DF when in the unit menu.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r5
« Reply #16 on: June 20, 2014, 03:13:40 pm »

I have a question, one that is rather important for MasterworkDF. Especially considering that I myself cannot code C++. Lua I understand a bit by now.

How much cross-compability exists between r4 and r5, and, if any assumptions can be made, how much updating will need to be done for the DF2014 release?

Where the r5 release has 36 scripts in the script folder, Masterwork has 151. If most of them break, a big portion of the mod becomes broken as well.

The advantage of a scripting language like lua or ruby is that you don't have to compile. This means that if there are few changes to DFHack, you don't have to change a thing. Plugins have to be compiled for exactly the right version.

The disadvantage is you don't get the advice (or runtime speed) of a compiler. You don't know until runtime whether it's accessing a variable that doesn't exist. When df-structures changes happen, it can break compatibility. Since df itself makes absolutely no backward compatibility for us (as it shouldn't), DFHack doesn't promise anything either.

The following link describes all of the changes in df-structures since the last release: https://github.com/DFHack/df-structures/compare/DFHack:d6bcaa991cfe9ab5a8031b1721d548a73258d7ed...DFHack:36e0b203de64dbd57deb39ca849fffc66cad8f54

Most of the changes only add newly identified variables, so they don't break backwards compatibility unless you were using a variable and referring to it by its temporary name without knowing what it does. I don't know if anything has been renamed. I think it would be a good policy for the future to document such changes for new releases. I'll try to do that.

You should also look at the changes in the Lua API, but that tends to be backwards compatible.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r5
« Reply #17 on: June 20, 2014, 03:25:10 pm »

EDIT: Which plugin lets you manage jobs and check emotions? Because it doesn't seem to be on automatically.

I believe you're referring to "manipulator" (this is the ASCII version of Therapist, which you get by pressing u l) and "dwarfmonitor", which puts the colored numbers in the lower right corner of the main screen.

I was referring to the "manipulator", except pressing "u" shows no "l" option, and pressing "l" does as much as it does in normal DF when in the unit menu.
That's because all plugins are disabled by default and must be explicitly enabled. You can automatically enable them by adding the appropriate commands to dfhack.init - see "dfhack.init-example" for more information.
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.

FallenAngel

  • Bay Watcher
  • !!x(oᴥo)x!!
    • View Profile
Re: DFHack 0.34.11 r5
« Reply #18 on: June 20, 2014, 03:57:19 pm »

EDIT: Which plugin lets you manage jobs and check emotions? Because it doesn't seem to be on automatically.

I believe you're referring to "manipulator" (this is the ASCII version of Therapist, which you get by pressing u l) and "dwarfmonitor", which puts the colored numbers in the lower right corner of the main screen.
Ah, thanks.
On an unrelated note, using invasion-now to make two dwarven sieges, I lost 3 of my starting 7. I forgot I gave them the axegun.
Time to see if four unhappy metal beings can duke it out with GOBLINS.
They don't have axeguns.

I was referring to the "manipulator", except pressing "u" shows no "l" option, and pressing "l" does as much as it does in normal DF when in the unit menu.
That's because all plugins are disabled by default and must be explicitly enabled. You can automatically enable them by adding the appropriate commands to dfhack.init - see "dfhack.init-example" for more information.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r5
« Reply #19 on: June 20, 2014, 04:33:59 pm »

Meph: I updated the main post with all of the renamed variables. It does not include newly discovered variables, just ones that had not-obviously-temporary-names that were changed. Took forever, but it's done now.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r5
« Reply #20 on: June 20, 2014, 04:47:34 pm »

Meph: I updated the main post with all of the renamed variables. It does not include newly discovered variables, just ones that had not-obviously-temporary-names that were changed. Took forever, but it's done now.
Thank you. :)
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 :::

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r5
« Reply #21 on: June 20, 2014, 06:01:14 pm »

By the way, to any experienced raw modders out there: what scripts are commonly used that are not included in DFHack by default? Scripts are pretty small, so as long as they work and are useful to a large number of people, they should be included. I know my way around DFHack internals, but I don't know as much about how stuff is used.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r5
« Reply #22 on: June 20, 2014, 07:34:19 pm »

I couldn't answer that, since I'm biased.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r5
« Reply #23 on: June 20, 2014, 07:41:25 pm »

What do you mean, biased? At least you know how the scripts are done. :P

Here my thoughts:
  • Autofixhandedness is a must, otherwise custom gloves cant be done.
  • Embark dwarves and embark points, for more dwarves/points at the start.
  • A script for skill training, I have several ones I use in the mod.
  • Boltguns conversion scripts. He can charm captured invaders and make civ members of them.
  • Everything Roses has written, ever. Seriously, they do so much for raw modders.
  • An announcements script.
  • Urist DaVincis scripts to add/remove materials and pets to civs.
  • Emigration by IndigoFenix, to handle unhappy dwarves.
  • Empregnate to replenish civ members.
  • Putnams Itemsyndrome, ProjectileExpansion, Gods, HackWish and more. Lots of this is basis for enchanted weapons, special ammo...
  • Force Event, also Putnam. Forces caravans, migrants, sieges... super useful for more interaction with the world, and to make reactions that might trigger a full blown attack. Good for bored people that want a challenge.
  • A feed script that sets hunger/thirst to 0, to allow keeping grazing animals indoor, which are fed manually.
  • Quietusts make-monarch, which allows people that play with low pop-limits to get kings. Usually you need 140 dwarves to trigger the possible arrival of the king, the script allows smaller forts to do that.
  • Add/Remove thoughts. Scripts that temper with thoughts, adding good or bad ones. Necessary for finer balancing, and to help save almost miserable dwarves.
  • Spawnunit is included now? Warmists creature spawning. This fixed the holy grail of modding, creating new units.

If you want any of them, I can have a look through my folder and send them to you/post them here. But most of them are in the dfhack script collection already. :)

IndigoFenix has written dozens of awesome features for the Masterwork Gnomes as well. Druidium and animal speech/taming, custom machines that allow turing complete setups (much easier than in vanilla), and for example a gun that shoots a cage as projectile and traps the unit it hits. Better ask him for details.... although he would have to write some form of readme. ^^
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 :::

greycat

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r5
« Reply #24 on: June 20, 2014, 08:17:07 pm »

How much cross-compability exists between r4 and r5, and, if any assumptions can be made, how much updating will need to be done for the DF2014 release?

Most of the changes only add newly identified variables, so they don't break backwards compatibility unless you were using a variable and referring to it by its temporary name without knowing what it does.

There are some scripts used in Masterwork that do refer to struct fields by their temporary names (anon_4, anon_5 and unk1 are the ones I have run across).  I don't have a full list, because I only fixed the ones that I actually ran across during my playing.  But here's what I have so far:

Code: [Select]
diff -ur MWDF-tmp/Dwarf Fortress/hack/scripts/construct-creature.lua MWDF/Dwarf
Fortress/hack/scripts/construct-creature.lua
--- MWDF-tmp/Dwarf Fortress/hack/scripts/construct-creature.lua 2014-03-28 10:06
:56.000000000 -0400
+++ MWDF/Dwarf Fortress/hack/scripts/construct-creature.lua     2014-06-13 21:04
:23.477664448 -0400
@@ -290,8 +290,8 @@
     --unit.relations.old_time=?? --TODO add normal age
     --[[ interataction stuff, probably timers ]]--
     local num_inter=#caste.body_info.interactions  -- new for interactions
-    unit.curse.anon_4:resize(num_inter) -- new for interactions
-    unit.curse.anon_5:resize(num_inter) -- new for interactions
+    unit.curse.own_interaction:resize(num_inter) -- new for interactions
+    unit.curse.own_interaction_delay:resize(num_inter) -- new for interactions
     --[[ body stuff ]]
     
     local body=unit.body

diff -ur MWDF-tmp/Dwarf Fortress/hack/scripts/itemsyndrome.lua MWDF/Dwarf Fortre
ss/hack/scripts/itemsyndrome.lua
--- MWDF-tmp/Dwarf Fortress/hack/scripts/itemsyndrome.lua       2014-06-08 17:29
:30.000000000 -0400
+++ MWDF/Dwarf Fortress/hack/scripts/itemsyndrome.lua   2014-06-19 10:07:05.4013
87096 -0400
@@ -120,7 +120,7 @@
     newSyndrome.year=df.global.cur_year
     newSyndrome.year_time=df.global.cur_year_tick
     newSyndrome.ticks=0
-    newSyndrome.unk1=0
+    newSyndrome.wound_id=0
        --newSyndrome.flags=0
     for k,v in ipairs(target_syndrome.ce) do
         local sympt=df.unit_syndrome.T_symptoms:new()

diff -ur MWDF-tmp/Dwarf Fortress/hack/scripts/spawnkid.lua MWDF/Dwarf Fortress/h
ack/scripts/spawnkid.lua
--- MWDF-tmp/Dwarf Fortress/hack/scripts/spawnkid.lua   2014-05-26 02:18:24.0000
00000 -0400
+++ MWDF/Dwarf Fortress/hack/scripts/spawnkid.lua       2014-06-14 13:06:34.231613947 -0400
@@ -163,7 +163,7 @@
     --todo set weapon bodypart
     
     local num_inter=#caste.body_info.interactions
-    unit.curse.anon_5:resize(num_inter)
+    unit.curse.own_interaction_delay:resize(num_inter)
     return unit
 end
 function findRace(name)

diff -ur MWDF-tmp/Dwarf Fortress/hack/scripts/spawn.lua MWDF/Dwarf Fortress/hack
/scripts/spawn.lua
--- MWDF-tmp/Dwarf Fortress/hack/scripts/spawn.lua      2014-06-07 06:49:20.0000
00000 -0400
+++ MWDF/Dwarf Fortress/hack/scripts/spawn.lua  2014-06-14 13:06:52.951893393 -0
400
@@ -97,8 +97,8 @@
     --unit.relations.old_time=?? --TODO add normal age
     --[[ interataction stuff, probably timers ]]--
     local num_inter=#caste.body_info.interactions  -- new for interactions
-    unit.curse.anon_4:resize(num_inter) -- new for interactions
-    unit.curse.anon_5:resize(num_inter) -- new for interactions
+    unit.curse.own_interaction:resize(num_inter) -- new for interactions
+    unit.curse.own_interaction_delay:resize(num_inter) -- new for interactions
     --[[ body stuff ]]
     
     local body=unit.body
@@ -190,7 +190,7 @@
     --todo set weapon bodypart
     
     local num_inter=#caste.body_info.interactions
-    unit.curse.anon_5:resize(num_inter)
+    unit.curse.own_interaction_delay:resize(num_inter)
     return unit
 end
 function findRace(name)

diff -ur MWDF-tmp/Dwarf Fortress/hack/scripts/spawnunit.lua MWDF/Dwarf Fortress/
hack/scripts/spawnunit.lua
--- MWDF-tmp/Dwarf Fortress/hack/scripts/spawnunit.lua  2014-06-11 10:12:17.0000
00000 -0400
+++ MWDF/Dwarf Fortress/hack/scripts/spawnunit.lua      2014-06-14 13:05:58.3110
77739 -0400
@@ -74,8 +74,8 @@
     end
     unit.sex=caste.gender
                local num_inter=#caste.body_info.interactions  -- new for interactions
-       unit.curse.anon_4:resize(num_inter) -- new for interactions
-       unit.curse.anon_5:resize(num_inter) -- new for interactions
+       unit.curse.own_interaction:resize(num_inter) -- new for interactions
+       unit.curse.own_interaction_delay:resize(num_inter) -- new for interactions
     local body=unit.body
     
     body.body_plan=caste.body_info
@@ -169,7 +169,7 @@
     df.global.world.units.other.ANY_ANIMAL:insert("#",unit)
 
     local num_inter=#caste.body_info.interactions
-    unit.curse.anon_5:resize(num_inter)
+    unit.curse.own_interaction_delay:resize(num_inter)
     return unit
 end
 function findRace(name)
Logged
Hell, if nobody's suffocated because of it, it hardly counts as a bug! -- StLeibowitz

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r5
« Reply #25 on: June 20, 2014, 08:38:49 pm »

FWIW, here's the scripts that I include in the Starter Pack that were not in r3 (excluding those in r5):

forceunit info viewer GUI, plugin to fix growthbug, forumdwarves, showunitsyndromes, removewearrepeat, feeding-timers

Edit:  particularly the growth-bug fix - url=https://github.com/KurikAmudnil/dfhack/tree/master/plugins/growthfix]here's the source[/url] - since it seems that r5 doesn't fix that at all.  I'll have to track down one of the script versions in the meantime. 
« Last Edit: June 20, 2014, 10:08:49 pm by PeridexisErrant »
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r5
« Reply #26 on: June 20, 2014, 09:07:18 pm »

unit.body.body_plan.attacks i.e. caste_attack appears to have problems. DFhack crashed when trying to printall the tissue_layer_idx. Other data such as the skill used for body part attacks is always printed as 0.

See https://github.com/angavrilov/df-structures/blob/master/df.creature-raws.xml#L559

Also see Quietust's post here: http://www.bay12forums.com/smf/index.php?topic=91166.msg4960241#msg4960241 and my preceding original research.

EDIT: contact_perc should be at offset 0xe8 according to my original research, but in R5 it is at 0xf8. Everything else is likewise shifted, which causes the errors. There is likely too many "specialattack" vectors defined (the things that Q found).
« Last Edit: June 20, 2014, 09:15:38 pm by Urist Da Vinci »
Logged

Japa

  • Bay Watcher
  • Spoopy time!
    • View Profile
Re: DFHack 0.34.11 r5
« Reply #27 on: June 20, 2014, 11:49:50 pm »

Stonesense should be updated in the next day or two.

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r5
« Reply #28 on: June 20, 2014, 11:58:48 pm »

Stonesense should be updated in the next day or two.

Excellent!
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: DFHack 0.34.11 r5
« Reply #29 on: June 21, 2014, 02:08:24 am »

Stonesense should be updated in the next day or two.

Any chance to make it compatible with Opengl (print_mode:standard) rendering on osx?

The problem seems to be that StoneSense does not support PRINT_MODE:STANDARD on OS X 10.9.
It crashes even on vanilla "dfhack 0.34.11 r3 for osx" if init/init.txt is changed to the PRINT_MODE:STANDARD.
TWBT needs PRINT_MODE:STANDARD or PRINT_MODE:SHADER to work, thus they are not compatible for now.

Seems like something only StoneSense developers can fix.
Pages: 1 [2] 3 4 ... 361