Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions include/RE/A/AIFormulas.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,12 @@ namespace RE
static REL::Relocation<func_t> func{ ID::AIFormulas::GetBarterValue };
return func(a_baseValue, a_charisma, a_selling, a_refTarget);
}

inline std::uint32_t ComputePickpocketSuccess(float a_thiefSkill, float a_targetSkill, std::int32_t a_valueStolen, float a_weightStolen, Actor* a_thief, Actor* a_target, TESForm* a_itemPickpocketing, bool a_placingItem)
{
using func_t = decltype(&AIFormulas::ComputePickpocketSuccess);
static REL::Relocation<func_t> func{ ID::AIFormulas::ComputePickpocketSuccess };
return func(a_thiefSkill, a_targetSkill, a_valueStolen, a_weightStolen, a_thief, a_target, a_itemPickpocketing, a_placingItem);
}
}
}
7 changes: 7 additions & 0 deletions include/RE/A/AIProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ namespace RE
return func(this);
}

float GetActorLightLevel()
{
using func_t = decltype(&AIProcess::GetActorLightLevel);
static REL::Relocation<func_t> func{ ID::AIProcess::GetActorLightLevel };
return func(this);
}

// members
MiddleLowProcessData* middleLow; // 00
MiddleHighProcessData* middleHigh; // 08
Expand Down
16 changes: 16 additions & 0 deletions include/RE/A/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ namespace RE
class CastPowerItem;
class CombatController;
class CombatGroup;
class DetectionData;
class HitData;
class MovementControllerNPC;
class MovementMessageActorCollision;
class MovementMessageNewPath;
Expand Down Expand Up @@ -599,6 +601,20 @@ namespace RE
return func(this, a_instance, a_moveActor, a_update3D);
}

void CalculateDetectionFormula(Actor* a_target, DetectionData* a_detectionData)
{
using func_t = decltype(&Actor::CalculateDetectionFormula);
static REL::Relocation<func_t> func{ ID::Actor::CalculateDetectionFormula };
return func(this, a_target, a_detectionData);
}

void DoHitMe(const HitData* a_data)
{
using func_t = decltype(&Actor::DoHitMe);
static REL::Relocation<func_t> func{ ID::Actor::DoHitMe };
return func(this, a_data);
}

// members
NiTFlags<std::uint32_t, Actor> niFlags; // 2D0
float updateTargetTimer; // 2D4
Expand Down
6 changes: 6 additions & 0 deletions include/RE/B/BGSColorForm.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ namespace RE
static constexpr auto VTABLE{ VTABLE::BGSColorForm };
static constexpr auto FORM_ID{ ENUM_FORM_ID::kCLFM };

enum class Flags : std::int32_t
{
kPlayable = 0x1,
kRemappingIndex = 0x2
};

// members
union
{
Expand Down
7 changes: 7 additions & 0 deletions include/RE/C/CombatFormulas.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,12 @@ namespace RE
static REL::Relocation<func_t> func{ ID::CombatFormulas::CalcScopeSteadyActionPointDrain };
return func(a_actor, a_deltaSec);
}

[[nodiscard]] inline float CalcResistedPercentage(const ActorValueInfo* a_resistance, float a_damage, float a_resistancePoints)
{
using func_t = decltype(&CombatFormulas::CalcResistedPercentage);
static REL::Relocation<func_t> func{ ID::CombatFormulas::CalcResistedPercentage };
return func(a_resistance, a_damage, a_resistancePoints);
}
}
}
12 changes: 12 additions & 0 deletions include/RE/D/DETECTION_FORMULA_TYPE.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

namespace RE
{
enum class DETECTION_FORMULA_TYPE : std::uint32_t
{
kFormula = 0x0,
kRange = 0x1,
kVisual_Range = 0x2,
kSound_Range = 0x3,
};
}
12 changes: 12 additions & 0 deletions include/RE/D/DETECTION_TYPE.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

