Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 120 121 [122] 123 124 ... 244

Author Topic: DFHack 50.14-r1.1  (Read 892373 times)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1815 on: July 06, 2019, 12:15:44 pm »

I don't think you can change single tiles, because it seems the tile itself doesn't specify the material, but rather references the layer  that does that (and, I presume, vein and inclusion to use, when appropriate).
This is correct. The "tiletypes" feature I was thinking of creates new veins on the fly to resolve this (but I don't know if it works for soil).
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1816 on: July 06, 2019, 04:18:30 pm »

I don't think you can change single tiles, because it seems the tile itself doesn't specify the material, but rather references the layer  that does that (and, I presume, vein and inclusion to use, when appropriate).
This is correct. The "tiletypes" feature I was thinking of creates new veins on the fly to resolve this (but I don't know if it works for soil).
I was wrong about veins and inclusions, as indicated by my previous post, as they're local to the map block, allowing for the creation of new ones (as you said). Given my brief fiddling with "builder", I see no reason why you can't create veins of soil, when you can create them out of milk of lime and refined metals: it ought to work with any inorganic material. However, soil vein floors didn't work for farming or sand extraction, as I mentioned, so there's little reason to do so. I'd expect "grass" won't grow of such soil either, although I didn't attempt to test that (the test bed save I used doesn't have any anywhere, anyway).
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1817 on: July 10, 2019, 06:59:09 pm »

A test build with a fix (hopefully) for a stonesense wagon-related crash is up at https://github.com/DFHack/stonesense/issues/54#issuecomment-510273737 if anyone here is interested in testing that.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

VislarRn

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1818 on: July 12, 2019, 10:06:49 am »

A test build with a fix (hopefully) for a stonesense wagon-related crash is up at https://github.com/DFHack/stonesense/issues/54#issuecomment-510273737 if anyone here is interested in testing that.

Tried it yesterday. No more wagon crashes from my side anymore.   :)
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1819 on: July 14, 2019, 02:56:53 pm »

Hey, couldn't find it on my own, but asking JIC, does anybody know where is stored/how do I get the minimum floorspace for a dance?

