Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 360 361 [362] 363 364 365

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

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5415 on: March 22, 2024, 02:47:10 pm »

Wait, copying CREATURE:HUMAN multiple times doesn't add additional chances for the civ to be human anymore? They have to be distinct species?
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.

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5416 on: March 23, 2024, 09:22:33 am »

Honestly i don't remember it being the case in the first place, but it seems like i was wrong via some contradiction on the wiki.

I checked it back and Pillbo confirmed that it works in this way helpfully adding the link into their difference notes.

<https://dwarffortresswiki.org/index.php?title=Entity_token&offset=20190928194152%7C247273&action=history> wiki diff page.

My bad, seems i missed a couple hundred pages or so on hiatus. The advice i mentioned is still sound however, if a bit redundant. Moreso for multi-populous sites or creatures of particular circumstances, rather than the one type per settlement the question-asker was looking for.
Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5417 on: March 23, 2024, 03:42:05 pm »

Okay, good to know i wasnt just insane :P
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.

Merrygin

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5418 on: April 04, 2024, 01:34:49 am »

Hey everyone, I want to mod some creatures but I gotta say, despite the explanations on the wiki, I am still a bit confused how body parts-tissue layers - tissues interact, or rather, which commands do what exactly.
For now, specifically, I want to add shearable HAIR to a custom Giant Bumblebee, as well as pollen that accumulates at its legs.

Shearable hair is easier since I kinda copied what I found with sheep, but still, don't quite understand what I am doing. This is how it looks currently:

Spoiler (click to show/hide)

I got a couple of questions.

1. Since bumblebee's bodies are defined as INSECT and the body detail plan calls CHITIN_TISSUES and EXOSKELETON_TISSUE_LAYERS, is it even possible to call STANDARD_MATERIALS again and plaster HAIR on it? Does it actually require SKIN?

2. As far as I understand, here I cover the entire bumblebee in rather thick hair, right? If I just want to cover a specific body part with hair (like the thorax and abdomen) or the legs (maybe even specific legs) with "growing" pollen, how would I select that specific part? Is that even possible?

3. Just for absolute clarity, what exactly is happening here [BODY_DETAIL_PLAN:BODY_HAIR_TISSUE_LAYERS:HAIR]?

I'd be really thankful if somebody could help me understand the logic here a bit. 

Logged
AKUR AKIR AKAM

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5419 on: April 04, 2024, 07:49:14 pm »

STANDARD_MATERIALS works, but is applying all the materials available to that list, like skin bones and teeth, even though the bee isn't using them. You could instead use [USE_MATERIAL_TEMPLATE:HAIR:HAIR_TEMPLATE] in its place. That will only add the hair material based on the HAIR_TEMPLATE material template, with the local material ID "HAIR" and nothing else. You then need to use [USE_TISSUE_TEMPLATE:HAIR:HAIR_TEMPLATE], because materials do not automatically become tissue layers, the game needs to know that a) you want to add a HAIR tissue layer and b) the hair tissue layer should use the HAIR_TEMPLATE tissue template definition as a default. Then you can select that tissue as is done in the sheep raws and change the name of the tissue to "wool."

Then you need to tell the game what body parts to apply the tissue layer to. For your question, "BODY_HAIR_TISSUE_LAYERS" is referring to a body detail plan in the vanilla b_detail_plan_default.txt. These are used as shortcuts to apply properties to a creature according to the templates defined there. BODY_DETAIL_PLAN:BODY_HAIR_TISSUE_LAYERS:HAIR is applying the HAIR tissue to body parts according to that body detail plan, but you said that you didn't want to add it to every body part, which that BDP does. So, you have a couple options. Firstly, you can copy (and rename the copy!) the BODY_HAIR_TISSUE_LAYERS entry from b_detail_plan_default in the vanilla bodies to a new BDP file in your mod, and remove the lines relating to the body parts you don't want to add hair to. This will mean youre adding a new file to your mod, but that's not a big deal because they're small files. But if you're only going to use it once anyway, you can instead just define them directly in the creature file. To do that, you can add after defining the rest of the tissue layers (or it will end up being placed inside the body, with subsequent layers being added on top of it!) [TISSUE_LAYER:BY_CATEGORY:whatever category you want:HAIR], which will add the tissue to every body part that matches that category string. You can do this multiple times to add it to several different categories.

