Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Can you make a single interaction that does multiple different types of effects.  (Read 984 times)

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile

Specifically I want to make an interaction that both results in a material emission, and an effect on the creature doing the interaction. I've made material intermission reactions before, and I've managed to get the effect on the creature to work fine with a syndrome, but I just can't figure out any good way to make a material emission in addition. I've gotten it to select a target for where the material is supposed to be emitted, but I can't actually get it to emit. If anybody could provide an example interaction that'd be great. I'd prefer that most of the interaction be in an interaction file, and then have only a small amount of the code on the creature, because it's going to be used by multiple creatures so I'd like to not clog up their raws with huge interactions.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile

I am pretty sure you can't make it with material emissions, but can with pretty much anything else. Problem is, creatures never use such interactions on their own.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile

I am pretty sure you can't make it with material emissions, but can with pretty much anything else. Problem is, creatures never use such interactions on their own.
I could have the interaction with the effect on the creature give them the ability to perform the material emission, but as you said it's rare for them to use the interactions in the first place so it's really unlikely that the second one would ever be used.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile

I am pretty sure you can't make it with material emissions, but can with pretty much anything else. Problem is, creatures never use such interactions on their own.
I could have the interaction with the effect on the creature give them the ability to perform the material emission, but as you said it's rare for them to use the interactions in the first place so it's really unlikely that the second one would ever be used.
No, what I meant is that if you have an interaction that targets both an enemy and the creature itself, it will never be used by the AI because USAGE_HINT:ATTACK can only target enemies. Unless you are okay with potentially shooting friendlies, in which case you can just remove the usage hint.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile

I am pretty sure you can't make it with material emissions, but can with pretty much anything else. Problem is, creatures never use such interactions on their own.
I could have the interaction with the effect on the creature give them the ability to perform the material emission, but as you said it's rare for them to use the interactions in the first place so it's really unlikely that the second one would ever be used.
No, what I meant is that if you have an interaction that targets both an enemy and the creature itself, it will never be used by the AI because USAGE_HINT:ATTACK can only target enemies. Unless you are okay with potentially shooting friendlies, in which case you can just remove the usage hint.
Wait, so, can it work if the material emission isn't supposed to be used as an attack?
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile

I am pretty sure you can't make it with material emissions, but can with pretty much anything else. Problem is, creatures never use such interactions on their own.
I could have the interaction with the effect on the creature give them the ability to perform the material emission, but as you said it's rare for them to use the interactions in the first place so it's really unlikely that the second one would ever be used.
No, what I meant is that if you have an interaction that targets both an enemy and the creature itself, it will never be used by the AI because USAGE_HINT:ATTACK can only target enemies. Unless you are okay with potentially shooting friendlies, in which case you can just remove the usage hint.
Wait, so, can it work if the material emission isn't supposed to be used as an attack?
You'll have a hard time making it not deal damage from the projectile impact (make it a gas?) but yeah. If you set the usage hint on a material emission to GREETING, it should end up with the projectiles being fired at friendlies. If there is no usage hint, they should just spam it whenever they can.

There appears to be a bug where creatures only use interactions in combat, however. No idea if that's been fixed, but no one's said anything indicating that.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile

I am pretty sure you can't make it with material emissions, but can with pretty much anything else. Problem is, creatures never use such interactions on their own.
I could have the interaction with the effect on the creature give them the ability to perform the material emission, but as you said it's rare for them to use the interactions in the first place so it's really unlikely that the second one would ever be used.
No, what I meant is that if you have an interaction that targets both an enemy and the creature itself, it will never be used by the AI because USAGE_HINT:ATTACK can only target enemies. Unless you are okay with potentially shooting friendlies, in which case you can just remove the usage hint.
Wait, so, can it work if the material emission isn't supposed to be used as an attack?
You'll have a hard time making it not deal damage from the projectile impact (make it a gas?) but yeah. If you set the usage hint on a material emission to GREETING, it should end up with the projectiles being fired at friendlies. If there is no usage hint, they should just spam it whenever they can.

There appears to be a bug where creatures only use interactions in combat, however. No idea if that's been fixed, but no one's said anything indicating that.
Well how do I make an interaction that is both a material emission and a syndrome for the user? That's my main problem to begin with.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia