Bay 12 Games Forum

Please login or register.

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

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

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5400 on: January 12, 2024, 12:07:18 am »

That entity_default isn't necessary, the game doesn't actually care about filenames beyond only reading files if they have the right prefix. Is this file being loaded at all? Add a new entity with an invalid token, like so:

Code: [Select]
[ENTITY:DUMMY]
[ERRORLOG ME]
and if no errorlog is generated, the file isn't being loaded at all, and something is malformed, folder name, file name etc.

ArrowheadArcher

  • Bay Watcher
  • Obsessed with !!Carp!!
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5401 on: January 12, 2024, 04:00:08 pm »

I believe it is. I just renamed the custom entries to the ones in vanilla and they work fine. I had them as Dwarven, Darken, Halfing and Wilding.
Logged

flyteofheart

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5402 on: January 13, 2024, 01:33:53 pm »

Code: [Select]
[OBJECT:CREATURE]

[SELECT_CREATURE:GIANT_LEOPARD_GECKO]
[SELECT_CASTE:FEMALE]
[DESCRIPTION:A spotted scaly monster with large, glassy eyes, scales covered in wart-like bumps, and a thick, ringed tail.  She feeds mostly on insects.  Many of them.]
[SELECT_CASTE:MALE]
[DESCRIPTION:A spotted scaly monster with large, glassy eyes, scales covered in wart-like bumps, and a thick, ringed tail.  He feeds mostly on insects.  Many of them.]
[CHILD:1][GENERAL_CHILD_NAME:juvenile giant leopard gecko:juvenile giant leopard geckos]

Can someone confirm this would do what I think it does, which is add descriptions for both male and female caste, and then give a juvenile stage to Giant Leopard Geckos?

Code: [Select]
[CREATURE:GIANT_LEOPARD_GECKO]
[COPY_TAGS_FROM:GECKO_LEOPARD]
[APPLY_CREATURE_VARIATION:GIANT]
[CV_REMOVE_TAG:CHANGE_BODY_SIZE_PERC]
[APPLY_CURRENT_CREATURE_VARIATION]
[GO_TO_END]
[SELECT_CASTE:ALL]
[CHANGE_BODY_SIZE_PERC:400700]
[GO_TO_START]
[NAME:giant leopard gecko:giant leopard geckos:giant leopard gecko]
[CASTE_NAME:giant leopard gecko:giant leopard geckos:giant leopard gecko]
[DESCRIPTION:A large monster in the shape of a gecko.]
[POPULATION_NUMBER:10:20]
[CLUSTER_NUMBER:1:1]

Even though the Giant Leopard Gecko doesn't have a default description for males and females, and lacks a child in the raws

Im real lost trying to start modding lol
« Last Edit: January 13, 2024, 01:39:58 pm by flyteofheart »
Logged
Encrusted with fried bread and menacing with spikes of coconuts
living the dream

joostheger

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5403 on: January 15, 2024, 03:31:36 am »

1. you'd better avoid pronounce like these, to prevent to much clutter. You can say 'it' or 'they'.
2. indentation (tabs and spaces) dont work. So everything following [SELECT_CASTE]-tag is considered part of that tag. But i dont think it matters in this case, because these are general creature tags.

to my knowledge, it looks fine otherway
Logged

Caldfir

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5404 on: January 21, 2024, 07:03:38 pm »

I'm trying to modify a creature so that different castes use different materials. According to the wiki, SET_TL_GROUP is caste-level, so I tried using SET_TL_GROUP/SET_LAYER_TISSUE in each caste specification. The result was that the materials were all offset by one caste. To get the materials to show up on the correct caste, I had to put the tissue-layer modification before each caste, as follows:

Spoiler (click to show/hide)