namespace RE
{
enum class DETECTION_TYPE
{
kNormal = 0,
kProjectile = 1,
kEvent = 2,
kTotal = 3
};
}
21 changes: 21 additions & 0 deletions include/RE/D/DetectionData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#pragma once

#include "RE/D/DetectionFormulaData.h"
#include "RE/D/DetectionLevels.h"
#include "RE/N/NiPoint.h"

namespace RE
{
enum class DETECTION_TYPE;

class DetectionData :
public DetectionFormulaData // 00
{
public:
// members
NiPoint3 detectedLocation; // 74
DetectionLevels detectionLevel; // 80
DETECTION_TYPE detectionType; // 84
};
static_assert(sizeof(DetectionData) == 0x88);
}
53 changes: 53 additions & 0 deletions include/RE/D/DetectionFormulaData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#pragma once

#include "RE/A/ACTOR_LOS_LOCATION.h"
#include "RE/A/AITimeStamp.h"

namespace RE
{
class DetectionFormulaData
{
public:
// members
ACTOR_LOS_LOCATION losLocation; // 00
AITimeStamp timeStamp; // 04
std::uint32_t ambush; // 08
std::uint32_t targetRaceSize; // 0C
std::uint32_t targetActionSound; // 10
float lightLevel; // 14
float modifiedLightLevel; // 18
float visualDetectionDistance; // 1C
float soundDetectionDistance; // 20
float perception; // 24
float basePerception; // 28
float blindness; // 2C
float deafness; // 30
float targetDistance; // 34
float targetAngle; // 38
float targetVerticalAngle; // 3C
float targetAgility; // 40
float targetSneakSkill; // 44
float targetBaseStealth; // 48
float targetEquippedWeight; // 4C
float targetMovementNoiseMult; // 50
float targetStealth; // 54
float targetVisibility; // 58
float visualDetectionLevel; // 5C
float soundDetectionLevel; // 60
bool LOS; // 64
bool LOS360; // 65
bool exterior; // 66
bool alert; // 67
bool sleeping; // 68
bool nightEye; // 69
bool targetMoving; // 6A
bool targetRunning; // 6B
bool targetSneaking; // 6C
bool targetInvisible; // 6D
bool targetInCover; // 6E
bool targetObserved; // 6F
bool combatTarget; // 70
bool flying; // 71
};
static_assert(sizeof(DetectionFormulaData) == 0x74);
}
10 changes: 5 additions & 5 deletions include/RE/D/DialogueMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ namespace RE
// Members
std::unique_ptr<BSGFxShaderFXTarget> dialogueButtonOBJs[4];
std::unique_ptr<BSGFxShaderFXTarget> speechChallengeAnimObj;
BSTValueEventSink<HUDPerkVaultBoySwfDisplayEvent> CurrentVBPerk;
BSTValueEventSource<ShowingDialogueSpeechChallengeAnim> ShowingSpeechChallenge;
BSTValueEventSink<HUDPerkVaultBoySwfDisplayEvent> currentVBPerk;
BSTValueEventSource<ShowingDialogueSpeechChallengeAnim> showingSpeechChallenge;
BSTSmartPointer<BSInputEnableLayer> inputLayer;
UserEvents::INPUT_CONTEXT_ID CurrentContext;
bool IsLookingAtPlayer;
bool AreButtonsShown;
UserEvents::INPUT_CONTEXT_ID currentContext;
bool isLookingAtPlayer;
bool areButtonsShown;
};
static_assert(sizeof(DialogueMenu) == 0x168);
}
6 changes: 6 additions & 0 deletions include/RE/Fallout.h
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,9 @@
#include "RE/D/DEFAULT_OBJECT.h"
#include "RE/D/DEFAULT_OBJECT_DATA.h"
#include "RE/D/DEFAULT_OBJECT_TYPE.h"
#include "RE/D/DETECTION_FORMULA_TYPE.h"
#include "RE/D/DETECTION_PRIORITY.h"
#include "RE/D/DETECTION_TYPE.h"
#include "RE/D/DIALOGUE_DATA.h"
#include "RE/D/DIALOGUE_SUBTYPE.h"
#include "RE/D/DIALOGUE_TYPE.h"
Expand All @@ -605,7 +607,9 @@
#include "RE/D/DesiredMovementData.h"
#include "RE/D/DestructibleObjectData.h"
#include "RE/D/DestructibleObjectStage.h"
#include "RE/D/DetectionData.h"
#include "RE/D/DetectionEvent.h"
#include "RE/D/DetectionFormulaData.h"
#include "RE/D/DetectionLevels.h"
#include "RE/D/DeviceConnectEvent.h"
#include "RE/D/DialogueItem.h"
Expand Down Expand Up @@ -1102,6 +1106,7 @@
#include "RE/R/REGION_DATA_BASE.h"
#include "RE/R/REGION_DATA_ID.h"
#include "RE/R/RESET_3D_FLAGS.h"
#include "RE/R/RadioManager.h"
#include "RE/R/RagDollBone.h"
#include "RE/R/RagDollData.h"
#include "RE/R/ReadyWeaponHandler.h"
Expand Down Expand Up @@ -1133,6 +1138,7 @@
#include "RE/S/SIT_SLEEP_STATE.h"
#include "RE/S/SOUND_LEVEL.h"
#include "RE/S/SPECIALMenuEvent.h"
#include "RE/S/STAGGER_MAGNITUDE.h"
#include "RE/S/SUBTITLE_PRIORITY.h"
#include "RE/S/SWFToCodeFunctionHandler.h"
#include "RE/S/SavefileMetadata.h"
Expand Down
16 changes: 16 additions & 0 deletions include/RE/IDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ namespace RE::ID
inline constexpr REL::ID GetMobilityCrippled{ 2230996 };
inline constexpr REL::ID SPECIALModifiedCallback{ 2231020 };
inline constexpr REL::ID StopInteractingQuick{ 2231227 };
inline constexpr REL::ID CalculateDetectionFormula{ 2230213 };
inline constexpr REL::ID DoHitMe{ 2231148 };
}