you are correct that the hair will be very thick, because the way [TL_RELATIVE_THICKNESS:10] works is its adding 10 units of hair on top of the existing tissues. If you look at the EXOSKELETON_TISSUE_LAYERS BDP you'll see the relative thickness of all the other layers on the body template. [...ARG3:6:ARG2:1:ARG1:2] on the body, specifically. The ARG strings refer to [BODY_DETAIL_PLAN:EXOSKELETON_TISSUE_LAYERS:CHITIN:FAT:MUSCLE] in the creature raws (defined under the vanilla normal-sized bumblebee, which your creature copied as a base template) CHITIN would be ARG1, FAT ARG2 and MUSCLE ARG3. adding the relative thicknesses of those three together, you'd get 9. The relative thickness of the hair youre applying on top of that is 10, which means the majority of the volume of the body part would be hair, followed by muscle, chitin, then fat as the thinnest layer. That could be fine for you, if you want your bees to be extremely fuzzy little guys, or you could reduce that down to 1 to give them an average hair coating over the top of thicker chitin, or any value you think suites them.

Tissue layer thickness isnt defined in [SET_TL_GROUP:BY_CATEGORY:ALL:HAIR] because at that point its already been defined, and youre moving on to describe individual qualities of the in-game description of the tissue, not the actual properties of the tissue layer, which are already defined prior.

You can indeed add pollen to their legs. You will have to go through the same steps;
1)Add a pollen material (I think youll have to create a material template file and define one, im pretty sure no such material exists in vanilla) template. Add this to your creature. This will make it "giant bumblebee pollen" on butchering/shearing/milking returns. Unless you add the line [PREFIX:NONE] to the material after selecting it in the creature file;
[USE_MATERIAL_TEMPLATE:POLLEN:POLLEN_TEMPLATE] - POLLEN is the "local creature ID" your creature material will use, POLLEN_TEMPLATE is template the creature material will copy properties from.
[SELECT_MATERIAL:POLLEN] - POLLEN being used here is the above "local creature ID"
    [STATE_NAME:ALL_SOLID:pollen]
    [STATE_ADJ:ALL_SOLID:pollen]
    [PREFIX:NONE]
 That will spit out a generic "pollen" material, which will still be associated with the giant bumblebee since it came from it, but wont show that in its nomenclature.

2) Create a pollen tissue layer. Same steps as before, there shouldnt be any such pre-existing tissue template so you'll have to create one in a new tissue template file. In the template, [TISSUE_MATERIAL:LOCAL_CREATURE_MAT:x] is where the game knows what material from your creature to use. its calling for a local creature mat, so the ID its looking for is POLLEN, but the template doesnt know that until the game initializes and looks at the creature file and asks "Which material is POLLEN?."

3) Then in the creature file you add [USE_TISSUE_TEMPLATE:POLLEN:POLLEN_TEMPLATE] - This time youre adding POLLEN as a local tissue layer ID, based off the POLLEN_TEMPLATE tissue template you just defined. The game knows, from the tissue template, what properties the tissue should have and the material its made of.

4) Add the POLLEN tissue layer to a body part; use [TISSUE_LAYER:BY_CATEGORY:whatever category you want:POLLEN] - This time the POLLEN being referenced is the local tissue layer ID. The game now knows to add a layer of that tissue on top of whatever prior tissue layers make up that body part, or if this is the first tissue added to it, it now makes up 100% of that part and subsequent layers will be applied on top of it.

5) Add body tissue descriptors. Since the material and tissue properties and locations are defined, you can now give that pollen a color description like
    [SET_TL_GROUP:BY_CATEGORY:ALL:POLLEN] - is searching all body parts of that category for a POLLEN tissue
      [TL_COLOR_MODIFIER:YELLOW:1:ORANGE:1]
         [TLCM_NOUN:pollen:SINGULAR]
