Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Disabling natural abilities  (Read 823 times)

Dunamisdeos

  • Bay Watcher
  • Duggin was the hero we needed.
    • View Profile
Disabling natural abilities
« on: March 06, 2019, 02:57:20 pm »

Hey folks,

Trying to disable a creature's natural ability through a syndrome. It has a projectile attack that I want to have disabled upon contracting a specific syndrome. Unfortunately, I'm apparently not sure how this would work. I tried using [IMPAIR_FUNCTION] to disable the required body parts, but that only works on organs.

To be honest the required body parts are internal. How do you define something in such a way as the game considers it an organ? I'm looking at, say, liver, and it looks like it just has [SMALL] and [INTERNAL] tags, which my custom parts already have. Is there an alternate way to disable those parts and thereby prevent the use of a natural ability for the duration of a syndrome?

Thanks in advance.
Logged
FACT I: Post note art is best art.
FACT II: Dunamisdeos is a forum-certified wordsmith.
FACT III: "All life begins with Post-it notes and ends with Post-it notes. This is the truth! This is my belief!...At least for now."
FACT IV: SPEECHO THE TRUSTWORM IS YOUR FRIEND or BEHOLD: THE FRUIT ENGINE 3.0

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: Disabling natural abilities
« Reply #1 on: March 06, 2019, 03:39:44 pm »

I have tried impairing body parts in an attempt to disable interaction use before, and it didn't seem to work in the slightest. IIRC the part was even turning blue and everything.

If you want a slightly hacky way of getting your desired effect, what you can do is remove your projectile attack from your creature, then give it an interaction that gives itself an interaction to make the same projectile attack with the same cooldown as your projectile interaction did, and have no usage hint attached (it will use it whenever available during combat). You can then use IT_CANNOT_HAVE_SYNDROME_CLASS to prevent it from giving itself the ability to use the projectile attack when it contracts whatever syndrome you want to turn its attack off.
Logged
Fallout Equestria Redux - that's right, it's back

Dunamisdeos

  • Bay Watcher
  • Duggin was the hero we needed.
    • View Profile
Re: Disabling natural abilities
« Reply #2 on: March 06, 2019, 04:02:29 pm »

That works. Bit cumbersome to use when controlling the creature oneself, but there should be no visible difference when fighting it in combat.

Thanks for the innovative tip, I'll probably use that. If anyone else has a more direct way, I'm still all ears.
Logged
FACT I: Post note art is best art.
FACT II: Dunamisdeos is a forum-certified wordsmith.
FACT III: "All life begins with Post-it notes and ends with Post-it notes. This is the truth! This is my belief!...At least for now."
FACT IV: SPEECHO THE TRUSTWORM IS YOUR FRIEND or BEHOLD: THE FRUIT ENGINE 3.0

Nahere

  • Bay Watcher
    • View Profile
Re: Disabling natural abilities
« Reply #3 on: March 06, 2019, 05:50:09 pm »

One other way is to give the interaction [CDI:VERBAL] and have the cancelling syndrome remove [CAN_SPEAK].
Logged

Dunamisdeos

  • Bay Watcher
  • Duggin was the hero we needed.
    • View Profile
Re: Disabling natural abilities
« Reply #4 on: March 06, 2019, 08:34:51 pm »

Having a bit of trouble getting this to work. I've never defined a projectile defense outside of a creature raw, and I'm a bit confused as to how to grant it that ability. I've got it working to grant it a new "power", aka the projectile, but it's not recognizing the ability to be given.

Thanks again.
Logged
FACT I: Post note art is best art.
FACT II: Dunamisdeos is a forum-certified wordsmith.
FACT III: "All life begins with Post-it notes and ends with Post-it notes. This is the truth! This is my belief!...At least for now."
FACT IV: SPEECHO THE TRUSTWORM IS YOUR FRIEND or BEHOLD: THE FRUIT ENGINE 3.0

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: Disabling natural abilities
« Reply #5 on: March 08, 2019, 08:58:15 pm »

I modified some RAWs I had lying around into these. Use them as a base if you like.
Code: (In interaction RAWs) [Select]
[INTERACTION:PREPARE_PROJECTILE_ATTACK]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:TEST_SYN_CLASS]
[IT_MANUAL_INPUT:self]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_CLASS:ACTIVE]
[SYN_NAME:projectile launch syn][SYN_NO_HOSPITAL]
[CE_CAN_DO_INTERACTION:START:1:END:10]
[CDI:INTERACTION:MATERIAL_EMISSION]
[CDI:ADV_NAME:fire projectile]
[CDI:USAGE_HINT:ATTACK]
[CDI:MATERIAL:INORGANIC:IRON:SOLID_GLOB]
[CDI:TARGET:C:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:C:20]
[CDI:MAX_TARGET_NUMBER:C:1]
[CDI:VERB:fire:fires:NA]
[CDI:WAIT_PERIOD:10]
Code: (In creature RAWs) [Select]
[CAN_DO_INTERACTION:PREPARE_PROJECTILE_ATTACK]
[CDI:ADV_NAME:prepare projectile attack]
[CDI:TARGET:A:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:A:20]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:VERB:prepare to fire a projectile:prepares to fire a projectile:NA]
[CDI:TARGET:A:SELF_ONLY]
[CDI:WAIT_PERIOD:300]
I stuck the interaction in dwarf raws, the interaction in interaction_standard, and added [SYN_CLASS:TEST_SYN_CLASS] to cave spider bites (applying it in testing via dfhack), and it did everything you want it to AFAICT. Dwarves shot blobs of iron at each other unless they were given the cave spider bite syndrome.
Logged
Fallout Equestria Redux - that's right, it's back

Dunamisdeos

  • Bay Watcher
  • Duggin was the hero we needed.
    • View Profile
Re: Disabling natural abilities
« Reply #6 on: March 08, 2019, 09:40:27 pm »

Thanks much! yeah i had the part where it granted the new ability down pat, but for some reason it wouldn't recognize my projectile.

I can't even see on looking at it what I had wrong, but when I get back to a place where I can examine it I'll use this as a guide. I'm sure it's something ridiculous/small, as such things tend to be :)

Thanks again for the detailed assistance.
Logged
FACT I: Post note art is best art.
FACT II: Dunamisdeos is a forum-certified wordsmith.
FACT III: "All life begins with Post-it notes and ends with Post-it notes. This is the truth! This is my belief!...At least for now."
FACT IV: SPEECHO THE TRUSTWORM IS YOUR FRIEND or BEHOLD: THE FRUIT ENGINE 3.0

Dunamisdeos

  • Bay Watcher
  • Duggin was the hero we needed.
    • View Profile
Re: Disabling natural abilities
« Reply #7 on: March 09, 2019, 05:42:42 pm »

Yep, I was doing it wrong entirely when defining the material emission.

Mystery solved, thanks again!
Logged
FACT I: Post note art is best art.
FACT II: Dunamisdeos is a forum-certified wordsmith.
FACT III: "All life begins with Post-it notes and ends with Post-it notes. This is the truth! This is my belief!...At least for now."
FACT IV: SPEECHO THE TRUSTWORM IS YOUR FRIEND or BEHOLD: THE FRUIT ENGINE 3.0