Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 96 97 [98] 99 100 ... 244

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

taleden

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1455 on: September 15, 2018, 12:41:08 pm »

I realize real-world bird eggs must be fertilized prior to laying, I just misunderstood the wiki's description of how DF simulates it (where it does actually say "the male must be able to path to the eggs to fertilize," strongly implying that fertilization happens after laying). Regardless, the issue with the current vanilla mechanics is that it's nigh impossible to maintain a consistent bird breeding program with even a single hen per species.

In theory it should be doable by keeping exactly 13 adults all the time (including the breeding pair with its nest box) and 9 hatchlings per clutch; with four clutches per year that makes 36 chicks + 13 adults at any given time, which is just within the default bounds (13 + 36 < 50; 36 / (13 + 36) < 75%). That should allow exactly 9 to be slaughtered consistently every season in order to stay within bounds and keep getting fertile clutches.

But in practice this doesn't work because when the fourth clutch hatches the population will be over 50 for at least a few days until the newly matured adults can be slaughtered, and during those few days the next clutch will already be laid and flagged infertile because the population is over limit. So it would be great if DFhack could provide a mechanism to periodically check for this situation and, when the slaughtering is all done and the population is back under limit, change the eggs' flag to fertile.
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1456 on: September 15, 2018, 01:37:27 pm »

Well the wiki is clearly wrong on that, as my poults can attest *goes to edit*. The male must be able to meet up with the female to get them pregnant, as with all other females in-game. (it also suggests fertilization chances might differ per animal, which is ..new claim to me.)

Also, the 75% ratio isn't checked for eggs; shown as I had 3 hens to something like 36 chicks at the time second set of eggs.
« Last Edit: September 15, 2018, 01:39:59 pm by Fleeting Frames »
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1457 on: September 15, 2018, 02:40:41 pm »

Screwing around to see if it possible to send different squads from a different civ in fort mode using dfhack, if possible it opens up to an idea of building and training a group of mercenaries for other civs.

from what I tested it is totally possible to just send a squad over to attack or explore sites for you if you lack any squads of your own.
sadly my next big hurdle is solving for
Code: [Select]
df.global.gview.view.child.child.squad_unk
as if I don't have this align with the new squad that's been added the game will crash. which means making a script that checks the list of how many squads there are and inserting them to the Gview squad pool, and also equally inserting a new squad_unk for each of 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

zaporozhets

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1458 on: September 15, 2018, 10:28:31 pm »

Is it currently known if it's possible to manually trigger a cave-in check after a tiletype change or, failing that, how to complete a remove construction job without a worker unit in proximity in order to trigger one automatically?

Attempted to set df.world.cavein_flags and job.completion_timer with no luck respectively, didn't find anything that looked relevant in map_block fields or df.job/unit.job.current_job fields and I'm out of ideas as to how to get these free floating floors to collapse.

Input from someone more experienced would be appreciated.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1459 on: September 16, 2018, 03:51:38 am »

I have no idea if it works, but have you tried changing the DF settings to disable cave-ins, remove what you want to remove, save, exit, enable cave-ins, and start your save again? I generally set up my cave-ins to be triggered by a lever pull removing a support.
Logged

Kat

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1460 on: September 16, 2018, 04:30:14 am »

I see that DfHack has a thing to adjust dwarfs preferences. the "pref-adjust" script.

I am wondering if it is possible, to make a similar script, that I could use to insert a preference for my drow civilisation - I have a couple citizens who have food preferences for things that are not available locally or from any of the caravans. I just want to insert a preference for one of the common drinks, not alter any of their other preferences.

And if so, how, because I find the script language very difficult to understand.

if it helps, the drink I want is made from the plant "RHENAYAS_DROW_LICHEN_BLUE"
Logged

zaporozhets

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1461 on: September 16, 2018, 11:49:59 am »

I have no idea if it works, but have you tried changing the DF settings to disable cave-ins, remove what you want to remove, save, exit, enable cave-ins, and start your save again? I generally set up my cave-ins to be triggered by a lever pull removing a support.

