Modifié par gordonbrown82, 06 janvier 2010 - 12:21 .
skillcheck in conversation (solved)
Débuté par
gordonbrown82
, janv. 05 2010 06:55
#1
Posté 05 janvier 2010 - 06:55
I was wondering how to make a conversation option available only to characters with the first persuasion skill or a charisma/personality greater than say 14.
#2
Posté 05 janvier 2010 - 08:31
if that's not possible then how to make a persuation attempt succesful given that the player has the right skill level/characteristic. any help greatly appriciated i can't find text about this on the wiki or any of the modding sites or here.
#3
Posté 05 janvier 2010 - 08:52
#4
Posté 05 janvier 2010 - 08:59
For your first request you could do something like
int StartingConditional() {
object oHero = GetHero();
if (HasAbility(ABILITY_SKILL_PERSUADE_1) || (GetCreatureProperty(oHero, PROPERTY_ATTRIBUTE_INTELLIGENCE) > 13.00))) {
return TRUE;
} else {
return FALSE;
}
}
Note that isn't tested code, but it should give you an idea.
int StartingConditional() {
object oHero = GetHero();
if (HasAbility(ABILITY_SKILL_PERSUADE_1) || (GetCreatureProperty(oHero, PROPERTY_ATTRIBUTE_INTELLIGENCE) > 13.00))) {
return TRUE;
} else {
return FALSE;
}
}
Note that isn't tested code, but it should give you an idea.
#5
Posté 05 janvier 2010 - 10:16
the fist solution worked but the second did not.
#6
Posté 05 janvier 2010 - 10:23
that code looks good to my untrained eyes though except perhaps one ) too many. i got this error message while exporting:
available.nss - available.nss(9): Declaration does not match parameters (HasAbility) (while compiling var_constants_h.nss)
available.nss - available.nss(9): Declaration does not match parameters (HasAbility) (while compiling var_constants_h.nss)
#7
Posté 05 janvier 2010 - 10:32
if there are any #includes left out of the last code piece you posted it would help if you added those because i don't know which ones are required by just seeing the functions in the code.
#8
Posté 05 janvier 2010 - 10:33
double post
Modifié par gordonbrown82, 05 janvier 2010 - 10:34 .
#9
Posté 05 janvier 2010 - 10:48
Should be HasAbility(oHero, ABILITY_SKILL_PERSUADE_1)
Sorry, I just mashed it in there, I didn't check it through the toolset or anything
However if you get that error again with anything, just double-click the function name and you can see which parameters are missing.
There shouldn't be any extra includes needed there.
Sorry, I just mashed it in there, I didn't check it through the toolset or anything
There shouldn't be any extra includes needed there.
#10
Posté 06 janvier 2010 - 12:15
There are generic skill check plot flags that can be used, if you just want to match what was done in the main game. Look in gen00pt_skills, and use them directly in the converstaion: no need for a custom script.
#11
Posté 06 janvier 2010 - 12:21
Mengtzu wrote...
Should be HasAbility(oHero, ABILITY_SKILL_PERSUADE_1)
Sorry, I just mashed it in there, I didn't check it through the toolset or anythingHowever if you get that error again with anything, just double-click the function name and you can see which parameters are missing.
There shouldn't be any extra includes needed there.
yup that worked. thanks for the help i appriciate it.
Modifié par gordonbrown82, 06 janvier 2010 - 12:22 .
#12
Posté 06 janvier 2010 - 12:50
DavidSims wrote...
There are generic skill check plot flags that can be used, if you just want to match what was done in the main game. Look in gen00pt_skills, and use them directly in the converstaion: no need for a custom script.
this worked as well but not for the skill II cunning check as far as i can see, just for cunning.





Retour en haut






