Hi everyone,
Maybe I am overlooking something, but I cannot figure out how to permanently raise an attribute (like strength or dexterity) of the main character and/or a companion via a script. Can anyone help please?
Thanks a lot!
Script to raise attributes?
Débuté par
Anysecondnow
, nov. 27 2011 01:03
#1
Posté 27 novembre 2011 - 01:03
#2
Posté 27 novembre 2011 - 01:44
first get the ability score without enhancements -->int GetAbilityScore(object oCreature, int nAbilityType, TRUE); (the TRUE at the end doesnt consider any enhancement)
you add a number and then using void SetBaseAbilityScore(object oCreature, int nAbilityType, int nScore);
if you want to be able to return to the original value, use SetLocalInt with the original value.
That set permanently a new ability score,
you add a number and then using void SetBaseAbilityScore(object oCreature, int nAbilityType, int nScore);
if you want to be able to return to the original value, use SetLocalInt with the original value.
That set permanently a new ability score,
#3
Posté 27 novembre 2011 - 09:55
Keep in mind that permanently modifying ability scores via script can result in an 'illegal' character:
http://nwn2.wikia.co...aseAbilityScore
http://nwn2.wikia.co...aseAbilityScore
Modifié par DannJ, 27 novembre 2011 - 09:55 .
#4
Posté 27 novembre 2011 - 10:57
Thx, mogromon & DannJ. Just to be on the safe side: what does "illegal" mean in this context? Does this refer to mp?
#5
Posté 27 novembre 2011 - 11:28
If some servers for persistant worlds or other multiplayer situations check for "illegal" characters, then this will make them "illegal". If you are making a SP module, then it probably isn't a problem. I've done this in both the modules I've made and no one has complained.
#6
Posté 28 novembre 2011 - 05:55
Thx, M. Rieder! I am working on a SP module indeed.
#7
Posté 28 novembre 2011 - 07:15
Great. You will probably be fine if you use it. I know on my first mod, I agonized about using it, but here it is about 18 months after release and no one has complained. I'm sure you will be fine.





Retour en haut






