Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 330 331 [332] 333 334 ... 365

Author Topic: [MODDING] CREATURE & ENTITY QUESTIONS THREAD  (Read 646026 times)

Rekov

  • Bay Watcher
  • Elf Aficionado
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4965 on: March 14, 2021, 11:26:49 am »

The problem at its core is that you can't control the item token of the butchering/shearing yield.
The material token BUTCHER_SPECIAL lets you change the item that's created when something of that material is butchered from MEAT:NONE to whatever you want. If you want it to yield plants, use [BUTCHER_SPECIAL:PLANT:NONE].
I tried that, but when I set it to PLANT, the butchered remains lose their name and just show up as a stack of 11 nothing.

This sort of seems to work. The resulting stacks can be used for cooking, can be eaten raw, and do wither like plants. They lose their name though, and still can't be stockpiled.

Are there any examples in the default raw of non MEAT/GLOB tokens going into BUTCHER_SPECIAL?
« Last Edit: March 14, 2021, 11:33:24 am by Rekov »
Logged

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4966 on: March 15, 2021, 01:31:45 pm »

Perhaps not a generic plant, but use a very rare custom plant:

--PRODUCT:100:10:PLANT:NONE:PLANT_MAT:saltfromminerals:STRUCTURAL] --doesn't work, makes "plants (10)".
--PRODUCT:100:20:PLANT:NONE:PLANT_MAT:saltfromminerals:PLANT] --works
[PRODUCT:100:15:PLANT:NONE:PLANT_MAT:saltfromminerals:LEAF] --works
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884

Rekov

  • Bay Watcher
  • Elf Aficionado
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4967 on: March 15, 2021, 02:33:14 pm »

I'm not sure what you're referring to exactly. The BUTCHER_SPECIAL token only takes an item token, not a material token.

I've tested it with some random item tokens. BOULDER, PLANT_GROWTH. Only PLANT:none makes the name disappear, however the results aren't stockpiled with other tokens either.
Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4968 on: March 15, 2021, 03:01:57 pm »

I think it shows up as nothing if the material doesn't have the butcher object token meat uses, where a name for that butcher item is defined. Like I used a custom material for my plant creatures and it needed that token to give the items from butchery a name, but they do become a plant_growth item on butchery.
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

Rekov

  • Bay Watcher
  • Elf Aficionado
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4969 on: March 15, 2021, 03:52:37 pm »

I think it shows up as nothing if the material doesn't have the butcher object token meat uses, where a name for that butcher item is defined. Like I used a custom material for my plant creatures and it needed that token to give the items from butchery a name, but they do become a plant_growth item on butchery.
I think I'm getting there? [BUTCHER_SPECIAL:PLANT_GROWTH:NONE] and [MEAT_NAME:NONE:planty flesh:planty flesh]. The MEAT_NAME token doesn't seem to do anything. As far as I can tell, the result is a functional, edible plant growth. It simply isn't stored in a food stockpile.

I think the problem might be that, because there isn't an actual plant with the fruit on it, it doesn't show up under the list of Fruit/Leaves in the stockpile settings, and thus can't be stockpiled. I wonder if I can trick the stockpile into working by creating a fake plant that doesn't show up anywhere, but happens to have a fruit of the same name.

EDIT: It looks like all you need for getting it to work in the stockpile is, perhaps unsurprisingly, [STOCKPILE_PLANT_GROWTH]. It shows up in the stockpile settings, vaguely:


I haven't had any luck with the dummy plant idea, and I don't even know if that would work. Probably not.
« Last Edit: March 15, 2021, 04:58:00 pm by Rekov »
Logged

Atkana

  • Bay Watcher
  • [CURIOUSBEAST]
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4970 on: March 16, 2021, 02:44:35 am »

Yeah, making a fake plant is the ideal way to go. I thought I was just being cute when I was making my plant creatures made out of actual plants, but I now realise that was actually necessary. I believe for PLANT items, the game will use the plants name for the item name, so producing plant items that aren't actually related to plants will yield a blank name. You might be able to get around this by using material adjectives / prefixes if you really don't want to make a plant, but I've not tried.

As I recently learned, any material with STOCKPILE_PLANT_GROWTH that doesn't have a GROWTH definition on a plant (to get the GROWTH_NAME) will show up as that "Plant Growth (?)" the stockpile menu. So either way, you probably want to just use the dummy plant method.

