Fortify attribute via a script

Post » Tue Jun 14, 2011 9:59 pm

is there any way to accomplish this through a script ?
The issue is I don't want to touch the base actor value.... and modav does not work for attributes, apparently.

In any case, the wiki has being down throughout the day. Bummer... :swear:
User avatar
JUDY FIGHTS
 
Posts: 3420
Joined: Fri Jun 23, 2006 4:25 am

Post » Wed Jun 15, 2011 4:30 am

Have a look http://obse.silverlock.org/obse_command_doc.html, and ModActorValueC. (an obse command.)
User avatar
Pawel Platek
 
Posts: 3489
Joined: Sat May 26, 2007 2:08 pm

Post » Wed Jun 15, 2011 2:48 am

Have a look http://obse.silverlock.org/obse_command_doc.html, and ModActorValueC. (an obse command.)


ok here's the thing, modAVC works much like modAV2, it can diminish the current AV without affecting the base value, however it can't be used to increase it beyond the current base limit.

IE if I use

player.modAVC 4 20


it will restore 20 points of strength, if your strength is below the base value, but it wont increase your strength 20 points.
You may say - well you can use setav strength to set your strength to whatever value you want- yes I could, but there are two problems.

First, altering the baseAV can and will backfire if the player levels up that attribute. Second, the maximum level you can set is 255.

On the other hand, a fortify attribute spell seems to increase your attributes to any amount and without any limits and more important, it does not tamper with the baseAV. So If the players acrobatic skill increases from jumping around, while affected by a fortify acrobatics spell, the base AV will remain the same when the effect wears out.
The problem with using a fortify attribute ability is...... having to create such ability lol. I wandered if there was an easier way to achieve the same result by using a OBSE comand.
User avatar
Brandon Bernardi
 
Posts: 3481
Joined: Tue Sep 25, 2007 9:06 am

Post » Tue Jun 14, 2011 11:13 pm

I could :hugs: you right now


ModAVMod does just what I need !!!!

Thanks for pointing me in the right direction :goodjob:
User avatar
Jason White
 
Posts: 3531
Joined: Fri Jul 27, 2007 12:54 pm

Post » Tue Jun 14, 2011 9:56 pm

is there any way to accomplish this through a script ?
The issue is I don't want to touch the base actor value.... and modav does not work for attributes, apparently.

Who says modAV doesn't work on attributes? It modifies the "script" offset just fine, exactly the same as "ModAVMod script " except it only modifies by integer amounts. In general you have the following options for modifying attributes;

1) ModAV - modifies the "script" offset, does not affect the base value, will show in stats menus as red (drained) or green (fortified), but there is no indication on the magic effects menu. Your mod must track applied offsets and ensure they are correctly removed and don't "leak". Will persist after your mod is removed. Commonly used by old scripts.

2) ModAV2 - modifies the "damage" offset, does not affect the base value, will show in stats menus as red (damaged), but with no indication on the magic effects menu. Cannot be used to fortify attributes past the "max" value. Will persist after your mod is removed, can also be reversed/removed by "restore" spells/effects. Effectively the same as damage/restore spells.

3) Fortify/Drain abilities - modifies the base value! Will not show in stats menus as red/green, but will show as an "Ability" effect in the magic effects menu. Easy to apply using AddSpell and persists until RemoveSpell.

4) Fortify/Drain spells - modifies the "max" offset, does not affect the base value, will show in stats menus as red/green, and will also show as a "Spell" effect in the magic effects menu and as a spell/timer icon. Spells have a limited duration and must be applied by casting from another actor/activator, which can be a pain to implement.

5) Fortify/Drain diseases - modifies the "max" offset, does not affect the base value, will show in stats menus as red/green, and will show as a "Disease" effect in the magic effects menu. Persistent and easily applied/removed using AddSpell/RemoveSpell. Is "catching" and can be automatically applied to other nearby actors (from attacks?). Can also be identified as a disease by other mods causing unexpected interactions.

6) Fortify/Drain tokens (slot-less unplayable enchanted item) - modifies the "max" offset, does not affect the base value, will show in stats menus as red/green, and as an "Enchantment" effect in the magic effects menu. Easy to apply and remove using AddItem/EquipItemSilent and UnequipItemSilent/RemoveItem.

