Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 287 288 [289] 290 291 ... 372

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

Logariter

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4320 on: February 07, 2020, 02:33:48 am »

OK
Logged

chipathingy

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4321 on: February 07, 2020, 09:23:25 pm »

While I'm at it, if you had an interaction with I_TARGET:A:whatever, what does the A do? I've seen B and C there as well and I can't find what they mean anywhere
A, B, C etc. are identifiers used to label the targets for an interaction, and work the same way as they do in reaction raws. They can be anything you like in the interaction definition, but the can do interaction code must use whatever identifier is defined in the interaction definition. Lemme try and unpack the cat's head bump interaction as an example:

The following is the interaction definition for the cat's bump:
Quote


[INTERACTION:BP_BUMP]
   [I_SOURCE:CREATURE_ACTION]
   [I_TARGET:A:CREATURE]
      [IT_LOCATION:CONTEXT_BP]
   [I_TARGET:B:CREATURE]
      [IT_LOCATION:CONTEXT_CREATURE]

      [IT_MANUAL_INPUT:creature]
   [I_EFFECT:CONTACT]
      [IE_TARGET:A]
      [IE_TARGET:B]
      [IE_IMMEDIATE]

From this, we can see that there is a target called A, a creature whose provided body part is going to be used in the interaction, and B, that must be a creature. The effect of the interaction (outlined in I_EFFECT) is to make the thing designated as A (so the creature A's given body part) make contact with target B (which is a creature).

Then within the cat's creature definition, it has its own can do interaction which governs how it selects the targets A and B to feed into that interaction:
Quote
[CAN_DO_INTERACTION:BP_BUMP]
   [CDI:ADV_NAME:Head bump]
   [CDI:USAGE_HINT:GREETING]
   [CDI:BP_REQUIRED:BY_CATEGORY:HEAD]
   [CDI:VERB:head-bump:head-bumps:bump heads]
   [CDI:CAN_BE_MUTUAL]
   [CDI:TARGET:A:SELF_ONLY]
   [CDI:TARGET:B:TOUCHABLE]
   [CDI:TARGET_RANGE:B:1]
   [CDI:MAX_TARGET_NUMBER:B:1]

   [CDI:WAIT_PERIOD:20]

This section is where we define what body part is being used as the CONTEXT_BP in the interaction. Because the interaction itself only cares that it is a body part, we could use whatever body part we wanted in this CDI.
This section is where we define what creature is set to be A (and it must be a creature, because that's what the interaction has said that it is expecting for A). Because the CDI says that A is going to be set to SELF_ONLY, that means that the cat doing this interaction is going to be selecting itself to be A in this instance.
This outlines what creature the cat selects to be B. It says that there must only be 1 target for B, and that it must be touchable and within 1 range of the cat using this interaction. Because the interaction itself only cares that it's being given a creature for B, we could edit this CDI entry in a number of ways. We could remove the touchable requirement, change the range of how far away the creature can be, or make it so the cat can select any number of creatures to be the target B.

If we wanted to make the labels more descriptive, we could change the interaction definition so that A is instead called BUMPER, and B is called TARGET. Of course, after changing what the ids are called in the interaction, we'd also have to change the can do interaction to use BUMPER and TARGET instead of A and B.


I kinda went on a bit of a tangent there just to get to that simple explanation, I hope that was possible to follow :P

tl;dr - Stuff like A, B, C, etc. are just arbitrary labels that can be anything. Interaction definitions define what each of those targets should be (like a creature, location, etc.), and can do interaction definitions define what a creature chooses to be each of those targets.

This is amazing, thank you!
Logged
Author of Fantastic Fantasy Fortress (http://www.bay12forums.com/smf/index.php?topic=180748.0)

mtboaty

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4322 on: February 09, 2020, 11:14:40 am »

My dear dwarfen scientists, i want to create a new entity which is able to train creatures the others can not train.
I thought via usage of the entity animal token i could define the creatures i want to be war trainable to them like:
[ANIMAL]
[some selection of the creatures i want via. caste token or class]
[ANIMAL_ALWAYS_PET]
[ANIMAL_ALWAYS_SIEGE]



Logged
Mighty armok help me, for I am lost in your worlds rules!

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4323 on: February 09, 2020, 11:54:52 am »

My dear dwarfen scientists, i want to create a new entity which is able to train creatures the others can not train.
I thought via usage of the entity animal token i could define the creatures i want to be war trainable to them like:
[ANIMAL]
[some selection of the creatures i want via. caste token or class]
[ANIMAL_ALWAYS_PET]
[ANIMAL_ALWAYS_SIEGE]

That should work, yes. Are you having any problems with it?

mtboaty

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4324 on: February 09, 2020, 12:02:01 pm »

yeah, somehow the creatures were pet able but not hunting or war trainable :-/
however i did not select specific creatures to try it out, could that be the problem?
so my tag was without any creature token/class/caste while really everything of the biome became pet able the effect i really looked for was not showing
Logged
Mighty armok help me, for I am lost in your worlds rules!

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4325 on: February 09, 2020, 03:01:02 pm »

Gotta put [TRAINABLE_WAR] or [TRAINABLE_HUNTING] or [TRAINABLE] inside the desired creature's definition.
And if they're a [MOUNT], take away their need to eat grass: "--GRAZER:40-- --war animal, no grass eating"
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

recon1o6

  • Bay Watcher
  • Developing a race, explosive booze and death traps
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4326 on: February 09, 2020, 03:49:49 pm »

I'm currently making a custom race and civ, and there's two things that have been stumping me lately and I'm wondering if anybody could help me?

The first: I'm wanting to add a religious sphere that needs a new token, but I'm not sure where to do this.

The second: Fire breath without being immune to fire. I want this race to be able to breath fire as a weapon, but can still be burned themselves and not melt internally the moment they spawn. Is this possible?
Logged
Urist McRecon cancels make exploding booze: Interrupted by bad idea
Urist McRecon cancels bad idea: missing raw files
Urist McRecon cancels add raw files: Interrupted by fortress mode
Urist McRecon cancels play fortress mode: Needs exploding booze
Urist McRecon cancels acquire exploding booze: No materials

ZM5

  • Bay Watcher
  • Accomplished RAW Engineer
    • View Profile
    • Steam
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4327 on: February 09, 2020, 03:59:44 pm »

1. Adding outright new spheres isnt possible.
2. What do you mean by that? You'd just give them a fire breath interaction without changing anything else. IIRC fire breath attacks come out in front of the user so they wouldnt burn themselves outside of deliberately walking into the fire.

recon1o6

  • Bay Watcher
  • Developing a race, explosive booze and death traps
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4328 on: February 09, 2020, 04:10:15 pm »

damn, so much for a god of time

with the second one, I have successfully given them a material emission for fire, but what ended up happening was whenever they used the fire breath, their insides started melting from the temperature increase while their skin outside was completely fine. One poor sod panicked at a goblin and his lungs turned to ash

I'm trying to avoid that self destructive part.
Logged
Urist McRecon cancels make exploding booze: Interrupted by bad idea
Urist McRecon cancels bad idea: missing raw files
Urist McRecon cancels add raw files: Interrupted by fortress mode
Urist McRecon cancels play fortress mode: Needs exploding booze
Urist McRecon cancels acquire exploding booze: No materials

ZM5

  • Bay Watcher
  • Accomplished RAW Engineer
    • View Profile
    • Steam
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4329 on: February 09, 2020, 04:32:00 pm »

Oh, are you using a custom material with TRAILING_GAS_FLOW then? That always happens with either the TRAILING_GAS/VAPOR/DUST or UNDIRECTED_GAS/VAPOR/DUST emission types, it gets expelled from the user's tile rather than one tile in front of them.

recon1o6

  • Bay Watcher
  • Developing a race, explosive booze and death traps
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4330 on: February 09, 2020, 04:37:08 pm »

ah I didn't know that, yeah that will be what's causing it. thanks!
Logged
Urist McRecon cancels make exploding booze: Interrupted by bad idea
Urist McRecon cancels bad idea: missing raw files
Urist McRecon cancels add raw files: Interrupted by fortress mode
Urist McRecon cancels play fortress mode: Needs exploding booze
Urist McRecon cancels acquire exploding booze: No materials

mtboaty

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4331 on: February 10, 2020, 09:51:42 am »

Gotta put [TRAINABLE_WAR] or [TRAINABLE_HUNTING] or [TRAINABLE] inside the desired creature's definition.
And if they're a [MOUNT], take away their need to eat grass: "--GRAZER:40-- --war animal, no grass eating"
Too sad i hoped i could redefine the behavior on entity layer so only specific entities can train these creatures, would have loved it that way so this entity has somehow an edge over other races through their war animals
Logged
Mighty armok help me, for I am lost in your worlds rules!

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4332 on: February 10, 2020, 12:03:09 pm »

Gotta put [TRAINABLE_WAR] or [TRAINABLE_HUNTING] or [TRAINABLE] inside the desired creature's definition.
And if they're a [MOUNT], take away their need to eat grass: "--GRAZER:40-- --war animal, no grass eating"
Too sad i hoped i could redefine the behavior on entity layer so only specific entities can train these creatures, would have loved it that way so this entity has somehow an edge over other races through their war animals
Maybe entity has ANIMAL_ALWAYS_PRESENT for that civ. And make the creature otherwise not appear in the world.
Wiki: https://dwarffortresswiki.org/index.php/DF2014:Entity_token#ANIMAL_ALWAYS_PRESENT

Related post: http://www.bay12forums.com/smf/index.php?topic=168353.msg7626926#msg7626926
Can duplicate HORSE to
HORSE and HORSE2(version only for dwarf civ, war-trainable)
Spoiler (click to show/hide)
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

mtboaty

  • Bay Watcher
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4333 on: February 10, 2020, 02:23:05 pm »

Gotta put [TRAINABLE_WAR] or [TRAINABLE_HUNTING] or [TRAINABLE] inside the desired creature's definition.
And if they're a [MOUNT], take away their need to eat grass: "--GRAZER:40-- --war animal, no grass eating"
Too sad i hoped i could redefine the behavior on entity layer so only specific entities can train these creatures, would have loved it that way so this entity has somehow an edge over other races through their war animals
Maybe entity has ANIMAL_ALWAYS_PRESENT for that civ. And make the creature otherwise not appear in the world.
Wiki: https://dwarffortresswiki.org/index.php/DF2014:Entity_token#ANIMAL_ALWAYS_PRESENT

Related post: http://www.bay12forums.com/smf/index.php?topic=168353.msg7626926#msg7626926
Can duplicate HORSE to
HORSE and HORSE2(version only for dwarf civ, war-trainable)
Spoiler (click to show/hide)

Thanks, i thought about that today but you confirmed that this is doable, however i am not too sure how to duplicate a creature in a way that it does not
get spawned in world gen.
The target is to create a trainable giant python duplicate only available to one civ this means this duplicate creature, giant_python_2, is not allowed to have any biomes in its raw definition and i need to assign it to the entity with animal_always_present correct?
Logged
Mighty armok help me, for I am lost in your worlds rules!

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« Reply #4334 on: February 10, 2020, 04:48:11 pm »

Yeah, no biomes or population tags and it cant spawn out in the world.
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.
Pages: 1 ... 287 288 [289] 290 291 ... 372