Here's an untested stab at a solution to making conversation check conditionals where you don't need to make one for every possible DC and every possible skill.
In conversations there are 3 primary skills that get used.
They are Bluff, Intimidate, Persuade
This system uses the skills on the NPCs. The persuade, bluff and intimidate skills on NPCs are not used by the game engine since an NPC cannot bluff, persuade or intimidate the PC. The skills are still part of the NPC and can be used to store the difficulty checks for them instead of creating local variables. When an NPC is created that you want to use one of these skills in a conversation you set the base difficulty for checks on that NPC.
So for a stupid guard, you might set the PERSUADE skill to 7, but for a clever magistrate you might set it to 15.
Also, sometimes the DCs for these might change in a conversation depending upon what is being said.
For example, convincing the guard that you are lost might be easier than convincing the guard that you are really the King in disguise. To allow this kind of modification a modifier is added to adjust for easy, average or difficult checks.
=================================================
#include "nw_i0_tool"
//These are the modifiers for relative difficulty of checks
int SKILLCHECK_EASY = -5;
int SKILLCHECK_AVERAGE = 0;
int SKILCHECK_HARD = 5;
//This is a utility function for using skills stored on an NPC for checks
int passedSkillCheck( int whichSkill, int easyHard )
{
int pcRoll = d20(1);
object oPC=GetPCSpeaker();
int pcSkill=GetSkillRank(whichSkill, oPC);
int npcSkill = GetSkillRank( whichSkill, OBJECT_SELF );
int pcTotal = (pcSkill + pcRoll) - (npcSkill + easyHard);
return pcTotal > 0 ? 1 : 0;
}
==============================================================================
Now make 9 conditional functions, 1 for each of the skills at each of the 3 difficulty levels.
//Example: Easy Persuade
int StartingConditional()
{
return passedSkillCheck( SKILL_PERSUADE, SKILLCHECK_EASY );
}
//Example: Difficult Persuade
int StartingConditional()
{
return passedSkillCheck( SKILL_PERSUADE, SKILLCHECK_HARD );
}
Now for any NPC that needs to make an easy persuade check. You would set the default persuade skill check in the NPC's persuade skill and use the conditional for the Easy Persuade shown above.
Modifié par Mudeye, 17 juin 2011 - 09:56 .