Aller au contenu

Photo

skillcheck in conversation (solved)


11 réponses à ce sujet

#1
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
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.

Modifié par gordonbrown82, 06 janvier 2010 - 12:21 .


#2
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
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
Mengtzu

Mengtzu
  • Members
  • 258 messages
 Try http://social.biowar...71/index/526679

Modifié par Mengtzu, 05 janvier 2010 - 08:53 .


#4
Mengtzu

Mengtzu
  • Members
  • 258 messages
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.

#5
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
the fist solution worked but the second did not.

#6
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
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)


#7
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
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
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
double post

Modifié par gordonbrown82, 05 janvier 2010 - 10:34 .


#9
Mengtzu

Mengtzu
  • Members
  • 258 messages
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.

#10
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
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
gordonbrown82

gordonbrown82
  • Members
  • 544 messages

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 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.



yup that worked. thanks for the help i appriciate it.

Modifié par gordonbrown82, 06 janvier 2010 - 12:22 .


#12
gordonbrown82

gordonbrown82
  • Members
  • 544 messages

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.