3) ModAVMod - new OBSE function that can be used to modify any of the 'script", "damage", or "max" offsets. Note it is highly inadvisable to modify the "max" offset without also modifying some applied fortify/drain effect... the "max" offset should correctly sum to all the applied fortify/drain effects and if it doesn't strange bugs can happen. Accepts float value offsets, which is particularly nice for modifying self-healing attributes like fatigue by fractional amounts to slow recovery without causing "jitter" effects.

AFAIK the only thing that can mess with attribute advancement in any way is drain/fortify abilities. Since these affect the base value, they modify how much experience is required for advancement, so a drain ability will cause a skill to advance faster, and a fortify ability will cause the skill to advance slower, and these advancements will still exist after the ability is removed. The skeleton key is famous for this... your security skill almost stops advancing when you have it. All other forms of attribute modification should not affect attribute advancement; skills will advance at the normal rate and will still be there after the modification is removed.
User avatar
RaeAnne
 
Posts: 3427
Joined: Sat Jun 24, 2006 6:40 pm

Post » Wed Jun 15, 2011 6:17 am

Who says modAV doesn't work on attributes? It modifies the "script" offset just fine, exactly the same as "ModAVMod script " except it only modifies by integer amounts. In general you have the following options for modifying attributes;

1) ModAV - modifies the "script" offset, does not affect the base value, will show in stats menus as red (drained) or green (fortified), but there is no indication on the magic effects menu. Your mod must track applied offsets and ensure they are correctly removed and don't "leak". Will persist after your mod is removed. Commonly used by old scripts.

2) ModAV2 - modifies the "damage" offset, does not affect the base value, will show in stats menus as red (damaged), but with no indication on the magic effects menu. Cannot be used to fortify attributes past the "max" value. Will persist after your mod is removed, can also be reversed/removed by "restore" spells/effects. Effectively the same as damage/restore spells.

3) Fortify/Drain abilities - modifies the base value! Will not show in stats menus as red/green, but will show as an "Ability" effect in the magic effects menu. Easy to apply using AddSpell and persists until RemoveSpell.

4) Fortify/Drain spells - modifies the "max" offset, does not affect the base value, will show in stats menus as red/green, and will also show as a "Spell" effect in the magic effects menu and as a spell/timer icon. Spells have a limited duration and must be applied by casting from another actor/activator, which can be a pain to implement.

5) Fortify/Drain diseases - modifies the "max" offset, does not affect the base value, will show in stats menus as red/green, and will show as a "Disease" effect in the magic effects menu. Persistent and easily applied/removed using AddSpell/RemoveSpell. Is "catching" and can be automatically applied to other nearby actors (from attacks?). Can also be identified as a disease by other mods causing unexpected interactions.

6) Fortify/Drain tokens (slot-less unplayable enchanted item) - modifies the "max" offset, does not affect the base value, will show in stats menus as red/green, and as an "Enchantment" effect in the magic effects menu. Easy to apply and remove using AddItem/EquipItemSilent and UnequipItemSilent/RemoveItem.

7) ModAVMod - new OBSE function that can be used to modify any of the 'script", "damage", or "max" offsets. Note it is highly inadvisable to modify the "max" offset without also modifying some applied fortify/drain effect... the "max" offset should correctly sum to all the applied fortify/drain effects and if it doesn't strange bugs can happen. Accepts float value offsets, which is particularly nice for modifying self-healing attributes like fatigue by fractional amounts to slow recovery without causing "jitter" effects.

AFAIK the only thing that can mess with attribute advancement in any way is drain/fortify abilities. Since these affect the base value, they modify how much experience is required for advancement, so a drain ability will cause a skill to advance faster, and a fortify ability will cause the skill to advance slower, and these advancements will still exist after the ability is removed. The skeleton key is famous for this... your security skill almost stops advancing when you have it. All other forms of attribute modification should not affect attribute advancement; skills will advance at the normal rate and will still be there after the modification is removed.




Thanks for the thorough explanation. :)

However I have to disagree with you on one point; ModAV does not change the offset. I've just tested it. ModAV speed 100, does not fortify your speed 100 points, nor does for strength, acrobatics, health or fatigue.
User avatar
Curveballs On Phoenix
 
Posts: 3365
Joined: Sun Jul 01, 2007 4:43 am

Post » Wed Jun 15, 2011 3:45 am

Note that modAV from the console behaves differently to modAV in a script. At the console it behaves like modAV2, but in a script it behaves as described above. So yeah, at the console it will not increase attributes past their max, but in a script it will.
User avatar
Claire Mclaughlin
 
Posts: 3361
Joined: Mon Jul 31, 2006 6:55 am


Return to IV - Oblivion