Bay 12 Games Forum

Please login or register.

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

Author Topic: What is a "decent meal"?  (Read 17127 times)

PatrikLundell

  • Bay Watcher
    • View Profile
Re: What is a "decent meal"?
« Reply #60 on: November 23, 2018, 06:36:32 am »

Milk: The cause of the naming problem is that milk and cheese doesn't use a prefix like other tissues do. Again, however, MySQL reports an error when I try to access Mantis for a bug report...
I believe I've managed to remove animal people from the list of eligible milk and cheese products, though.

The Creepy Crawler can be butchered because it doesn't have the [NOT_BUTCHERABLE] tag together with being large enough to generate meat when slaughtered.

The [FISHITEM] tag is set on every vermin fish, plus the moghopper. The only things I've found that sets the moghopper apart from the rest is that it can't be eaten (according to the wiki) and that it has a creature extract reaction.

I haven't looked at CASTE flags before, but there seems to be some general flags buried down there. It can be noted that the script still iterates over the raw strings for NON_BUTCHERABLE, for instance: I haven't changed that yet.

The updated version if the script. Note the variable "replace_vermin" at the top. It's set to "false", so the script behaves as before (minus some bugs). If the variable is changed to "true", the script should replace all non "fish" vermin (no Creepy Crawler, Mog Juice, or Dwarven Milk/Cheese as a collateral result).

Spoiler (click to show/hide)

Edit: I finally managed to file a bug report: http://www.bay12games.com/dwarves/mantisbt/view.php?id=10959
« Last Edit: November 23, 2018, 11:03:45 am by PatrikLundell »
Logged

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: What is a "decent meal"?
« Reply #61 on: November 23, 2018, 06:45:59 pm »

I think it works very good now. I needed to personalize it only by adding logging. Maybe also I will modify so vermin is changed to aquatic vermin, because that would be easier to fulfil, and I like to cheat.

Regarding moghopper, I don't believe it is inedible and I wanted to prove it (also wiki on moghopper says it's edible). However, I tried and failed to find an embark where moghopper is present in the population list. Actually, in most embarks (with unmodded game!) pools are empty since the beginning, and I can't fish anything. I'm not sure if it's my luck or some kind of a bug. Dwarves trying to catch a live fish vermin (using the Fishery workshop task) when pools are empty (i.e. in all my tested cases) will just stand somewhere in the corner till I cancel the task, even if they are hungry or thirsty...

Regarding the bug with milk and cheese: it seems impossible to easily modify it with RAW. I was able to correct it by changing c_variation_default.txt so it removed milk and cheese tags from all giant versions, and then manually adding milk and cheese tags to proper RAWs for female giant animals (I did it only for a few, to test it). The same could be done with animal men. It's too much work to be fun (the new tags need to be in proper place and sequence), but it's doable.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: What is a "decent meal"?
« Reply #62 on: November 24, 2018, 03:34:39 am »

The wiki page on vermin claims the moghopper is not edible, but yes, the page on the moghopper claims it is, so the pages are conflicting.
It can be noted that the raws for the creature makes it available only in summer, so for a "live" testing I'd consider removing the season restrictions. However, I've found pools to be surprisingly empty of vermin fish when a blasted mood require shells, forcing me to try some emergency fishing for pond turtles.

Your testing with the raws shows that it is possible to fix the bug with raws only, though, even if it's tedious, which is probably better than changing the code (especially if the community would do the work and Toady would accept the results). Personally I'd leave animal women out, as I don't think they should produce theoretically milkable but practically unavailable, milk (and hence cheese).
Logged

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: What is a "decent meal"?
« Reply #63 on: November 24, 2018, 06:06:54 am »

I tried proper live tests with moghopper at first - in my fort in summer, and then on new embark in new world, using spring time to prepare traps and workshops. But the only fish I can catch are in the rivers or oceans, not in the ponds. Maybe caverns are viable, but I don't fish there, instead buying cave fish from caravan.

The bug with milk is still a bug, even if in RAWs, and maybe it would actually need some code changes for easier modification, or rather generation of name? Currently names have to be explicitly declared, and giant/animal men versions simply copy the names from the base creature. You could name liquid cow's milk "a rainbow puke", frozen one "elixir of youth No.5" and gaseous "bar of soap", and if the giant cows existed their milk would be named the same.

After some tries I find that the best modification to me is these steps:
1. extract raws of critters as the game sees them
2. modify raws of giant/animal men
3. overwrite original definition in the proper txt files with the new changes.

