I feel like a newbie asking this but I have no idea what the difference between these two are.
I might infer that the intrinsic mod is applied from an equipped item and then temp mod maybe by some other means but I'd rather know what their intended use is.
Thanks.
AttributeIntrinsicMod, AttributeTemporaryMod questions
I use TemporaryMods for applying skill or stat related temporary changes - eg an equipped item that gives a skill boost, or a spell that boosts your strength.
GetAttributeTemporaryMod( character, attrname );
and
SetAttributeTemporaryMod( character, attrname, tempmod_tenths );
They work as you'd expect them to except that they are 10 times their actual value. eg This allows you to have a 9.6 boost but still keep it as an integer because you store it as 96.
I use GetAttributeIntrinsicMod for my race related changes.
Eg a human has a permanent +10 applied to their swordsmanship skill. (All my various races have skill bonuses and penalties.)
Like TempMods, IntrinsicMods are also used in 10ths meaning you always set a value 10 times the real value you want.
Because you don't have a SetAttributeIntrinsicMod you might wonder how to use it. Well, it's always a value you calculate so it's easy enough to just retrieve it.
First of all edit your attributes.cfg file. I will just show Swordsmanship, but every stat or skill you want to have an intrinsicmod needs to be modified in the same way:
In a script called intrinsicmods.src I have the following:
There is one of those exported functions for each and every stat and skill you want to have an intrinsicmod for.
I have a common function that actually calculates the intrinsic mod amount. In it's simplest form it is:
If you have these in place, then GetAttributeIntrinsicMod on a human mobile for the swordsmanship skill will return 100.
GetAttributeBaseValue + GetAttributeTemporaryMod + GetAttributeIntrinsicMod = GetAttribute
They are all 10 times their real value except for GetAttribute which automatically adds all the others together, divides it by 10 and turns it into an integer.
Eg for a human swordsman with skill 98.4 with an intrinsic mod of 10 and a weapon with a tempmod of 8:
GetAttributeBaseValue == 984
GetAttributeTemporaryMod == 80
GetAttributeIntrinsicMod == 100
GetAttribute == 116
I also use the GetAttributeIntrinsicMod to set the stat or skill cap higher, thus giving that race an effective boost all the way.
In scripts skill checking you can want to know several things:
GetAttributeBaseValue - no problem, just remember it's 10 times the real value.
GetAttribute - the total and effective skill of the player with all buffs and bonuses applied automatically.
Sometimes, however I want to know the GetAttributeBaseValue PLUS the GetAttributeIntrinsicMod (eg when there is a minimum skill required and you don't want them to cheat with buffs). I wrote a short function to handle this:
GetAttributeTemporaryMod( character, attrname );
and
SetAttributeTemporaryMod( character, attrname, tempmod_tenths );
They work as you'd expect them to except that they are 10 times their actual value. eg This allows you to have a 9.6 boost but still keep it as an integer because you store it as 96.
I use GetAttributeIntrinsicMod for my race related changes.
Eg a human has a permanent +10 applied to their swordsmanship skill. (All my various races have skill bonuses and penalties.)
Like TempMods, IntrinsicMods are also used in 10ths meaning you always set a value 10 times the real value you want.
Because you don't have a SetAttributeIntrinsicMod you might wonder how to use it. Well, it's always a value you calculate so it's easy enough to just retrieve it.
First of all edit your attributes.cfg file. I will just show Swordsmanship, but every stat or skill you want to have an intrinsicmod needs to be modified in the same way:
Code: Select all
Attribute Alchemy
{
desc Swordsmanship
script
GetIntrinsicModFunction intrinsicmods:IntrinModSwordsmanship
}Code: Select all
program IntrinMods()
return 1;
endprogram
exported function IntrinModSwordsmanship(character)
return GetAttIntrinsicMod(character, "Swordsmanship");
endfunctionI have a common function that actually calculates the intrinsic mod amount. In it's simplest form it is:
Code: Select all
function GetAttIntrinsicMod(character, attributeid)
var race := GetObjProperty(character, "racename");
case ( race )
"Human":
case ( attributeid )
"Swordsmanship": change := 10;
default: change := 0;
endcase
endcase
return change * 10;
endfunctionGetAttributeBaseValue + GetAttributeTemporaryMod + GetAttributeIntrinsicMod = GetAttribute
They are all 10 times their real value except for GetAttribute which automatically adds all the others together, divides it by 10 and turns it into an integer.
Eg for a human swordsman with skill 98.4 with an intrinsic mod of 10 and a weapon with a tempmod of 8:
GetAttributeBaseValue == 984
GetAttributeTemporaryMod == 80
GetAttributeIntrinsicMod == 100
GetAttribute == 116
I also use the GetAttributeIntrinsicMod to set the stat or skill cap higher, thus giving that race an effective boost all the way.
In scripts skill checking you can want to know several things:
GetAttributeBaseValue - no problem, just remember it's 10 times the real value.
GetAttribute - the total and effective skill of the player with all buffs and bonuses applied automatically.
Sometimes, however I want to know the GetAttributeBaseValue PLUS the GetAttributeIntrinsicMod (eg when there is a minimum skill required and you don't want them to cheat with buffs). I wrote a short function to handle this:
Code: Select all
function GetBaseAttributeRaceMod(character, attributeid)
return GetAttributeBaseValue(character, attributeid) + GetAttributeIntrinsicMod(character, attributeid);
endfunctionOK. That sounds reasonable.
After reading my question again I see I had the idea backwards.
Temp is for transient boosts/drops as you said like on items and intrinsic is more of a permanent mod based on something about the character that gives them an extra boost or deficiency such as race or gender.
Thanks OnG.
After reading my question again I see I had the idea backwards.
Temp is for transient boosts/drops as you said like on items and intrinsic is more of a permanent mod based on something about the character that gives them an extra boost or deficiency such as race or gender.
Thanks OnG.