Difference between revisions of "SetNthEffectItemMagnitude"

m
store integer data
imported>Haama
(Notes)
imported>Haama
m (store integer data)
Line 7: Line 7:
* You can set the magnitude of a spell to a negative number. The spell will have the opposite effect. For example, if you set a '''Damage Health''' spell to -10 (Duration 1), and cast it on the player, the player will gain 10 health. Unlike the above, a fraction will be rounded up (i.e., -2.6 will be -2).
* You can set the magnitude of a spell to a negative number. The spell will have the opposite effect. For example, if you set a '''Damage Health''' spell to -10 (Duration 1), and cast it on the player, the player will gain 10 health. Unlike the above, a fraction will be rounded up (i.e., -2.6 will be -2).
** Only '''Damage Health''' has been tested so far, so results may vary.
** Only '''Damage Health''' has been tested so far, so results may vary.
* You can set the magnitude of any magic item, even if it normally doesn't have a magnitude and it's grayed out in the CS. This magnitude won't do anything or even appear in-game, but you can retrieve it with [[GetNthEffectItemMagnitude]], making it a good way to store data.
* You can set the magnitude of any magic item, even if it normally doesn't have a magnitude and it's grayed out in the CS. This magnitude won't do anything or even appear in-game, but you can retrieve it with [[GetNthEffectItemMagnitude]], making it a good way to store integer data.
* (Unconfirmed, but likely) Using this function on a non-cloned spell (any spells from Oblivion.esm or mods) will change the magnitude of the spell, but only until the player re-loads their game. The most likely explanation is that Oblivion retrieves the spell's data from the mod/Oblivion.esm when loading, while cloned spells' data come from the save file itself.
* (Unconfirmed, but likely) Using this function on a non-cloned spell (any spells from Oblivion.esm or mods) will change the magnitude of the spell, but only until the player re-loads their game. The most likely explanation is that Oblivion retrieves the spell's data from the mod/Oblivion.esm when loading, while cloned spells' data come from the save file itself.


Anonymous user