Difference between revisions of "Talk:WillIntimidateSucceed - Actor"
Jump to navigation
Jump to search
Talk:WillIntimidateSucceed - Actor (edit)
Revision as of 05:35, 8 August 2018
, 05:35, 8 August 2018GetLevel 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:: | <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 | SInt16 levelPlayer = (*g_thePlayer)->baseForm->actorData.GetLevel(); | ||
SInt32 | SInt32 levelTarget = this->baseForm->actorData.GetLevel(); | ||
// | // | ||
float esp0C = | 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 = | 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) |