So for example in giant kangaroo's case, find the giant kangaroo in creature_temperate_new.txt, remove [CREATURE:GIANT_KANGAROO] and everything below to the line about sponsorship of koala's, and insert
Spoiler (click to show/hide)

Sure, this way the giant kangaroo's definition is divorced from the base creature's definition, but at least the only thing which changes from the game's perspective is the only thing I want to have changed. This is also guaranteed to be save compatible, while I'm not so sure about the product of tag changing, which is prone to mistakes. This can be automated by a script, but since this script would need testing anyway, maybe it's not worth doing, time-wise. Besides, manually changing can help in finding bugs in RAW definition (for example giant koala doesn't have opening bracket in GENERAL_CHILD_NAME tag, so the tag is not applied, and giant koalas don't have specific names for young, I found out only because it is just after kangaroos).

The new definition of giant kangaroo takes 5815 characters, the original definition has 1039 characters. Downside is that the file size is bigger, but file size would have to be bigger anyway, if the strings are to be changed.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: What is a "decent meal"?
« Reply #64 on: November 24, 2018, 07:51:42 am »

If I was to change the code in a limited way, I'd use wildcards such that generic milk would be defined as "*milk"/"frozen *milk"/etc. and the parsing of the RAWS replacing '*' with the name of the creature in possessive form (i.e."'s") followed by a blank (allowing for very generic milk being called "milk" rather than " milk"). I'd allow this to be overridden both by a [WILDCARD] tag (similar to the current [PREFIX]) and possibly by specific string tag overrides. Purring Maggot would have a [WILDCARD] of "Dwarf" for both milk and cheese. However, it's Toady who'd have to do code changes.
Logged

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: What is a "decent meal"?
« Reply #65 on: November 24, 2018, 08:09:33 am »

Eh, I've checked all RAWs, and there are only four species which produce both milk and animal/giant version. I thought there are more. So it is perfectly possible to change it manually without a script, heh. These animals are both kind of camel, kangaroo and tapir. Probably modded versions of RAWs would need more, and they can use more work, but vanilla is pretty easy as it is.

Yes, Toady could think about using some tags which use more intelligent parsing and renaming, as you suggest, especially since he likes these variations. Funny thing with this purring maggot, good that dwarven women don't produce milk, would be confusing.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: What is a "decent meal"?
« Reply #66 on: November 24, 2018, 02:11:14 pm »

Dwarves being mammals, I assume dwarven women lactate while nursing their babies, but its all abstracted, and I don't see much point in simulating it beyond a nursing action for adventure mode offspring once that becomes possible. Only a small number of species have been bred to produce an excess of milk (and I don't believe kangaroos are among those: even milking them would be tricky, as I believe the teats are at the bottom of the pouch).
Logged

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: What is a "decent meal"?
« Reply #67 on: November 25, 2018, 01:13:48 pm »

I think this is abstracted too much now - when a dwarf woman is in depression and bears a baby, it is dropped down instantly and crawls around, until the mother comes to her senses and picks the baby up. It can take days, even a week, and the baby is still alive and well, before the mother pays attention to it for the first time. It makes life of an overseer easier, but means that the mother is kind of redundant.

I have compared amount of milk bigger kangaroos produce to amount of other animals, and even human females beat the bigger kangaroos in peak daily output. But the giant kangaroos in DF are much bigger, and since kangaroos (no matter size) lactate for longer than humans, and can feed even three different sized children at the same time, I believe that dwarves would find a way to utilise them. But why giant kangaroos (or tapirs) are milk producers in DF, but not for example giant goat mountain or giant goat I cannot fathom.
Logged

Cjenz

  • Escaped Lunatic
    • View Profile
Re: What is a "decent meal"?
« Reply #68 on: January 16, 2019, 09:07:19 pm »

@Saiko Kila:

Bananas: I hack bananas to yield wood and I hack all surface biomes to contain all eligible plants and animals... This means it's only a matter of time before they show up in my embark (which is carefully created [and hacked] to contain 9 biomes, although only 6 is needed to get all boozable plants).


9 biomes in one sounds quite FUN. Any chance of a link to a hacked map which contains one such dwarven playground?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: What is a "decent meal"?
« Reply #69 on: January 17, 2019, 03:20:12 am »

@Saiko Kila:

Bananas: I hack bananas to yield wood and I hack all surface biomes to contain all eligible plants and animals... This means it's only a matter of time before they show up in my embark (which is carefully created [and hacked] to contain 9 biomes, although only 6 is needed to get all boozable plants).


9 biomes in one sounds quite FUN. Any chance of a link to a hacked map which contains one such dwarven playground?