and the game will choose one of those colors to add to the creature description. "Its pollen is yellow" will be printed in the creature's description in the health tab. You can then make it shearable the same way wool is;

      [TISSUE_LAYER_APPEARANCE_MODIFIER:LENGTH:0:0:0:0:0:0:0]
         [APP_MOD_NOUN:POLLEN:SINGULAR]
         [APP_MOD_RATE:1:DAILY:0:300:0:0:NO_END]
         [APP_MOD_DESC_RANGE:10:50:100:150:200:300]
      [SHEARABLE_TISSUE_LAYER:LENGTH:300]

This should now spit out a "pollen" glob on shearing alongside the "giant bumblebee wool" yarn.
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.

DPh Kraken

  • Bay Watcher
  • [PRONOUNS:it:its:itself]
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5420 on: April 04, 2024, 07:55:36 pm »

3. Just for absolute clarity, what exactly is happening here [BODY_DETAIL_PLAN:BODY_HAIR_TISSUE_LAYERS:HAIR]?

This is the code for BODY_HAIR_TISSUE_LAYERS. ARG1 refers to the first argument, which you have input as the tissue type HAIR. It uses BY_CATEGORY to apply that tissue to those body parts that match the categories.

Code: [Select]
[BODY_DETAIL_PLAN:BODY_HAIR_TISSUE_LAYERS]
[BP_LAYERS:BY_CATEGORY:BODY:ARG1:1]
[BP_LAYERS:BY_CATEGORY:BODY_UPPER:ARG1:1]
[BP_LAYERS:BY_CATEGORY:BODY_LOWER:ARG1:1]
[BP_LAYERS:BY_CATEGORY:GROWTH:ARG1:1]
[BP_LAYERS:BY_CATEGORY:ARM:ARG1:1]
[BP_LAYERS:BY_CATEGORY:ARM_UPPER:ARG1:1]
[BP_LAYERS:BY_CATEGORY:ARM_LOWER:ARG1:1]
[BP_LAYERS:BY_CATEGORY:HAND:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LEG:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LEG_UPPER:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LEG_LOWER:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LEG_FRONT:ARG1:1]
[BP_LAYERS:BY_CATEGORY:LEG_REAR:ARG1:1]
[BP_LAYERS:BY_CATEGORY:FOOT:ARG1:1]
[BP_LAYERS:BY_CATEGORY:FOOT_FRONT:ARG1:1]
[BP_LAYERS:BY_CATEGORY:FOOT_REAR:ARG1:1]
[BP_LAYERS:BY_CATEGORY:HEAD:ARG1:1]
[BP_LAYERS:BY_CATEGORY:NECK:ARG1:1]
[BP_LAYERS:BY_CATEGORY:TENTACLE:ARG1:1]
[BP_LAYERS:BY_CATEGORY:TAIL:ARG1:1]
[BP_LAYERS:BY_CATEGORY:NOSE:ARG1:1]
[BP_LAYERS:BY_CATEGORY:EAR:ARG1:1]
[BP_LAYERS:BY_CATEGORY:FINGER:ARG1:1]
[BP_LAYERS:BY_CATEGORY:TOE:ARG1:1]
[BP_LAYERS:BY_CATEGORY:FIN:ARG1:1]
[BP_LAYERS:BY_CATEGORY:FLIPPER:ARG1:1]
[BP_LAYERS:BY_CATEGORY:HUMP:ARG1:1]
[BP_LAYERS:BY_CATEGORY:CHEEK:ARG1:1]
[BP_LAYERS:BY_CATEGORY:EYELID:ARG1:1]
[BP_LAYERS:BY_CATEGORY:THROAT:ARG1:1]
Logged
[CHEESE_PLANT] and [CHEESE_GRAPHICS] biggest fan
Mod releases

Merrygin

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5421 on: April 09, 2024, 10:33:39 am »

Hey thanks so much for the extensive explanation and help, I understand it much better now!
Logged
AKUR AKIR AKAM

aradar

  • Bay Watcher
  • Legendary bullshitter
    • View Profile
    • my steam workshop
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5422 on: April 09, 2024, 09:30:46 pm »