namespace ActorEquipManager
Expand Down Expand Up @@ -95,6 +97,7 @@ namespace RE::ID
namespace AIFormulas
{
inline constexpr REL::ID GetBarterValue{ 2208969 };
inline constexpr REL::ID ComputePickpocketSuccess{ 2208977 };
}

namespace AIProcess
Expand All @@ -116,6 +119,7 @@ namespace RE::ID
inline constexpr REL::ID SetRunOncePackage{ 2232344 };
inline constexpr REL::ID AddToProcedureIndexRunning{ 2718412 };
inline constexpr REL::ID ComputeLastTimeProcessed{ 2231541 };
inline constexpr REL::ID GetActorLightLevel{ 2231981 };
}

namespace AITimer
Expand Down Expand Up @@ -851,6 +855,7 @@ namespace RE::ID
inline constexpr REL::ID CalcWeaponDamage{ 2209001 };
inline constexpr REL::ID GetNumCrippledAttackConditions{ 2209041 };
inline constexpr REL::ID CalcScopeSteadyActionPointDrain{ 2209045 };
inline constexpr REL::ID CalcResistedPercentage{ 2209007 };
}

namespace CombatUtilities
Expand Down Expand Up @@ -1235,6 +1240,7 @@ namespace RE::ID
{
inline constexpr REL::ID OpenLockpickingMenu{ 2249263 };
inline constexpr REL::ID SendLockInfoToMenu{ 2249267 };
inline constexpr REL::ID DamageLockpick{ 2249275 };
}

namespace LocksPicked
Expand Down Expand Up @@ -1613,6 +1619,7 @@ namespace RE::ID
inline constexpr REL::ID SetPerkCount{ 2233187 };
inline constexpr REL::ID HasLOSToTarget{ 2233004 };
inline constexpr REL::ID TryUnlockObject{ 2233040 };
inline constexpr REL::ID EnableRadio{ 2233211 };
}

