Ho would someone write a custom "Aura" script. The aura adds a +1 to hit and saves to the owner of the feat and to all allies within the area of effect. This is for a passive custom class feat.
Aura scripts
#1
Posté 11 avril 2015 - 07:56
#2
Posté 11 avril 2015 - 08:15
I'd start by copying the On Enter, On Heartbeat, and On Exit scripts for one of the bardic inspirations. There may be one that matches that description.
Once you have new copies of them, edited if necessary, you can create the aura by creating a custom AoE effect on the intended creature, specifying those three scripts during the creation. Something like this, I think:
eAoE = EffectAreaOfEffect(AOE_PER_CUSTOM_AOE, sOnEnterScript, sHeartbeatScript, sOnExitScript, sAuraTag); ApplyEffectToObject(DURATION_TYPE_PERMANENT, eAoE, oTarget);
Making sure to appropriately define those variables somewhere, of course. Then when you want to remove it, you can just use DestroyObject on sAuraTag.
#3
Posté 11 avril 2015 - 11:02
I'd start by copying the On Enter, On Heartbeat, and On Exit scripts for one of the bardic inspirations. There may be one that matches that description.
Once you have new copies of them, edited if necessary, you can create the aura by creating a custom AoE effect on the intended creature, specifying those three scripts during the creation. Something like this, I think:
eAoE = EffectAreaOfEffect(AOE_PER_CUSTOM_AOE, sOnEnterScript, sHeartbeatScript, sOnExitScript, sAuraTag); ApplyEffectToObject(DURATION_TYPE_PERMANENT, eAoE, oTarget);Making sure to appropriately define those variables somewhere, of course. Then when you want to remove it, you can just you DestroyObject on sAuraTag.
I tried inspire courage but the script was written with song scrips in mind rather than spell. Will they work? How would I write a simple sHeartbeatScript?
#4
Posté 11 avril 2015 - 11:42
If the example you chose doesn't use a heartbeat script, then you probably don't need one, and can leave that one blank. You can define it as "" (empty quotes) in the function.
I don't know that there's any functional difference between a song script and a spell script in terms of applying and removing buffs, but in any case I'd just use the scripts as a jumping off point and edit them as needed.
#5
Posté 12 avril 2015 - 12:24
Ho would someone write a custom "Aura" script. The aura adds a +1 to hit and saves to the owner of the feat and to all allies within the area of effect. This is for a passive custom class feat.
this isn't simple. It needs a feat in Feat.2da, refering to a spellability in Spells.2da, which fires a script that creates a persistent AoE, that has to be defined in Vfx_persistent.2da, that handles 2 other scripts for onEnter and onExit ...
if you want to go down that rabbit hole i'll wander around with ya for a while,
#6
Posté 12 avril 2015 - 12:37
There shouldn't be any need to edit vfx_persistent.2da.
#7
Posté 12 avril 2015 - 01:24
#8
Posté 12 avril 2015 - 03:31
I could have phrased that better. What I said should be interpreted to mean that it's not strictly necessary to edit vfx_persistent.2da, though that is of course another perfectly good way of approaching the task.
#9
Posté 12 avril 2015 - 04:15
this isn't simple. It needs a feat in Feat.2da, refering to a spellability in Spells.2da, which fires a script that creates a persistent AoE, that has to be defined in Vfx_persistent.2da, that handles 2 other scripts for onEnter and onExit ...
if you want to go down that rabbit hole i'll wander around with ya for a while,
I already know how to alter feat.2da and spell.2da files, that is not the problem. I have made many custom feats, spells and classes, I just cannot find a decent resource to guide me into making my own custom aura effect for the next custom class I am trying to make.
#10
Posté 12 avril 2015 - 04:36
// Create an Area Of Effect effect in the area of the creature it is applied to. // If the scripts are not specified, default ones will be used. // You can also specify a tag for the effect object that will be created when // the effect is applied. // Brock H. - OEI 04/21/06 -- Added sEffectTag - this is a tag which will // be set on the spawned AoE object, so that it can be accessed later. effect EffectAreaOfEffect(int nAreaEffectId, string sOnEnterScript="", string sHeartbeatScript="", string sOnExitScript="", string sEffectTag="");eg. the spell Battletide 'x2_s0_batttide' uses onEnter 'x2_s0_batttidea' and onExit 'x2_s0_batttideb' scripts
(the suffixes a,b,c generally mean onEnter,onExit,onHB)
to see how it goes together, gander at Vfx_persistent.2da, #41
#11
Posté 12 avril 2015 - 10:34
I could have phrased that better. What I said should be interpreted to mean that it's not strictly necessary to edit vfx_persistent.2da, though that is of course another perfectly good way of approaching the task.
Using the custom AOE script function allows you to bypass the need to edit vfx_persistent.2da - however you'll have no control over the shape or size of the aura (you're stuck with a 5m radius circle). If you want more control over the aura, then the 2DA becomes your friend. Personally, I'm usually happy with a 5m circle (as it means one less 2DA to edit).
#12
Posté 13 avril 2015 - 01:16
I'd have to look into it again, but I think it may be possible not to be limited to the 5m circle, if there are other AoEs in the 2DA that differ only in what scripts they contain, since the function will override what's in the 2DA with whatever scripts you specify.





Retour en haut






