Jump to content

Conditions on abilities/spells


Recommended Posts

Can someone conform how conditions work with spells/abilities?

 

if an ability has a condition that isn't true when the character (player) aquires the ability, does the oneffectstart not fire and then fire when the condition comes true? Will there be an oneffectstop event when the condition no longer attains?

The condition I'm thinking of is one of the isincombat ones since there is no event for the player on starting combat - apparently works for NPCs though.

Also, there is a conditions tab on both the effect and the spell dialogue, what's the difference?

 

I'm hoping to fake player starts and stops combat events.

 

 

 

diziet

Link to comment
Share on other sites

I've added the condition 'IsInCombat' to a spell. it works every time. An ability is nothing more than a spell, so it should work. Never tested it, though. It definitely works on the player. My spell was a teleport spell. I wanted it to work from interiors, so I made it that way. I didn't want the player to teleport out of battle. I used that condition. It worked in testing.

 

I'd try it and see. Can't see why it won't work for an ability.

Link to comment
Share on other sites

I put it on the magic effect because I always wanted this condition to work on the teleport spell. I've not added a condition when assigning the magic effect to a spell. I'd think that it could be done either way.

 

There is likely an option to apply conditions at the point of attaching the magic effect to the spell, so that you can be flexible with conditions. For instance If a magic effect that you want to use has no conditions, but you want your spell to only work when the weather is fine, you could add the weather condition when you add the effect to your spell. This way you don't need to duplicate a magic effect.

 

I wouldn't know if the conditions on the spell take priority over any conditions on the magic effect. It would be good to know. I may do some testing on this, unless someone has tried this before and can let us both know!

 

It may not work. I don't know of any vanilla ability that uses conditions.

 

If the condition doesn't work, I haven't got a clue. As you say, the event 'OnCombatStateChanged' won't work for the player.

 

I'm interested in how tthis goes for you.

Link to comment
Share on other sites

Abilities with conditions check every second.

 

Spell conditions affect what will happen to the spell when it was attempted to be cast, it has nothing to do with magic effect conditions, which affect the effect that is attempting to be applied. Spell conditions in this case take priority for they must affect the target in order for the magic effect to activate and read its own conditions.

 

 

This is a logical guess.

Edited by Rasikko
Link to comment
Share on other sites

@ Rasikko

"Abilities with conditions check every second."

I intend on adding 1 last add-on to the main boss fight on my mod's final update, and the 'Hidden' ability that will be added to the player (only in 1 cell) will have the 'IsSneaking' condition (or something like this, i don't remember the exact name of the condition right now), to make the main boss fight a little more intresting and hard.


BUT


I've been researching this with no available data on this subject anywhere, the logical conclusion is the one you mentioned.

So i've been trying to find a way to test this but i'm out of ideas on how to test this, because if it's "checking every second" then this is a really big issue for me, since this will be implemented on the heaviest scripted part / cell of the whole mod, there is already way too much going on and right now everything is working like a swiss clock.

Any ideas or suggestions...


* It would be very cool if i could add this idea without putting additional stress to the system.


* Sorry dizietemblesssma for steping in like this with my issue.


Thank you very much in advance.

Edited by maxarturo
Link to comment
Share on other sites

 

@ Rasikko
"Abilities with conditions check every second."
I intend on adding 1 last add-on to the main boss fight on my mod's final update, and the 'Hidden' ability that will be added to the player (only in 1 cell) will have the 'IsSneaking' condition (or something like this, i don't remember the exact name of the condition right now), to make the main boss fight a little more intresting and hard.
BUT
I've been researching this with no available data on this subject anywhere, the logical conclusion is the one you mentioned.
So i've been trying to find a way to test this but i'm out of ideas on how to test this, because if it's "checking every second" then this is a really big issue for me, since this will be implemented on the heaviest scripted part / cell of the whole mod, there is already way too much going on and right now everything is working like a swiss clock.
Any ideas or suggestions...
* It would be very cool if i could add this idea without putting additional stress to the system.
* Sorry dizietemblesssma for steping in like this with my issue.
Thank you very much in advance.

 

 

I found a way to implement my idea without adding additional stress to the system, but i'm still interested in this if anyone read or has any data on this.
Thanks.
Link to comment
Share on other sites

I will rephrase what I said about the checking: The condition system processes the statements every second.

 

This has been confirmed so very long ago.

 

I can't say for certain what are the ramifications of having abilities/spells/magic effects/perks that run conditions along side scripts that have polling of some kind.

 

If you want to at least get a handle on optimizing your scripts, something you have control over, then I could suggest making use of Debug.StartStackProfiling()/StopStackProfiling(), and see if your scripts are too slow (I usually try to get mine under 1s), it's in milliseconds, so you'll need to convert to seconds. It will tell you what functions are making other functions "wait" (queuing) and how long this wait is(for example, pretty much any function that returns a reference is gonna take time to return). The beauty of papyrus is that you don't necessarily need to put everything in one script, slower operations can be called elsewhere - running in parallel.

Edited by Rasikko
Link to comment
Share on other sites

@ Rasikko


"This has been confirmed so very long ago."

I could not possibly know everything that's out there.


* Thanks for the suggestion.


* I did found a way how to test this, but i will do it after i upload the mod, since i don't need to use it in my current project.


Have a pleasant day.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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