namespace PlayerControls
Expand Down Expand Up @@ -1669,6 +1676,13 @@ namespace RE::ID
inline constexpr REL::ID RequestHighestDetectionLevelAgainstActor{ 2234111 };
}

namespace RadioManager
{
inline constexpr REL::ID QPlayerRadioEnabled{ 2227674 };
inline constexpr REL::ID QCurrentPlayerFreq{ 2227670 };
inline constexpr REL::ID EnablePlayerRadio{ 2227673 };
}

namespace REFR_LOCK
{
inline constexpr REL::ID GetLevel{ 2191019 };
Expand Down Expand Up @@ -1783,6 +1797,7 @@ namespace RE::ID
inline constexpr REL::ID QueueShowPipboy{ 2229288 };
inline constexpr REL::ID QueueUpdate3D{ 2229234 };
inline constexpr REL::ID QueueWeaponFire{ 2229186 };
inline constexpr REL::ID TaskUnpackFunc{ 2229323 };
}

namespace TerminalHacked
Expand Down Expand Up @@ -1974,6 +1989,7 @@ namespace RE::ID
inline constexpr REL::ID GetFacialBoneMorphIntensity{ 2207416 };
inline constexpr REL::ID SetHairColor{ 2207426 };
inline constexpr REL::ID GetShortName{ 2207405 };
inline constexpr REL::ID GetXPValue{ 2207384 };
}

namespace TESObjectARMO
Expand Down
15 changes: 8 additions & 7 deletions include/RE/L/LOADED_REF_DATA.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include "RE/B/BSModelDB.h"
#include "RE/N/NiPointer.h"

namespace RE
Expand All @@ -10,13 +11,13 @@ namespace RE
{
public:
// members
void* handleList; // 00 - TODO
NiPointer<NiAVObject> data3D; // 08
TESWaterForm* currentWaterType; // 10
float relevantWaterHeight; // 18
float cachedRadius; // 1C
std::uint16_t flags; // 20
std::int16_t underwaterCount; // 22
BSModelDB::HandelListHead handleList; // 00
NiPointer<NiAVObject> data3D; // 08
TESWaterForm* currentWaterType; // 10
float relevantWaterHeight; // 18
float cachedRadius; // 1C
std::uint16_t flags; // 20
std::int16_t underwaterCount; // 22
};
static_assert(sizeof(LOADED_REF_DATA) == 0x28);
}
7 changes: 7 additions & 0 deletions include/RE/L/LockpickingMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ namespace RE
return func(a_lockedRef);
}

static void DamageLockpick()
{
using func_t = decltype(&LockpickingMenu::DamageLockpick);
static REL::Relocation<func_t> func{ ID::LockpickingMenu::DamageLockpick };
return func();
}

// members
NiMatrix3 origPickRotate; // 0E0
NiPoint3 origPickTranslate; // 110
Expand Down
7 changes: 7 additions & 0 deletions include/RE/P/PlayerCharacter.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,13 @@ namespace RE
return func(this, a_enable);
}

void EnableRadio(bool a_enable)
{
using func_t = decltype(&PlayerCharacter::EnableRadio);
static REL::Relocation<func_t> func{ ID::PlayerCharacter::EnableRadio };
return func(this, a_enable);
}

// members
BSSpinLock actorToDisplayOnHUDLock; // 628
BSSpinLock questTargetLock; // 630
Expand Down
6 changes: 6 additions & 0 deletions include/RE/R/REFR_LOCK.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ namespace RE
class REFR_LOCK
{
public:
enum class Flags : std::uint8_t
{
kLocked = 0x1,
kLeveled = 0x4
};

[[nodiscard]] LOCK_LEVEL GetLockLevel(TESObjectREFR* a_owner)
{
using func_t = decltype(&REFR_LOCK::GetLockLevel);
Expand Down
Loading
Loading