I can see why that might work, but unfortunately it's for a script mod with explosive weapons and I'm trying to get them to be able to "destroy" constructions during combat, rather than a specific thing I want gone.
ATM the script just does a check in a square around the point of impact and changes any walls found into floors.
This works well enough for my purposes, but messing about with this in the arena made me realize that it could leave stranded floating floors with no supports and so the cave-in would need to ideally be triggered straight away, either by manual invocation of the check or by utilizing an artificially created and completed "remove construction" job rather than changing tiletype.
Using the 'job method' I've gotten as far as creating the job (the construction is flashing), but I haven't yet managed to get it to complete artificially.

Thank you for your help nonetheless.

Edit: As an update to this, I've gotten as far as being able to complete a deconstruct job artificially and trigger the cave-in some of the time, but I've no real idea as to what determines if it works or not.

Edit2: No longer bothering with the synthesized job stuff, figured out how to trigger cave-ins by setting df.global.world.cavein_flags[0] and df.global.world.map.map_block_columns[].flags[0] to true, seems to be producing small amounts of magma, which is strange.
« Last Edit: September 16, 2018, 08:02:43 pm by zaporozhets »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1462 on: September 16, 2018, 12:00:22 pm »

@Kat

I think this script might work
Code: [Select]
[code]
function z ()
 local unit = dfhack.gui.getSelectedUnit (true)
 local material = dfhack.matinfo.find ("PLANT:SINGLE-GRAIN_WHEAT:DRINK")

 local preference = df.unit_preference:new ()
 preference.type = df.unit_preference.T_type.LikeFood
 preference.item_type = df.item_type.DRINK
 preference.item_subtype = -1
 preference.mattype = material.type
 preference.matindex = material.index
 preference.mat_state = df.matter_state.Solid  --  Stupid for drinks, but everything seems to be specified as solid
 preference.active = true
 preference.prefstring_seed = 1  --  Or whatever
         
 unit.status.current_soul.preferences:insert ("#", preference)
end

z ()
[/code]

You'd have to replace "SINGLE-GRAIN_WHEAT" in the string on the third line with your plant name.
At least it added single-grain wheat beer to my test subject's preferences in addition to the pre-existing prickleberry one. Note that the unit to be subjected to the script has to be selected with 'v' or in the units list.
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1463 on: September 16, 2018, 11:34:45 pm »

Question about iterating through active jobs: Looking in my save, there's 438 elements in job list linkedlist, and 379 not-dead/547 total in job_postings. I've also seen both used in places(isPlantMarked, Altaree's priority.lua respectively). Which is more 'proper' to use?

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1464 on: September 16, 2018, 11:42:34 pm »

job_postings is used to track some limited data about future jobs, not current jobs. If you want actual jobs, use job_list.
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.

thefinn

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1465 on: September 17, 2018, 06:56:54 am »

What ever happened to being able to set AUTODUMP on a stockpile? (Like you can with AUTOMELT and AUTOTRADE)

That used to be incredibly useful.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1466 on: September 17, 2018, 08:30:56 am »

"enable autodump"
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.

taleden

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1467 on: September 17, 2018, 08:34:18 am »

Also, the 75% ratio isn't checked for eggs; shown as I had 3 hens to something like 36 chicks at the time second set of eggs.

I'm not sure that's true; I tried slaughtering all my extra adult turkeys and the next clutch was infertile, even though their total population including the newest poults was under 50. So something other than the species population cap is causing eggs to remain infertile even from two fertile adults, and the only other such mechanic I've ever heard of is the 75% child rule.
Logged

thefinn

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1468 on: September 17, 2018, 09:00:08 am »

Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1469 on: September 17, 2018, 12:41:14 pm »

@taledan:

When did you slaughter? I suspect that poultry, once pregnant, can't get pregnant again until they stop being pregnant, which means you might have had the previous batch laid in later half of pregnancy.

I can provide saves for both turkey hens being pregnant and having laid eggs after first set hatched and of second clutch of turkey poults hatching with no turkey hens of gobblers alive (though as I've seen, that's not something to rely on).
Pages: 1 ... 96 97 [98] 99 100 ... 244