Here's a cutdown example of what to do. (Because things are cut down, I might've missed something important, but I assure you this stuff does actually work :P):
Code: [Select]
[PLANT:EXAMPLE_PLANT]
 [ALL_NAMES:my plant]
 
 [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
  [BUTCHER_SPECIAL:PLANT:NONE]

 [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
Then on the creature use this (or a similar tissue):
Code: [Select]
[TISSUE:PLANT]
 [TISSUE_NAME:plant:NP]
 [TISSUE_MATERIAL:PLANT_MAT:EXAMPLE_PLANT:STRUCTURAL] -- this is the important bit. change to your material
 [MUSCULAR]
 [FUNCTIONAL]
 [STRUCTURAL]
 [RELATIVE_THICKNESS:20]
 [CONNECTS]
 [TISSUE_SHAPE:LAYER]

 [HEALING_RATE:100]
 [VASCULAR:2]
 [PAIN_RECEPTORS:5]
 [THICKENS_ON_STRENGTH]

[TISSUE_LAYER:BY_CATEGORY:ALL:PLANT]

Butchering that creature would then yield a size-appropriate amount of the plant item called "my plant".

Rekov

  • Bay Watcher
  • Elf Aficionado
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4971 on: March 16, 2021, 01:13:00 pm »

That is very helpful, Atkana. It certainly seems like the best player-facing solution, in the sense that everything is properly named in game, both the butchered plant parts, and the option in the stockpile.

I still don't have a perfect solution for butcherable plant growths. Here are the two options I've found so far:

1) Define the material in the creature, and have the tissue use LOCAL_CREATURE_MAT:WHATEVER. The resulting butchered items will correctly be plant growths, with the name 'creature name' +  'material name', but the stockpile settings will show Plant Growth (?).

2) Define the material in the fake plant, and have the tissue use PLANT_MAT:FAKE_PLANT:WHATEVER. This time, the butchered items appear without a name, but as long as your fake plant gives a [GROWTH_NAME], the stockpile settings will appear correctly.

In both cases, the items are functional plant growths. It's just a matter of where the name shows up correctly or not.


The other option I suppose is to only use [BUTCHER_SPECIAL:PLANT:NONE] for plant based creatures, and have a separate fake plant for each different material of the plant creature.


Logged

Atkana

  • Bay Watcher
  • [CURIOUSBEAST]
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4972 on: March 17, 2021, 05:00:45 am »

Here's what I've found after looking into butchering for plant growths...
  • Without making any special edits to the materials of the growths, it looks like butchering a creature with a layer made out of that growth actually yields corpse pieces made of the material, rather than the growths, and hadn't noticed until now. Oops.
  • Giving the growth material a BUTCHER_SPECIAL for its growth (e.g. BUTCHER_SPECIAL:PLANT_GROWTH:FLOWERS), and applying the material as a tissue layer on the creature doesn't seem to work properly. The item yielded from butchering is a plant growth item, but the game scrubs away the growth data (i.e. so it doesn't count as a particular one of the plant's growths like FLOWERS, and has no name).
  • EXTRA_BUTCHER_OBJECT does seem to respect and maintain growth data, so that is potentially a way to ensure particular growths are yielded from butchery. The drawback there is that you can only apply fixed value yields, rather than having them adapt based on the size of the creature etc.
Because the growths aren't a super important part of my plant creatures, but I still want them to yield the proper growths when butchered (even though, uh, I'm not doing anything with them :P), this is the solution I'm using (describing one of my plant creatures as an example): I have a named plant with a structural material (with BUTCHER_SPECIAL:PLANT:NONE), a leaf material, and a defined growth for the leaf. The creature is made up of one main tissue for its body, the material being the plant's structural material. Around its upperbody is a largely cosmetic tissue layer for its leaves. While I refer to the tissue layer by name as leaves, it's really made up out of the plant's main material, rather than the plant's leaf material. This means that I can still get the flavour in game of that layer + use appearance modifiers to mess with its colours and such separately, while using the plant material (with it's BUTCHER_SPECIAL data) to prevent the part from yielding a corpse piece. I then use EXTRA_BUTCHER_OBJECT on the body part the layer is attached to to yield the specific growths I actually want, since that method does properly handle growth types.
The only caveat to this method is I have run into a slightly weird bug: It seems like if a corpse doesn't yield any corpse pieces upon butchering, it becomes unavailable as an option to butcher in adventure mode. Both the arena mode butcher button and slaughtering in fort mode seem to work fine (not sure about hunted corpses or not).

Just in case I couldn't explain my method well enough, here's another cut down example:
Spoiler (click to show/hide)

Liquidpip

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4973 on: March 17, 2021, 08:21:15 am »