The world: https://www.dropbox.com/s/mgtay25ovjnuia0/Newhope%202.zip?dl=0
You'd embark in the north/center region (i.e. inside the "ocean" in the single good desert tile (towards the southern end of the area). Once your focus is in that world tile, you'd run this DFHack script:
Spoiler (click to show/hide)

The script hacks the mid level tiles to generate a 3*3 area with 9 biomes close to the center of the map, which is the intended embark area. Note that the effects of the script are removed if you move the focus to a different world tile and back (but you can run the script again). It's possible to generate the same kind of multi region embark using the Region Manipulator, but this script predates that tool, as well as does exactly what I want with a single command.

Edit: I screwed up the zip file, and accidentally provided one with a bug report save. I've corrected the link above (the file names differ with a blank character...).
« Last Edit: January 18, 2019, 03:06:03 am by PatrikLundell »
Logged

em312s0n

  • Bay Watcher
    • View Profile
Re: What is a "decent meal"?
« Reply #70 on: April 12, 2020, 12:36:11 am »

I tried the updated script in 47.04 but its giving me a "...\Desktop\DF\Dwarf Fortress 0.47.04/hack/scripts/food.lua:250: Cannot read field BitArray<>.CASTE_COMMON_DOMESTIC: not found.
stack traceback:
        [C]: in metamethod '__index'
        ...\Desktop\DF\Dwarf Fortress 0.47.04/hack/scripts/food.lua:250: in global 'fix_food_needs'
        ...\Desktop\DF\Dwarf Fortress 0.47.04/hack/scripts/food.lua:594: in local 'script_code'
        ...0n\Desktop\DF\Dwarf Fortress 0.47.04\hack\lua\dfhack.lua:680: in function 'dfhack.run_script_with_env'
        (...tail calls...)"

Can you share if you've fixed it? thank you
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: What is a "decent meal"?
« Reply #71 on: April 12, 2020, 02:19:06 am »

I updated the script to handle changed flag names and a weird issue with vermin flags not working as one would think.

Spoiler (click to show/hide)
Logged

em312s0n

  • Bay Watcher
    • View Profile
Re: What is a "decent meal"?
« Reply #72 on: April 12, 2020, 04:29:04 am »

Awesome as always thanks. On another note ive just found that the workflow plugin can automate brewing of specific alcohol.

I first made a repeating brew from plant task from the still:
Spoiler (click to show/hide)

alt A to specify material then esc to set:
Spoiler (click to show/hide)

Alt W creates the workflow restriction and it lists the possible products so choose dwarven wine:
Spoiler (click to show/hide)

and it creates the restriction
Spoiler (click to show/hide)

you can just change the range to fit your fort's needs shift R:
Spoiler (click to show/hide)

now it will queue up the order when needed to your specific range so you can just set it then forget it:
Spoiler (click to show/hide)

Just posting it here just in case someone finds it useful

You can't do this with prepared foods sadly. I tried. Workflow can create the restriction but the building cant attach the task to the restriction. I think it has something to do with meals using multiple materials or maybe because the kitchen really only outputs roasts, stews etc not like the still where it outputs dwarven rum, beer, sewer brew, etc depending on the input material.
« Last Edit: April 12, 2020, 04:40:50 am by em312s0n »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: What is a "decent meal"?
« Reply #73 on: April 12, 2020, 07:28:53 am »

I don't know anything specific about Workflow, but it's definitely possible for a script to specify the ingredients to use for specific kitchen jobs. A restriction is that the first ingredient has to be solid.
Logged

em312s0n

  • Bay Watcher
    • View Profile
Re: What is a "decent meal"?
« Reply #74 on: April 12, 2020, 08:23:42 am »

I don't know anything specific about Workflow, but it's definitely possible for a script to specify the ingredients to use for specific kitchen jobs. A restriction is that the first ingredient has to be solid.

Sorry when I wrote restriction I meant the workflow constraint(maintain x amount of y type of items). restriction is just a term that I use in my head when I use workflow hehe.

So what I meant was I could create a workflow constraint saying "maintain 40-50 roasts with a plump helmet as ingredient":

Spoiler (click to show/hide)

and I can have the kitchen create an order specifying to create a roast with a plump helmet as ingredient with alt A

Spoiler (click to show/hide)

but workflow wouldnt link the order with the constraint:
Spoiler (click to show/hide)

on that example it would just make plump helmet roasts regardless of whether its within the set range or not.
Spoiler (click to show/hide)
« Last Edit: April 12, 2020, 08:38:55 am by em312s0n »
Logged
Pages: 1 ... 3 4 [5] 6