Difference between revisions of "Talk:WillIntimidateSucceed - Actor"

Jump to navigation Jump to search
GetLevel ID'd
imported>DavidJCobb
m (typo in method name)
imported>DavidJCobb
(GetLevel ID'd)
 
Line 1: Line 1:
I found this function in a disassembler; the calculations translate as follows:
I found this function in a disassembler; the calculations translate as follows:


<source lang="cpp">SInt16 TESActorBaseData::Subroutine0044D4D0() {
<source lang="cpp">SInt16 TESActorBaseData::GetLevel() {
   if (!(this->flags & kFlag_PCLevelMult))
   if (!(this->flags & kFlag_PCLevelMult))
       return this->level;
       return this->level;
Line 22: Line 22:
   float  a = (speechPlayer - speechTarget) / 100.0;
   float  a = (speechPlayer - speechTarget) / 100.0;
   float  c = pow(1.0 + max(-1.0, a), GMST:fIntimidateSpeechcraftCurve);
   float  c = pow(1.0 + max(-1.0, a), GMST:fIntimidateSpeechcraftCurve);
   SInt16 levelDataPlayer = (*g_thePlayer)->baseForm->actorData.TESV_0044D4D0();
   SInt16 levelPlayer = (*g_thePlayer)->baseForm->actorData.GetLevel();
   SInt32 levelDataTarget = this->baseForm->actorData.TESV_0044D4D0();
   SInt32 levelTarget = this->baseForm->actorData.GetLevel();
   //
   //
   float esp0C = levelDataPlayer * c;
   float esp0C = levelPlayer * c;
   CalculatePerkData(kEntryPoint_Mod_Player_Intimidation, *g_thePlayer, this, &esp0C);
   CalculatePerkData(kEntryPoint_Mod_Player_Intimidation, *g_thePlayer, this, &esp0C);
   //
   //
Line 35: Line 35:
   // Based on later usage, esp0C == how scary the player is.
   // Based on later usage, esp0C == how scary the player is.
   //
   //
   float  esp04 = levelDataTarget; // how scary is the NPC?
   float  esp04 = levelTarget; // how scary is the NPC?
   float  confidenceMult;
   float  confidenceMult;
   SInt32 confidence = this->baseForm->aiForm.GetConfidence();
   SInt32 confidence = this->baseForm->aiForm.GetConfidence();
Line 61: Line 61:


[[User:DavidJCobb|DavidJCobb]] ([[User talk:DavidJCobb|talk]]) 2018-08-07T09:03:00 (EDT)
[[User:DavidJCobb|DavidJCobb]] ([[User talk:DavidJCobb|talk]]) 2018-08-07T09:03:00 (EDT)
:Update: Confirmed that that support method is a level getter; Papyrus Actor.GetLevel is a wrapper for it. [[User:DavidJCobb|DavidJCobb]] ([[User talk:DavidJCobb|talk]]) 2018-08-08T06:35:08 (EDT)
Anonymous user

Navigation menu