Jump to content

[LE] Alternative to defunct GetKeywordDataForCurrentLocation condition?


Recommended Posts

I'm trying to make a magic effect script that applies a constant effect to the player if they enter a specific cell type, like a draugr lair for example

GetKeywordDataForCurrentLocation would be the perfect condition to accomplish this... if it actually worked

According to the Creation Kit website, the condition is non-functional outside of perhaps the story manager. I tested it extensively myself applying it to a magic effect, and it does indeed seem to have no effect (or rather, it always comes back negative, except if I set to == 0 in which case it essentially does nothing)

So does anyone know any alternatives I could use? Either to get this condition to function, or if there's any other methods for checking location keywords?

Link to comment
Share on other sites

Yeah most of those are for the StoryManager, and it's hard to say what it's really designed to look for.

 

However in your case, there is a nice way around that.

 

LocationHasKeyword : [LocTypeDraugrCrypt] == 1.00 AND

 

You may need to do further isolation though because it's possible not every dungeon containing draugrs will have this keyword.

Edited by Rasikko
Link to comment
Share on other sites

That did it, thanks! Although I had to assign it to the spell rather than the magic effect to get it to function for some reason (for the record though GetKeywordDataFromCurrentLocation works on neither the spell nor the magic effect)

Link to comment
Share on other sites

That did it, thanks! Although I had to assign it to the spell rather than the magic effect to get it to function for some reason (for the record though GetKeywordDataFromCurrentLocation works on neither the spell nor the magic effect)

 

Conditions on magic effects are checked once, when whatever spell/enchantment they're attached to first starts. Conditions applied in the spell form get checked more or less continuously. In general, then, you want the conditions on the magic effects to be ones that are definitive yes/no things, and stuff on the spell to be things that can change.

Link to comment
Share on other sites

 

That did it, thanks! Although I had to assign it to the spell rather than the magic effect to get it to function for some reason (for the record though GetKeywordDataFromCurrentLocation works on neither the spell nor the magic effect)

Â

Conditions on magic effects are checked once, when whatever spell/enchantment they're attached to first starts. Conditions applied in the spell form get checked more or less continuously. In general, then, you want the conditions on the magic effects to be ones that are definitive yes/no things, and stuff on the spell to be things that can change.

This is a fantastic nugget of information. Thanks. I read threads like this just in case this sort of information pops up.

Link to comment
Share on other sites

This is a fantastic nugget of information. Thanks. I read threads like this just in case this sort of information pops up.

 

 

Welcome :) It's really useful, I've found, particularly since there's checks you can make with the condition system that you can't do through Papyrus.

 

For example, there are conditions to check whether someone is talking, or if they're able to offer services, but no real Papyrus equivalents. So if you want to pass that information into Papyrus, you can put a spell on them with the condition, and then have the effect move the target in or out of a formlist depending on if the effect is active (through OnEffectStart and OnEffectFinish events).

 

You might think you could just apply a keyword with the magic effect and not need an attached script, but unfortunately the HasMagicEffect/HasMagicEffectWithKeyword functions will return true if the effect level conditions are met, even if the spell-level ones are not.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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