(I verified the tissues by making the creature butcherable+domestic and checking the butcher's products.)

Is this correct? It feels like what I have here is a bug and a workaround, but it is possible I just don't understand what I'm doing.
Logged
where is up?

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5405 on: January 21, 2024, 09:25:52 pm »

I have a nearly identical megabeast already;

Spoiler (click to show/hide)

To do this I didn't use any body detail plans. If you want to continue using them, I would suggest defining all the castes and the materials/tissues first, then selecting each caste individually and applying tissues to it. That might get around this situation.
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.

Caldfir

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5406 on: January 22, 2024, 11:01:16 pm »

After testing things, I think I figured out what happened. The default bronze colossus already defines "TISSUE_LAYER:BY_CATEGORY:ALL:BRONZE" so when I added it to my castes, I ended up with both bronze tissues AND the new material. I went about fixing it by converting the tissues rather than just removing the duplicate tag using a CV. I think my solution was actually converting the bronze in some unseen "default" caste and then getting picked-up with each caste definition. Makes much more sense now.
Logged
where is up?

DPh Kraken

  • Bay Watcher
  • [PRONOUN:she:her:herself][PRONOUN:it:its:itself]
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5407 on: January 24, 2024, 03:46:10 pm »

I created a civilization with access to inorganic liquids. They produce them by reaction, but I'm having trouble getting them to show up in the embark purchase menu. I've seen some mods add custom resources by giving the civ a special nonexistent creature with animal tokens, but I'm not sure what I'd write in the creature file to enable them for trade.
Logged
[CHEESE_PLANT] and [CHEESE_GRAPHICS] biggest fan
My mods:
Language & symbolsMiscellanyGraphics resourcesPseudo-ASCII

chipathingy

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5408 on: January 24, 2024, 10:09:23 pm »

I created a civilization with access to inorganic liquids. They produce them by reaction, but I'm having trouble getting them to show up in the embark purchase menu. I've seen some mods add custom resources by giving the civ a special nonexistent creature with animal tokens, but I'm not sure what I'd write in the creature file to enable them for trade.

You'd have to add a creature that actually exists I think, not a dummy one that's only there for materials. Look at how milk is coded in whatever animal you like

The only other think I can think of is looking at how the game uses lye and try and incorporate that. I think it's the only liquid available from traders that isn't an animal or plant product. The soap making reactions use lye as a reagent if you need some examples, try replacing LYE with INORGANIC:X

Hope this works!
Logged
Author of Fantastic Fantasy Fortress (http://www.bay12forums.com/smf/index.php?topic=180748.0)

DPh Kraken

  • Bay Watcher
  • [PRONOUN:she:her:herself][PRONOUN:it:its:itself]
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5409 on: January 25, 2024, 02:03:23 am »


You'd have to add a creature that actually exists I think, not a dummy one that's only there for materials. Look at how milk is coded in whatever animal you like


Added a bunch of extracts to a single creature owned by the civ, I'm amazed how quickly that worked!
Haven't been able to test extracting from the creature, though. Tame purring maggot shenanigans.
Logged
[CHEESE_PLANT] and [CHEESE_GRAPHICS] biggest fan
My mods:
Language & symbolsMiscellanyGraphics resourcesPseudo-ASCII

Button

  • Bay Watcher
  • Plants Specialist
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5410 on: January 27, 2024, 05:55:32 pm »

EDIT - I'm an idiot, this was asked earlier in the thread with almost the exact same example, and I didn't find it cause I was using too narrow of search terms.

The answer appears to be "no you can't patch vanilla creature variations, you'll have to make the new variation to apply."



I'm working on converting some of my preferred raw changes from classic DF modders' approach of "just replace the vanilla file" to the Steam version's patching paradigm.

My question today is: is there any way to patch the vanilla/default creature variations?

For example, one of the changes the Modest Mod made to [CREATURE_VARIATION:ANIMAL_PERSON] was to add the following as a workaround for the bug where civilized creatures won't incubate their eggs:

Code: [Select]
[CV_REMOVE_TAG:LAYS_EGGS] workaround for bug #10209
[CV_REMOVE_TAG:CLUTCH_SIZE]
[CV_REMOVE_TAG:EGG_MATERIAL]
[CV_REMOVE_TAG:EGG_SIZE]

(The bug tracker seems to be out of temp space, but I'm not sure who to report that to.)

Because this change needs to be made to all egg-laying creatures that get the template, and has no effect on non-egg-laying creatures that get the template, it would make sense to patch the template itself, rather than creating a separate CREATURE_VARIATION:ANIMAL_PERSON_BUGFIX template and applying it to every egg-laying animal person individually. But I've not been able to find any information on patching vanilla creature variations. Is it even possible?
« Last Edit: January 27, 2024, 06:07:38 pm by Button »
Logged
I used to work on Modest Mod and Plant Fixes.

Always assume I'm not seriously back

DPh Kraken

  • Bay Watcher
  • [PRONOUN:she:her:herself][PRONOUN:it:its:itself]
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5411 on: January 27, 2024, 09:33:39 pm »

I think for the more technical objects that don't have cut/select, you just create the object entry again and the last one loads.
Logged
[CHEESE_PLANT] and [CHEESE_GRAPHICS] biggest fan
My mods:
Language & symbolsMiscellanyGraphics resourcesPseudo-ASCII

Button

  • Bay Watcher
  • Plants Specialist
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5412 on: February 19, 2024, 06:21:22 pm »

Hello again.

I want to modify some animal people's attacks. For example, [CREATURE:TOAD_MAN] has [APPLY_CREATURE_VARIATION:MOUTH_BITE_ATTACK], which is defined as follows:

Code: [Select]
[CREATURE_VARIATION:MOUTH_BITE_ATTACK]
[CV_NEW_TAG:ATTACK:BITE:BODYPART:BY_CATEGORY:MOUTH]
[CV_NEW_TAG:ATTACK_SKILL:BITE]
[CV_NEW_TAG:ATTACK_VERB:bite:bites]
[CV_NEW_TAG:ATTACK_CONTACT_PERC:100]
[CV_NEW_TAG:ATTACK_PREPARE_AND_RECOVER:3:3]
[CV_NEW_TAG:ATTACK_PRIORITY:MAIN]
[CV_NEW_TAG:ATTACK_FLAG_CANLATCH]

I want to make the MOUTH_BITE_ATTACK have ATTACK_PRIORITY:SECOND, because this is a toad man and he can hold weapons.

What I did in the old system was make an attack called MOUTH_BITE_SECONDARY_ATTACK, which was the same as MOUTH_BITE_ATTACK but with ATTACK_PRIORITY:SECOND, and then just replaced the line [APPLY_CREATURE_VARIATION:MOUTH_BITE_ATTACK] with [APPLY_CREATURE_VARIATION:MOUTH_BITE_SECONDARY_ATTACK]. Obviously I can still do that with CUT-and-replace, but I'm hoping there's a way I can modify this in place.

I thought about using [CV_CONVERT_TAG] with [CVCT_MASTER:ATTACK_PRIORITY] and [CVCT_TARGET:MAIN], but if I understand that correctly that would change all of the MAIN-priority attacks to SECOND-priority.

Is it possible to use [CV_CONVERT_TAG] with [CVCT_MASTER:APPLY_CREATURE_VARIATION]? It can't be that easy. EDIT: Can confirm, [CV_CONVERT_TAG] doesn't appear to work with [CVCT_MASTER:APPLY_CREATURE_VARIATION]

Is there any other way to modify this attack in place?

EDIT: I ended up solving that problem by creating a creature variation that removes all attacks from a creature, and then re-adding both the changed attacks and the attacks I didn't intend to change. Here's the creature variation for anyone who wants to do the same thing:

Code: [Select]
[CREATURE_VARIATION:REMOVE_ALL_ATTACKS]
[CV_REMOVE_TAG:ATTACK]
[CV_REMOVE_TAG:ATTACK_SKILL]
[CV_REMOVE_TAG:ATTACK_VERB]
[CV_REMOVE_TAG:ATTACK_CONTACT_PERC]
[CV_REMOVE_TAG:ATTACK_PENETRATION_PERC]
[CV_REMOVE_TAG:ATTACK_PRIORITY]
[CV_REMOVE_TAG:ATTACK_VELOCITY_MODIFIER]
[CV_REMOVE_TAG:ATTACK_FLAG_CANLATCH]
[CV_REMOVE_TAG:ATTACK_FLAG_WITH]
[CV_REMOVE_TAG:ATTACK_FLAG_EDGE]
[CV_REMOVE_TAG:ATTACK_PREPARE_AND_RECOVER]
[CV_REMOVE_TAG:ATTACK_FLAG_BAD_MULTIATTACK]
[CV_REMOVE_TAG:ATTACK_FLAG_INDEPENDENT_MULTIATTACK]
[CV_REMOVE_TAG:SPECIALATTACK_INJECT_EXTRACT]
[CV_REMOVE_TAG:SPECIALATTACK_INTERACTION]
[CV_REMOVE_TAG:SPECIALATTACK_SUCK_BLOOD]
« Last Edit: March 09, 2024, 12:40:37 pm by Button »
Logged
I used to work on Modest Mod and Plant Fixes.

Always assume I'm not seriously back

CansecoDev

  • Escaped Lunatic
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #5413 on: March 22, 2024, 09:10:35 am »

This is my first post on the forum, I have not been able to find an answer to this or figure out an elegant solution, I hope this is the right place to ask.

Is it possible to weight the chances of a specific creature to be chosen for a civilization?

Something like:

Code: [Select]
[ENTITY:DESERT]
*
*
[CREATURE:TUSKEN:1]
[CREATURE:HUMAN:2]
*
*

In this fictional example, having a DESERT civilization, it could spawn as either HUMAN or TUSKEN, but HUMAN have double the chances of being selected (notice the :1 and :2 at the end of each tag).

This doesn't seem to be something that can be done, that's the question; currently the only way I can think of to "simulate" this would be to have (for this fictional case) duplicate entries of the civilizations to achieve these weighted chances, i,e:

Code: [Select]
[ENTITY:DESERT_HUMANS1]
*
*
[CREATURE:HUMAN]
*
*

[ENTITY:DESERT_HUMANS2]
Duplicate entry of DESERT_HUMANS to double the chances of HUMAN in DESERT.
*
*
[CREATURE:HUMAN]
*
*

[ENTITY:DESERT_TUSKEN]
*
*
[CREATURE:TUSKEN]
*
*

But it looks a bit bad to do that. Is there a more elegant way to achieve this?
« Last Edit: March 22, 2024, 10:31:47 am by CansecoDev »
Logged

FantasticDorf

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

Each time you include more than 1 primary race to CREATURE: on the entity, it splits the chances of them appearing. So 3 distinct humans (not the same copy pasted) or least human like creatures would even out the 1 Tusken by 1/4 chance every time they make a new site of the same entity culture, lead by majority outside of transient populations.

An alternative way would be to create a pet-race that explicitly creates sentient members, and then tagging it onto the civ as a [ANIMAL] maybe something ambigious like "Tusken Raider Immigrant" as a semi-intelligent citizen-pet caste in a human only settlement, because it will automatically breed sentient members, and potentially with the right setup you can get them from trade.

Code: ("an example with annotations on use") [Select]
Blah blah entity.txt
Entity:DESERT[
[ANIMAL]
[ANIMAL_TOKEN:TUSKEN_RAIDER]
[ANIMAL_CASTE_TOKEN:TUSKEN_RAIDER_IMMIGRANT_MALE] <- re-apply seperate animal arguement for female etc.
[ANIMAL_ALWAYS_PRESENT] <- +Pet exotic on the caste = Tradable, maybe adjust a appropriate price.
[ANIMAL_NEVER_PET] <- It can be immersion breaking and impractical for adopted baby animals with immigrants.
[ANIMAL_ALWAYS_PACK_ANIMAL] <- They also need active roles, no role = no inclusion.
[ANIMAL_NEVER_SIEGE] <- Don't give this to races that are not expected to fight naked.

^ also the way you can get sustainable genderless races, by pushing the burden onto pets of a nonsapient or semi-sapient variety.
« Last Edit: March 22, 2024, 09:39:40 am by FantasticDorf »
Logged
Pages: 1 ... 359 360 [361] 362 363 ... 372