I'm really confused about this thing that I did it's really cool but I don't know how I did it !!!??
somehow on my custom goblin entity I can embark with demons as pets I'm really really not sure how I made this happen they had a relatively low embark value too just a little over a thousand.

Does the age of the world dictate what you can embark with???
I'm playing on a 10,000 year map not sure if that has anything to do with it I've never seen demons at embark!!

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5423 on: April 09, 2024, 11:13:52 pm »

The master probably tamed them. That would be my first guess. You could confirm by scrawling through the history of the master(s) and see what they tamed
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.

aradar

  • Bay Watcher
  • Legendary bullshitter
    • View Profile
    • my steam workshop
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5424 on: April 09, 2024, 11:29:56 pm »

The master probably tamed them. That would be my first guess. You could confirm by scrawling through the history of the master(s) and see what they tamed
That's the craziest thing it was the option of two different forgotten beast animals and three different kinds of demon I didn't even realize that that was a thing that could even happen that's cool as s***

aradar

  • Bay Watcher
  • Legendary bullshitter
    • View Profile
    • my steam workshop
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5425 on: April 10, 2024, 01:46:21 pm »

Just found a hilarious rare case exception that will make the game crash world generator every single time if you make a creature(entity) have hair at a matte fixed temp cold 9999 value
The world generator crashes every time lololol

It probably will crash also if you set the hair to be at a very high temperature as well oddly enough you can set the hair temperature to a temperature that injures the creature upon the map loading but if it doesn't kill them I guess it's okay

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5426 on: April 10, 2024, 04:51:19 pm »

I'm really confused about this thing that I did it's really cool but I don't know how I did it !!!??
somehow on my custom goblin entity I can embark with demons as pets I'm really really not sure how I made this happen they had a relatively low embark value too just a little over a thousand.

Does the age of the world dictate what you can embark with???
I'm playing on a 10,000 year map not sure if that has anything to do with it I've never seen demons at embark!!

I've seen this before in vanilla goblins edited to be playable, but normally only applicable to goblin civs that have arisen through deep features which is always a gamble unless you leave the simulation running a long time like you did. 10,000 years is plenty of time for a dwarven civ to collapse and release the HFS goblin horde.

If you edited the value of unique demons to 0 (via [DEMON_NUMBER:] on the worldgen file), these events would still happen even if dark-forts don't generate but they would just draw from creatures on layer 5 (not sure if that counts inbetween too) which becomes accessible to them.
Logged

aradar

  • Bay Watcher
  • Legendary bullshitter
    • View Profile
    • my steam workshop
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5427 on: April 11, 2024, 10:50:04 am »

All right I'm a little confused I cut a creature and then all the sudden I'm getting gigantic errors about the creature not existing and the graphics are unrecognized for this non-existent creature why does cutting a creature not break the association with the graphics it's kind of weird how do I cut a creature and not get these graphic errors

Cuz okay I cut the creature goblin and then the error report is saying failed to find creature graphics creature goblin no s*** I cut the damn creature why you still looking for it???

Think I'm just overall little confused on how you swap things out how do I get rid of the original entities so they don't appear in world gen anymore??

Is this even is this even possible or do I just go into the entity tag and spam creature my custom creature tag a million times until the original entity never appears??

aSpatula66

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5428 on: April 11, 2024, 01:49:59 pm »

The way to fix that would be to make a new creature with the same creature ID defined afterwards. Creature ID is never shown in game so it could be a entirely unrelated new creature. You could also just ignore the errorlog messages.
Logged

aradar

  • Bay Watcher
  • Legendary bullshitter
    • View Profile
    • my steam workshop
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5429 on: April 11, 2024, 06:51:07 pm »

The way to fix that would be to make a new creature with the same creature ID defined afterwards. Creature ID is never shown in game so it could be a entirely unrelated new creature. You could also just ignore the errorlog messages.

If I define a new creature ID with the same ID isn't that just going to cause duplication errors????
Pages: 1 ... 360 361 [362] 363 364 365