Jump to content

"Auto-Unlocking" abilities for NPCs, how to do it?


LordThauron

Recommended Posts

Just something of an idea I'm hoping to incorporate into my "Chronicles of the Fallen Order" mod, but I've run into something of a snag for what I thought was a relatively simple process that wouldn't be complicated at all. The idea is for various abilities NPCs will have to "unlock" upon their health being reduced below a certain value or percentage of their overall health, and to do so automatically. The same could also apply in reverse, with abilities being removed when their health drops below the aforementioned thresholds or when they heal themselves back above them. I'd prefer to be able to do this without resorting to scripts as well (meaning only using the conditions section for magic effects in the CK, assuming that's where it should be), and I'm fairly sure they exist.

 

I'll likely have to use some actual scripting as the mod's development continues, but for now I'm trying to keep it simple.

 

 

There are two main categories for this:

- Passive Abilities

- Active Abilities

 

Passive abilities are simply "buffs" (mostly, could make some "trade-off" abilities based on this as well), intended to make an enemy more dangerous as their health gets lower. The other detail is that they'll have visual flags, largely based on the built-in visual effects from the game (such as the swirling blue mist from Dragonrend); a way of indicating to the player that the ability is now active. These should also have no set duration, only being "on" or "off" depending on whether or not an enemy's health is above or below a certain threshold.

 

Active abilities are a bit more straight-forward, but the potential issue is that enemies may "waste" using the ability when it doesn't have any effect until their health drops below certain values. This is largely a question of whether or not the AI automatically doesn't use abilities which are flagged not to work until the conditions are met. A potential work-around could be having multiple effects layered into the active abilities, but more effects are applied as the conditions are met; leading to the same ability getting more potent as the NPC's health gets lower.

 

 

Just looking for some quick guidance on the subject, thanks in advance.

Link to comment
Share on other sites

 

Certainly useful in the long run, but I'm looking for a simpler solution than the full-blown scripting method right now. Just the same, thanks.

 

 

Passive abilities: can be achieved without script by add conditions to abilities instead of magic effects

Active abilities: I don't get the difference between it and passive abilities from your post, sorry

 

Passives - A bit closer to what I'm looking for, but a more accurate question is which condition flag would get the desired results. To be specific, the list of conditions from the drop-down menu (health percentage I've already found, but it's segment immediately before that) and what the condition should be "run on".

 

Actives - I suppose it wasn't worded correctly, but the idea is for an enemy only using a particular ability until they're below a certain amount of health. For example, below 50% health, an enemy would gain the Unrelenting Force shout. The same flag for passives would mean certain aspects of an ability could be turned on and off based on an enemy's health, but my concern is the enemy using a "useless" ability due to the AI ignoring these same flags.

 

Still, thanks for your help.

Link to comment
Share on other sites

First, for passive abilities, the condition must be assigned to the effect within ability (i.e. the Effect Item window), not the magic effect itself. there are several conditions to use: GetActorValuePercent, GetHealthPercentage. The comparison value should be from 0 to 1 and Run on Subject

 

For Active abilities, I tried adding the conditions but seemed like the AI was not that intelligent, NPC will still use the spell even though it won't have any effect. My suggestion is to create a passive ability that when activate will give NPC the spell, of course that will require little scripting

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...