So I've found for a while that, in fortress mode, visitors of the same race as your civilization's main race (e.g. Dwarves for MOUNTAIN, elves for FOREST, humans for PLAINS) will always use the smiley face tile (default for dwarves). It doesn't matter if the elves are supposed to use 'e'; an elf visiting your elven 'fortress' will always be a smiley face. The human merchants from the capitol coming over to your human fortress will always be displayed as smiley faces.

Well at least without any graphic tiles. I don't know if using graphics changes it. Is there any way to fix this or is it just something hardcoded?
Logged

Dunmeris

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4974 on: March 17, 2021, 05:21:45 pm »

Is there any way, any way at all, that is known, to, if not restrict, than at least strongly associate certain clothing items with certain castes? That is, to make it so that the clothing someone generates/appears with is based on their caste? I will learn to use DFHack if that's what it takes.
Logged

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4975 on: March 17, 2021, 07:55:04 pm »

Is there any way, any way at all, that is known, to, if not restrict, than at least strongly associate certain clothing items with certain castes? That is, to make it so that the clothing someone generates/appears with is based on their caste? I will learn to use DFHack if that's what it takes.
Don't think there is a way. If there is a way, I want my two military castes to migration-arrive with chainmail and leather high boots.

One thing that one could attempt is, personality: really likes artwork,
and sewn-image-art attached to a shirt. https://dwarffortresswiki.org/index.php/DF2014:Personality_trait

DFhack plugins: no mention of clothes assigning. Autocloth-plugin queues shirt making jobs. https://docs.dfhack.org/en/stable/docs/Plugins.html#autoclothing
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884

Dunmeris

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4976 on: March 17, 2021, 09:17:05 pm »

Is there any way, any way at all, that is known, to, if not restrict, than at least strongly associate certain clothing items with certain castes? That is, to make it so that the clothing someone generates/appears with is based on their caste? I will learn to use DFHack if that's what it takes.
Don't think there is a way. If there is a way, I want my two military castes to migration-arrive with chainmail and leather high boots.

One thing that one could attempt is, personality: really likes artwork,
and sewn-image-art attached to a shirt. https://dwarffortresswiki.org/index.php/DF2014:Personality_trait

DFhack plugins: no mention of clothes assigning. Autocloth-plugin queues shirt making jobs. https://docs.dfhack.org/en/stable/docs/Plugins.html#autoclothing

Ah I see, thanks. I thought that might be the case. Basically, what I'm wanting to do is A) sumptuary laws and B) gendered clothing (not that I'm the sort who cares about that sort of thing, but I'm trying to make a really (almost stupidly and pointlessly) detailed, roughly High Medieval Euro-Middle-Eastern Dark Fantasy mod and it would help to add a sense of authenticity).

I've tried making certain clothes really expensive so that naturally only nobles would wear them, but it doesn't seem like the game pays attention to [VALUE]. Conveying or at least implying sumptuary laws through giving noble castes really high [ART_INCLINED] could work though, I didn't think of that. Thanks, I'll try it and report results probably tomorrow.
Logged

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4977 on: March 18, 2021, 07:03:37 am »

The Icosahedron creature from LOLmod crashes the game upon viewing it's description (z), and I can't figure out why...

Can anyone here lend me a hand to help figure it out? Here are the raws: https://pastebin.com/Jg7AvR3J

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4978 on: March 18, 2021, 01:30:50 pm »

The Icosahedron creature from LOLmod crashes the game upon viewing it's description (z), and I can't figure out why...
Can anyone here lend me a hand to help figure it out? Here are the raws: https://pastebin.com/Jg7AvR3J
First glance, the single quotes in CASTE_NAME seem ungood.

Extra closing quote in [USE_MATERIAL_TEMPLATE:PLASMA2:CREATURE_EXTRACT_TEMPLATE]]
Body size 100 tons??
Crazy wait period [CDI:WAIT_PERIOD:100000000000000000000]
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4979 on: March 19, 2021, 06:42:47 am »

I fixed all those kinks (except the body size, the vanilla giant sperm whale is twice the size) but they weren't at fault. I think I figured out half the problem: for some reason, it qualifies as citizen in arena mode. As to why it does that and why exactly that crashes the game, I have no idea, but I've tested it in other the modes using DF hack with no crashing/problems. As such, I will leave it unsolved.

That said I'm grateful for the help, taking an extra look for syntax errors made me find another few (easier-to-solve) bugs :)
Pages: 1 ... 330 331 [332] 333 334 ... 365