(Pondering what's the largest minimum floorspace for all dances in fort in my given world.)

ibanix

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1820 on: July 16, 2019, 03:44:37 pm »

Is anyone else using the 'emigration' script?  (https://dfhack.readthedocs.io/en/stable/docs/_auto/base.html?highlight=emigration#emigration)

Everytime I enable this, half my dwarves leave, even with low stress levels.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1821 on: July 17, 2019, 06:50:19 am »

Spoiler: egg splicing script (click to show/hide)
well here's a script for implanting an adventurer's genes into an egg for reasons I can't grasp be warn it's probably for the best to change the mother genes to father genes if you don't want the game to crash trying to grasp the horror's true form
oh and probably should poke around their genes after birth as some times their colors could hit the 1000 to 6000 range which I guess is probably why the game crashes on looking at them.
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

ragundo

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1822 on: July 18, 2019, 02:44:08 pm »

Spoiler: egg splicing script (click to show/hide)
well here's a script for implanting an adventurer's genes into an egg for reasons I can't grasp be warn it's probably for the best to change the mother genes to father genes if you don't want the game to crash trying to grasp the horror's true form
oh and probably should poke around their genes after birth as some times their colors could hit the 1000 to 6000 range which I guess is probably why the game crashes on looking at them.

Hmmm.
Shouldn't you check that the item type that Invcheck return is a item_egg?. 

My unit has a inventory item of type 1, but is a item_weapon, not a item_egg, so no mother_genes, etc.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1823 on: July 21, 2019, 07:53:11 am »

Spoiler: egg splicing script (click to show/hide)
well here's a script for implanting an adventurer's genes into an egg for reasons I can't grasp be warn it's probably for the best to change the mother genes to father genes if you don't want the game to crash trying to grasp the horror's true form
oh and probably should poke around their genes after birth as some times their colors could hit the 1000 to 6000 range which I guess is probably why the game crashes on looking at them.

Hmmm.
Shouldn't you check that the item type that Invcheck return is a item_egg?. 

My unit has a inventory item of type 1, but is a item_weapon, not a item_egg, so no mother_genes, etc.
oh yeah forgot this script was made for adv mode, and that the person is holding no items but the egg itself, this probably wouldn't work universally in fort mode either.
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

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1824 on: July 24, 2019, 02:48:58 am »

Do the "migrants-now" and "force migrants" create said migrants from thin air (like the starting dwarves) or do they pull them from the already existing population?
Logged
Bring Kobold Kamp to LNP! graphics compatibility fix.

So the conclusion I'm getting here is that we use QSPs because dwarves can't pilot submarines.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1825 on: July 24, 2019, 07:17:09 am »

They use DF's migrant logic, which I believe does the latter most of the time, although that also means that they can do nothing at all if you've had too many migrants recently, among other things.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Atkana

  • Bay Watcher
  • [CURIOUSBEAST]
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1826 on: July 30, 2019, 07:54:52 am »

While digging into modtools/create-unit for one of my scripts (thank you whoever made those createFigure and createNemesis functions, you saved me a lot of time), I noticed a slight error but I'm too inept to work out how to have two separate pulls on the go at the same time so I'll just mention it here :P

For a historical figure, their unit_id2 is the ID for their nemesis. During createFigure, the created figure is instead being assigned the unit's id a second time. The differences between unit_id and unit_id2 is easy to miss because I think a bunch of the worldgen figures(?) happen to have unit and nemesis IDs that are the same value.

I think the only edits that need to be are:
  • In createFigure, remove hf.unit_id2 = trgunit.id so the historical figure's unit_id2 remains at the default value of -1 (at least, I think that's how it works, otherwise just make it assign -1 :b). Not that this edit is that vital.
  • In createNemesis, just before return nem add something like df.historical_figure.find(trgunit.hist_figure_id).unit_id2 = id
... or do something better than that. As far as I can tell, a historical figure that's attached to a unit always needs a nemesis, so it's fine to assume that createNemesis will always be used.

Edit: In the process of acquiring knowledge on how companions work that'll probably be invalidated come next update when that system is possibly getting overhauled, I've worked out a couple of anon values, but couldn't find/work out which file I was supposed to edit.
For a histfig_hf_link_companionst (which is a histfig_hf_link stored in a historical_figure's histfig_links), the value of anon_1 is the ID of the agreement that was made between the player and the companion to have them join the adventurer (see df.global.world.agreements), and the value of anon_2 is the ID of the party involved in that agreement that the historical figure that this histfig link is on appears in (not the party that the listed target_hf appears in)... if that makes any sense, I can try to elaborate a bit more if not :P

Edit Edit: I also figured out that unk_1, unk_2, and unk_3 in df.global.ui_advmode are the last x, y, and z coordinates of the adventurer's army (set/updated when the travel screen is opened, or you move on the travel screen)... then I discovered this was already known because it was used in questport Q.Q These style of coordinates are also anon_1, anon_2, and anon_3 in agreements, but I'm not sure if it represents the army position of one of the parties, or whether it just represents where the agreement took place.

Does anybody know how the army position style of coords are calculated? I'm fake generating some agreements and so need to know how to make the coords, otherwise I'll just slap in the adventurer's last army coords and call it good enough :P
« Last Edit: July 31, 2019, 05:00:19 am by Atkana »
Logged

strainer

  • Bay Watcher
  • Goatherd
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1827 on: August 03, 2019, 10:21:14 am »

That's good research on the Anons Atkana.

In the histfig structure, is it the case that unit_id2 should be set to the units nemesis_id ?
Its my understanding that the nemesis record normally just points to the unit and units histfig record rather than to a different unit.

Those scripts are maintained in their own little repo here: https://github.com/DFHack/scripts, and get imported to the central dfhack repo with the "git submodule update" commands. If you open a file in it on github and make a small edit, github automatically forks the repo so you can make a pull request quickly. Seems like it can all be done conviently online when logged into github account so that shouldnt have to complicate your local repos state.
Logged
Klok the Kloker !

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1828 on: August 03, 2019, 02:35:14 pm »

When I was reversing some code for assigning noble position, I remember that nemesis records were looked up by comparing historical_figure's unit_id2 with nemesis_record's id (not unit_id).
Logged

strainer

  • Bay Watcher
  • Goatherd
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1829 on: August 03, 2019, 03:30:37 pm »

Thanks - I just had to doublecheck. That nemesis structure is an odd thing, maybe it was designed once to allow units to pretend to be an other historical figure  :-\
Logged
Klok the Kloker !
Pages: 1 ... 120 121 [122] 123 124 ... 244