diff --git a/CKPE.Fallout4/CKPE.Fallout4.vcxproj b/CKPE.Fallout4/CKPE.Fallout4.vcxproj index d92b96c8..043296f6 100644 --- a/CKPE.Fallout4/CKPE.Fallout4.vcxproj +++ b/CKPE.Fallout4/CKPE.Fallout4.vcxproj @@ -422,6 +422,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CKPE.Fallout4/CKPE.Fallout4.vcxproj.filters b/CKPE.Fallout4/CKPE.Fallout4.vcxproj.filters index 74c79956..a3132e14 100644 --- a/CKPE.Fallout4/CKPE.Fallout4.vcxproj.filters +++ b/CKPE.Fallout4/CKPE.Fallout4.vcxproj.filters @@ -981,6 +981,522 @@ EditorAPI\T + + EditorAPI\A + + + EditorAPI\A + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\B + + + EditorAPI\E + + + EditorAPI\E + + + EditorAPI\F + + + EditorAPI\G + + + EditorAPI\I + + + EditorAPI\M + + + EditorAPI\N + + + EditorAPI\N + + + EditorAPI\N + + + EditorAPI\S + + + EditorAPI\S + + + EditorAPI\S + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + + + EditorAPI\T + diff --git a/CKPE.Fallout4/Include/EditorAPI/A/ActorValueInfo.h b/CKPE.Fallout4/Include/EditorAPI/A/ActorValueInfo.h new file mode 100644 index 00000000..036c8b3c --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/A/ActorValueInfo.h @@ -0,0 +1,50 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x1A8, vtable RVA 0x2FF4C90, 124 virtual functions + class ActorValueInfo : + public TESForm, // 000 + public TESFullName, // 028 + public TESDescription // 040 + { + public: + virtual ~ActorValueInfo() = default; + + public: + ActorValueInfo* dependentActorValues[15]; // 68 + std::uint8_t derivationFunction[0x40]; // E0 - std::function (MSVC layout: 0x38 small-object storage + impl pointer) + const char* enumNames[10]; // 120 + BGSLocalizedString abbreviation; // 170 + std::int32_t oldActorValue; // 180 + std::int32_t flags; // 184 - REX::TEnumSet + std::int32_t avType; // 188 - REX::TEnumSet + std::uint32_t numDependentActorValues; // 18C + std::uint32_t enumCount; // 190 + std::int32_t fullCacheIndex; // 194 + std::int32_t permanentCacheIndex; // 198 + float defaultValue; // 19C + std::uint32_t sortIndex; // 1A0 + std::uint32_t unk1A4; // 1A4 + }; + static_assert(sizeof(ActorValueInfo) == 0x1A8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/A/AlchemyItem.h b/CKPE.Fallout4/Include/EditorAPI/A/AlchemyItem.h new file mode 100644 index 00000000..430376d4 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/A/AlchemyItem.h @@ -0,0 +1,58 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x450, vtable RVA 0x30BC3C8, 188 virtual functions + class AlchemyItem : + public MagicItem, // 000 + public BGSModelMaterialSwap, // 2D0 + public TESIcon, // 320 + public BGSMessageIcon, // 348 + public TESWeightForm, // 378 + public BGSEquipType, // 388 + public BGSDestructibleObjectForm, // 398 + public BGSPickupPutdownSounds, // 3A8 + public BGSCraftingUseSound, // 3C0 + public TESDescription // 3D0 + { + public: + virtual ~AlchemyItem() = default; + + public: + std::uint32_t unk3F8; // 3F8 + std::uint32_t unk3FC; // 3FC + std::uint64_t unk400; // 400 + std::uint32_t unk408; // 408 + std::uint32_t unk40C; // 40C + std::uint64_t unk410; // 410 + BGSLocalizedString unk418; // 418 + TESIcon unk428; // 428 + }; + static_assert(sizeof(AlchemyItem) == 0x450); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSAcousticSpace.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSAcousticSpace.h new file mode 100644 index 00000000..252de688 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSAcousticSpace.h @@ -0,0 +1,41 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + class TESRegion; + class BGSReverbParameters; + + // 1.11.240.0: size 0xB0, vtable RVA 0x3054008, 154 virtual functions + class BGSAcousticSpace : + public TESBoundObject // 000 + { + public: + virtual ~BGSAcousticSpace() = default; + + public: + BGSSoundDescriptorForm* loopingSound; // 90 + TESRegion* soundRegion; // 98 + BGSReverbParameters* reverbType; // A0 + std::uint16_t weatherAttenMillibels; // A8 + bool isInterior; // AA + std::uint8_t unkAB[0x5]; // AB + }; + static_assert(sizeof(BGSAcousticSpace) == 0xB0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSAction.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSAction.h new file mode 100644 index 00000000..43a7de08 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSAction.h @@ -0,0 +1,33 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x68, vtable RVA 0x302F038, 124 virtual functions + class BGSAction : + public BGSKeyword // 000 + { + public: + virtual ~BGSAction() = default; + + public: + std::uint32_t index; // 60 + std::uint32_t unk64; // 64 + }; + static_assert(sizeof(BGSAction) == 0x68); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSAddonNode.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSAddonNode.h new file mode 100644 index 00000000..5f63e8dd --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSAddonNode.h @@ -0,0 +1,49 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + class TESObjectLIGH; + + struct ADDON_DATA + { + std::uint16_t masterParticleCap; // 00 + std::int8_t flags; // 02 + }; + static_assert(sizeof(ADDON_DATA) == 0x4); + + // 1.11.240.0: size 0x100, vtable RVA 0x307DA18, 154 virtual functions + class BGSAddonNode : + public TESBoundObject, // 000 + public BGSModelMaterialSwap // 090 + { + public: + virtual ~BGSAddonNode() = default; + + public: + std::uint32_t index; // E0 + std::uint32_t unkE4; // E4 + BGSSoundDescriptorForm* sound; // E8 + TESObjectLIGH* light; // F0 + ADDON_DATA data; // F8 + std::uint8_t masterParticleLock[0x4]; // FC - BSNonReentrantSpinLock + }; + static_assert(sizeof(BGSAddonNode) == 0x100); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSAimModel.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSAimModel.h new file mode 100644 index 00000000..5603205a --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSAimModel.h @@ -0,0 +1,53 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + struct BGSAimModelData + { + float aimModelMinConeDegrees; // 00 + float aimModelMaxConeDegrees; // 04 + float aimModelConeIncreasePerShot; // 08 + float aimModelConeDecreasePerSec; // 0C + std::uint32_t aimModelConeDecreaseDelayMs; // 10 + float aimModelConeSneakMultiplier; // 14 + float aimModelRecoilDiminishSpringForce; // 18 + float aimModelRecoilDiminishSightsMult; // 1C + float aimModelRecoilMaxDegPerShot; // 20 + float aimModelRecoilMinDegPerShot; // 24 + float aimModelRecoilHipMult; // 28 + std::uint32_t aimModelRecoilShotsForRunaway; // 2C + float aimModelRecoilArcDeg; // 30 + float aimModelRecoilArcRotateDeg; // 34 + float aimModelConeIronSightsMultiplier; // 38 + float aimModelBaseStability; // 3C + }; + static_assert(sizeof(BGSAimModelData) == 0x40); + + // 1.11.240.0: size 0x68, vtable RVA 0x2FBC948, 124 virtual functions + class BGSAimModel : + public TESForm // 000 + { + public: + virtual ~BGSAimModel() = default; + + public: + BGSAimModelData aimModelData; // 28 - DNAM + }; + static_assert(sizeof(BGSAimModel) == 0x68); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSArtObject.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSArtObject.h new file mode 100644 index 00000000..217c5eb8 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSArtObject.h @@ -0,0 +1,37 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x108, vtable RVA 0x307E3E8, 154 virtual functions + class BGSArtObject : + public TESBoundObject, // 000 + public BGSKeywordForm, // 090 + public BGSModelMaterialSwap // 0B0 + { + public: + virtual ~BGSArtObject() = default; + + public: + std::uint32_t unk100; // 100 + std::uint32_t unk104; // 104 + }; + static_assert(sizeof(BGSArtObject) == 0x108); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSAssociationType.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSAssociationType.h new file mode 100644 index 00000000..6c38fa6d --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSAssociationType.h @@ -0,0 +1,35 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x50, vtable RVA 0x302F698, 124 virtual functions + class BGSAssociationType : + public TESForm // 000 + { + public: + virtual ~BGSAssociationType() = default; + + public: + BSFixedString associationLabel[2][2]; // 28 - BSFixedStringCS + std::uint32_t flags; // 48 - REX::TEnumSet + std::uint32_t unk4C; // 4C + }; + static_assert(sizeof(BGSAssociationType) == 0x50); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSAttachParentArray.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSAttachParentArray.h new file mode 100644 index 00000000..206a2c98 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSAttachParentArray.h @@ -0,0 +1,33 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x20, vtable RVA 0x2FA5CE0, 21 virtual functions + class BGSAttachParentArray : + public BaseFormComponent // 000 + { + public: + virtual ~BGSAttachParentArray() = default; + + public: + std::uint16_t* array; // 08 - BGSTypedKeywordValue*, keyword indices + std::uint32_t size; // 10 + std::uint32_t unk14; // 14 + std::uint32_t unk18; // 18 - CK only (not in CommonLibF4) + std::uint32_t unk1C; // 1C + }; + static_assert(sizeof(BGSAttachParentArray) == 0x20); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSAttackDataForm.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSAttackDataForm.h new file mode 100644 index 00000000..f4f14f63 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSAttackDataForm.h @@ -0,0 +1,31 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + class BGSAttackDataMap; + + // 1.11.240.0: size 0x10, vtable RVA 0x3018670, 21 virtual functions + class BGSAttackDataForm : + public BaseFormComponent // 000 + { + public: + virtual ~BGSAttackDataForm() = default; + + public: + BGSAttackDataMap* attackDataMap; // 08 - NiPointer + }; + static_assert(sizeof(BGSAttackDataForm) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSAttractionRule.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSAttractionRule.h new file mode 100644 index 00000000..4a0109b1 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSAttractionRule.h @@ -0,0 +1,42 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + struct ATTRACTION_RULE_DATA + { + float radius; // 00 + float minDelay; // 04 + float maxDelay; // 08 + bool requiresLOS; // 0C + bool combatTarget; // 0D + }; + static_assert(sizeof(ATTRACTION_RULE_DATA) == 0x10); + + // 1.11.240.0: size 0x38, vtable RVA 0x2FB50F0, 124 virtual functions + class BGSAttractionRule : + public TESForm // 000 + { + public: + virtual ~BGSAttractionRule() = default; + + public: + ATTRACTION_RULE_DATA data; // 28 + }; + static_assert(sizeof(BGSAttractionRule) == 0x38); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSAudioEffectChain.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSAudioEffectChain.h new file mode 100644 index 00000000..68fee4a1 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSAudioEffectChain.h @@ -0,0 +1,36 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x48, vtable RVA 0x2FB7660, 124 virtual functions + class BGSAudioEffectChain : + public TESForm, // 000 + public BSIAudioEffectChain // 028 + { + public: + virtual ~BGSAudioEffectChain() = default; + + public: + BSTArray effects; // 30 - BSTArray + }; + static_assert(sizeof(BGSAudioEffectChain) == 0x48); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSBehaviorGraphModel.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSBehaviorGraphModel.h new file mode 100644 index 00000000..5ce65c26 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSBehaviorGraphModel.h @@ -0,0 +1,26 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x38, vtable RVA 0x304C7B8, 27 virtual functions + class BGSBehaviorGraphModel : + public TESModel // 000 + { + public: + virtual ~BGSBehaviorGraphModel() = default; + }; + static_assert(sizeof(BGSBehaviorGraphModel) == 0x38); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSBendableSpline.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSBendableSpline.h new file mode 100644 index 00000000..88d998e6 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSBendableSpline.h @@ -0,0 +1,48 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSTextureSet; + + struct SplineData + { + float numTiles; // 00 + std::uint16_t numSlices; // 04 + std::uint16_t flags; // 06 + NiAPI::NiColor color; // 08 + float windSensibility; // 14 + float flexibility; // 18 + }; + static_assert(sizeof(SplineData) == 0x1C); + + // 1.11.240.0: size 0xB8, vtable RVA 0x2FBD638, 154 virtual functions + class BGSBendableSpline : + public TESBoundObject // 000 + { + public: + virtual ~BGSBendableSpline() = default; + + public: + SplineData data; // 90 + std::uint32_t unkAC; // AC + BGSTextureSet* textureSet; // B0 + }; + static_assert(sizeof(BGSBendableSpline) == 0xB8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSBipedObjectForm.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSBipedObjectForm.h new file mode 100644 index 00000000..7b4b0878 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSBipedObjectForm.h @@ -0,0 +1,32 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x10, vtable RVA 0x3018898, 22 virtual functions + class BGSBipedObjectForm : + public BaseFormComponent // 000 + { + public: + virtual ~BGSBipedObjectForm() = default; + + virtual bool FillsBipedSlot(std::int32_t nBipedSlot) const noexcept(true) { return false; } // 21 - RVA 0x88BA90, if ( a2 >= 32 ); return 0;; v3 = *(_DWORD *)(a1 + 8);; return _bittest(&v3, a2); + + public: + std::uint32_t bipedModelData; // 08 - BIPED_MODEL, biped slot mask + std::uint32_t unk0C; // 0C + }; + static_assert(sizeof(BGSBipedObjectForm) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSBlockBashData.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSBlockBashData.h new file mode 100644 index 00000000..6e7f0adc --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSBlockBashData.h @@ -0,0 +1,36 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSImpactDataSet; + class BGSMaterialType; + } + + // 1.11.240.0: size 0x18, vtable RVA 0x30189E8, 21 virtual functions + class BGSBlockBashData : + public BaseFormComponent // 000 + { + public: + virtual ~BGSBlockBashData() = default; + + public: + Forms::BGSImpactDataSet* blockBashImpactDataSet; // 08 + Forms::BGSMaterialType* altBlockMaterialType; // 10 + }; + static_assert(sizeof(BGSBlockBashData) == 0x18); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSBodyPartData.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSBodyPartData.h new file mode 100644 index 00000000..76c12167 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSBodyPartData.h @@ -0,0 +1,41 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0xA0, vtable RVA 0x3030C60, 124 virtual functions + class BGSBodyPartData : + public TESForm, // 000 + public TESModel, // 028 + public BGSPreloadable // 060 + { + public: + virtual ~BGSBodyPartData() = default; + + public: + std::uint8_t unk68[0x10]; // 68 + std::uint64_t unk78; // 78 + std::uint64_t unk80; // 80 + std::uint64_t unk88; // 88 + std::uint64_t unk90; // 90 + std::uint64_t unk98; // 98 + }; + static_assert(sizeof(BGSBodyPartData) == 0xA0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSCameraPath.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSCameraPath.h new file mode 100644 index 00000000..b946e1b0 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSCameraPath.h @@ -0,0 +1,45 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + struct PATH_DATA + { + std::int8_t flags; // 00 + }; + static_assert(sizeof(PATH_DATA) == 0x1); + + // 1.11.240.0: size 0x70, vtable RVA 0x3054830, 124 virtual functions + class BGSCameraPath : + public TESForm // 000 + { + public: + virtual ~BGSCameraPath() = default; + + public: + std::uint8_t unk28[0x18]; // 28 + std::uint64_t unk40; // 40 + std::uint64_t unk48; // 48 + PATH_DATA data; // 50 + std::uint8_t unk51[0x7]; // 51 + std::uint64_t unk58; // 58 + std::uint64_t unk60; // 60 + std::uint64_t unk68; // 68 + }; + static_assert(sizeof(BGSCameraPath) == 0x70); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSCameraShot.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSCameraShot.h new file mode 100644 index 00000000..ab9ac905 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSCameraShot.h @@ -0,0 +1,59 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + struct CAMERA_SHOT_DATA + { + std::int32_t cameraAction; // 00 - REX::TEnumSet + std::int32_t location; // 04 - REX::TEnumSet + std::int32_t target; // 08 - REX::TEnumSet + std::uint32_t flags; // 0C + float playerTimeMult; // 10 + float targetTimeMult; // 14 + float globalTimeMult; // 18 + float maxTime; // 1C + float minTime; // 20 + float targetPercentBetweenActors; // 24 + float nearTargetDistance; // 28 + float locationSpring; // 2C + float targetSpring; // 30 + float rotationOffsetX; // 34 + float rotationOffsetY; // 38 + float rotationOffsetZ; // 3C + }; + static_assert(sizeof(CAMERA_SHOT_DATA) == 0x40); + + // 1.11.240.0: size 0xC8, vtable RVA 0x30553E0, 124 virtual functions + class BGSCameraShot : + public TESForm, // 000 + public TESModel, // 028 + public TESImageSpaceModifiableForm // 060 + { + public: + virtual ~BGSCameraShot() = default; + + public: + CAMERA_SHOT_DATA data; // 70 + std::uint8_t conditions[0x8]; // B0 - TESCondition + std::uint8_t unkB8[0x10]; // B8 + }; + static_assert(sizeof(BGSCameraShot) == 0xC8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSCollisionLayer.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSCollisionLayer.h new file mode 100644 index 00000000..ff6273ac --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSCollisionLayer.h @@ -0,0 +1,40 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x80, vtable RVA 0x3055BC8, 124 virtual functions + class BGSCollisionLayer : + public TESForm, // 000 + public TESDescription // 028 + { + public: + virtual ~BGSCollisionLayer() = default; + + public: + std::uint32_t collisionIdx; // 50 + std::uint8_t unk54[0xC]; // 54 + BSFixedString name; // 60 + BSTArray collidesWith; // 68 - BSTArray + }; + static_assert(sizeof(BGSCollisionLayer) == 0x80); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSComponent.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSComponent.h new file mode 100644 index 00000000..310e4862 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSComponent.h @@ -0,0 +1,42 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESGlobal; + class TESObjectMISC; + + // 1.11.240.0: size 0xD8, vtable RVA 0x2FB8400, 154 virtual functions + class BGSComponent : + public TESBoundObject, // 000 + public TESFullName, // 090 + public TESValueForm, // 0A8 + public BGSCraftingUseSound // 0B8 + { + public: + virtual ~BGSComponent() = default; + + public: + TESGlobal* modScrapScalar; // C8 + TESObjectMISC* scrapItem; // D0 + }; + static_assert(sizeof(BGSComponent) == 0xD8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSConstructibleObject.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSConstructibleObject.h new file mode 100644 index 00000000..ac3695be --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSConstructibleObject.h @@ -0,0 +1,51 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + struct ConstructibleObjectData + { + std::uint16_t numConstructed; // 00 + std::uint16_t workshopPriority; // 02 + }; + static_assert(sizeof(ConstructibleObjectData) == 0x4); + + // 1.11.240.0: size 0xB0, vtable RVA 0x307EED8, 124 virtual functions + class BGSConstructibleObject : + public TESForm, // 000 + public BGSPickupPutdownSounds, // 028 + public TESDescription // 040 + { + public: + virtual ~BGSConstructibleObject() = default; + + public: + void* requiredItems; // 68 - BSTArray>* + std::uint8_t unk70[0x18]; // 70 + std::uint64_t unk88; // 88 + std::uint64_t unk90; // 90 + ConstructibleObjectData data; // 98 + std::uint32_t unk9C; // 9C + std::uint64_t unkA0; // A0 + std::uint32_t unkA8; // A8 + std::uint32_t unkAC; // AC + }; + static_assert(sizeof(BGSConstructibleObject) == 0xB0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSCraftingUseSound.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSCraftingUseSound.h new file mode 100644 index 00000000..9acb63a4 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSCraftingUseSound.h @@ -0,0 +1,34 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + } + + // 1.11.240.0: size 0x10, vtable RVA 0x2FA6BA8, 21 virtual functions + class BGSCraftingUseSound : + public BaseFormComponent // 000 + { + public: + virtual ~BGSCraftingUseSound() = default; + + public: + Forms::BGSSoundDescriptorForm* craftingUseSound; // 08 + }; + static_assert(sizeof(BGSCraftingUseSound) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSDamageType.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSDamageType.h new file mode 100644 index 00000000..01a8cfaa --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSDamageType.h @@ -0,0 +1,37 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class ActorValueInfo; + + class MagicItem; + + // 1.11.240.0: size 0x38, vtable RVA 0x2FB91D0, 124 virtual functions + class BGSDamageType : + public TESForm // 000 + { + public: + virtual ~BGSDamageType() = default; + + public: + ActorValueInfo* resistance; // 28 + MagicItem* spell; // 30 + }; + static_assert(sizeof(BGSDamageType) == 0x38); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSDebris.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSDebris.h new file mode 100644 index 00000000..82405452 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSDebris.h @@ -0,0 +1,34 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x40, vtable RVA 0x307FC28, 124 virtual functions + class BGSDebris : + public TESForm, // 000 + public BGSPreloadable // 028 + { + public: + virtual ~BGSDebris() = default; + + public: + BSSimpleList dataList; // 30 - BSSimpleList + }; + static_assert(sizeof(BGSDebris) == 0x40); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSDefaultObject.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSDefaultObject.h new file mode 100644 index 00000000..3a669ef8 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSDefaultObject.h @@ -0,0 +1,37 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESForm; + + // 1.11.240.0: size 0x40, vtable RVA 0x2FB9800, 124 virtual functions + class BGSDefaultObject : + public TESForm // 000 + { + public: + virtual ~BGSDefaultObject() = default; + + public: + TESForm* form; // 28 + std::uint8_t type[0x8]; // 30 - ENUM_FORM_ID + BSFixedString formEditorID; // 38 + }; + static_assert(sizeof(BGSDefaultObject) == 0x40); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSDefaultObjectManager.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSDefaultObjectManager.h new file mode 100644 index 00000000..7dea236c --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSDefaultObjectManager.h @@ -0,0 +1,35 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x1A78, vtable RVA 0x3059BA8, 124 virtual functions + class BGSDefaultObjectManager : + public TESForm, // 000 + public BSTSingletonImplicit // 028 + { + public: + virtual ~BGSDefaultObjectManager() = default; + + public: + std::uint8_t unk28[0xC60]; // 28 + std::uint8_t unkC88[0xDF0]; // C88 + }; + static_assert(sizeof(BGSDefaultObjectManager) == 0x1A78); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSDestructibleObjectForm.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSDestructibleObjectForm.h new file mode 100644 index 00000000..588f86a1 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSDestructibleObjectForm.h @@ -0,0 +1,31 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + class DestructibleObjectData; + + // 1.11.240.0: size 0x10, vtable RVA 0x3018D38, 21 virtual functions + class BGSDestructibleObjectForm : + public BaseFormComponent // 000 + { + public: + virtual ~BGSDestructibleObjectForm() = default; + + public: + DestructibleObjectData* data; // 08 + }; + static_assert(sizeof(BGSDestructibleObjectForm) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSDialogueBranch.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSDialogueBranch.h new file mode 100644 index 00000000..1b5fdd89 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSDialogueBranch.h @@ -0,0 +1,45 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESQuest; + class TESTopic; + + // 1.11.240.0: size 0x68, vtable RVA 0x3031BB0, 124 virtual functions + class BGSDialogueBranch : + public TESForm // 000 + { + public: + virtual ~BGSDialogueBranch() = default; + + public: + std::uint32_t flags; // 28 + std::uint32_t unk2C; // 2C + TESQuest* quest; // 30 + TESTopic* startingTopic; // 38 + std::int32_t type; // 40 - REX::TEnumSet + std::uint8_t unk44[0x4]; // 44 + std::uint32_t unk48; // 48 + std::uint32_t unk4C; // 4C + BSTArray unk50; // 50 - element type not identified yet + }; + static_assert(sizeof(BGSDialogueBranch) == 0x68); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSDialogueView.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSDialogueView.h new file mode 100644 index 00000000..e61869a8 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSDialogueView.h @@ -0,0 +1,46 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x98, vtable RVA 0x3032230, 126 virtual functions + class BGSDialogueView : + public TESFormIDListView // 000 + { + public: + virtual ~BGSDialogueView() = default; + + public: + BSTArray unk28; // 28 - element type not identified yet + BSTArray unk40; // 40 - element type not identified yet + std::uint32_t unk58; // 58 + std::uint32_t unk5C; // 5C + std::uint64_t unk60; // 60 + std::uint64_t unk68; // 68 + std::uint32_t unk70; // 70 + std::uint32_t unk74; // 74 + std::uint16_t unk78; // 78 + std::uint8_t unk7A[0x6]; // 7A + std::uint64_t unk80; // 80 + std::uint64_t unk88; // 88 + std::uint64_t unk90; // 90 + }; + static_assert(sizeof(BGSDialogueView) == 0x98); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSDualCastData.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSDualCastData.h new file mode 100644 index 00000000..eac98c04 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSDualCastData.h @@ -0,0 +1,49 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSArtObject; + class BGSExplosion; + class BGSImpactDataSet; + class BGSProjectile; + class TESEffectShader; + + struct BGSDualCastDataDEF + { + BGSProjectile* projectile; // 00 + BGSExplosion* explosion; // 08 + TESEffectShader* effectShader; // 10 + BGSArtObject* hitEffectArt; // 18 + BGSImpactDataSet* impactDataSet; // 20 + std::uint32_t flags; // 28 + }; + static_assert(sizeof(BGSDualCastDataDEF) == 0x30); + + // 1.11.240.0: size 0xC0, vtable RVA 0x30BD660, 154 virtual functions + class BGSDualCastData : + public TESBoundObject // 000 + { + public: + virtual ~BGSDualCastData() = default; + + public: + BGSDualCastDataDEF data; // 90 + }; + static_assert(sizeof(BGSDualCastData) == 0xC0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSEncounterZone.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSEncounterZone.h new file mode 100644 index 00000000..1c05a4cb --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSEncounterZone.h @@ -0,0 +1,47 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSLocation; + class TESForm; + + struct ENCOUNTER_ZONE_DATA + { + TESForm* zoneOwner; // 00 + BGSLocation* location; // 08 + std::int8_t ownerRank; // 10 + std::int8_t minLevel; // 11 + std::uint8_t flags; // 12 - REX::TEnumSet + std::int8_t maxLevel; // 13 + }; + static_assert(sizeof(ENCOUNTER_ZONE_DATA) == 0x18); + + // 1.11.240.0: size 0x48, vtable RVA 0x30A2A98, 124 virtual functions + class BGSEncounterZone : + public TESForm // 000 + { + public: + virtual ~BGSEncounterZone() = default; + + public: + ENCOUNTER_ZONE_DATA data; // 28 + std::uint64_t unk40; // 40 + }; + static_assert(sizeof(BGSEncounterZone) == 0x48); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSEquipSlot.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSEquipSlot.h new file mode 100644 index 00000000..89805a9a --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSEquipSlot.h @@ -0,0 +1,39 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class ActorValueInfo; + + // 1.11.240.0: size 0x50, vtable RVA 0x3035D48, 124 virtual functions + class BGSEquipSlot : + public TESForm // 000 + { + public: + virtual ~BGSEquipSlot() = default; + + public: + BSTArray parentSlots; // 28 - BSTArray + std::uint32_t flags; // 40 + std::uint32_t unk44; // 44 + ActorValueInfo* conditionActorValue; // 48 + }; + static_assert(sizeof(BGSEquipSlot) == 0x50); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSEquipType.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSEquipType.h new file mode 100644 index 00000000..0e3db438 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSEquipType.h @@ -0,0 +1,37 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSEquipSlot; + } + + // 1.11.240.0: size 0x10, vtable RVA 0x3019480, 23 virtual functions + class BGSEquipType : + public BaseFormComponent // 000 + { + public: + virtual ~BGSEquipType() = default; + + virtual Forms::BGSEquipSlot* GetEquipSlot(const void* pInstanceData) const noexcept(true) { return nullptr; } // 21 - RVA 0x893670, return (const char *)*((_QWORD *)this + 1); + virtual void SetEquipSlot(Forms::BGSEquipSlot* pSlot) noexcept(true) { return; } // 22 - RVA 0x893680, *(_QWORD *)(a1 + 8) = a2; + + public: + Forms::BGSEquipSlot* equipSlot; // 08 + }; + static_assert(sizeof(BGSEquipType) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSExplosion.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSExplosion.h new file mode 100644 index 00000000..0dce4165 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSExplosion.h @@ -0,0 +1,73 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSImpactDataSet; + class BGSProjectile; + class BGSSoundDescriptorForm; + class TESBoundObject; + class TESObjectLIGH; + + struct BGSExplosionData + { + TESObjectLIGH* light; // 00 + BGSSoundDescriptorForm* sound1; // 08 + BGSSoundDescriptorForm* sound2; // 10 + BGSImpactDataSet* impactDataSet; // 18 + TESBoundObject* impactPlacedObject; // 20 + BGSProjectile* spawnProjectile; // 28 + NiAPI::NiPoint3 projectileVector; // 30 + float projectileSpread; // 3C + std::uint32_t projectileCount; // 40 + float force; // 44 + float damage; // 48 + float innerRadius; // 4C + float outerRadius; // 50 + float imageSpaceRadius; // 54 + float verticalOffsetMult; // 58 + std::uint32_t flags; // 5C + std::int32_t soundLevel; // 60 - REX::TEnumSet + float placedObjectFadeDelay; // 64 + std::int32_t staggerMagnitude; // 68 - REX::TEnumSet + }; + static_assert(sizeof(BGSExplosionData) == 0x70); + + // 1.11.240.0: size 0x180, vtable RVA 0x3080520, 154 virtual functions + class BGSExplosion : + public TESBoundObject, // 000 + public TESFullName, // 090 + public TESModel, // 0A8 + public TESEnchantableForm, // 0E0 + public BGSPreloadable, // 0F8 + public TESImageSpaceModifiableForm // 100 + { + public: + virtual ~BGSExplosion() = default; + + public: + BGSExplosionData data; // 110 + }; + static_assert(sizeof(BGSExplosion) == 0x180); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSFeaturedItemMessage.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSFeaturedItemMessage.h new file mode 100644 index 00000000..9f870639 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSFeaturedItemMessage.h @@ -0,0 +1,34 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSMessage; + } + + // 1.11.240.0: size 0x10, vtable RVA 0x2FA6D20, 21 virtual functions + class BGSFeaturedItemMessage : + public BaseFormComponent // 000 + { + public: + virtual ~BGSFeaturedItemMessage() = default; + + public: + Forms::BGSMessage* featuredItemMessage; // 08 + }; + static_assert(sizeof(BGSFeaturedItemMessage) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSFootstep.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSFootstep.h new file mode 100644 index 00000000..0684034d --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSFootstep.h @@ -0,0 +1,36 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSImpactDataSet; + + // 1.11.240.0: size 0x38, vtable RVA 0x305A448, 124 virtual functions + class BGSFootstep : + public TESForm // 000 + { + public: + virtual ~BGSFootstep() = default; + + public: + BSFixedString tagString; // 28 + BGSImpactDataSet* impactSet; // 30 + }; + static_assert(sizeof(BGSFootstep) == 0x38); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSFootstepSet.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSFootstepSet.h new file mode 100644 index 00000000..9cba5aa2 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSFootstepSet.h @@ -0,0 +1,32 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0xA8, vtable RVA 0x305AAD8, 124 virtual functions + class BGSFootstepSet : + public TESForm // 000 + { + public: + virtual ~BGSFootstepSet() = default; + + public: + std::uint8_t unk28[0x80]; // 28 + }; + static_assert(sizeof(BGSFootstepSet) == 0xA8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSForcedLocRefType.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSForcedLocRefType.h new file mode 100644 index 00000000..d7525c97 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSForcedLocRefType.h @@ -0,0 +1,34 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSLocationRefType; + } + + // 1.11.240.0: size 0x10, vtable RVA 0x2FA6E80, 21 virtual functions + class BGSForcedLocRefType : + public BaseFormComponent // 000 + { + public: + virtual ~BGSForcedLocRefType() = default; + + public: + Forms::BGSLocationRefType* forcedType; // 08 + }; + static_assert(sizeof(BGSForcedLocRefType) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSGodRays.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSGodRays.h new file mode 100644 index 00000000..686548c5 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSGodRays.h @@ -0,0 +1,48 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + struct GodRaysData + { + NiAPI::NiColor colorAir; // 00 + NiAPI::NiColor colorBack; // 0C + NiAPI::NiColor colorFwd; // 18 + float intensity; // 24 + float scatterAir; // 28 + float scatterBack; // 2C + float scatterFwd; // 30 + float phaseBack; // 34 + float phaseFwd; // 38 + }; + static_assert(sizeof(GodRaysData) == 0x3C); + + // 1.11.240.0: size 0x68, vtable RVA 0x2FC1AB8, 124 virtual functions + class BGSGodRays : + public TESForm // 000 + { + public: + virtual ~BGSGodRays() = default; + + public: + GodRaysData data; // 28 + std::uint32_t unk64; // 64 + }; + static_assert(sizeof(BGSGodRays) == 0x68); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSHazard.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSHazard.h new file mode 100644 index 00000000..99e80ded --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSHazard.h @@ -0,0 +1,63 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSImpactDataSet; + class BGSSoundDescriptorForm; + class SpellItem; + class TESObjectLIGH; + + struct BGSHazardData + { + std::uint32_t limit; // 00 + float radius; // 04 + float lifetime; // 08 + float imageSpaceRadius; // 0C + float targetInterval; // 10 + std::uint32_t flags; // 14 - REX::TEnumSet + SpellItem* spell; // 18 + TESObjectLIGH* light; // 20 + BGSImpactDataSet* impactDataSet; // 28 + BGSSoundDescriptorForm* sound; // 30 + float fullEffectRadius; // 38 + float taperWeight; // 3C + float taperCurve; // 40 + }; + static_assert(sizeof(BGSHazardData) == 0x48); + + // 1.11.240.0: size 0x140, vtable RVA 0x30812C0, 154 virtual functions + class BGSHazard : + public TESBoundObject, // 000 + public TESFullName, // 090 + public TESModel, // 0A8 + public BGSPreloadable, // 0E0 + public TESImageSpaceModifiableForm // 0E8 + { + public: + virtual ~BGSHazard() = default; + + public: + BGSHazardData data; // F8 + }; + static_assert(sizeof(BGSHazard) == 0x140); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSHeadPart.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSHeadPart.h new file mode 100644 index 00000000..8317f73d --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSHeadPart.h @@ -0,0 +1,55 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSTextureSet; + + class BGSColorForm; + + class BGSListForm; + + // 1.11.240.0: size 0x1C0, vtable RVA 0x3036560, 124 virtual functions + class BGSHeadPart : + public TESForm, // 000 + public TESFullName, // 028 + public BGSModelMaterialSwap // 040 + { + public: + virtual ~BGSHeadPart() = default; + + public: + std::uint8_t flags; // 90 - REX::TEnumSet + std::uint8_t unk91[0x3]; // 91 + std::int32_t type; // 94 - REX::TEnumSet + BSTArray extraParts; // 98 - BSTArray + BGSTextureSet* textureSet; // B0 + TESModel ChargenModel; // B8 + TESModelTri morphs[3]; // F0 + BGSColorForm* colorForm; // 198 + BGSListForm* validRaces; // 1A0 + std::uint8_t unk1A8[0x18]; // 1A8 + }; + static_assert(sizeof(BGSHeadPart) == 0x1C0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSIdleCollection.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSIdleCollection.h new file mode 100644 index 00000000..9c8b7ea4 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSIdleCollection.h @@ -0,0 +1,39 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESIdleForm; + } + + // 1.11.240.0: size 0x20, vtable RVA 0x30196C0, 21 virtual functions + class BGSIdleCollection : + public BaseFormComponent // 000 + { + public: + virtual ~BGSIdleCollection() = default; + + public: + std::int8_t idleFlags; // 08 + std::int8_t idleCount; // 09 + std::uint8_t unk0A[0x6]; // 0A + Forms::TESIdleForm** idleArray; // 10 + float timerCheckForIdle; // 18 + std::uint32_t unk1C; // 1C + }; + static_assert(sizeof(BGSIdleCollection) == 0x20); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSIdleMarker.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSIdleMarker.h new file mode 100644 index 00000000..7f778849 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSIdleMarker.h @@ -0,0 +1,41 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSKeyword; + + // 1.11.240.0: size 0x118, vtable RVA 0x3037160, 154 virtual functions + class BGSIdleMarker : + public TESBoundObject, // 000 + public BGSKeywordForm, // 090 + public TESModel, // 0B0 + public BGSIdleCollection // 0E8 + { + public: + virtual ~BGSIdleMarker() = default; + + public: + BGSKeyword* animArchType; // 108 + BGSKeyword* flavorAnim; // 110 + }; + static_assert(sizeof(BGSIdleMarker) == 0x118); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSImpactData.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSImpactData.h new file mode 100644 index 00000000..52d68920 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSImpactData.h @@ -0,0 +1,80 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSTextureSet; + class BGSSoundDescriptorForm; + class BGSExplosion; + class BGSHazard; + + struct IMPACT_DATA_DATA + { + float effectDuration; // 00 + std::int32_t orient; // 04 - REX::TEnumSet + float angleThreshold; // 08 + float placementRadius; // 0C + std::int32_t soundLevel; // 10 - REX::TEnumSet + std::int8_t flags; // 14 + std::int8_t resultOverride; // 15 + }; + static_assert(sizeof(IMPACT_DATA_DATA) == 0x18); + + struct DECAL_DATA_DATA + { + float decalMinWidth; // 00 + float decalMaxWidth; // 04 + float decalMinHeight; // 08 + float decalMaxHeight; // 0C + float depth; // 10 + float shininess; // 14 + float parallaxScale; // 18 + std::int8_t parallaxPasses; // 1C + std::int8_t flags; // 1D + std::uint32_t color; // 20 + }; + static_assert(sizeof(DECAL_DATA_DATA) == 0x24); + + struct DecalData + { + DECAL_DATA_DATA data; // 00 + }; + static_assert(sizeof(DecalData) == 0x24); + + // 1.11.240.0: size 0xD0, vtable RVA 0x305B1D8, 124 virtual functions + class BGSImpactData : + public TESForm, // 000 + public TESModel // 028 + { + public: + virtual ~BGSImpactData() = default; + + public: + IMPACT_DATA_DATA data; // 60 + BGSTextureSet* decalTextureSet; // 78 + BGSTextureSet* decalTextureSet2; // 80 + BGSSoundDescriptorForm* sound1; // 88 + BGSSoundDescriptorForm* sound2; // 90 + BGSExplosion* explosion; // 98 + BGSHazard* hazard; // A0 + DecalData decalData; // A8 + float maxFootstepParticleDist; // CC + }; + static_assert(sizeof(BGSImpactData) == 0xD0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSImpactDataSet.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSImpactDataSet.h new file mode 100644 index 00000000..ef349ad3 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSImpactDataSet.h @@ -0,0 +1,40 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x68, vtable RVA 0x305BB50, 124 virtual functions + class BGSImpactDataSet : + public TESForm, // 000 + public BGSPreloadable // 028 + { + public: + virtual ~BGSImpactDataSet() = default; + + public: + std::uint8_t unk30[0xC]; // 30 + std::uint8_t unk3C[0x8]; // 3C + std::uint32_t unk44; // 44 + std::uint64_t unk48; // 48 + std::uint32_t unk50; // 50 + std::uint8_t unk54[0xC]; // 54 + std::uint64_t unk60; // 60 + }; + static_assert(sizeof(BGSImpactDataSet) == 0x68); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSInstanceNamingRules.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSInstanceNamingRules.h new file mode 100644 index 00000000..95d8f1fc --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSInstanceNamingRules.h @@ -0,0 +1,35 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x128, vtable RVA 0x2FB9E60, 124 virtual functions + class BGSInstanceNamingRules : + public TESForm // 000 + { + public: + virtual ~BGSInstanceNamingRules() = default; + + public: + std::uint32_t unk28; // 28 + std::uint8_t unk2C[0xF4]; // 2C + std::uint32_t unk120; // 120 + std::uint32_t unk124; // 124 + }; + static_assert(sizeof(BGSInstanceNamingRules) == 0x128); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSInstanceNamingRulesForm.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSInstanceNamingRulesForm.h new file mode 100644 index 00000000..11e6dfdb --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSInstanceNamingRulesForm.h @@ -0,0 +1,34 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSInstanceNamingRules; + } + + // 1.11.240.0: size 0x10, vtable RVA 0x2FA70A0, 21 virtual functions + class BGSInstanceNamingRulesForm : + public BaseFormComponent // 000 + { + public: + virtual ~BGSInstanceNamingRulesForm() = default; + + public: + Forms::BGSInstanceNamingRules* instanceNamingRules; // 08 + }; + static_assert(sizeof(BGSInstanceNamingRulesForm) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSKeyword.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSKeyword.h index bb900c3c..34585ea7 100644 --- a/CKPE.Fallout4/Include/EditorAPI/B/BGSKeyword.h +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSKeyword.h @@ -1,11 +1,13 @@ -// Copyright © 2025 aka CKPE team. All rights reserved. +// Copyright © 2020-2025 aka CKPE team. All rights reserved. // Contacts: // License: https://www.gnu.org/licenses/lgpl-3.0.html #pragma once -#include +#include #include +#include +#include #include namespace CKPE @@ -42,28 +44,32 @@ namespace CKPE kDispelEffect, kTotal }; - private: - BGSLocalizedString _DisplayName; // 08 - NiAPI::NiRGB _Color; // 10 - BSFixedString _Description; // 18 - std::uint8_t _Type; - char _unk[15]; - public: - virtual ~BGS_KEYWORD_DATA() = default; - - [[nodiscard]] inline const char* GetDisplayName() const noexcept(true) { return _DisplayName.c_str(); } - [[nodiscard]] inline NiAPI::NiRGB GetColor() const noexcept(true) { return _Color; } - [[nodiscard]] inline const char* GetDescription() const noexcept(true) { return _Description.c_str(); } - [[nodiscard]] inline std::uint8_t GetType() const noexcept(true) { return _Type; } }; - static_assert(sizeof(BGS_KEYWORD_DATA) == 0x38); - class BGSKeyword : public TESForm, public BGS_KEYWORD_DATA + + // 1.11.240.0: size 0x60, vtable RVA 0x3037CF8, 124 virtual functions + class BGSKeyword : + public TESForm, // 000 + public TESFullName // 028 { public: + virtual ~BGSKeyword() = default; + constexpr static std::uint8_t TYPE_ID = ftKeyword; - virtual ~BGSKeyword() = default; + [[nodiscard]] inline const char* GetDisplayName() const noexcept(true) { return GetFullName(); } + [[nodiscard]] inline NiAPI::NiRGB GetColor() const noexcept(true) { return color; } + [[nodiscard]] inline const char* GetDescription() const noexcept(true) { return description.c_str(); } + [[nodiscard]] inline std::uint8_t GetType() const noexcept(true) { return (std::uint8_t)type; } + + public: + NiAPI::NiRGB color; // 40 + std::uint8_t pad43[1]; // 43 + std::uint32_t unk44; // 44 + BSFixedString description; // 48 + std::uint32_t type; // 50 + std::uint32_t unk54; // 54 + std::uint64_t unk58; // 58 }; static_assert(sizeof(BGSKeyword) == 0x60); } diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSKeywordForm.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSKeywordForm.h new file mode 100644 index 00000000..569c08a8 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSKeywordForm.h @@ -0,0 +1,45 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSKeyword; + } + + + // 1.11.240.0: size 0x20, vtable RVA 0x3019990, 23 virtual functions + class BGSKeywordForm : + public BaseFormComponent, // 000 + public IKeywordFormBase // 008 + { + public: + virtual ~BGSKeywordForm() = default; + + [[nodiscard]] inline Forms::BGSKeyword** GetKeywords() const noexcept(true) { return keywords; } + [[nodiscard]] inline std::uint32_t GetKeywordCount() const noexcept(true) { return numKeywords; } + + virtual void sub_0A8() { return; } // 21 - RVA 0x898690 + virtual Forms::BGSKeyword* GetDefaultKeyword() const noexcept(true) { return nullptr; } // 22 - RVA 0x45AAC0, return 0; + + public: + Forms::BGSKeyword** keywords; // 10 - verified: array of BGSKeyword*, see BGSKeywordForm vfuncs + std::uint32_t numKeywords; // 18 + std::uint32_t listControlID; // 1C - dialog control ID (5320) used with GetDlgItem by the dialog virtuals + }; + static_assert(sizeof(BGSKeywordForm) == 0x20); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSLensFlare.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSLensFlare.h new file mode 100644 index 00000000..6e7b3485 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSLensFlare.h @@ -0,0 +1,32 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x58, vtable RVA 0x2FC0F70, 124 virtual functions + class BGSLensFlare : + public TESForm // 000 + { + public: + virtual ~BGSLensFlare() = default; + + public: + std::uint8_t unk28[0x30]; // 28 + }; + static_assert(sizeof(BGSLensFlare) == 0x58); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSLightingTemplate.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSLightingTemplate.h new file mode 100644 index 00000000..3d4e042f --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSLightingTemplate.h @@ -0,0 +1,76 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSGodRays; + + struct BGSDirectionalAmbientLightingColors + { + std::uint32_t colorValues[7]; // 00 + float fresnelPower; // 1C + }; + static_assert(sizeof(BGSDirectionalAmbientLightingColors) == 0x20); + + // The CK copy of INTERIOR_DATA stops after fogFarHeightRange (no interiorOffset): 0x88 bytes + struct BGSLightingTemplateData + { + std::uint32_t ambient; // 00 + std::uint32_t directional; // 04 + std::uint32_t fogColorNear; // 08 + float fogNear; // 0C + float fogFar; // 10 + std::uint32_t directionalXY; // 14 + std::uint32_t directionalZ; // 18 + float directionalFade; // 1C + float clipDist; // 20 + float fogPower; // 24 + BGSDirectionalAmbientLightingColors directionalAmbientLightingColors; // 28 + std::uint32_t fogColorFar; // 48 + float fogClamp; // 4C + float lightFadeStart; // 50 + float lightFadeEnd; // 54 + std::uint32_t lightingTemplateInheritanceFlags; // 58 + float fogHeightMid; // 5C + float fogHeightRange; // 60 + std::uint32_t fogColorHighNear; // 64 + std::uint32_t fogColorHighFar; // 68 + float fogHighDensityScale; // 6C + float fogNearColorScale; // 70 + float fogFarColorScale; // 74 + float fogHighNearColorScale; // 78 + float fogHighFarColorScale; // 7C + float fogFarHeightMid; // 80 + float fogFarHeightRange; // 84 + }; + static_assert(sizeof(BGSLightingTemplateData) == 0x88); + + // 1.11.240.0: size 0xD8, vtable RVA 0x30A35E8, 126 virtual functions + class BGSLightingTemplate : + public TESFormIDListView // 000 + { + public: + virtual ~BGSLightingTemplate() = default; + + public: + BGSLightingTemplateData data; // 28 - INTERIOR_DATA + BGSGodRays* godRays; // B0 + BGSDirectionalAmbientLightingColors directionalAmbientLightingColors; // B8 + }; + static_assert(sizeof(BGSLightingTemplate) == 0xD8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSListForm.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSListForm.h new file mode 100644 index 00000000..b8f46bcc --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSListForm.h @@ -0,0 +1,36 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x58, vtable RVA 0x305C430, 124 virtual functions + class BGSListForm : + public TESForm, // 000 + public TESFullName // 028 + { + public: + virtual ~BGSListForm() = default; + + public: + BSTArray arrayOfForms; // 40 - BSTArray + }; + static_assert(sizeof(BGSListForm) == 0x58); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSLocation.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSLocation.h new file mode 100644 index 00000000..222cf51a --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSLocation.h @@ -0,0 +1,80 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESFaction; + class BGSMusicType; + class BGSEncounterZone; + + // 1.11.240.0: size 0x1E0, vtable RVA 0x30A3F38, 124 virtual functions + class BGSLocation : + public TESForm, // 000 + public TESFullName, // 028 + public BGSKeywordForm // 040 + { + public: + virtual ~BGSLocation() = default; + + public: + BGSLocation* parentLoc; // 60 + TESFaction* unreportedCrimeFaction; // 68 + BGSMusicType* musicType; // 70 + BGSEncounterZone* zone; // 78 + std::uint64_t unk80; // 80 + std::uint32_t worldLocMarker; // 88 - MNAM - ObjectRefHandle + float worldLocRadius; // 8C - RNAM + float actorFadeMult; // 90 - ANAM + std::uint32_t horseLocMarker; // 94 - NAM0 - ObjectRefHandle + BSTArray specialRefs; // 98 - BSTArray + BSTArray uniqueNPCs; // B0 - BSTArray + BSTArray unkC8; // C8 - element type not identified yet + std::uint8_t unkE0[0xC]; // E0 + std::uint8_t unkEC[0x8]; // EC + std::uint32_t unkF4; // F4 + std::uint64_t unkF8; // F8 + std::uint32_t unk100; // 100 + std::uint8_t unk104[0xC]; // 104 + std::uint64_t unk110; // 110 + BSTArray unk118; // 118 - element type not identified yet + BSTArray unk130; // 130 - element type not identified yet + std::uint8_t unk148[0xC]; // 148 + std::uint8_t unk154[0x8]; // 154 + std::uint32_t unk15C; // 15C + std::uint64_t unk160; // 160 + std::uint32_t unk168; // 168 + std::uint8_t unk16C[0xC]; // 16C + std::uint64_t unk178; // 178 + std::uint8_t unk180[0xC]; // 180 + std::uint8_t unk18C[0x8]; // 18C + std::uint32_t unk194; // 194 + std::uint64_t unk198; // 198 + std::uint32_t unk1A0; // 1A0 + std::uint8_t unk1A4[0xC]; // 1A4 + std::uint64_t unk1B0; // 1B0 + std::uint64_t unk1B8; // 1B8 + BSTArray unk1C0; // 1C0 - element type not identified yet + std::uint32_t unk1D8; // 1D8 + std::uint32_t unk1DC; // 1DC + }; + static_assert(sizeof(BGSLocation) == 0x1E0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSLocationRefType.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSLocationRefType.h new file mode 100644 index 00000000..2b4a166d --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSLocationRefType.h @@ -0,0 +1,29 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x60, vtable RVA 0x30A5538, 124 virtual functions + class BGSLocationRefType : + public BGSKeyword // 000 + { + public: + virtual ~BGSLocationRefType() = default; + }; + static_assert(sizeof(BGSLocationRefType) == 0x60); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSMaterialObject.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSMaterialObject.h new file mode 100644 index 00000000..adca3e21 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSMaterialObject.h @@ -0,0 +1,40 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0xD8, vtable RVA 0x305CC18, 124 virtual functions + class BGSMaterialObject : + public TESForm, // 000 + public TESModel, // 028 + public BSMaterialObject // 060 + { + public: + virtual ~BGSMaterialObject() = default; + + public: + BSTArray fileData; // B0 - BSTArray + std::uint64_t unkC8; // C8 + std::uint64_t unkD0; // D0 + }; + static_assert(sizeof(BGSMaterialObject) == 0xD8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSMaterialType.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSMaterialType.h new file mode 100644 index 00000000..3cd85ebc --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSMaterialType.h @@ -0,0 +1,43 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSImpactDataSet; + + // 1.11.240.0: size 0x90, vtable RVA 0x305D4D8, 124 virtual functions + class BGSMaterialType : + public TESForm // 000 + { + public: + virtual ~BGSMaterialType() = default; + + public: + TESModel breakableFXModel; // 28 + BGSMaterialType* parentType; // 60 + BGSImpactDataSet* havokImpactDataSet; // 68 + BSFixedString materialName; // 70 + std::uint32_t materialID; // 78 + std::uint8_t materialColor[0xC]; // 7C - NiColor + float buoyancy; // 88 + std::uint32_t flags; // 8C + }; + static_assert(sizeof(BGSMaterialType) == 0x90); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSMenuDisplayObject.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSMenuDisplayObject.h new file mode 100644 index 00000000..72028213 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSMenuDisplayObject.h @@ -0,0 +1,36 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESBoundObject; + } + + // 1.11.240.0: size 0x10, vtable RVA 0x3019CC0, 22 virtual functions + class BGSMenuDisplayObject : + public BaseFormComponent // 000 + { + public: + virtual ~BGSMenuDisplayObject() = default; + + virtual Forms::TESBoundObject* GetMenuDispObject() const noexcept(true) { return nullptr; } // 21 - RVA 0x899710, return (const char *)*((_QWORD *)this + 1); + + public: + Forms::TESBoundObject* menuDispObject; // 08 + }; + static_assert(sizeof(BGSMenuDisplayObject) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSMenuIcon.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSMenuIcon.h new file mode 100644 index 00000000..338e9de0 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSMenuIcon.h @@ -0,0 +1,31 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x50, vtable RVA 0x305DDD8, 124 virtual functions + class BGSMenuIcon : + public TESForm, // 000 + public TESIcon // 028 + { + public: + virtual ~BGSMenuIcon() = default; + }; + static_assert(sizeof(BGSMenuIcon) == 0x50); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSMessage.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSMessage.h new file mode 100644 index 00000000..903afe2a --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSMessage.h @@ -0,0 +1,46 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSMenuIcon; + class TESQuest; + + // 1.11.240.0: size 0xA8, vtable RVA 0x305E4E0, 124 virtual functions + class BGSMessage : + public TESForm, // 000 + public TESFullName, // 028 + public TESDescription // 040 + { + public: + virtual ~BGSMessage() = default; + + public: + BGSMenuIcon* icon; // 68 + TESQuest* ownerQuest; // 70 + BSSimpleList buttonList; // 78 - BSSimpleList + BSFixedString swfFile; // 88 - BSFixedStringCS + BGSLocalizedString shortName; // 90 + std::uint32_t flags; // A0 + std::uint32_t displayTime; // A4 + }; + static_assert(sizeof(BGSMessage) == 0xA8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSMessageIcon.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSMessageIcon.h new file mode 100644 index 00000000..6b70b6d5 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSMessageIcon.h @@ -0,0 +1,30 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x30, vtable RVA 0x3019F98, 21 virtual functions + class BGSMessageIcon : + public BaseFormComponent // 000 + { + public: + virtual ~BGSMessageIcon() = default; + + public: + TESIcon icon; // 08 + }; + static_assert(sizeof(BGSMessageIcon) == 0x30); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSModelMaterialSwap.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSModelMaterialSwap.h index e53db0d8..3dbb383c 100644 --- a/CKPE.Fallout4/Include/EditorAPI/B/BGSModelMaterialSwap.h +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSModelMaterialSwap.h @@ -5,6 +5,7 @@ #pragma once #include +#include namespace CKPE { @@ -16,12 +17,13 @@ namespace CKPE { // size = 0x50 // func = 27 - class BGSModelMaterialSwap + class BGSModelMaterialSwap : + public TESModel // 000 { public: virtual ~BGSModelMaterialSwap() = default; public: - [[nodiscard]] inline const char* GetModelPath() const noexcept(true) { return !_ModelPath.empty() ? _ModelPath.c_str() : nullptr; } + [[nodiscard]] inline const char* GetModelPath() const noexcept(true) { return !modelName.empty() ? modelName.c_str() : nullptr; } [[nodiscard]] inline BGSMaterialSwap* GetMaterialSwap() const noexcept(true) { return _MaterialSwap; } [[nodiscard]] inline float GetColorRemapIndex() const noexcept(true) { return fColorRemapIndex; } [[nodiscard]] inline bool HasColorRemapIndex() const noexcept(true) @@ -34,17 +36,15 @@ namespace CKPE CKPE_READ_PROPERTY(GetMaterialSwap) BGSMaterialSwap* MaterialSwap; CKPE_READ_PROPERTY(GetColorRemapIndex) float ColorRemapIndex; private: - BSFixedString _ModelPath; - char pad10[0x18]; - std::uint32_t u32Unk28; - char pad2C[0x14]; - BGSMaterialSwap* _MaterialSwap; + // TESModel is 0x38 bytes (modelName at 0x08) + char pad38[0x8]; // 38 + BGSMaterialSwap* _MaterialSwap; // 0x40 union { float fColorRemapIndex; std::uint32_t uColorRemapIndex; }; - char pad4[0x4]; + char pad4C[0x4]; // 4C }; static_assert(sizeof(BGSModelMaterialSwap) == 0x50); } diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSMovableStatic.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSMovableStatic.h new file mode 100644 index 00000000..21a7009b --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSMovableStatic.h @@ -0,0 +1,47 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + + struct MOVABLE_STATIC_DATA + { + std::int8_t flags; // 00 + }; + static_assert(sizeof(MOVABLE_STATIC_DATA) == 0x1); + + // 1.11.240.0: size 0x198, vtable RVA 0x3081EB0, 154 virtual functions + class BGSMovableStatic : + public TESObjectSTAT, // 000 + public BGSDestructibleObjectForm, // 148 + public BGSKeywordForm // 158 + { + public: + virtual ~BGSMovableStatic() = default; + + public: + BGSSoundDescriptorForm* soundLoop; // 178 + MOVABLE_STATIC_DATA data; // 180 + std::uint8_t unk181[0x7]; // 181 + std::uint8_t unk188[0x10]; // 188 + }; + static_assert(sizeof(BGSMovableStatic) == 0x198); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSMovementType.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSMovementType.h new file mode 100644 index 00000000..01d8b32b --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSMovementType.h @@ -0,0 +1,36 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0xA8, vtable RVA 0x30395F8, 124 virtual functions + class BGSMovementType : + public TESForm // 000 + { + public: + virtual ~BGSMovementType() = default; + + public: + BSFixedString unk28; // 28 + std::uint8_t unk30[0x70]; // 30 + float floatHeight; // A0 + std::uint32_t unkA4; // A4 + }; + static_assert(sizeof(BGSMovementType) == 0xA8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSMusicTrackFormWrapper.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSMusicTrackFormWrapper.h new file mode 100644 index 00000000..10d79dd0 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSMusicTrackFormWrapper.h @@ -0,0 +1,36 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSMusicTrack; + + // 1.11.240.0: size 0x40, vtable RVA 0x305FD20, 124 virtual functions + class BGSMusicTrackFormWrapper : + public TESForm, // 000 + public BSIMusicTrack // 028 + { + public: + virtual ~BGSMusicTrackFormWrapper() = default; + + public: + BGSMusicTrack* trackImpl; // 38 + }; + static_assert(sizeof(BGSMusicTrackFormWrapper) == 0x40); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSMusicType.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSMusicType.h new file mode 100644 index 00000000..84606aed --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSMusicType.h @@ -0,0 +1,44 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x78, vtable RVA 0x3060568, 124 virtual functions + class BGSMusicType : + public TESForm, // 000 + public BSIMusicType // 028 + { + public: + virtual ~BGSMusicType() = default; + + public: + std::uint32_t flags; // 30 - BSIMusicType::flags + std::int8_t priority; // 34 + std::uint8_t pad35; // 35 + std::uint16_t ducksOtherMusicBy; // 36 + float fadeTime; // 38 + std::uint32_t currentTrackIndex; // 3C + BSTArray trackHistory; // 40 - BSTArray + BSTArray tracks; // 58 - BSTArray + std::int32_t typeStatus; // 70 - REX::EnumSet + std::uint32_t pad74; // 74 + }; + static_assert(sizeof(BGSMusicType) == 0x78); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSNativeTerminalForm.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSNativeTerminalForm.h new file mode 100644 index 00000000..f8ad1af8 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSNativeTerminalForm.h @@ -0,0 +1,34 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSTerminal; + } + + // 1.11.240.0: size 0x10, vtable RVA 0x2FA9560, 21 virtual functions + class BGSNativeTerminalForm : + public BaseFormComponent // 000 + { + public: + virtual ~BGSNativeTerminalForm() = default; + + public: + Forms::BGSTerminal* terminal; // 08 + }; + static_assert(sizeof(BGSNativeTerminalForm) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSNote.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSNote.h new file mode 100644 index 00000000..6ddddce8 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSNote.h @@ -0,0 +1,51 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x168, vtable RVA 0x3039EF8, 154 virtual functions + class BGSNote : + public TESBoundObject, // 000 + public TESWeightForm, // 090 + public TESValueForm, // 0A0 + public TESModel, // 0B0 + public TESFullName, // 0E8 + public TESIcon, // 100 + public BGSPickupPutdownSounds // 128 + { + public: + virtual ~BGSNote() = default; + + public: + BSFixedString programFile; // 140 + std::uint64_t unk148; // 148 + std::int8_t type; // 150 + bool hasBeenRead; // 151 + std::uint8_t unk152[0xE]; // 152 + std::uint16_t unk160; // 160 + std::uint8_t unk162[0x6]; // 162 + }; + static_assert(sizeof(BGSNote) == 0x168); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSObjectVisibilityManager.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSObjectVisibilityManager.h new file mode 100644 index 00000000..fbde7af3 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSObjectVisibilityManager.h @@ -0,0 +1,40 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x60, vtable RVA 0x2FAC100, 124 virtual functions + class BGSObjectVisibilityManager : + public TESForm, // 000 + public BSTSingletonImplicit // 028 + { + public: + virtual ~BGSObjectVisibilityManager() = default; + + public: + std::uint8_t unk28[0xC]; // 28 + std::uint8_t unk34[0x8]; // 34 + std::uint32_t unk3C; // 3C + std::uint64_t unk40; // 40 + std::uint32_t unk48; // 48 + std::uint8_t unk4C[0xC]; // 4C + std::uint64_t unk58; // 58 + }; + static_assert(sizeof(BGSObjectVisibilityManager) == 0x60); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSOutfit.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSOutfit.h new file mode 100644 index 00000000..52a98b78 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSOutfit.h @@ -0,0 +1,34 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x40, vtable RVA 0x3082BF8, 124 virtual functions + class BGSOutfit : + public TESForm // 000 + { + public: + virtual ~BGSOutfit() = default; + + public: + BSTArray outfitItems; // 28 - BSTArray + }; + static_assert(sizeof(BGSOutfit) == 0x40); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSOverridePackCollection.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSOverridePackCollection.h new file mode 100644 index 00000000..dd942650 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSOverridePackCollection.h @@ -0,0 +1,39 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSListForm; + } + + // 1.11.240.0: size 0x38, vtable RVA 0x301A2D8, 21 virtual functions + class BGSOverridePackCollection : + public BaseFormComponent // 000 + { + public: + virtual ~BGSOverridePackCollection() = default; + + public: + Forms::BGSListForm* spectatorOverRidePackList; // 08 + Forms::BGSListForm* observeCorpseOverRidePackList; // 10 + Forms::BGSListForm* guardWarnOverRidePackList; // 18 + Forms::BGSListForm* enterCombatOverRidePackList; // 20 + Forms::BGSListForm* followerCommandPackList; // 28 + Forms::BGSListForm* elevatorOverRidePackList; // 30 + }; + static_assert(sizeof(BGSOverridePackCollection) == 0x38); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSPackIn.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSPackIn.h new file mode 100644 index 00000000..0a6cab42 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSPackIn.h @@ -0,0 +1,43 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x80, vtable RVA 0x3083310, 124 virtual functions + class BGSPackIn : + public TESForm // 000 + { + public: + virtual ~BGSPackIn() = default; + + public: + std::uint64_t unk28; // 28 + std::uint64_t unk30; // 30 + std::uint32_t unk38; // 38 + std::uint32_t unk3C; // 3C + std::uint32_t unk40; // 40 + std::uint8_t unk44[0x10]; // 44 + std::uint8_t unk54[0x8]; // 54 + std::uint32_t unk5C; // 5C + std::uint64_t unk60; // 60 + std::uint32_t unk68; // 68 + std::uint8_t unk6C[0xC]; // 6C + std::uint64_t unk78; // 78 + }; + static_assert(sizeof(BGSPackIn) == 0x80); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSPerk.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSPerk.h new file mode 100644 index 00000000..cd8241fb --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSPerk.h @@ -0,0 +1,71 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + + struct PerkData + { + bool trait; // 00 + std::int8_t level; // 01 + std::int8_t numRanks; // 02 + bool playable; // 03 + bool hidden; // 04 + }; + static_assert(sizeof(PerkData) == 0x5); + + // 1.11.240.0: size 0x138, vtable RVA 0x303B298, 124 virtual functions + class BGSPerk : + public TESForm, // 000 + public TESFullName, // 028 + public TESDescription, // 040 + public TESIcon // 068 + { + public: + virtual ~BGSPerk() = default; + + public: + PerkData data; // 90 + std::uint8_t unk95[0x3]; // 95 + std::uint8_t perkConditions[0x18]; // 98 - TESCondition (0x18 in the CK) - CTDA + BSTArray perkEntries; // B0 - BSTArray, by position after perkConditions + BSFixedString swfFile; // C8 - BSFixedStringCS + BGSPerk* nextPerk; // D0 + BGSSoundDescriptorForm* sound; // D8 + std::uint64_t unkE0; // E0 + std::uint64_t unkE8; // E8 + std::uint8_t unkF0; // F0 + std::uint8_t unkF1[0x13]; // F1 + std::uint8_t unk104[0x8]; // 104 + std::uint32_t unk10C; // 10C + std::uint64_t unk110; // 110 + std::uint32_t unk118; // 118 + std::uint8_t unk11C[0xC]; // 11C + std::uint64_t unk128; // 128 + std::uint16_t unk130; // 130 + std::uint8_t unk132[0x6]; // 132 + }; + static_assert(sizeof(BGSPerk) == 0x138); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSPerkRankArray.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSPerkRankArray.h new file mode 100644 index 00000000..98072d37 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSPerkRankArray.h @@ -0,0 +1,31 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + class PerkRankData; + + // 1.11.240.0: size 0x10, vtable RVA 0x301AFE0, 21 virtual functions + class BGSPerkRankArray : + public BaseFormComponent // 000 + { + public: + virtual ~BGSPerkRankArray() = default; + + public: + PerkRankData* perks; // 08 - the CK has no perkCount member (size 0x10) + }; + static_assert(sizeof(BGSPerkRankArray) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSPickupPutdownSounds.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSPickupPutdownSounds.h new file mode 100644 index 00000000..544d46d9 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSPickupPutdownSounds.h @@ -0,0 +1,35 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + } + + // 1.11.240.0: size 0x18, vtable RVA 0x301B3B0, 21 virtual functions + class BGSPickupPutdownSounds : + public BaseFormComponent // 000 + { + public: + virtual ~BGSPickupPutdownSounds() = default; + + public: + Forms::BGSSoundDescriptorForm* pickupSound; // 08 + Forms::BGSSoundDescriptorForm* putdownSound; // 10 + }; + static_assert(sizeof(BGSPickupPutdownSounds) == 0x18); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSPreloadable.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSPreloadable.h new file mode 100644 index 00000000..16187f5c --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSPreloadable.h @@ -0,0 +1,26 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x8, vtable RVA 0x3030B88, 21 virtual functions + class BGSPreloadable : + public BaseFormComponent // 000 + { + public: + virtual ~BGSPreloadable() = default; + }; + static_assert(sizeof(BGSPreloadable) == 0x8); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSProjectile.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSProjectile.h new file mode 100644 index 00000000..3e91b0a8 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSProjectile.h @@ -0,0 +1,79 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSCollisionLayer; + class BGSExplosion; + class BGSSoundDescriptorForm; + class BGSTextureSet; + class TESObjectLIGH; + class TESObjectWEAP; + + struct BGSProjectileData + { + std::uint32_t flags; // 00 + float gravity; // 04 + float speed; // 08 + float range; // 0C + TESObjectLIGH* light; // 10 + TESObjectLIGH* muzzleFlashLight; // 18 + float explosionProximity; // 20 + float explosionTimer; // 24 + BGSExplosion* explosionType; // 28 + BGSSoundDescriptorForm* activeSoundLoop; // 30 + float muzzleFlashDuration; // 38 + float fadeOutTime; // 3C + float force; // 40 + BGSSoundDescriptorForm* countdownSound; // 48 + BGSSoundDescriptorForm* deactivateSound; // 50 + TESObjectWEAP* defaultWeaponSource; // 58 + float coneSpread; // 60 + float collisionRadius; // 64 + float lifetime; // 68 + float relaunchInterval; // 6C + BGSTextureSet* decalData; // 70 + BGSCollisionLayer* collisionLayer; // 78 + BGSProjectile* vatsProjectile; // 80 + std::int8_t tracerFrequency; // 88 + }; + static_assert(sizeof(BGSProjectileData) == 0x90); + + // 1.11.240.0: size 0x1C8, vtable RVA 0x3083F18, 154 virtual functions + class BGSProjectile : + public TESBoundObject, // 000 + public TESFullName, // 090 + public TESModel, // 0A8 + public BGSPreloadable, // 0E0 + public BGSDestructibleObjectForm // 0E8 + { + public: + virtual ~BGSProjectile() = default; + + public: + BGSProjectileData data; // F8 + TESModel muzzleFlashModel; // 188 + std::int32_t soundLevel; // 1C0 - REX::TEnumSet + std::uint32_t unk1C4; // 1C4 + }; + static_assert(sizeof(BGSProjectile) == 0x1C8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSPropertySheet.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSPropertySheet.h new file mode 100644 index 00000000..0219f5bb --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSPropertySheet.h @@ -0,0 +1,29 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x10, vtable RVA 0x2FA9870, 21 virtual functions + class BGSPropertySheet : + public BaseFormComponent // 000 + { + public: + virtual ~BGSPropertySheet() = default; + + public: + void* properties; // 08 - BSTArray>*, heap allocated 24 byte array + }; + static_assert(sizeof(BGSPropertySheet) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSReferenceEffect.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSReferenceEffect.h new file mode 100644 index 00000000..88a87fe4 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSReferenceEffect.h @@ -0,0 +1,35 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x40, vtable RVA 0x30A5BB8, 124 virtual functions + class BGSReferenceEffect : + public TESForm // 000 + { + public: + virtual ~BGSReferenceEffect() = default; + + public: + std::uint64_t unk28; // 28 + std::uint64_t unk30; // 30 + std::uint32_t unk38; // 38 + std::uint32_t unk3C; // 3C + }; + static_assert(sizeof(BGSReferenceEffect) == 0x40); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSReferenceGroup.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSReferenceGroup.h new file mode 100644 index 00000000..516ef97d --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSReferenceGroup.h @@ -0,0 +1,40 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x58, vtable RVA 0x30A62D8, 124 virtual functions + class BGSReferenceGroup : + public TESForm // 000 + { + public: + virtual ~BGSReferenceGroup() = default; + + public: + std::uint64_t unk28; // 28 + std::uint32_t unk30; // 30 + std::uint32_t unk34; // 34 + std::uint32_t unk38; // 38 + std::uint32_t unk3C; // 3C + std::uint64_t unk40; // 40 + std::uint64_t unk48; // 48 + std::uint32_t unk50; // 50 + std::uint32_t unk54; // 54 + }; + static_assert(sizeof(BGSReferenceGroup) == 0x58); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSRelationship.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSRelationship.h new file mode 100644 index 00000000..8836140b --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSRelationship.h @@ -0,0 +1,39 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESNPC; + class BGSAssociationType; + + // 1.11.240.0: size 0x48, vtable RVA 0x303D528, 124 virtual functions + class BGSRelationship : + public TESForm // 000 + { + public: + virtual ~BGSRelationship() = default; + + public: + TESNPC* npc1; // 28 + TESNPC* npc2; // 30 + BGSAssociationType* assocType; // 38 + std::uint32_t packedData; // 40 + std::uint32_t unk44; // 44 + }; + static_assert(sizeof(BGSRelationship) == 0x48); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSReverbParameters.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSReverbParameters.h new file mode 100644 index 00000000..62d27f27 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSReverbParameters.h @@ -0,0 +1,40 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x48, vtable RVA 0x3060DD0, 124 virtual functions + class BGSReverbParameters : + public TESForm, // 000 + public BSIReverbType // 028 + { + public: + virtual ~BGSReverbParameters() = default; + + public: + std::uint32_t unk30; // 30 + std::uint32_t unk34; // 34 + std::uint32_t unk38; // 38 + std::uint8_t unk3C; // 3C + std::uint8_t unk3D[0x3]; // 3D + std::uint32_t reverbClass; // 40 + std::uint32_t unk44; // 44 + }; + static_assert(sizeof(BGSReverbParameters) == 0x48); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSScene.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSScene.h new file mode 100644 index 00000000..04085adf --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSScene.h @@ -0,0 +1,87 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESQuest; + + // 1.11.240.0: size 0x230, vtable RVA 0x303DEA8, 124 virtual functions + class BGSScene : + public TESForm, // 000 + public IKeywordFormBase // 028 + { + public: + virtual ~BGSScene() = default; + + public: + std::uint32_t unk30; // 30 + std::uint32_t unk34; // 34 + BSTArray phases; // 38 - BSTArray + BSTArray actors; // 50 - BSTArray + BSTArray actorFlags; // 68 - BSTArray + BSTArray actorProgressionFlags; // 80 - BSTArray + BSTArray actions; // 98 - BSTArray + TESQuest* parentQuest; // B0 + BGSScene* templateScene; // B8 + std::uint32_t flags; // C0 + std::uint32_t unkC4; // C4 + std::uint8_t repeatConditions[0x18]; // C8 - TESCondition (0x18 in the CK) + std::uint8_t unkE0[0x2C]; // E0 + std::uint32_t unk10C; // 10C + std::uint64_t unk110; // 110 + std::uint8_t unk118[0x50]; // 118 + std::uint64_t unk168; // 168 + std::uint32_t unk170; // 170 + std::uint32_t unk174; // 174 + std::uint64_t unk178; // 178 + std::uint32_t unk180; // 180 + std::uint8_t unk184[0xC]; // 184 + std::uint64_t unk190; // 190 + std::uint32_t unk198; // 198 + std::uint32_t unk19C; // 19C + BSTArray unk1A0; // 1A0 - element type not identified yet + std::uint32_t unk1B8; // 1B8 + std::uint32_t unk1BC; // 1BC + std::uint64_t unk1C0; // 1C0 + std::uint64_t unk1C8; // 1C8 + std::uint64_t unk1D0; // 1D0 + BSFixedString unk1D8; // 1D8 + std::uint16_t unk1E0; // 1E0 + std::uint8_t unk1E2; // 1E2 + std::uint8_t unk1E3[0x5]; // 1E3 + BGSKeywordForm* keywordForm; // 1E8 - allocated in the constructor (KSIZ chunk) + std::uint16_t unk1F0; // 1F0 + std::uint16_t unk1F2; // 1F2 + std::uint32_t unk1F4; // 1F4 + std::uint32_t unk1F8; // 1F8 + std::uint32_t unk1FC; // 1FC + std::uint64_t unk200; // 200 + std::uint64_t unk208; // 208 + std::uint64_t unk210; // 210 + std::uint64_t unk218; // 218 + std::uint64_t unk220; // 220 + std::uint16_t unk228; // 228 + std::uint8_t unk22A[0x6]; // 22A + }; + static_assert(sizeof(BGSScene) == 0x230); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSSceneCollection.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSSceneCollection.h new file mode 100644 index 00000000..01889f4d --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSSceneCollection.h @@ -0,0 +1,63 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x158, vtable RVA 0x2FB6F48, 124 virtual functions + class BGSSceneCollection : + public TESForm // 000 + { + public: + virtual ~BGSSceneCollection() = default; + + public: + std::uint32_t unk28; // 28 + std::uint32_t unk2C; // 2C + std::uint64_t unk30; // 30 + BSTArray unk38; // 38 - element type not identified yet + std::uint8_t unk50[0x30]; // 50 + std::uint64_t unk80; // 80 + BSTArray unk88; // 88 - element type not identified yet + std::uint8_t unkA0[0xC]; // A0 + std::uint8_t unkAC[0x8]; // AC + std::uint32_t unkB4; // B4 + std::uint64_t unkB8; // B8 + std::uint32_t unkC0; // C0 + std::uint8_t unkC4[0xC]; // C4 + std::uint64_t unkD0; // D0 + std::uint8_t unkD8[0xC]; // D8 + std::uint8_t unkE4[0x8]; // E4 + std::uint32_t unkEC; // EC + std::uint64_t unkF0; // F0 + std::uint32_t unkF8; // F8 + std::uint8_t unkFC[0xC]; // FC + std::uint64_t unk108; // 108 + std::uint64_t unk110; // 110 + std::uint32_t unk118; // 118 + std::uint8_t unk11C[0x10]; // 11C + std::uint8_t unk12C[0x8]; // 12C + std::uint32_t unk134; // 134 + std::uint64_t unk138; // 138 + std::uint32_t unk140; // 140 + std::uint8_t unk144[0xC]; // 144 + std::uint64_t unk150; // 150 + }; + static_assert(sizeof(BGSSceneCollection) == 0x158); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSShaderParticleGeometryData.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSShaderParticleGeometryData.h new file mode 100644 index 00000000..12f06d3f --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSShaderParticleGeometryData.h @@ -0,0 +1,40 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x78, vtable RVA 0x30A6A90, 124 virtual functions + class BGSShaderParticleGeometryData : + public TESForm // 000 + { + public: + virtual ~BGSShaderParticleGeometryData() = default; + + public: + BSTArray data; // 28 - BSTArray + TESTexture particleTexture; // 40 + BSFixedString materialName; // 68 + std::uint32_t unk70; // 70 + std::uint32_t unk74; // 74 + }; + static_assert(sizeof(BGSShaderParticleGeometryData) == 0x78); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSSkinForm.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSSkinForm.h new file mode 100644 index 00000000..314fd254 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSSkinForm.h @@ -0,0 +1,36 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESObjectARMO; + } + + // 1.11.240.0: size 0x18, vtable RVA 0x301B630, 21 virtual functions + class BGSSkinForm : + public BaseFormComponent // 000 + { + public: + virtual ~BGSSkinForm() = default; + + public: + Forms::TESObjectARMO* formSkin; // 08 + std::uint32_t unk10; // 10 + std::uint32_t unk14; // 14 + }; + static_assert(sizeof(BGSSkinForm) == 0x18); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundCategory.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundCategory.h new file mode 100644 index 00000000..a9a54164 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundCategory.h @@ -0,0 +1,49 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x88, vtable RVA 0x3061CF8, 124 virtual functions + class BGSSoundCategory : + public TESForm, // 000 + public TESFullName, // 028 + public BSISoundCategory // 040 + { + public: + virtual ~BGSSoundCategory() = default; + + public: + BGSSoundCategory* parentCategory; // 48 + BGSSoundCategory* sliderCategory; // 50 + float volumeMult; // 58 + float snapshotMult; // 5C + float currCompressionMult; // 60 + float fullyCompressedMult; // 64 + float frequencyMult; // 68 + float minFrequencyMult; // 6C + std::uint32_t appFlags; // 70 + std::uint16_t attenuation[6]; // 74 + std::uint16_t stateFlags; // 80 + std::uint16_t staticMult; // 82 + std::uint16_t defaultMenuValue; // 84 + std::uint16_t unk86; // 86 + }; + static_assert(sizeof(BGSSoundCategory) == 0x88); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundCategorySnapshot.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundCategorySnapshot.h new file mode 100644 index 00000000..1b4832bd --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundCategorySnapshot.h @@ -0,0 +1,41 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0xE8, vtable RVA 0x2FBA5A0, 124 virtual functions + class BGSSoundCategorySnapshot : + public TESForm // 000 + { + public: + virtual ~BGSSoundCategorySnapshot() = default; + + public: + std::uint8_t unk28[0xC]; // 28 + std::uint8_t unk34[0x8]; // 34 + std::uint32_t unk3C; // 3C + std::uint64_t unk40; // 40 + std::uint32_t unk48; // 48 + std::uint8_t unk4C[0xC]; // 4C + std::uint64_t unk58; // 58 + std::int8_t priority; // 60 + std::uint8_t unk61[0x7]; // 61 + std::uint8_t unk68[0x80]; // 68 + }; + static_assert(sizeof(BGSSoundCategorySnapshot) == 0xE8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundDescriptorForm.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundDescriptorForm.h new file mode 100644 index 00000000..38ba59e1 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundDescriptorForm.h @@ -0,0 +1,39 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptor; + + // 1.11.240.0: size 0x48, vtable RVA 0x3062A10, 124 virtual functions + class BGSSoundDescriptorForm : + public TESForm, // 000 + public BSISoundDescriptor // 028 + { + public: + virtual ~BGSSoundDescriptorForm() = default; + + public: + BGSSoundDescriptor* impl; // 30 + std::uint64_t unk38; // 38 + BSFixedString unk40; // 40 + }; + static_assert(sizeof(BGSSoundDescriptorForm) == 0x48); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundKeywordMapping.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundKeywordMapping.h new file mode 100644 index 00000000..2255c5c2 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundKeywordMapping.h @@ -0,0 +1,41 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + + // 1.11.240.0: size 0xB8, vtable RVA 0x2FBAC48, 124 virtual functions + class BGSSoundKeywordMapping : + public TESForm // 000 + { + public: + virtual ~BGSSoundKeywordMapping() = default; + + public: + std::uint8_t keywordSet[0x30]; // 28 - BSTScatterTable, ...> (KNAM) + std::uint8_t unk58[0x10]; // 58 + std::uint8_t reverbDescMap[0x30]; // 68 - BSTScatterTable, ...> (PTRN) + BGSSoundDescriptorForm* descriptor; // 98 - KNAM + BGSSoundDescriptorForm* exteriorTail; // A0 - KNAM + BGSSoundDescriptorForm* vatsDescriptor; // A8 - PTRN + float vatsDescThreshold; // B0 - PTRN + std::uint32_t unkB4; // B4 + }; + static_assert(sizeof(BGSSoundKeywordMapping) == 0xB8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundOutput.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundOutput.h new file mode 100644 index 00000000..4788450c --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundOutput.h @@ -0,0 +1,44 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class DynamicAttenuationCharacteristics; + class SpeakerArrays; + class BGSAudioEffectChain; + + // 1.11.240.0: size 0x58, vtable RVA 0x30633E0, 124 virtual functions + class BGSSoundOutput : + public TESForm, // 000 + public BSISoundOutputModel // 028 + { + public: + virtual ~BGSSoundOutput() = default; + + public: + DynamicAttenuationCharacteristics* attenuation; // 30 + SpeakerArrays* speakerOutputArrays; // 38 + BGSAudioEffectChain* effectChain; // 40 + std::uint32_t flags; // 48 + std::int32_t mode; // 4C - REX::TEnumSet + std::uint16_t staticAttenuation; // 50 + std::uint8_t unk52[0x6]; // 52 + }; + static_assert(sizeof(BGSSoundOutput) == 0x58); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundTagComponent.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundTagComponent.h index 3bf9de0d..4ced4a98 100644 --- a/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundTagComponent.h +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundTagComponent.h @@ -1,4 +1,4 @@ -// Copyright © 2023-2025 aka CKPE team. All rights reserved. +// Copyright © 2020-2025 aka CKPE team. All rights reserved. // Contacts: // License: https://www.gnu.org/licenses/lgpl-3.0.html @@ -12,27 +12,16 @@ namespace CKPE { namespace EditorAPI { - class BGSSoundTagComponent : public BaseFormComponent + // CK 1.11.240.0: size 0x8 (only the vtable pointer; the scalar deleting destructor frees 8 bytes), + // 21 virtual functions. The constructor only stores the vtable, the destructor takes the global spin lock. + // The dword that follows the component inside TESBoundObject (0x88) belongs to TESBoundObject, not to the component. + class BGSSoundTagComponent : + public BaseFormComponent // 000 { - std::uint32_t _Tag{ 0x43544143 }; public: - constexpr BGSSoundTagComponent() = default; - BGSSoundTagComponent(std::uint32_t tag) : _Tag(tag) {} - BGSSoundTagComponent(const BGSSoundTagComponent& Rhs) : _Tag(Rhs._Tag) {} - - BGSSoundTagComponent& operator=(const BGSSoundTagComponent& Rhs) noexcept(true) { _Tag = Rhs._Tag; return *this; } - - constexpr bool operator==(const BGSSoundTagComponent& Rhs) const noexcept(true) { return _Tag == Rhs._Tag; } - constexpr bool operator!=(const BGSSoundTagComponent& Rhs) const noexcept(true) { return _Tag != Rhs._Tag; } - virtual ~BGSSoundTagComponent() = default; - public: - [[nodiscard]] inline std::uint32_t GetTag() const noexcept(true) { return _Tag; } - inline void SetTag(std::uint32_t tag) noexcept(true) { _Tag = tag; } - public: - CKPE_PROPERTY(GetTag, SetTag) std::uint32_t Tag; }; - static_assert(sizeof(BGSSoundTagComponent) == 0x10); + static_assert(sizeof(BGSSoundTagComponent) == 0x8); } } -} \ No newline at end of file +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundTagSet.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundTagSet.h new file mode 100644 index 00000000..4b3267b3 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSSoundTagSet.h @@ -0,0 +1,39 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0xE0, vtable RVA 0x2FBBA38, 124 virtual functions + class BGSSoundTagSet : + public TESForm // 000 + { + public: + virtual ~BGSSoundTagSet() = default; + + public: + std::uint8_t unk28[0xC]; // 28 + std::uint8_t unk34[0x8]; // 34 + std::uint32_t unk3C; // 3C + std::uint64_t unk40; // 40 + std::uint32_t unk48; // 48 + std::uint8_t unk4C[0xC]; // 4C + std::uint64_t unk58; // 58 + std::uint8_t unk60[0x80]; // 60 + }; + static_assert(sizeof(BGSSoundTagSet) == 0xE0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSStaticCollection.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSStaticCollection.h new file mode 100644 index 00000000..a934c6f0 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSStaticCollection.h @@ -0,0 +1,39 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x110, vtable RVA 0x3084F98, 154 virtual functions + class BGSStaticCollection : + public TESBoundObject, // 000 + public TESFullName, // 090 + public BGSModelMaterialSwap // 0A8 + { + public: + virtual ~BGSStaticCollection() = default; + + public: + void* dataMap; // F8 - BSTHashMap*>* + std::uint64_t unk100; // 100 + std::uint32_t unk108; // 108 + std::uint32_t unk10C; // 10C + }; + static_assert(sizeof(BGSStaticCollection) == 0x110); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerBranchNode.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerBranchNode.h new file mode 100644 index 00000000..07428475 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerBranchNode.h @@ -0,0 +1,34 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x70, vtable RVA 0x3013568, 136 virtual functions + class BGSStoryManagerBranchNode : + public BGSStoryManagerNodeBase // 000 + { + public: + virtual ~BGSStoryManagerBranchNode() = default; + + virtual void sub_438() { return; } // 135 - RVA 0xFF1880, return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a2 + 8LL))(a2, a1); + + public: + BSTArray children; // 58 - BSTArray + }; + static_assert(sizeof(BGSStoryManagerBranchNode) == 0x70); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerEventNode.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerEventNode.h new file mode 100644 index 00000000..b394fcb9 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerEventNode.h @@ -0,0 +1,32 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x90, vtable RVA 0x310BCF0, 136 virtual functions + class BGSStoryManagerEventNode : + public BGSStoryManagerBranchNode // 000 + { + public: + virtual ~BGSStoryManagerEventNode() = default; + + public: + std::uint8_t unk70[0x20]; // 70 + }; + static_assert(sizeof(BGSStoryManagerEventNode) == 0x90); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerNodeBase.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerNodeBase.h new file mode 100644 index 00000000..f8b838f0 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerNodeBase.h @@ -0,0 +1,41 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x58, vtable RVA 0x3013048, 135 virtual functions + class BGSStoryManagerNodeBase : + public BGSStoryManagerTreeForm // 000 + { + public: + virtual ~BGSStoryManagerNodeBase() = default; + + virtual void sub_400() { return; } // 128 - RVA 0xFF8360 + virtual void* GetConditions() noexcept(true) { return nullptr; } // 129 - RVA 0x87CF30, return (CDocument *)((char *)this + 64); + virtual void sub_410() { return; } // 130 - RVA 0x87B260, return 1; + virtual void sub_418() { return; } // 131 - RVA 0x87B270, return 1; + virtual void sub_420() { return; } // 132 - RVA 0x87BF40 + virtual void sub_428() { return; } // 133 - RVA 0xFF8800 + virtual void sub_430() { return; } // 134 - RVA 0xFF8BF0 + + public: + std::uint8_t unk28[0x18]; // 28 + std::uint8_t unk40[0x18]; // 40 + }; + static_assert(sizeof(BGSStoryManagerNodeBase) == 0x58); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerQuestNode.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerQuestNode.h new file mode 100644 index 00000000..8835c78a --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerQuestNode.h @@ -0,0 +1,34 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0xE8, vtable RVA 0x310C630, 136 virtual functions + class BGSStoryManagerQuestNode : + public BGSStoryManagerNodeBase // 000 + { + public: + virtual ~BGSStoryManagerQuestNode() = default; + + virtual void sub_438() { return; } // 135 - RVA 0xFFB650, LOBYTE(a3) = 1;; return (*(__int64 (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *) + + public: + std::uint8_t unk58[0x90]; // 58 + }; + static_assert(sizeof(BGSStoryManagerQuestNode) == 0xE8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerTreeForm.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerTreeForm.h new file mode 100644 index 00000000..72c4e4c0 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSStoryManagerTreeForm.h @@ -0,0 +1,34 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x28, vtable RVA 0x3012B70, 128 virtual functions + class BGSStoryManagerTreeForm : + public TESForm // 000 + { + public: + virtual ~BGSStoryManagerTreeForm() = default; + + virtual void sub_3E0() { return; } // 124 - RVA 0x87BF30 + virtual void sub_3E8() { return; } // 125 - RVA 0x87E080 + virtual void sub_3F0() { return; } // 126 - RVA 0x87CF20, return 0; + virtual void sub_3F8() { return; } // 127 - RVA 0x87BD10, return 0; + }; + static_assert(sizeof(BGSStoryManagerTreeForm) == 0x28); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSTalkingActivator.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSTalkingActivator.h new file mode 100644 index 00000000..a76f1c21 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSTalkingActivator.h @@ -0,0 +1,38 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSVoiceType; + + // 1.11.240.0: size 0x1F8, vtable RVA 0x3086378, 155 virtual functions + class BGSTalkingActivator : + public TESObjectACTI // 000 + { + public: + virtual ~BGSTalkingActivator() = default; + + virtual bool GetReflectedByAutoWater() noexcept(true) { return false; } // 154 - RVA 0xC2E650, return 0; + + public: + TESObjectREFR* tempRef; // 1E8 + BGSVoiceType* voiceType; // 1F0 + }; + static_assert(sizeof(BGSTalkingActivator) == 0x1F8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSTerminal.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSTerminal.h new file mode 100644 index 00000000..c7d15fdc --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSTerminal.h @@ -0,0 +1,45 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x330, vtable RVA 0x2FBF938, 154 virtual functions + class BGSTerminal : + public TESFurniture // 000 + { + public: + virtual ~BGSTerminal() = default; + + public: + BSTArray bodyTextItems; // 2A0 - BSTArray + BSTArray menuItems; // 2B8 - BSTArray + BGSLocalizedString headerTextOverride; // 2D0 + BGSLocalizedString welcomeText; // 2E0 + std::uint64_t unk2F0; // 2F0 + std::uint64_t unk2F8; // 2F8 + std::uint16_t unk300; // 300 + std::uint16_t unk302; // 302 + std::uint32_t unk304; // 304 + TESTexture unk308; // 308 + }; + static_assert(sizeof(BGSTerminal) == 0x330); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSTextureModel.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSTextureModel.h new file mode 100644 index 00000000..de423dc5 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSTextureModel.h @@ -0,0 +1,26 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x38, vtable RVA 0x304C6A8, 27 virtual functions + class BGSTextureModel : + public TESModel // 000 + { + public: + virtual ~BGSTextureModel() = default; + }; + static_assert(sizeof(BGSTextureModel) == 0x38); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSTextureSet.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSTextureSet.h new file mode 100644 index 00000000..08adc316 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSTextureSet.h @@ -0,0 +1,43 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class DecalData; + + // 1.11.240.0: size 0x3D8, vtable RVA 0x3064968, 154 virtual functions + class BGSTextureSet : + public TESBoundObject, // 000 + public BSTextureSet // 090 + { + public: + virtual ~BGSTextureSet() = default; + + public: + BSFixedString materialName; // A0 + TESTexture textures[8]; // A8 + DecalData* decalData; // 1E8 + std::uint16_t flags; // 1F0 + std::uint8_t unk1F2[0x6]; // 1F2 + std::uint8_t unk1F8[0x1E0]; // 1F8 + }; + static_assert(sizeof(BGSTextureSet) == 0x3D8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSVoiceType.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSVoiceType.h index 93adf412..e6309478 100644 --- a/CKPE.Fallout4/Include/EditorAPI/B/BGSVoiceType.h +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSVoiceType.h @@ -1,11 +1,12 @@ -// Copyright © 2023-2024 aka CKPE team. All rights reserved. +// Copyright © 2020-2025 aka CKPE team. All rights reserved. // Contacts: -// License: https://www.gnu.org/licenses/gpl-3.0.html +// License: https://www.gnu.org/licenses/lgpl-3.0.html #pragma once -#include +#include #include +#include namespace CKPE { @@ -15,11 +16,13 @@ namespace CKPE { namespace Forms { - // size = 0x40 - // func = 124 - class BGSVoiceType : public TESForm + // 1.11.240.0: size 0x30, vtable RVA 0x3040CE8, 124 virtual functions + class BGSVoiceType : + public TESForm // 000 { public: + virtual ~BGSVoiceType() = default; + constexpr static std::uint8_t TYPE_ID = ftVoice; enum Flags @@ -27,9 +30,7 @@ namespace CKPE kAllowDefaultDialogue = 1, kWoman = 2, }; - public: - virtual ~BGSVoiceType() = default; - public: + [[nodiscard]] inline bool HasMale() const noexcept(true) { return !HasWoman(); } [[nodiscard]] inline bool HasWoman() const noexcept(true) { return flag.Has(kWoman); } [[nodiscard]] inline bool HasAllowDefaultDialogue() const noexcept(true) { return flag.Has(kAllowDefaultDialogue); } @@ -42,18 +43,19 @@ namespace CKPE flag.Unset(kWoman); } - inline void SetAllowDefaultDialogue(bool v) + inline void SetAllowDefaultDialogue(bool v) { if (v) flag.Set(kAllowDefaultDialogue); else flag.Unset(kAllowDefaultDialogue); } - private: - NiAPI::NiTFlags flag; - char pad29[0x17]; + + public: + NiAPI::NiTFlags flag; // 28 + std::uint8_t pad29[7]; // 29 }; - static_assert(sizeof(BGSVoiceType) == 0x40); + static_assert(sizeof(BGSVoiceType) == 0x30); } } } diff --git a/CKPE.Fallout4/Include/EditorAPI/B/BGSZoomData.h b/CKPE.Fallout4/Include/EditorAPI/B/BGSZoomData.h new file mode 100644 index 00000000..a54c4010 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/B/BGSZoomData.h @@ -0,0 +1,40 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESImageSpaceModifier; + + // 1.11.240.0: size 0x48, vtable RVA 0x2FC0920, 124 virtual functions + class BGSZoomData : + public TESForm // 000 + { + public: + virtual ~BGSZoomData() = default; + + public: + std::uint32_t unk28; // 28 + std::uint32_t unk2C; // 2C + std::uint32_t unk30; // 30 + std::uint32_t unk34; // 34 + std::uint32_t unk38; // 38 + std::uint32_t unk3C; // 3C + TESImageSpaceModifier* isMod; // 40 + }; + static_assert(sizeof(BGSZoomData) == 0x48); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/E/EffectSetting.h b/CKPE.Fallout4/Include/EditorAPI/E/EffectSetting.h new file mode 100644 index 00000000..6b581b35 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/E/EffectSetting.h @@ -0,0 +1,108 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class FilterValidationFunction_t; + + class ActorValueInfo; + class BGSArtObject; + class BGSDualCastData; + class BGSExplosion; + class BGSImpactDataSet; + class BGSPerk; + class BGSProjectile; + class BGSReferenceEffect; + class SpellItem; + class TESEffectShader; + class TESForm; + class TESImageSpaceModifier; + class TESObjectLIGH; + + struct EffectSettingData + { + std::uint32_t flags; // 00 - REX::TEnumSet + float baseCost; // 04 + TESForm* associatedForm; // 08 + ActorValueInfo* associatedSkill; // 10 + ActorValueInfo* resistVariable; // 18 + std::int16_t numCounterEffects; // 20 + TESObjectLIGH* light; // 28 + float taperWeight; // 30 + TESEffectShader* effectShader; // 38 + TESEffectShader* enchantEffect; // 40 + std::int32_t minimumSkill; // 48 + std::int32_t spellmakingArea; // 4C + float spellmakingChargeTime; // 50 + float taperCurve; // 54 + float taperDuration; // 58 + float secondaryAVWeight; // 5C + std::int32_t archetype; // 60 - REX::TEnumSet + ActorValueInfo* primaryAV; // 68 + BGSProjectile* projectileBase; // 70 + BGSExplosion* explosion; // 78 + std::int32_t castingType; // 80 - REX::TEnumSet + std::int32_t delivery; // 84 - REX::TEnumSet + ActorValueInfo* secondaryAV; // 88 + BGSArtObject* castingArt; // 90 + BGSArtObject* hitEffectArt; // 98 + BGSImpactDataSet* impactDataSet; // A0 + float skillUsageMult; // A8 + BGSDualCastData* dualCastData; // B0 + float dualCastScale; // B8 + BGSArtObject* enchantEffectArt; // C0 + BGSReferenceEffect* hitVisuals; // C8 + BGSReferenceEffect* enchantVisuals; // D0 + SpellItem* equipAbility; // D8 + TESImageSpaceModifier* imageSpaceMod; // E0 + BGSPerk* perk; // E8 + std::int32_t castingSoundLevel; // F0 - REX::TEnumSet + float aiScore; // F4 + float aiDelayTime; // F8 + }; + static_assert(sizeof(EffectSettingData) == 0x100); + + // 1.11.240.0: size 0x1E0, vtable RVA 0x30BE680, 124 virtual functions + class EffectSetting : + public TESForm, // 000 + public TESFullName, // 028 + public BGSMenuDisplayObject, // 040 + public BGSKeywordForm // 050 + { + public: + virtual ~EffectSetting() = default; + + public: + FilterValidationFunction_t* filterValidationFunction; // 70 + void* filterValidationItem; // 78 + EffectSettingData data; // 80 + BSSimpleList counterEffects; // 180 - BSSimpleList + BSTArray effectSounds; // 190 - BSTArray + BGSLocalizedString magicItemDescription; // 1A8 + std::uint8_t unk1B8[0x18]; // 1B8 + std::uint8_t unk1D0[0x10]; // 1D0 + }; + static_assert(sizeof(EffectSetting) == 0x1E0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/E/EnchantmentItem.h b/CKPE.Fallout4/Include/EditorAPI/E/EnchantmentItem.h new file mode 100644 index 00000000..41ae2632 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/E/EnchantmentItem.h @@ -0,0 +1,41 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x300, vtable RVA 0x30BF688, 188 virtual functions + class EnchantmentItem : + public MagicItem // 000 + { + public: + virtual ~EnchantmentItem() = default; + + public: + std::uint32_t unk2D0; // 2D0 + std::uint32_t unk2D4; // 2D4 + std::uint32_t unk2D8; // 2D8 + std::uint32_t unk2DC; // 2DC + std::uint32_t unk2E0; // 2E0 + std::uint32_t unk2E4; // 2E4 + std::uint32_t unk2E8; // 2E8 + std::uint32_t unk2EC; // 2EC + std::uint64_t unk2F0; // 2F0 + std::uint64_t unk2F8; // 2F8 + }; + static_assert(sizeof(EnchantmentItem) == 0x300); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/F/FormInterfaces.h b/CKPE.Fallout4/Include/EditorAPI/F/FormInterfaces.h new file mode 100644 index 00000000..c9e24657 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/F/FormInterfaces.h @@ -0,0 +1,266 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // Helper classes used as additional bases of Creation Kit form classes that do not inherit BaseFormComponent. + // Only the layout (size, vtable slot count) was reverse engineered (CK 1.11.240.0). + + // size 0x8, 3 virtual functions + class IKeywordFormBase + { + public: + virtual ~IKeywordFormBase() = default; + virtual void sub_008() { return; } + virtual void sub_010() { return; } + }; + static_assert(sizeof(IKeywordFormBase) == 0x8); + + // size 0x8, 11 virtual functions + class ActorValueOwner + { + public: + virtual ~ActorValueOwner() = default; + virtual void sub_008() { return; } + virtual void sub_010() { return; } + virtual void sub_018() { return; } + virtual void sub_020() { return; } + virtual void sub_028() { return; } + virtual void sub_030() { return; } + virtual void sub_038() { return; } + virtual void sub_040() { return; } + virtual void sub_048() { return; } + virtual void sub_050() { return; } + }; + static_assert(sizeof(ActorValueOwner) == 0x8); + + // size 0x8, 5 virtual functions + class BGSOpenCloseForm + { + public: + virtual ~BGSOpenCloseForm() = default; + virtual void sub_008() { return; } + virtual void sub_010() { return; } + virtual void sub_018() { return; } + virtual void sub_020() { return; } + }; + static_assert(sizeof(BGSOpenCloseForm) == 0x8); + + // size 0x8, 4 virtual functions + class BSIAudioEffectChain + { + public: + virtual ~BSIAudioEffectChain() = default; + virtual void sub_008() { return; } + virtual void sub_010() { return; } + virtual void sub_018() { return; } + }; + static_assert(sizeof(BSIAudioEffectChain) == 0x8); + + // size 0x10, 11 virtual functions + class BSIMusicTrack + { + public: + virtual ~BSIMusicTrack() = default; + virtual void sub_008() { return; } + virtual void sub_010() { return; } + virtual void sub_018() { return; } + virtual void sub_020() { return; } + virtual void sub_028() { return; } + virtual void sub_030() { return; } + virtual void sub_038() { return; } + virtual void sub_040() { return; } + virtual void sub_048() { return; } + virtual void sub_050() { return; } + + std::uint8_t unk08[0x8]; + }; + static_assert(sizeof(BSIMusicTrack) == 0x10); + + // size 0x8, 9 virtual functions + class BSIMusicType + { + public: + virtual ~BSIMusicType() = default; + virtual void sub_008() { return; } + virtual void sub_010() { return; } + virtual void sub_018() { return; } + virtual void sub_020() { return; } + virtual void sub_028() { return; } + virtual void sub_030() { return; } + virtual void sub_038() { return; } + virtual void sub_040() { return; } + }; + static_assert(sizeof(BSIMusicType) == 0x8); + + // size 0x8, 11 virtual functions + class BSIReverbType + { + public: + virtual ~BSIReverbType() = default; + virtual void sub_008() { return; } + virtual void sub_010() { return; } + virtual void sub_018() { return; } + virtual void sub_020() { return; } + virtual void sub_028() { return; } + virtual void sub_030() { return; } + virtual void sub_038() { return; } + virtual void sub_040() { return; } + virtual void sub_048() { return; } + virtual void sub_050() { return; } + }; + static_assert(sizeof(BSIReverbType) == 0x8); + + // size 0x8, 16 virtual functions + class BSISoundCategory + { + public: + virtual ~BSISoundCategory() = default; + virtual void sub_008() { return; } + virtual void sub_010() { return; } + virtual void sub_018() { return; } + virtual void sub_020() { return; } + virtual void sub_028() { return; } + virtual void sub_030() { return; } + virtual void sub_038() { return; } + virtual void sub_040() { return; } + virtual void sub_048() { return; } + virtual void sub_050() { return; } + virtual void sub_058() { return; } + virtual void sub_060() { return; } + virtual void sub_068() { return; } + virtual void sub_070() { return; } + virtual void sub_078() { return; } + }; + static_assert(sizeof(BSISoundCategory) == 0x8); + + // size 0x8, 5 virtual functions + class BSISoundDescriptor + { + public: + virtual ~BSISoundDescriptor() = default; + virtual void sub_008() { return; } + virtual void sub_010() { return; } + virtual void sub_018() { return; } + virtual void sub_020() { return; } + }; + static_assert(sizeof(BSISoundDescriptor) == 0x8); + + // size 0x8, 16 virtual functions + class BSISoundOutputModel + { + public: + virtual ~BSISoundOutputModel() = default; + virtual void sub_008() { return; } + virtual void sub_010() { return; } + virtual void sub_018() { return; } + virtual void sub_020() { return; } + virtual void sub_028() { return; } + virtual void sub_030() { return; } + virtual void sub_038() { return; } + virtual void sub_040() { return; } + virtual void sub_048() { return; } + virtual void sub_050() { return; } + virtual void sub_058() { return; } + virtual void sub_060() { return; } + virtual void sub_068() { return; } + virtual void sub_070() { return; } + virtual void sub_078() { return; } + }; + static_assert(sizeof(BSISoundOutputModel) == 0x8); + + // size 0x50, 2 virtual functions + class BSMaterialObject + { + public: + virtual ~BSMaterialObject() = default; + virtual void sub_008() { return; } + + std::uint8_t unk08[0x48]; + }; + static_assert(sizeof(BSMaterialObject) == 0x50); + + // size 0x228, 2 virtual functions + class BSNavmesh + { + public: + virtual ~BSNavmesh() = default; + virtual void sub_008() { return; } + + std::uint8_t unk08[0x220]; + }; + static_assert(sizeof(BSNavmesh) == 0x228); + + // size 0x10, 6 virtual functions + class BSNavmeshInfoMap + { + public: + virtual ~BSNavmeshInfoMap() = default; + virtual void sub_008() { return; } + virtual void sub_010() { return; } + virtual void sub_018() { return; } + virtual void sub_020() { return; } + virtual void sub_028() { return; } + + std::uint8_t unk08[0x8]; + }; + static_assert(sizeof(BSNavmeshInfoMap) == 0x10); + + // size 0x8, 26 virtual functions + class IAnimationGraphManagerHolder + { + public: + virtual ~IAnimationGraphManagerHolder() = default; + virtual void sub_008() { return; } + virtual void sub_010() { return; } + virtual void sub_018() { return; } + virtual void sub_020() { return; } + virtual void sub_028() { return; } + virtual void sub_030() { return; } + virtual void sub_038() { return; } + virtual void sub_040() { return; } + virtual void sub_048() { return; } + virtual void sub_050() { return; } + virtual void sub_058() { return; } + virtual void sub_060() { return; } + virtual void sub_068() { return; } + virtual void sub_070() { return; } + virtual void sub_078() { return; } + virtual void sub_080() { return; } + virtual void sub_088() { return; } + virtual void sub_090() { return; } + virtual void sub_098() { return; } + virtual void sub_0A0() { return; } + virtual void sub_0A8() { return; } + virtual void sub_0B0() { return; } + virtual void sub_0B8() { return; } + virtual void sub_0C0() { return; } + virtual void sub_0C8() { return; } + }; + static_assert(sizeof(IAnimationGraphManagerHolder) == 0x8); + + // Empty helper base (no data). + class BGSNavmeshableObject {}; + + // Empty helper base (no data). + class TESMagicCasterForm {}; + + // Empty helper base (no data). + class TESMagicTargetForm {}; + + // Empty helper base, singleton marker. + template + class BSTSingletonImplicit {}; + + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/G/GameSettingForm.h b/CKPE.Fallout4/Include/EditorAPI/G/GameSettingForm.h new file mode 100644 index 00000000..393d371d --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/G/GameSettingForm.h @@ -0,0 +1,32 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x40, vtable RVA 0x30657A8, 126 virtual functions + class GameSettingForm : + public TESFormIDListView // 000 + { + public: + virtual ~GameSettingForm() = default; + + public: + std::uint8_t unk28[0x18]; // 28 + }; + static_assert(sizeof(GameSettingForm) == 0x40); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/I/IngredientItem.h b/CKPE.Fallout4/Include/EditorAPI/I/IngredientItem.h new file mode 100644 index 00000000..d161d1a9 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/I/IngredientItem.h @@ -0,0 +1,48 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x3B8, vtable RVA 0x30C0380, 188 virtual functions + class IngredientItem : + public MagicItem, // 000 + public BGSModelMaterialSwap, // 2D0 + public TESIcon, // 320 + public TESWeightForm, // 348 + public BGSEquipType, // 358 + public BGSDestructibleObjectForm, // 368 + public BGSPickupPutdownSounds, // 378 + public TESValueForm // 390 + { + public: + virtual ~IngredientItem() = default; + + public: + std::uint8_t unk3A0[0x10]; // 3A0 + std::uint32_t unk3B0; // 3B0 + std::uint32_t unk3B4; // 3B4 + }; + static_assert(sizeof(IngredientItem) == 0x3B8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/M/MagicItem.h b/CKPE.Fallout4/Include/EditorAPI/M/MagicItem.h new file mode 100644 index 00000000..6d2a0d45 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/M/MagicItem.h @@ -0,0 +1,83 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class Forms; + class EffectSetting; + + // 1.11.240.0: size 0x2D0, vtable RVA 0x30C12F8, 188 virtual functions + class MagicItem : + public TESBoundObject, // 000 + public TESFullName, // 090 + public BGSKeywordForm // 0A8 + { + public: + virtual ~MagicItem() = default; + + virtual std::uint32_t GetSpellType() const noexcept(true) { return 0; } // 154 - RVA 0x8258190 + virtual void SetCastingType(std::uint32_t nCastingType) noexcept(true) { return; } // 155 - RVA 0xE7C310, *((_DWORD *)this + 124) = a2; + virtual std::uint32_t GetCastingType() const noexcept(true) { return 0; } // 156 - RVA 0x8258190 + virtual void SetDelivery(std::uint32_t nDelivery) noexcept(true) { return; } // 157 - RVA 0xE7C320, *(_DWORD *)(a1 + 500) = a2; + virtual std::uint32_t GetDelivery() const noexcept(true) { return 0; } // 158 - RVA 0x8258190 + virtual bool IsValidDelivery(std::uint32_t nDelivery) noexcept(true) { return true; } // 159 - RVA 0xE7C330, return 1; + virtual float GetFixedCastDuration() const noexcept(true) { return 0.0f; } // 160 - RVA 0xE7C340, return 0.0; + virtual float GetRange() const noexcept(true) { return 0.0f; } // 161 - RVA 0xE7C350, return 0.0; + virtual bool IgnoreResistance() const noexcept(true) { return false; } // 162 - RVA 0xE7C4C0, return 0; + virtual bool IgnoreLOS() const noexcept(true) { return false; } // 163 - RVA 0xE7C4D0, return 0; + virtual bool IsFood() const noexcept(true) { return false; } // 164 - RVA 0xE7C4E0, return 0; + virtual bool GetNoAbsorb() const noexcept(true) { return false; } // 165 - RVA 0xE7C4F0, return 0; + virtual bool GetNoDualCastModifications() const noexcept(true) { return false; } // 166 - RVA 0xE7C500, return 0; + virtual bool IsPoison() const noexcept(true) { return false; } // 167 - RVA 0xE79120, return (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a1 + 1232LL))(a1) == 5; + virtual bool IsMedicine() const noexcept(true) { return false; } // 168 - RVA 0xE79110, return 0; + virtual void AdjustCost(float& fCost, void* pActor) const noexcept(true) { return; } // 169 - RVA 0xE7E0A0 + virtual float GetChargeTime() const noexcept(true) { return 0.0f; } // 170 - RVA 0xE65900, return 0.0; + virtual std::uint32_t GetMaxEffectCount() const noexcept(true) { return 0; } // 171 - RVA 0xE65960, return 0; + virtual void* GetAssociatedSkill() const noexcept(true) { return nullptr; } // 172 - RVA 0xE7F870, return 0; + virtual bool IsTwoHanded() const noexcept(true) { return false; } // 173 - RVA 0xE7E650, return 0; + virtual void sub_570() { return; } // 174 - RVA 0x8258190 + virtual void sub_578() { return; } // 175 - RVA 0x8258190 + virtual void sub_580() { return; } // 176 - RVA 0x8258190 + virtual void sub_588() { return; } // 177 - RVA 0xE794F0 + virtual void sub_590() { return; } // 178 - RVA 0x8258190 + virtual void sub_598() { return; } // 179 - RVA 0xE79190 + virtual void sub_5A0() { return; } // 180 - RVA 0xE7E7F0 + virtual void sub_5A8() { return; } // 181 - RVA 0x8258190 + virtual void sub_5B0() { return; } // 182 - RVA 0x8258190 + virtual void sub_5B8() { return; } // 183 - RVA 0x8258190 + virtual void sub_5C0() { return; } // 184 - RVA 0x8258190 + virtual void sub_5C8() { return; } // 185 - RVA 0xE7F860 + virtual void sub_5D0() { return; } // 186 - RVA 0xE81FC0 + virtual void sub_5D8() { return; } // 187 - RVA 0xE820E0 + + public: + BSTArray listOfEffects; // C8 - BSTArray + std::int32_t hostileCount; // E0 + std::uint32_t unkE4; // E4 + EffectSetting* avEffectSetting; // E8 + std::uint8_t unkF0[0x100]; // F0 + std::uint32_t castingType; // 1F0 - verified: SetCastingType (slot 155) writes it + std::uint32_t delivery; // 1F4 - verified: SetDelivery (slot 157) writes it + std::uint8_t unk1F8[0xD8]; // 1F8 + }; + static_assert(sizeof(MagicItem) == 0x2D0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/N/NavMesh.h b/CKPE.Fallout4/Include/EditorAPI/N/NavMesh.h new file mode 100644 index 00000000..75d03582 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/N/NavMesh.h @@ -0,0 +1,41 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x290, vtable RVA 0x30FBD40, 124 virtual functions + class NavMesh : + public TESForm, // 000 + public TESChildCell, // 028 + public BSNavmesh // 030 + { + public: + virtual ~NavMesh() = default; + + public: + std::uint32_t unk258; // 258 + std::uint32_t unk25C; // 25C + BSTArray unk260; // 260 - element type not identified yet + BSTArray unk278; // 278 - element type not identified yet + }; + static_assert(sizeof(NavMesh) == 0x290); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/N/NavMeshInfoMap.h b/CKPE.Fallout4/Include/EditorAPI/N/NavMeshInfoMap.h new file mode 100644 index 00000000..27b43f27 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/N/NavMeshInfoMap.h @@ -0,0 +1,58 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x128, vtable RVA 0x3100FE0, 124 virtual functions + class NavMeshInfoMap : + public TESForm, // 000 + public BSNavmeshInfoMap // 028 + { + public: + virtual ~NavMeshInfoMap() = default; + + public: + std::uint8_t unk38[0x8]; // 38 + BSTArray allPaths; // 40 - BSTArray*>, by layout (fills 0x38..0x88 exactly) + std::uint8_t infoToIndexMap[0x30]; // 58 - BSTScatterTable, by layout + bool updateAll; // 88 + std::uint8_t unk89[0x7]; // 89 + BSTArray staleNavmeshInfos; // 90 - BSTArray, by position after updateAll + std::uint8_t unkA8[0xC]; // A8 + std::uint8_t unkB4[0x8]; // B4 + std::uint32_t unkBC; // BC + std::uint64_t unkC0; // C0 + std::uint32_t unkC8; // C8 + std::uint8_t unkCC[0xC]; // CC + std::uint64_t unkD8; // D8 + std::uint8_t unkE0[0xC]; // E0 + std::uint8_t unkEC[0x8]; // EC + std::uint32_t unkF4; // F4 + std::uint64_t unkF8; // F8 + std::uint32_t unk100; // 100 + std::uint8_t unk104[0xC]; // 104 + std::uint64_t unk110; // 110 + std::uint64_t unk118; // 118 + bool init; // 120 - NVMI + std::uint8_t unk121[0x7]; // 121 + }; + static_assert(sizeof(NavMeshInfoMap) == 0x128); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/N/NavMeshObstacleCoverManager.h b/CKPE.Fallout4/Include/EditorAPI/N/NavMeshObstacleCoverManager.h new file mode 100644 index 00000000..a0aedafa --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/N/NavMeshObstacleCoverManager.h @@ -0,0 +1,40 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x60, vtable RVA 0x2FB3A68, 124 virtual functions + class NavMeshObstacleCoverManager : + public TESForm, // 000 + public BSTSingletonImplicit // 028 + { + public: + virtual ~NavMeshObstacleCoverManager() = default; + + public: + std::uint8_t unk28[0xC]; // 28 + std::uint8_t unk34[0x8]; // 34 + std::uint32_t unk3C; // 3C + std::uint64_t unk40; // 40 + std::uint32_t unk48; // 48 + std::uint8_t unk4C[0xC]; // 4C + std::uint64_t unk58; // 58 + }; + static_assert(sizeof(NavMeshObstacleCoverManager) == 0x60); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/N/NiTSimpleArray.h b/CKPE.Fallout4/Include/EditorAPI/N/NiTSimpleArray.h index fbdfa45a..8441359b 100644 --- a/CKPE.Fallout4/Include/EditorAPI/N/NiTSimpleArray.h +++ b/CKPE.Fallout4/Include/EditorAPI/N/NiTSimpleArray.h @@ -4,6 +4,7 @@ #pragma once +#include #include namespace CKPE diff --git a/CKPE.Fallout4/Include/EditorAPI/S/Script.h b/CKPE.Fallout4/Include/EditorAPI/S/Script.h new file mode 100644 index 00000000..280cf8e0 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/S/Script.h @@ -0,0 +1,57 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESQuest; + + struct SCRIPT_HEADER + { + std::uint32_t variableCount; // 00 + std::uint32_t refObjectCount; // 04 + std::uint32_t dataSize; // 08 + std::uint32_t lastID; // 0C + bool isQuestScript; // 10 + bool isMagicEffectScript; // 11 + bool isCompiled; // 12 + }; + static_assert(sizeof(SCRIPT_HEADER) == 0x14); + + // 1.11.240.0: size 0x78, vtable RVA 0x3066FB8, 127 virtual functions + class Script : + public TESForm // 000 + { + public: + virtual ~Script() = default; + + virtual void sub_3E0() { return; } // 124 - RVA 0xBE2580 + virtual void sub_3E8() { return; } // 125 - RVA 0xBE2610 + virtual void sub_3F0() { return; } // 126 - RVA 0xBE4A60 + + public: + SCRIPT_HEADER header; // 28 + std::uint32_t unk3C; // 3C + char* text; // 40 + std::byte* data; // 48 + TESQuest* parentQuest; // 50 + BSSimpleList refObjects; // 58 - BSSimpleList + BSSimpleList variables; // 68 - BSSimpleList + }; + static_assert(sizeof(Script) == 0x78); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/S/ScrollItem.h b/CKPE.Fallout4/Include/EditorAPI/S/ScrollItem.h new file mode 100644 index 00000000..5a273bbb --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/S/ScrollItem.h @@ -0,0 +1,39 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x3D8, vtable RVA 0x30C2B80, 188 virtual functions + class ScrollItem : + public SpellItem, // 000 + public BGSModelMaterialSwap, // 340 + public BGSDestructibleObjectForm, // 390 + public BGSPickupPutdownSounds, // 3A0 + public TESWeightForm, // 3B8 + public TESValueForm // 3C8 + { + public: + virtual ~ScrollItem() = default; + }; + static_assert(sizeof(ScrollItem) == 0x3D8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/S/SpellItem.h b/CKPE.Fallout4/Include/EditorAPI/S/SpellItem.h new file mode 100644 index 00000000..c26c75f4 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/S/SpellItem.h @@ -0,0 +1,44 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x340, vtable RVA 0x30C3CE8, 188 virtual functions + class SpellItem : + public MagicItem, // 000 + public BGSEquipType, // 2D0 + public BGSMenuDisplayObject, // 2E0 + public TESDescription // 2F0 + { + public: + virtual ~SpellItem() = default; + + public: + std::uint32_t unk318; // 318 + std::uint8_t unk31C[0x8]; // 31C + std::uint32_t unk324; // 324 + std::uint32_t unk328; // 328 + std::uint8_t unk32C[0x8]; // 32C + std::uint32_t unk334; // 334 + std::uint64_t unk338; // 338 + }; + static_assert(sizeof(SpellItem) == 0x340); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESAIForm.h b/CKPE.Fallout4/Include/EditorAPI/T/TESAIForm.h new file mode 100644 index 00000000..be3cca7d --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESAIForm.h @@ -0,0 +1,54 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESPackage; + } + + // 0x10 bytes, bitfield layout from CommonLibF4 (default 0x03000400 stored by the CK constructor) + struct AIDATA_GAME + { + std::uint32_t aggression : 2; // 00:00 + std::uint32_t confidence : 3; // 00:02 + std::uint32_t energy : 8; // 00:05 + std::uint32_t morality : 2; // 00:13 + std::uint32_t unused : 3; // 00:15 + std::uint32_t assistance : 2; // 00:18 + std::uint32_t useAggroRadius : 1; // 00:20 + std::uint16_t aggroRadius[3]; // 04 + std::uint32_t noSlowApproach : 1; // 0C:00 + }; + static_assert(sizeof(AIDATA_GAME) == 0x10); + + + // 1.11.240.0: size 0x30, vtable RVA 0x301C2C0, 21 virtual functions + class TESAIForm : + public BaseFormComponent // 000 + { + public: + virtual ~TESAIForm() = default; + + public: + AIDATA_GAME aiData; // 08 + std::uint32_t unk18; // 18 - CK only + std::uint32_t unk1C; // 1C - CK only + BSSimpleList aiPackList; // 20 - CommonLibF4 PackageList (at 18 there) + }; + static_assert(sizeof(TESAIForm) == 0x30); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESActorBase.h b/CKPE.Fallout4/Include/EditorAPI/T/TESActorBase.h new file mode 100644 index 00000000..275ea720 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESActorBase.h @@ -0,0 +1,61 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESCombatStyle; + class TESForm; + + // 1.11.240.0: size 0x248, vtable RVA 0x30454C0, 158 virtual functions + class TESActorBase : + public TESBoundAnimObject, // 000 + public TESActorBaseData, // 090 + public TESContainer, // 0F8 + public TESSpellList, // 170 + public TESAIForm, // 180 + public TESFullName, // 1B0 + public ActorValueOwner, // 1C8 + public BGSDestructibleObjectForm, // 1D0 + public BGSSkinForm, // 1E0 + public BGSKeywordForm, // 1F8 + public BGSAttackDataForm, // 218 + public BGSPerkRankArray, // 228 + public BGSPropertySheet // 238 + { + public: + virtual ~TESActorBase() = default; + + virtual bool GetHasPLSpecTex() const noexcept(true) { return false; } // 154 - RVA 0xAB1160, return 0; + virtual TESCombatStyle* GetCombatStyle() noexcept(true) { return nullptr; } // 155 - RVA 0xAB1020, return 0; + virtual void SetCombatStyle(TESCombatStyle* pCombatStyle) noexcept(true) { return; } // 156 - RVA 0xAB2B80 + virtual TESForm* GetAsForm() noexcept(true) { return nullptr; } // 157 - RVA 0xAB0B00, return a1; + }; + static_assert(sizeof(TESActorBase) == 0x248); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESActorBaseData.h b/CKPE.Fallout4/Include/EditorAPI/T/TESActorBaseData.h new file mode 100644 index 00000000..b5211220 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESActorBaseData.h @@ -0,0 +1,78 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESForm; + class TESGlobal; + class TESLevItem; + class TESFaction; + class BGSVoiceType; + } + + // 0x14 bytes, layout from CommonLibF4, defaults verified against the CK constructor + // (level = 1, baseDisposition = global default, everything else 0) + struct ACTOR_BASE_DATA + { + std::uint32_t actorBaseFlags; // 00 + std::int16_t xpValueOffset; // 04 + std::uint16_t level; // 06 + std::uint16_t calcLevelMin; // 08 + std::uint16_t calcLevelMax; // 0A + std::uint16_t baseDisposition; // 0C + std::uint16_t templateUseFlags; // 0E + std::int16_t bleedoutOverride; // 10 + std::uint16_t pad12; // 12 + }; + static_assert(sizeof(ACTOR_BASE_DATA) == 0x14); + + struct FACTION_RANK + { + Forms::TESFaction* faction; // 00 + std::int8_t rank; // 08 + std::uint8_t pad09[7]; // 09 + }; + static_assert(sizeof(FACTION_RANK) == 0x10); + + + // 1.11.240.0: size 0x68, vtable RVA 0x301BB50, 25 virtual functions + class TESActorBaseData : + public BaseFormComponent // 000 + { + public: + virtual ~TESActorBaseData() = default; + + virtual void CopyFromTemplateForms() noexcept(true) { return; } // 21 - RVA 0x8ADCC0 + virtual bool GetIsGhost() const noexcept(true) { return false; } // 22 - RVA 0x8ADDB0, return (*(_DWORD *)(a1 + 8) & 0x20000000) != 0; + virtual bool GetInvulnerable() const noexcept(true) { return false; } // 23 - RVA 0x8ADDA0, return *(_DWORD *)(a1 + 8) >> 31; + virtual void sub_0C0() { return; } // 24 - RVA 0x8A9F00 + + public: + ACTOR_BASE_DATA actorData; // 08 + std::int32_t changeFlags; // 1C + Forms::TESLevItem* deathItem; // 20 + Forms::BGSVoiceType* voiceType; // 28 + Forms::TESForm* baseTemplateForm; // 30 + Forms::TESForm** templateForms; // 38 + Forms::TESGlobal* legendChance; // 40 + Forms::TESForm* legendTemplate; // 48 + BSTArray factions; // 50 + }; + static_assert(sizeof(TESActorBaseData) == 0x68); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESAmmo.h b/CKPE.Fallout4/Include/EditorAPI/T/TESAmmo.h new file mode 100644 index 00000000..29c34ddb --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESAmmo.h @@ -0,0 +1,67 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSProjectile; + + struct AMMO_DATA + { + BGSProjectile* projectile; // 00 + std::uint32_t health; // 08 + std::int8_t flags; // 0C + float damage; // 10 + }; + static_assert(sizeof(AMMO_DATA) == 0x18); + + // 1.11.240.0: size 0x240, vtable RVA 0x30872B0, 154 virtual functions + class TESAmmo : + public TESBoundObject, // 000 + public TESFullName, // 090 + public BGSModelMaterialSwap, // 0A8 + public TESIcon, // 0F8 + public BGSMessageIcon, // 120 + public TESValueForm, // 150 + public BGSDestructibleObjectForm, // 160 + public BGSPickupPutdownSounds, // 170 + public TESDescription, // 188 + public BGSKeywordForm, // 1B0 + public TESWeightForm // 1D0 + { + public: + virtual ~TESAmmo() = default; + + public: + AMMO_DATA data; // 1E0 + BGSLocalizedString shortDesc; // 1F8 + TESModel shellCasing; // 208 + }; + static_assert(sizeof(TESAmmo) == 0x240); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESAttackDamageForm.h b/CKPE.Fallout4/Include/EditorAPI/T/TESAttackDamageForm.h new file mode 100644 index 00000000..822c132e --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESAttackDamageForm.h @@ -0,0 +1,29 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x10, vtable RVA 0x301C448, 21 virtual functions + class TESAttackDamageForm : + public BaseFormComponent // 000 + { + public: + virtual ~TESAttackDamageForm() = default; + + public: + std::uint64_t unk08; // 08 + }; + static_assert(sizeof(TESAttackDamageForm) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESBipedModelForm.h b/CKPE.Fallout4/Include/EditorAPI/T/TESBipedModelForm.h new file mode 100644 index 00000000..0f17555f --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESBipedModelForm.h @@ -0,0 +1,37 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x190, vtable RVA 0x301C6E8, 21 virtual functions + class TESBipedModelForm : + public BaseFormComponent // 000 + { + public: + virtual ~TESBipedModelForm() = default; + + public: + Forms::BGSModelMaterialSwap worldModel[2]; // 08 - sizeof 0x50 each (0x08, 0x58) + TESIcon inventoryIcon[2]; // A8 - sizeof 0x28 each (0xA8, 0xD0) + BGSMessageIcon messageIcon[2]; // F8 - sizeof 0x30 each (0xF8, 0x128) + TESModelRDT constraintTemplate; // 158 + }; + static_assert(sizeof(TESBipedModelForm) == 0x190); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESBoundObject.h b/CKPE.Fallout4/Include/EditorAPI/T/TESBoundObject.h index c03a3e47..6f9f50c6 100644 --- a/CKPE.Fallout4/Include/EditorAPI/T/TESBoundObject.h +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESBoundObject.h @@ -7,6 +7,8 @@ #include #include #include +#include +#include namespace CKPE { @@ -16,20 +18,47 @@ namespace CKPE { namespace Forms { + class BGSVoiceType; // 0x90 - class TESBoundObject : public TESObject, public TESCellUseList + class TESBoundObject : + public TESObject, // 000 + public TESCellUseList // 030 { public: //constexpr static std::uint8_t TYPE_ID = ftVoice; // need knows struct TESBound { std::int16_t x, y, z; }; + + // CK 1.11.240.0: 154 virtual functions (TESObject has 136), the new ones start at 0x440 + virtual ~TESBoundObject() = default; + virtual void* CreateInstanceData(const void* pData) const noexcept(true) { return nullptr; } // 136 - RVA 0x436830, return 0; + virtual const void* GetBaseInstanceData() const noexcept(true) { return nullptr; } // 137 - RVA 0x436870, return 0; + virtual bool GetAttachedMarkersVisible(void* pObj3D) const noexcept(true) { return false; } // 138 - RVA 0xC5A1A0, return 0; + virtual void SetAttachedMarkersVisible(void* pObj3D, bool bVisible) const noexcept(true) { return; } // 139 - RVA 0xC5A1B0 + virtual bool QSupportsCountPerInstance() const noexcept(true) { return false; } // 140 - RVA 0x436980, return 0; + virtual void SetObjectVoiceType(BGSVoiceType* pVoiceType) noexcept(true) { return; } // 141 - RVA 0x4369A0 + virtual BGSVoiceType* GetObjectVoiceType() const noexcept(true) { return nullptr; } // 142 - RVA 0x436890, return 0; + virtual void sub_478() { return; } // 143 - RVA 0xC5A270, return sub_14009E585(a1 + 128); + virtual void Clone3D(void* pRequester, void* pObj3D) noexcept(true) { return; } // 144 - RVA 0xC5A560, return (*(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD))(*(_QWORD *)a1 + 1024 + virtual bool ReplaceModel(const char* lpFileName) noexcept(true) { return false; } // 145 - RVA 0xC5A6B0 + virtual void sub_490() { return; } // 146 - RVA 0xC5A910 + virtual void sub_498() { return; } // 147 - RVA 0xC5B0B0 + virtual void sub_4A0() { return; } // 148 - RVA 0x436860 + virtual void sub_4A8() { return; } // 149 - RVA 0x4368D0 + virtual void sub_4B0() { return; } // 150 - RVA 0x436970 + virtual void sub_4B8() { return; } // 151 - RVA 0x436940 + virtual void sub_4C0() { return; } // 152 - RVA 0x436950 + virtual void sub_4C8() { return; } // 153 - RVA 0x436960 + private: - /*040*/ TESBound _BoundMin; - /*046*/ TESBound _BoundMax; - /*04C*/ char pad4C[4]; - /*050*/ BGSMod::Template::Items _templateItems; // ??? - /*070*/ BGSPreviewTransform _PreviewTransform; - /*080*/ BGSSoundTagComponent _SoundTag; + TESBound _BoundMin; // 40 + TESBound _BoundMax; // 46 + char pad4C[4]; // 4C + BGSMod::Template::Items _templateItems; // 50 - ??? + BGSPreviewTransform _PreviewTransform; // 70 + BGSSoundTagComponent _SoundTag; // 80 - 8 bytes in the CK + std::uint32_t _unk88; // 88 + char pad8C[4]; // 8C public: [[nodiscard]] inline TESBound GetBoundMin() const noexcept(true) { return _BoundMin; } [[nodiscard]] inline TESBound GetBoundMax() const noexcept(true) { return _BoundMax; } @@ -45,7 +74,8 @@ namespace CKPE static_assert(sizeof(TESBoundObject) == 0x90); // 0x90 - class TESBoundAnimObject : public TESBoundObject + class TESBoundAnimObject : + public TESBoundObject // 000 {}; static_assert(sizeof(TESBoundAnimObject) == 0x90); diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESClass.h b/CKPE.Fallout4/Include/EditorAPI/T/TESClass.h new file mode 100644 index 00000000..5ca684cc --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESClass.h @@ -0,0 +1,47 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + struct CLASS_DATA + { + std::int32_t serviceFlags; // 00 + float bleedoutDefault; // 04 + }; + static_assert(sizeof(CLASS_DATA) == 0x8); + + // 1.11.240.0: size 0xA8, vtable RVA 0x3041B38, 124 virtual functions + class TESClass : + public TESForm, // 000 + public TESFullName, // 028 + public TESDescription, // 040 + public TESTexture, // 068 + public BGSPropertySheet // 090 + { + public: + virtual ~TESClass() = default; + + public: + CLASS_DATA data; // A0 + }; + static_assert(sizeof(TESClass) == 0xA8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESClimate.h b/CKPE.Fallout4/Include/EditorAPI/T/TESClimate.h new file mode 100644 index 00000000..2a64afc9 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESClimate.h @@ -0,0 +1,42 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0xF8, vtable RVA 0x30A8480, 124 virtual functions + class TESClimate : + public TESForm // 000 + { + public: + virtual ~TESClimate() = default; + + public: + TESModel nightSky; // 28 + std::uint8_t weatherList[0x18]; // 60 - TESWeatherList (WLST) + std::uint8_t unk78[0x18]; // 78 + TESTexture skyObjects[2]; // 90 - FNAM/GNAM + std::uint8_t data[0x6]; // E0 - TNAM + std::uint16_t unkE6; // E6 + std::uint64_t unkE8; // E8 + std::uint32_t unkF0; // F0 + std::uint32_t unkF4; // F4 + }; + static_assert(sizeof(TESClimate) == 0xF8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESCombatStyle.h b/CKPE.Fallout4/Include/EditorAPI/T/TESCombatStyle.h new file mode 100644 index 00000000..5a58e59a --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESCombatStyle.h @@ -0,0 +1,123 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + struct CombatStyleGeneralData + { + float offensiveMult; // 00 + float defensiveMult; // 04 + float groupOffensiveMult; // 08 + float meleeScoreMult; // 0C + float magicScoreMult; // 10 + float rangedScoreMult; // 14 + float shoutScoreMult; // 18 + float unarmedScoreMult; // 1C + float staffScoreMult; // 20 + float avoidThreatChance; // 24 + float dodgeThreatChance; // 28 + float evadeThreatChance; // 2C + }; + static_assert(sizeof(CombatStyleGeneralData) == 0x30); + + struct CombatStyleMeleeData + { + float attackIncapacitatedMult; // 00 + float powerAttackIncapacitatedMult; // 04 + float powerAttackBlockingMult; // 08 + float bashMult; // 0C + float bashRecoiledMult; // 10 + float bashAttackMult; // 14 + float bashPowerAttackMult; // 18 + float specialAttackMult; // 1C + float blockWhenIncapacitatedMult; // 20 + float attackWhenIncapacitatedMult; // 24 + }; + static_assert(sizeof(CombatStyleMeleeData) == 0x28); + + struct CombatStyleRangedData + { + float accuracyMult; // 00 + }; + static_assert(sizeof(CombatStyleRangedData) == 0x4); + + struct CombatStyleCloseRangeData + { + float circleMult; // 00 + float fallbackMult; // 04 + float flankDistanceMult; // 08 + float stalkTimeMult; // 0C + float chargeDistanceMult; // 10 + float flipThrowProbability; // 14 + float sprintChargeProbability; // 18 + float sideswipeProbability; // 1C + float disengageProbability; // 20 + std::uint32_t throwMaxTargets; // 24 + float flankVarianceMult; // 28 + }; + static_assert(sizeof(CombatStyleCloseRangeData) == 0x2C); + + struct CombatStyleLongRangeData + { + float strafeMult; // 00 + float adjustRangeMult; // 04 + float crouchMult; // 08 + float waitMult; // 0C + float rangeMult; // 10 + }; + static_assert(sizeof(CombatStyleLongRangeData) == 0x14); + + struct CombatStyleCoverData + { + float coverSearchDistanceMult; // 00 + }; + static_assert(sizeof(CombatStyleCoverData) == 0x4); + + struct CombatStyleFlightData + { + float hoverChance; // 00 + float diveBombChance; // 04 + float groundAttackChance; // 08 + float hoverTimeMult; // 0C + float groundAttackTimeMult; // 10 + float perchAttackChance; // 14 + float perchAttackTimeMult; // 18 + float flyingAttackChance; // 1C + }; + static_assert(sizeof(CombatStyleFlightData) == 0x20); + + // 1.11.240.0: size 0xF0, vtable RVA 0x3088410, 124 virtual functions + class TESCombatStyle : + public TESForm // 000 + { + public: + virtual ~TESCombatStyle() = default; + + public: + CombatStyleGeneralData generalData; // 28 + CombatStyleMeleeData meleeData; // 58 + CombatStyleRangedData rangedData; // 80 + CombatStyleCloseRangeData closeRangeData; // 84 + CombatStyleLongRangeData longRangeData; // B0 + CombatStyleCoverData coverData; // C4 + CombatStyleFlightData flightData; // C8 + std::uint32_t unkE8; // E8 + std::uint32_t unkEC; // EC + }; + static_assert(sizeof(TESCombatStyle) == 0xF0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESContainer.h b/CKPE.Fallout4/Include/EditorAPI/T/TESContainer.h new file mode 100644 index 00000000..2ababe34 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESContainer.h @@ -0,0 +1,56 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // verified in the CK: TESContainer::ClearDataComponent frees 0x18 bytes per entry (+16 points to a 0x28 byte extra) + struct ContainerObject + { + std::int32_t count; // 00 + std::int32_t pad04; // 04 + Forms::TESBoundObject* obj; // 08 + void* itemExtra; // 10 - ContainerItemExtra* + }; + static_assert(sizeof(ContainerObject) == 0x18); + + + namespace Forms + { + class TESBoundObject; + } + + + // 1.11.240.0: size 0x78, vtable RVA 0x301C938, 22 virtual functions + class TESContainer : + public BaseFormComponent // 000 + { + public: + virtual ~TESContainer() = default; + + virtual void sub_0A8() { return; } // 21 - RVA 0x8B5870 + + public: + ContainerObject** containerObjects; // 08 + std::uint32_t numContainerObjects; // 10 + std::uint32_t unk14; // 14 + BSTArray unk18; // 18 - element type not identified yet + BSTArray unk30; // 30 - element type not identified yet + BSTArray unk48; // 48 - element type not identified yet + BSTArray unk60; // 60 - element type not identified yet + }; + static_assert(sizeof(TESContainer) == 0x78); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESEffectShader.h b/CKPE.Fallout4/Include/EditorAPI/T/TESEffectShader.h new file mode 100644 index 00000000..e066c5a4 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESEffectShader.h @@ -0,0 +1,82 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + + struct EffectShaderData + { + std::int32_t textureBlendModeSource; // 00 - REX::TEnumSet<_D3DBLEND, std::int32_t> + std::int32_t textureBlendOperation; // 04 - REX::TEnumSet<_D3DBLENDOP, std::int32_t> + std::int32_t textureZTestFunction; // 08 - REX::TEnumSet<_D3DCMPFUNC, std::int32_t> + std::uint32_t fillColor1; // 0C + float fillAlphaFadeInTime; // 10 + float fillAlphaFullTime; // 14 + float fillAlphaFadeOutTime; // 18 + float fillAlphaPersistentPercent; // 1C + float fillAlphaPulseAmplitude; // 20 + float fillAlphaPulseFrequency; // 24 + float fillTextureUAnimSpeed; // 28 + float fillTextureVAnimSpeed; // 2C + float edgeExponentValue; // 30 + std::uint32_t edgeColor; // 34 + float edgeAlphaFadeInTime; // 38 + float edgeAlphaFullTime; // 3C + float edgeAlphaFadeOutTime; // 40 + float edgeAlphaPersistentPercent; // 44 + float edgeAlphaPulseAmplitude; // 48 + float edgeAlphaPulseFrequency; // 4C + float fillAlphaFullPercent; // 50 + float edgeAlphaFullPercent; // 54 + std::int32_t textureBlendModeDest; // 58 - REX::TEnumSet<_D3DBLEND, std::int32_t> + float alphaTestStartTime; // 5C + float alphaTestEndTime; // 60 + float alphaTestStartValue; // 64 + float alphaTestEndValue; // 68 + BGSSoundDescriptorForm* ambientSound; // 70 + std::uint32_t fillColor2; // 78 + std::uint32_t fillColor3; // 7C + float fillColorScaleA[3]; // 80 + float fillColorTimeA[3]; // 8C + std::uint32_t flags; // 98 + float fillTextureUScale; // 9C + float fillTextureVScale; // A0 + std::int8_t boneDepth; // A4 + }; + static_assert(sizeof(EffectShaderData) == 0xA8); + + // 1.11.240.0: size 0x188, vtable RVA 0x3088A70, 124 virtual functions + class TESEffectShader : + public TESForm, // 000 + public TESModel // 028 + { + public: + virtual ~TESEffectShader() = default; + + public: + EffectShaderData data; // 60 + TESTexture textureShaderTexture; // 108 + TESTexture blockOutTexture; // 130 + TESTexture paletteTexture; // 158 + std::uint8_t shareableGeometry[0x8]; // 180 - NiPointer + }; + static_assert(sizeof(TESEffectShader) == 0x188); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESEnchantableForm.h b/CKPE.Fallout4/Include/EditorAPI/T/TESEnchantableForm.h new file mode 100644 index 00000000..266a59c9 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESEnchantableForm.h @@ -0,0 +1,39 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class EnchantmentItem; + } + + // 1.11.240.0: size 0x18, vtable RVA 0x301D390, 22 virtual functions + class TESEnchantableForm : + public BaseFormComponent // 000 + { + public: + virtual ~TESEnchantableForm() = default; + + virtual std::uint16_t GetCastingType() const noexcept(true) { return 0; } // 21 - RVA 0x8C03F0, return *(unsigned __int16 *)(a1 + 16); + + public: + Forms::EnchantmentItem* formEnchanting; // 08 + std::uint16_t castingType; // 10 - MagicSystem::CastingType + std::uint16_t amountOfEnchantment; // 12 + std::uint32_t unk14; // 14 + }; + static_assert(sizeof(TESEnchantableForm) == 0x18); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESEyes.h b/CKPE.Fallout4/Include/EditorAPI/T/TESEyes.h new file mode 100644 index 00000000..42f6f5b9 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESEyes.h @@ -0,0 +1,37 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x70, vtable RVA 0x30424C0, 124 virtual functions + class TESEyes : + public TESForm, // 000 + public TESFullName, // 028 + public TESTexture // 040 + { + public: + virtual ~TESEyes() = default; + + public: + std::int8_t flags; // 68 + std::uint8_t unk69[0x7]; // 69 + }; + static_assert(sizeof(TESEyes) == 0x70); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESFaction.h b/CKPE.Fallout4/Include/EditorAPI/T/TESFaction.h new file mode 100644 index 00000000..5f77e4de --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESFaction.h @@ -0,0 +1,94 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESCondition; + + class BGSListForm; + + class BGSOutfit; + + class PackageLocation; + + struct FACTION_DATA + { + std::uint32_t flags; // 00 + }; + static_assert(sizeof(FACTION_DATA) == 0x4); + + struct FACTION_CRIME_DATA_VALUES + { + bool arrest; // 00 + bool attackOnSight; // 01 + std::uint16_t murderCrimeGold; // 02 + std::uint16_t assaultCrimeGold; // 04 + std::uint16_t trespassCrimeGold; // 06 + std::uint16_t pickpocketCrimeGold; // 08 + float stealCrimeGoldMult; // 0C + std::uint16_t escapeCrimeGold; // 10 + std::uint16_t unused; // 12 + }; + static_assert(sizeof(FACTION_CRIME_DATA_VALUES) == 0x14); + + struct FACTION_VENDOR_DATA_VALUES + { + std::uint16_t startHour; // 00 + std::uint16_t endHour; // 02 + std::uint32_t locationRadius; // 04 + bool buysStolen; // 08 + bool notBuySell; // 09 + bool buysNonStolen; // 0A + }; + static_assert(sizeof(FACTION_VENDOR_DATA_VALUES) == 0xC); + + // 1.11.240.0: size 0xF8, vtable RVA 0x3042CB0, 124 virtual functions + class TESFaction : + public TESForm, // 000 + public TESFullName, // 028 + public TESReactionForm // 040 + { + public: + virtual ~TESFaction() = default; + + public: + FACTION_DATA data; // 60 + std::uint32_t unk64; // 64 + TESObjectREFR* factionJailMarker; // 68 + TESObjectREFR* factionWaitMarker; // 70 + TESObjectREFR* factionStolenContainer; // 78 + TESObjectREFR* factionPlayerInventoryContainer; // 80 + BGSListForm* crimeGroup; // 88 + BGSOutfit* jailOutfit; // 90 + FACTION_CRIME_DATA_VALUES crimeValues; // 98 - CRVA + std::uint32_t unkAC; // AC + FACTION_VENDOR_DATA_VALUES vendorValues; // B0 - VENV + std::uint32_t unkBC; // BC + PackageLocation* vendorLocation; // C0 + TESCondition* vendorConditions; // C8 + BGSListForm* vendorSellBuyList; // D0 + TESObjectREFR* merchantContainer; // D8 + BSSimpleList rankDataList; // E0 - BSSimpleList + std::uint64_t unkF0; // F0 + }; + static_assert(sizeof(TESFaction) == 0xF8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESFlora.h b/CKPE.Fallout4/Include/EditorAPI/T/TESFlora.h new file mode 100644 index 00000000..2b99e4b2 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESFlora.h @@ -0,0 +1,31 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x208, vtable RVA 0x3089580, 154 virtual functions + class TESFlora : + public TESObjectACTI, // 000 + public TESProduceForm // 1E8 + { + public: + virtual ~TESFlora() = default; + }; + static_assert(sizeof(TESFlora) == 0x208); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESFormIDListView.h b/CKPE.Fallout4/Include/EditorAPI/T/TESFormIDListView.h new file mode 100644 index 00000000..f34e1ff8 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESFormIDListView.h @@ -0,0 +1,32 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x28, vtable RVA 0x2FF2B30, 126 virtual functions + class TESFormIDListView : + public TESForm // 000 + { + public: + virtual ~TESFormIDListView() = default; + + virtual void sub_3E0() { return; } // 124 - RVA 0x725DE0, return sub_14003195D(a2, a3); + virtual void sub_3E8() { return; } // 125 - RVA 0x725E10 + }; + static_assert(sizeof(TESFormIDListView) == 0x28); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESFurniture.h b/CKPE.Fallout4/Include/EditorAPI/T/TESFurniture.h new file mode 100644 index 00000000..8458cacb --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESFurniture.h @@ -0,0 +1,49 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESForm; + + // 1.11.240.0: size 0x2A0, vtable RVA 0x308AC68, 154 virtual functions + class TESFurniture : + public TESObjectACTI // 000 + { + public: + virtual ~TESFurniture() = default; + + public: + BSTArray unk1E8; // 1E8 - element type not identified yet + TESModel unk200; // 200 + BSTArray entryPointDataArray; // 238 - BSTArray, by position (same member order and sizes as the game after the last base) + BGSAttachParentArray attachParents; // 250 + std::int8_t wbData; // 270 - WorkbenchData::type, by position (same member order and sizes as the game after the last base) + std::uint8_t unk271[0x3]; // 271 + std::uint32_t furnFlags; // 274 - by position (same member order and sizes as the game after the last base) + TESForm* associatedForm; // 278 - by position (same member order and sizes as the game after the last base) + BSTArray markersArray; // 280 - BSTArray, by position (same member order and sizes as the game after the last base) + std::uint16_t unk298; // 298 + std::uint8_t unk29A; // 29A + std::uint8_t unk29B[0x5]; // 29B + }; + static_assert(sizeof(TESFurniture) == 0x2A0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESGlobal.h b/CKPE.Fallout4/Include/EditorAPI/T/TESGlobal.h new file mode 100644 index 00000000..74ba2a1f --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESGlobal.h @@ -0,0 +1,33 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x30, vtable RVA 0x30661B8, 124 virtual functions + class TESGlobal : + public TESForm // 000 + { + public: + virtual ~TESGlobal() = default; + + public: + float value; // 28 + std::uint32_t unk2C; // 2C + }; + static_assert(sizeof(TESGlobal) == 0x30); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESGrass.h b/CKPE.Fallout4/Include/EditorAPI/T/TESGrass.h new file mode 100644 index 00000000..1bf8ea3a --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESGrass.h @@ -0,0 +1,81 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 0x20 bytes, layout from CommonLibF4 GRASS_DATA, offsets confirmed by the CK getters/setters (data at 0xC8) + struct GRASS_DATA + { + std::int8_t density; // 00 + std::int8_t minSlopeDegrees; // 01 + std::int8_t maxSlopeDegrees; // 02 + std::uint8_t pad03; // 03 + std::uint16_t distanceFromWaterLevel; // 04 + std::uint16_t pad06; // 06 + std::int32_t underwater; // 08 - GRASS_WATER_STATE + float positionRange; // 0C + float heightRange; // 10 + float colorRange; // 14 + float wavePeriod; // 18 + std::int8_t flags; // 1C - 1 vertex lighting, 2 uniform scaling, 4 fit to slope + std::uint8_t pad1D[3]; // 1D + }; + static_assert(sizeof(GRASS_DATA) == 0x20); + + + // 1.11.240.0: size 0xE8, vtable RVA 0x308BF10, 180 virtual functions + class TESGrass : + public TESBoundObject, // 000 + public TESModel // 090 + { + public: + virtual ~TESGrass() = default; + + virtual std::int8_t GetDensity() const noexcept(true) { return 0; } // 154 - RVA 0xC49EE0, return *(unsigned __int8 *)(a1 + 200); + virtual bool SetDensity(std::int8_t nDensity) noexcept(true) { return false; } // 155 - RVA 0xC49840, if ( a2 > 0x64u ); return 0;; *(_BYTE *)(a1 + 200) = a2;; return 1; + virtual std::int8_t GetMinSlopeDegrees() const noexcept(true) { return 0; } // 156 - RVA 0xC49F70, return *(unsigned __int8 *)(a1 + 201); + virtual bool SetMinSlopeDegrees(std::int8_t nDegrees) noexcept(true) { return false; } // 157 - RVA 0x16031 + virtual std::int8_t GetMaxSlopeDegrees() const noexcept(true) { return 0; } // 158 - RVA 0xC49F40, return *(unsigned __int8 *)(a1 + 202); + virtual bool SetMaxSlopeDegrees(std::int8_t nDegrees) noexcept(true) { return false; } // 159 - RVA 0xC49880, if ( a2 > 0x5Au || a2 < *(_BYTE *)(a1 + 201) ); return 0;; *(_BYTE *)(a1 + 202) = a2;; ret + virtual float GetMinSlope() const noexcept(true) { return 0.0f; } // 160 - RVA 0xC49F50, return (float)*(unsigned __int8 *)(a1 + 201) * 0.017453292; + virtual float GetMaxSlope() const noexcept(true) { return 0.0f; } // 161 - RVA 0xC49F20, return (float)*(unsigned __int8 *)(a1 + 202) * 0.017453292; + virtual std::uint16_t GetDistanceFromWaterLevel() const noexcept(true) { return 0; } // 162 - RVA 0xC49EF0, return *(unsigned __int16 *)(a1 + 204); + virtual void SetDistanceFromWaterLevel(std::uint16_t nDistance) noexcept(true) { return; } // 163 - RVA 0xC49FD0 + virtual std::uint32_t GetUnderwaterState() const noexcept(true) { return 0; } // 164 - RVA 0xC49F90, return *(unsigned int *)(a1 + 208); + virtual void SetUnderwaterState(std::uint32_t nState) noexcept(true) { return; } // 165 - RVA 0xC4A010, *((_DWORD *)this + 52) = a2; + virtual float GetPositionRange() const noexcept(true) { return 0.0f; } // 166 - RVA 0xC49F80, return *(float *)(a1 + 212); + virtual bool SetPositionRange(float fRange) noexcept(true) { return false; } // 167 - RVA 0xC498A0, if ( a2 < 0.0 || a2 > 512.0 ); return 0;; *(float *)(a1 + 212) = a2;; return 1; + virtual float GetHeightRange() const noexcept(true) { return 0.0f; } // 168 - RVA 0xC49F10, return *(float *)(a1 + 216); + virtual bool SetHeightRange(float fRange) noexcept(true) { return false; } // 169 - RVA 0xC498D0, if ( a2 < 0.0 || a2 > 1.0 ); return 0;; *(float *)(a1 + 216) = a2;; return 1; + virtual float GetColorRange() const noexcept(true) { return 0.0f; } // 170 - RVA 0xC49ED0, return *(float *)(a1 + 220); + virtual bool SetColorRange(float fRange) noexcept(true) { return false; } // 171 - RVA 0xC49900, if ( a2 < 0.0 || a2 > 1.0 ); return 0;; *(float *)(a1 + 220) = a2;; return 1; + virtual float GetWavePeriod() const noexcept(true) { return 0.0f; } // 172 - RVA 0xC49FC0, return *(float *)(a1 + 224); + virtual bool SetWavePeriod(float fPeriod) noexcept(true) { return false; } // 173 - RVA 0xC49930, if ( a2 <= 0.0 ); return 0;; *(float *)(a1 + 224) = a2;; return 1; + virtual bool GetVertexLighting() const noexcept(true) { return false; } // 174 - RVA 0xC49FB0, return *(_BYTE *)(a1 + 228) & 1; + virtual void SetVertexLighting(bool bFlag) noexcept(true) { return; } // 175 - RVA 0xC4A050, v2 = *(_BYTE *)(a1 + 228);; v3 = v2 | 1;; result = v2 & 0xFE;; if ( !a2 ); v3 = result;; * + virtual bool GetUniformScaling() const noexcept(true) { return false; } // 176 - RVA 0xC49FA0, return (*(_BYTE *)(a1 + 228) & 2) != 0; + virtual void SetUniformScaling(bool bFlag) noexcept(true) { return; } // 177 - RVA 0xC4A020, v2 = *(_BYTE *)(a1 + 228);; v3 = v2 | 2;; result = v2 & 0xFD;; if ( !a2 ); v3 = result;; * + virtual bool GetFitToSlope() const noexcept(true) { return false; } // 178 - RVA 0xC49F00, return (*(_BYTE *)(a1 + 228) & 4) != 0; + virtual void SetFitToSlope(bool bFlag) noexcept(true) { return; } // 179 - RVA 0xC49FE0, v2 = *(_BYTE *)(a1 + 228);; v3 = v2 | 4;; result = v2 & 0xFB;; if ( !a2 ); v3 = result;; * + + public: + GRASS_DATA data; // C8 + }; + static_assert(sizeof(TESGrass) == 0xE8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESHealthForm.h b/CKPE.Fallout4/Include/EditorAPI/T/TESHealthForm.h new file mode 100644 index 00000000..c9126220 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESHealthForm.h @@ -0,0 +1,29 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x10, vtable RVA 0x3020260, 21 virtual functions + class TESHealthForm : + public BaseFormComponent // 000 + { + public: + virtual ~TESHealthForm() = default; + + public: + std::uint64_t unk08; // 08 + }; + static_assert(sizeof(TESHealthForm) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESIcon.h b/CKPE.Fallout4/Include/EditorAPI/T/TESIcon.h new file mode 100644 index 00000000..ef09df15 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESIcon.h @@ -0,0 +1,26 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x28, vtable RVA 0x30203A8, 27 virtual functions + class TESIcon : + public TESTexture // 000 + { + public: + virtual ~TESIcon() = default; + }; + static_assert(sizeof(TESIcon) == 0x28); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESIdleForm.h b/CKPE.Fallout4/Include/EditorAPI/T/TESIdleForm.h new file mode 100644 index 00000000..81098177 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESIdleForm.h @@ -0,0 +1,52 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + struct IDLE_DATA + { + std::int8_t loopMin; // 00 + std::int8_t loopMax; // 01 + std::int8_t flags; // 02 + std::uint16_t replayDelay; // 04 + }; + static_assert(sizeof(IDLE_DATA) == 0x6); + + // 1.11.240.0: size 0x78, vtable RVA 0x3043AE8, 125 virtual functions + class TESIdleForm : + public TESForm // 000 + { + public: + virtual ~TESIdleForm() = default; + + virtual void sub_3E0() { return; } // 124 - RVA 0xA7ED90 + + public: + std::uint8_t unk28[0x18]; // 28 + IDLE_DATA data; // 40 + std::uint16_t unk46; // 46 + std::uint64_t unk48; // 48 + TESIdleForm* parentIdle; // 50 + TESIdleForm* prevIdle; // 58 + BSFixedString behaviorGraphName; // 60 + BSFixedString animEventName; // 68 + BSFixedString animFileName; // 70 + }; + static_assert(sizeof(TESIdleForm) == 0x78); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESImageSpace.h b/CKPE.Fallout4/Include/EditorAPI/T/TESImageSpace.h new file mode 100644 index 00000000..f63f2b67 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESImageSpace.h @@ -0,0 +1,95 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + struct ImageSpaceBaseDataHDR + { + float eyeAdaptSpeed; // 00 + float bloomBlurRadius; // 04 + float bloomThreshold; // 08 + float bloomScale; // 0C + float receiveBloomThreshold; // 10 + float white; // 14 + float sunlightScale; // 18 + float skyScale; // 1C + float eyeAdaptStrength; // 20 + }; + static_assert(sizeof(ImageSpaceBaseDataHDR) == 0x24); + + struct ImageSpaceBaseDataCinematic + { + float saturation; // 00 + float brightness; // 04 + float contrast; // 08 + }; + static_assert(sizeof(ImageSpaceBaseDataCinematic) == 0xC); + + struct ImageSpaceBaseDataColorF + { + float red; // 00 + float green; // 04 + float blue; // 08 + }; + static_assert(sizeof(ImageSpaceBaseDataColorF) == 0xC); + + struct ImageSpaceBaseDataTint + { + float amount; // 00 + ImageSpaceBaseDataColorF color; // 04 + }; + static_assert(sizeof(ImageSpaceBaseDataTint) == 0x10); + + struct ImageSpaceBaseDataDepthOfField + { + float strength; // 00 + float distance; // 04 + float range; // 08 + float vignetteRadius; // 0C + float vignetteStrength; // 10 + float mode; // 14 + }; + static_assert(sizeof(ImageSpaceBaseDataDepthOfField) == 0x18); + + struct ImageSpaceBaseData + { + ImageSpaceBaseDataHDR hdrData; // 00 + ImageSpaceBaseDataCinematic cinematicData; // 24 + ImageSpaceBaseDataTint tintData; // 30 + ImageSpaceBaseDataDepthOfField dofData; // 40 + }; + static_assert(sizeof(ImageSpaceBaseData) == 0x58); + + // 1.11.240.0: size 0xC0, vtable RVA 0x30A94A0, 126 virtual functions + class TESImageSpace : + public TESFormIDListView // 000 + { + public: + virtual ~TESImageSpace() = default; + + public: + std::uint64_t unk28; // 28 + std::uint32_t unk30; // 30 + std::uint32_t unk34; // 34 + ImageSpaceBaseData data; // 38 + TESTexture lutTexture; // 90 - TX00 + std::uint64_t niLutTexture; // B8 - NiPointer, by position after lutTexture + }; + static_assert(sizeof(TESImageSpace) == 0xC0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESImageSpaceModifiableForm.h b/CKPE.Fallout4/Include/EditorAPI/T/TESImageSpaceModifiableForm.h new file mode 100644 index 00000000..2af16fd8 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESImageSpaceModifiableForm.h @@ -0,0 +1,34 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESImageSpaceModifier; + } + + // 1.11.240.0: size 0x10, vtable RVA 0x30204E0, 21 virtual functions + class TESImageSpaceModifiableForm : + public BaseFormComponent // 000 + { + public: + virtual ~TESImageSpaceModifiableForm() = default; + + public: + Forms::TESImageSpaceModifier* formImageSpaceModifying; // 08 + }; + static_assert(sizeof(TESImageSpaceModifiableForm) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESImageSpaceModifier.h b/CKPE.Fallout4/Include/EditorAPI/T/TESImageSpaceModifier.h new file mode 100644 index 00000000..bec06c6f --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESImageSpaceModifier.h @@ -0,0 +1,83 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + struct ImageSpaceModifierData + { + bool animatable; // 00 + float duration; // 04 + std::uint32_t keySize[21][2]; // 08 + std::uint32_t tintColorKeySize; // B0 + std::uint32_t blurKeySize; // B4 + std::uint32_t doubleKeySize; // B8 + std::uint32_t radialBlurStrengthKeySize; // BC + std::uint32_t radialBlurRampupKeySize; // C0 + std::uint32_t radialBlurStartKeySize; // C4 + bool useTargetForRadialBlur; // C8 + NiAPI::NiPoint2 radialBlurCenter; // CC + std::uint32_t depthOfFieldStrengthKeySize; // D4 + std::uint32_t depthOfFieldDistanceKeySize; // D8 + std::uint32_t depthOfFieldRangeKeySize; // DC + bool useTargetForDepthOfField; // E0 + std::int8_t depthOfFieldMode; // E1 + std::uint32_t radialBlurRampDownKeySize; // E4 + std::uint32_t radialBlurDownStartKeySize; // E8 + std::uint32_t fadeColorKeySize; // EC + std::uint32_t motionBlurStrengthKeySize; // F0 + std::uint32_t depthOfFieldVignetteRadiusKeySize; // F4 + std::uint32_t depthOfFieldVignetteStrengthKeySize; // F8 + }; + static_assert(sizeof(ImageSpaceModifierData) == 0xFC); + + // 1.11.240.0: size 0xDC8, vtable RVA 0x30A9C88, 126 virtual functions + class TESImageSpaceModifier : + public TESFormIDListView // 000 + { + public: + virtual ~TESImageSpaceModifier() = default; + + public: + ImageSpaceModifierData data; // 28 + std::uint32_t unk124; // 124 + std::uint8_t interpolator[21][2][0x30]; // 128 - NiPointer[21][2] in the game (0x30-byte objects in the CK) + std::uint8_t blurInterpolator[0x30]; // 908 + std::uint8_t doubleInterpolator[0x30]; // 938 + std::uint8_t tintColorInterpolator[0x38]; // 968 - NiColorInterpolator in the game + std::uint8_t fadeColorInterpolator[0x38]; // 9A0 - NiColorInterpolator in the game + std::uint8_t radialBlurStrengthInterpolator[0x30]; // 9D8 + std::uint8_t radialBlurRampupInterpolator[0x30]; // A08 + std::uint8_t radialBlurStartInterpolator[0x30]; // A38 + std::uint8_t radialBlurRampDownInterpolator[0x30]; // A68 + std::uint8_t radialBlurDownStartInterpolator[0x30]; // A98 + std::uint8_t depthOfFieldStrengthInterpolator[0x30]; // AC8 + std::uint8_t depthOfFieldDistanceInterpolator[0x30]; // AF8 + std::uint8_t depthOfFieldRangeInterpolator[0x30]; // B28 + std::uint8_t depthOfFieldVignetteRadiusInterpolator[0x30]; // B58 + std::uint8_t depthOfFieldVignetteStrengthInterpolator[0x30]; // B88 + std::uint8_t motionBlurStrengthInterpolator[0x30]; // BB8 + std::uint8_t unkBE8[0x1C8]; // BE8 + std::uint32_t unkDB0; // DB0 + std::uint32_t unkDB4; // DB4 + std::uint64_t unkDB8; // DB8 + std::uint32_t unkDC0; // DC0 + std::uint32_t unkDC4; // DC4 + }; + static_assert(sizeof(TESImageSpaceModifier) == 0xDC8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESKey.h b/CKPE.Fallout4/Include/EditorAPI/T/TESKey.h new file mode 100644 index 00000000..f6666f25 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESKey.h @@ -0,0 +1,29 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x1E8, vtable RVA 0x308C828, 156 virtual functions + class TESKey : + public TESObjectMISC // 000 + { + public: + virtual ~TESKey() = default; + }; + static_assert(sizeof(TESKey) == 0x1E8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESLandTexture.h b/CKPE.Fallout4/Include/EditorAPI/T/TESLandTexture.h index 962d10c1..ee25de40 100644 --- a/CKPE.Fallout4/Include/EditorAPI/T/TESLandTexture.h +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESLandTexture.h @@ -1,10 +1,12 @@ -// Copyright © 2023-2025 aka CKPE team. All rights reserved. +// Copyright © 2020-2025 aka CKPE team. All rights reserved. // Contacts: // License: https://www.gnu.org/licenses/lgpl-3.0.html #pragma once +#include #include +#include namespace CKPE { @@ -14,13 +16,42 @@ namespace CKPE { namespace Forms { - class TESLandTexture : TESForm + class BGSTextureSet; + + class BGSMaterialType; + + struct TEXTURE_HAVOK_DATA + { + std::int8_t friction; // 00 + std::int8_t restitution; // 01 + }; + static_assert(sizeof(TEXTURE_HAVOK_DATA) == 0x2); + + // 1.11.240.0: size 0x70, vtable RVA 0x30ABCD8, 124 virtual functions + class TESLandTexture : + public TESForm // 000 { public: + virtual ~TESLandTexture() = default; + constexpr static std::uint8_t TYPE_ID = ftLandTexture; - private: + + public: + BGSTextureSet* textureSet; // 28 + TEXTURE_HAVOK_DATA havokData; // 30 + std::uint8_t unk32[0x6]; // 32 + BGSMaterialType* materialType; // 38 + std::int8_t specularExponent; // 40 + std::uint8_t unk41[0x3]; // 41 + std::int32_t shaderTextureIndex; // 44 + BSSimpleList textureGrassList; // 48 - BSSimpleList + std::uint64_t unk58; // 58 + std::uint64_t unk60; // 60 + std::uint32_t unk68; // 68 + std::uint32_t unk6C; // 6C }; + static_assert(sizeof(TESLandTexture) == 0x70); } } } -} \ No newline at end of file +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESLevCharacter.h b/CKPE.Fallout4/Include/EditorAPI/T/TESLevCharacter.h new file mode 100644 index 00000000..0351f0ef --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESLevCharacter.h @@ -0,0 +1,33 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x108, vtable RVA 0x308D820, 154 virtual functions + class TESLevCharacter : + public TESBoundAnimObject, // 000 + public TESLeveledList, // 090 + public BGSModelMaterialSwap // 0B8 + { + public: + virtual ~TESLevCharacter() = default; + }; + static_assert(sizeof(TESLevCharacter) == 0x108); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESLevItem.h b/CKPE.Fallout4/Include/EditorAPI/T/TESLevItem.h new file mode 100644 index 00000000..51e4cf65 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESLevItem.h @@ -0,0 +1,35 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0xC8, vtable RVA 0x308E308, 154 virtual functions + class TESLevItem : + public TESBoundObject, // 000 + public TESLeveledList // 090 + { + public: + virtual ~TESLevItem() = default; + + public: + BGSLocalizedString unkB8; // B8 + }; + static_assert(sizeof(TESLevItem) == 0xC8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESLevSpell.h b/CKPE.Fallout4/Include/EditorAPI/T/TESLevSpell.h new file mode 100644 index 00000000..d65eff7b --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESLevSpell.h @@ -0,0 +1,31 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0xB8, vtable RVA 0x308EB50, 154 virtual functions + class TESLevSpell : + public TESBoundObject, // 000 + public TESLeveledList // 090 + { + public: + virtual ~TESLevSpell() = default; + }; + static_assert(sizeof(TESLevSpell) == 0xB8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESLeveledList.h b/CKPE.Fallout4/Include/EditorAPI/T/TESLeveledList.h new file mode 100644 index 00000000..5dda814e --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESLeveledList.h @@ -0,0 +1,66 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESForm; + class TESGlobal; + } + + // 0x18 bytes, array element of TESLeveledList::leveledLists (CK 1.11.240.0) + struct LEVELED_OBJECT + { + Forms::TESForm* form; // 00 + void* itemExtra; // 08 - ContainerItemExtra* + std::uint16_t count; // 10 - verified: the list calculation adds this many + std::uint16_t level; // 12 - verified: entry is used when playerLevel >= level + std::int8_t chanceNone; // 14 - verified: rolled against rand(0, 100) + std::uint8_t pad15[3]; // 15 + }; + static_assert(sizeof(LEVELED_OBJECT) == 0x18); + + + // 1.11.240.0: size 0x28, vtable RVA 0x30209D8, 31 virtual functions + class TESLeveledList : + public BaseFormComponent // 000 + { + public: + virtual ~TESLeveledList() = default; + + virtual std::int8_t GetChanceNone() const noexcept(true) { return 0; } // 21 - RVA 0x8DE590, v1 = *(_QWORD *)(a1 + 8);; if ( v1 ); return (unsigned int)(int)*(float *)(v1 + 40);; else + virtual bool GetMultCalc() const noexcept(true) { return false; } // 22 - RVA 0x8DE600, return (*(_BYTE *)(a1 + 34) & 2) != 0; + virtual std::int32_t GetMaxLevelDifference() const noexcept(true) { return 0; } // 23 - RVA 0x8E2D90, return 0; + virtual const char* GetOverrideName() const noexcept(true) { return nullptr; } // 24 - RVA 0x8E2DA0, return 0; + virtual void sub_0C8() { return; } // 25 - RVA 0x8E3640 + virtual void sub_0D0() { return; } // 26 - RVA 0x8E07D0 + virtual void sub_0D8() { return; } // 27 - RVA 0x8258190 + virtual void sub_0E0() { return; } // 28 - RVA 0x8E47B0 + virtual void sub_0E8() { return; } // 29 - RVA 0x8E2B50, return 0; + virtual void sub_0F0() { return; } // 30 - RVA 0x8E2B40, return 0; + + public: + Forms::TESGlobal* chanceGlobal; // 08 + void* keywordChances; // 10 - BSTArray>*, heap allocated 24 byte array + LEVELED_OBJECT* leveledLists; // 18 + std::uint8_t baseListCount; // 20 - number of LEVELED_OBJECT in leveledLists (the CK has no scriptAddedLists) + std::int8_t chanceNone; // 21 + std::int8_t llFlags; // 22 + std::int8_t maxUseAllCount; // 23 + std::uint32_t unk24; // 24 + }; + static_assert(sizeof(TESLeveledList) == 0x28); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESLoadScreen.h b/CKPE.Fallout4/Include/EditorAPI/T/TESLoadScreen.h new file mode 100644 index 00000000..c2f74bcf --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESLoadScreen.h @@ -0,0 +1,35 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x70, vtable RVA 0x30667C8, 124 virtual functions + class TESLoadScreen : + public TESForm, // 000 + public TESDescription // 028 + { + public: + virtual ~TESLoadScreen() = default; + + public: + std::uint8_t unk50[0x18]; // 50 + std::uint64_t unk68; // 68 + }; + static_assert(sizeof(TESLoadScreen) == 0x70); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESModel.h b/CKPE.Fallout4/Include/EditorAPI/T/TESModel.h new file mode 100644 index 00000000..411b7b7b --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESModel.h @@ -0,0 +1,60 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace BSResource + { + class ID; // BSResource::ID, array element of textures/materials (12 bytes) + } + + + namespace Forms + { + class BGSModelMaterialSwap; + } + + + // 1.11.240.0: size 0x38, vtable RVA 0x30212A0, 27 virtual functions + class TESModel : + public BaseFormComponent // 000 + { + public: + virtual ~TESModel() = default; + + virtual const char* GetModel() const noexcept(true) { return nullptr; } // 21 - RVA 0x35AFE0, return sub_14007126F(a1 + 8); + virtual void SetModelFromDialogBox(HWND hDialogBox, std::uint32_t nCtrlID) noexcept(true) { return; } // 22 - RVA 0x8EAA40 + virtual void SetModel(const char* lpModel) noexcept(true) { return; } // 23 - RVA 0x8E9370 + virtual Forms::BGSModelMaterialSwap* GetAsModelMaterialSwap() noexcept(true) { return nullptr; } // 24 - RVA 0x8B3330, return 0; + virtual void sub_0C8() { return; } // 25 - RVA 0x8EAAF0 + virtual void sub_0D0() { return; } // 26 - RVA 0x35AFF0 + + public: + BSFixedString modelName; // 08 + BSResource::ID* textures; // 10 + BSResource::ID* materials; // 18 + std::uint32_t* addons; // 20 + std::int8_t numTextures; // 28 + std::int8_t numTexturesSRGB; // 29 + std::int8_t numAddons; // 2A + std::int8_t numMaterials; // 2B + std::int8_t flags; // 2C + std::uint8_t unk2D[0x3]; // 2D + std::uint32_t unk30; // 30 - CK only (constant 2421 on construction) + std::uint32_t unk34; // 34 - CK only (constant 2420 on construction) + }; + static_assert(sizeof(TESModel) == 0x38); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESModelRDT.h b/CKPE.Fallout4/Include/EditorAPI/T/TESModelRDT.h new file mode 100644 index 00000000..1748d962 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESModelRDT.h @@ -0,0 +1,26 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x38, vtable RVA 0x301C5D8, 27 virtual functions + class TESModelRDT : + public TESModel // 000 + { + public: + virtual ~TESModelRDT() = default; + }; + static_assert(sizeof(TESModelRDT) == 0x38); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESModelTri.h b/CKPE.Fallout4/Include/EditorAPI/T/TESModelTri.h new file mode 100644 index 00000000..ad996bbe --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESModelTri.h @@ -0,0 +1,26 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x38, vtable RVA 0x3036450, 27 virtual functions + class TESModelTri : + public TESModel // 000 + { + public: + virtual ~TESModelTri() = default; + }; + static_assert(sizeof(TESModelTri) == 0x38); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESNPC.h b/CKPE.Fallout4/Include/EditorAPI/T/TESNPC.h index 8d990cc9..df35cac5 100644 --- a/CKPE.Fallout4/Include/EditorAPI/T/TESNPC.h +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESNPC.h @@ -1,125 +1,84 @@ -// Copyright © 2023-2024 aka perchik71. All rights reserved. +// Copyright © 2020-2025 aka CKPE team. All rights reserved. // Contacts: -// License: https://www.gnu.org/licenses/gpl-3.0.html +// License: https://www.gnu.org/licenses/lgpl-3.0.html #pragma once -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -namespace CreationKitPlatformExtended +namespace CKPE { - namespace EditorAPI + namespace Fallout4 { - namespace Fallout4 + namespace EditorAPI { - class TESNPC; - - // size = 0x40 - class TESActorBaseData + namespace Forms { - public: - virtual ~TESActorBaseData() = default; + class HeadRelatedData; + class TESClass; + class BGSListForm; + class TESCombatStyle; + class TESFurniture; + class BGSOutfit; + class TESFaction; + class BGSHeadPart; - enum TESActorFlags : uint64_t - { - nfFemale = 0x1, - nfEssential = 0x2, - nfCharGenFacePreset = 0x4, - nfRespawn = 0x8, - nfAutoCalcStats = 0x10, - nfUnique = 0x20, - nfDoesNotAffectStealthMeter = 0x40, - nfPCLevelMult = 0x80, // It is always set together with the parameter nfAutoCalcStats - nfSummonable = 0x400, - nfProtected = 0x800, - nfBleedoutOverride = 0x4000, - nfOppositeGenderAnims = 0x8000, - nfDoesNotBleed = 0x10000, - nfSimpleActor = 0x100000, - nfNoActivationOrHellos = 0x800000, - nfDiffuseAlphaTest = 0x1000000, - nfGhost = 0x20000000, - nfInvulnerable = 0x80000000, - }; - enum TESActorTemplateFlags : uint64_t - { - tfTraits = 1 << 16, - tfStats = 1 << 17, - tfFactions = 1 << 18, - tfSpellList = 1 << 19, - tfAIData = 1 << 20, - tfAIPackage = 1 << 21, - tfBaseData = 1 << 23, - tfInventory = 1 << 24, - tfScripts = 1 << 25, - tfDefaultPackList = 1 << 26, - tfAttackData = 1 << 27, - tfKeywowrds = 1 << 28, - }; + class BGSCharacterTint; + class Entries; - TESActorFlags Flags; // 08 - TESActorTemplateFlags TemplateFlags; // 10 - uint64_t unk18; // 18 - uint64_t unk20; // 20 - BGSVoiceType* VoiceType; // 28 - TESNPC* DefaultTemplate; // 30 - - struct TemplateInfo + // 1.11.240.0: size 0x3B8, vtable RVA 0x30465B0, 158 virtual functions + class TESNPC : + public TESActorBase, // 000 + public TESRaceForm, // 248 + public BGSOverridePackCollection, // 258 + public BGSForcedLocRefType, // 290 + public BGSNativeTerminalForm // 2A0 { - TESNPC* Traits; // 00 - TESNPC* Stats; // 08 - TESNPC* Factions; // 10 - TESNPC* SpellList; // 18 - TESNPC* AIData; // 20 - TESNPC* AIPackage; // 28 - char pad30[0x8]; // 30 ??? nullptr - TESNPC* BaseData; // 38 - TESNPC* Inventory; // 40 - TESNPC* Scripts; // 48 - TESNPC* DefaultPackList; // 50 - TESNPC* AttackData; // 58 - TESNPC* Keywowrds; // 60 - }; + public: + virtual ~TESNPC() = default; - TemplateInfo* Templates; - }; - static_assert(sizeof(TESActorBaseData::TemplateInfo) == 0x68); - static_assert(sizeof(TESActorBaseData) == 0x40); + constexpr static std::uint8_t TYPE_ID = ftActor; - - // size = 0x400 - // func = 158 - class TESNPC : public TESBoundAnimObject - { - public: - constexpr static uint8_t TYPE_ID = ftActor; - - virtual ~TESNPC() = default; - - TESActorBaseData* GetActorData() noexcept(true) { return &ActorData; } - - [[nodiscard]] inline bool HasFemale() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfFemale) == TESActorBaseData::nfFemale; } - [[nodiscard]] inline bool HasOppositeGenderAnims() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfOppositeGenderAnims) == TESActorBaseData::nfOppositeGenderAnims; } - [[nodiscard]] inline bool HasAutoCalcStats() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfAutoCalcStats) == TESActorBaseData::nfAutoCalcStats; } - [[nodiscard]] inline bool HasCharGenFacePreset() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfCharGenFacePreset) == TESActorBaseData::nfCharGenFacePreset; } - [[nodiscard]] inline bool HasEssential() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfEssential) == TESActorBaseData::nfEssential; } - [[nodiscard]] inline bool HasProtected() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfProtected) == TESActorBaseData::nfProtected; } - [[nodiscard]] inline bool HasRespawn() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfRespawn) == TESActorBaseData::nfRespawn; } - [[nodiscard]] inline bool HasUnique() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfUnique) == TESActorBaseData::nfUnique; } - [[nodiscard]] inline bool HasDoesNotAffectStealthMeter() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfDoesNotAffectStealthMeter) == TESActorBaseData::nfDoesNotAffectStealthMeter; } - [[nodiscard]] inline bool HasDiffuseAlphaTest() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfDiffuseAlphaTest) == TESActorBaseData::nfDiffuseAlphaTest; } - [[nodiscard]] inline bool HasSummonable() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfSummonable) == TESActorBaseData::nfSummonable; } - [[nodiscard]] inline bool HasGhost() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfGhost) == TESActorBaseData::nfGhost; } - [[nodiscard]] inline bool HasInvulnerable() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfInvulnerable) == TESActorBaseData::nfInvulnerable; } - [[nodiscard]] inline bool HasDoesNotBleed() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfDoesNotBleed) == TESActorBaseData::nfDoesNotBleed; } - [[nodiscard]] inline bool HasSimpleActor() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfSimpleActor) == TESActorBaseData::nfSimpleActor; } - [[nodiscard]] inline bool HasNoActivationOrHellos() const noexcept(true) { return (ActorData.Flags & TESActorBaseData::nfNoActivationOrHellos) == TESActorBaseData::nfNoActivationOrHellos; } - private: - TESActorBaseData ActorData; - }; - static_assert(sizeof(TESNPC) == 0xD0); + public: + BGSAttachParentArray attachParents; // 2B0 + std::uint8_t data[0x8]; // 2D0 - NPC_DATA (saved as an 8 byte record) + TESClass* cl; // 2D8 + HeadRelatedData* headRelatedData; // 2E0 - read by GetHairColor + BGSListForm* giftFilter; // 2E8 + TESCombatStyle* combatStyle; // 2F0 + NiAPI::NiPoint3 morphWeight; // 2F8 - thin/muscular/fat, FLT_MAX means unset + float height; // 304 + float heightMax; // 308 + std::uint32_t unk30C; // 30C + TESNPC* faceNPC; // 310 + BGSLocalizedString shortName; // 318 + BGSSkinForm farSkin; // 328 + BGSLocalizedString unk340; // 340 + TESFurniture* powerArmorFurn; // 350 + BGSOutfit* defOutfit; // 358 + BGSOutfit* sleepOutfit; // 360 + BGSListForm* defaultPackList; // 368 + TESFaction* crimeFaction; // 370 + BGSHeadPart** headParts; // 378 + std::uint8_t unk380[0x10]; // 380 + std::int8_t numHeadParts; // 390 + std::uint8_t unk391[0x7]; // 391 + std::uint8_t unk398[0x10]; // 398 + void* morphSliderValues; // 3A8 - BSTHashMap* + void* tintingData; // 3B0 - BGSCharacterTint::Entries* + }; + static_assert(sizeof(TESNPC) == 0x3B8); + } } } } diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObject.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObject.h index 0e2b02a6..89aed3cd 100644 --- a/CKPE.Fallout4/Include/EditorAPI/T/TESObject.h +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObject.h @@ -15,30 +15,32 @@ namespace CKPE { namespace Forms { - // `class TESForm`: VTable[0x0000000002F83448, 0x0000000000000000 offset, 124 functions] `. ? AVTESForm@@` - // `class TESObject`: VTable [0x0000000002FF3A20, 0x0000000000000000 offset, 136 functions] `.?AVTESObject@@` - class TESObject : public TESForm + class TESWaterForm; + + // CK 1.11.240.0: size 0x30, vtable RVA 0x2FF3A20, 136 virtual functions (TESForm has 124) + // `class TESObject`: `.?AVTESObject@@` + class TESObject : + public TESForm // 000 { private: - /*028*/ char pad28[8]; + char pad28[8]; // 28 public: virtual ~TESObject() = default; - // add - virtual void Unk_3B(void); // 3B - { return 0; } - virtual bool IsBoundAnimObject(); // 3C - { return false; } - //[[nodiscard]] virtual TESWaterForm* GetWaterType() const; // 3D - { return 0; } - [[nodiscard]] virtual bool IsAutoCalc() const; // 3E - { return false; } - virtual void SetAutoCalc(bool a_autoCalc); // 3F - { return; } - //virtual NiAVObject* Clone3D(TESObjectREFR* a_ref, bool a_arg3); // 40 - { return 0; } - virtual void UnClone3D(TESObjectREFR* a_ref); // 41 - virtual bool IsMarker(); // 42 - virtual bool IsOcclusionMarker(); // 43 - { return formType == FormType::Static && this == Plane/Room/PortalMarker; } - virtual bool ReplaceModel(); // 44 - virtual std::uint32_t IncRef(); // 45 - { return 0; } - virtual std::uint32_t DecRef(); // 46 - { return 0; } - //virtual NiAVObject* LoadGraphics(TESObjectREFR* a_ref); // 47 + virtual bool IsBoundAnimObject() noexcept(true) { return false; } // 124 - { return 0; } + virtual Forms::TESWaterForm* GetWaterType() const noexcept(true) { return nullptr; } // 125 - { return 0; } + virtual bool IsAutoCalc() const noexcept(true) { return false; } // 126 - { return 0; } + virtual void SetAutoCalc(bool bAutoCalc) noexcept(true) { return; } // 127 + virtual void Clone3D(void* pRequester, void* pObj3D, bool bBackground) noexcept(true) { return; } // 128 + virtual void UnClone3D(void* pRequester) noexcept(true) { return; } // 129 + virtual bool IsMarker() noexcept(true) { return false; } // 130 - tests TESForm flag 0x800000 + virtual bool IsOcclusionMarker() noexcept(true) { return false; } // 131 - verified: formType == ftStatic && this is one of the Plane/Room/Portal marker statics + virtual bool ReplaceModel() noexcept(true) { return false; } // 132 + virtual std::uint32_t IncRef() noexcept(true) { return 0; } // 133 - { return 0; } + virtual std::uint32_t DecRef() noexcept(true) { return 0; } // 134 - { return 0; } + virtual void* LoadGraphics(void* pRequester) noexcept(true) { return nullptr; } // 135 }; + static_assert(sizeof(TESObject) == 0x30); } } } diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectACTI.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectACTI.h new file mode 100644 index 00000000..b083cf57 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectACTI.h @@ -0,0 +1,66 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + class TESWaterForm; + + // 1.11.240.0: size 0x1E8, vtable RVA 0x3092248, 154 virtual functions + class __declspec(empty_bases) TESObjectACTI : + public TESBoundAnimObject, // 000 + public TESFullName, // 090 + public BGSModelMaterialSwap, // 0A8 + public BGSDestructibleObjectForm, // 0F8 + public BGSOpenCloseForm, // 108 + public BGSKeywordForm, // 110 + public BGSPropertySheet, // 130 + public BGSForcedLocRefType, // 140 + public BGSNativeTerminalForm, // 150 + public TESMagicTargetForm, // 160 + public BGSNavmeshableObject // 160 + { + public: + virtual ~TESObjectACTI() = default; + + public: + BGSSoundDescriptorForm* soundLoop; // 160 + BGSSoundDescriptorForm* soundActivate; // 168 + TESWaterForm* waterForm; // 170 + std::uint16_t flags; // 178 + std::uint8_t unk17A[0x6]; // 17A + std::uint16_t unk180; // 180 + std::uint8_t unk182[0x6]; // 182 + BGSLocalizedString unk188; // 188 + std::uint8_t unk198[0x10]; // 198 + std::uint8_t unk1A8[0x10]; // 1A8 + std::uint8_t unk1B8[0x10]; // 1B8 + std::uint64_t unk1C8; // 1C8 + std::uint8_t unk1D0[0x18]; // 1D0 + }; + static_assert(sizeof(TESObjectACTI) == 0x1E8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectANIO.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectANIO.h new file mode 100644 index 00000000..b415c53e --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectANIO.h @@ -0,0 +1,35 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x80, vtable RVA 0x3093250, 124 virtual functions + class TESObjectANIO : + public TESForm, // 000 + public BGSModelMaterialSwap // 028 + { + public: + virtual ~TESObjectANIO() = default; + + public: + BSFixedString unloadEventName; // 78 + }; + static_assert(sizeof(TESObjectANIO) == 0x80); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectARMA.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectARMA.h new file mode 100644 index 00000000..0dd2cb16 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectARMA.h @@ -0,0 +1,67 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSTextureSet; + class BGSListForm; + + class BGSArtObject; + + class BGSFootstepSet; + + struct OBJ_ARMA + { + std::int8_t priorities[2]; // 00 + std::int8_t modelRange[2]; // 02 + std::int8_t unused[2]; // 04 + std::int8_t soundValue; // 06 + float weaponAdjust; // 08 + }; + static_assert(sizeof(OBJ_ARMA) == 0xC); + + // 1.11.240.0: size 0x298, vtable RVA 0x30939E8, 136 virtual functions + class TESObjectARMA : + public TESObject, // 000 + public TESRaceForm, // 030 + public BGSBipedObjectForm // 040 + { + public: + virtual ~TESObjectARMA() = default; + + public: + OBJ_ARMA data; // 50 + std::uint32_t unk5C; // 5C + BGSModelMaterialSwap bipedModel[2]; // 60 + BGSModelMaterialSwap bipedModelFacebones[2]; // 100 + BGSModelMaterialSwap bipedModel1stPerson[2]; // 1A0 + BGSTextureSet* skinTextures[2]; // 240 + BGSListForm* skinTextureSwapLists[2]; // 250 + BSTArray additionalRaces; // 260 - BSTArray + BGSFootstepSet* footstepSet; // 278 + BGSArtObject* artObject; // 280 + std::uint64_t unk288; // 288 + std::uint64_t unk290; // 290 + }; + static_assert(sizeof(TESObjectARMA) == 0x298); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectARMO.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectARMO.h index e0c4125a..94369cee 100644 --- a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectARMO.h +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectARMO.h @@ -1,14 +1,26 @@ -// Copyright © 2023-2025 aka CKPE team. All rights reserved. +// Copyright © 2020-2025 aka CKPE team. All rights reserved. // Contacts: // License: https://www.gnu.org/licenses/lgpl-3.0.html #pragma once +#include #include -#include #include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace CKPE { @@ -18,34 +30,45 @@ namespace CKPE { namespace Forms { - // size = 0x3C0 - // func = 154 - class TESObjectARMO : public TESBoundObject, public TESFullName + // 1.11.240.0: size 0x3C0, vtable RVA 0x3094C30, 154 virtual functions + class TESObjectARMO : + public TESBoundObject, // 000 + public TESFullName, // 090 + public TESRaceForm, // 0A8 + public TESEnchantableForm, // 0B8 + public BGSDestructibleObjectForm, // 0D0 + public BGSPickupPutdownSounds, // 0E0 + public TESBipedModelForm, // 0F8 + public BGSEquipType, // 288 + public BGSBipedObjectForm, // 298 + public BGSBlockBashData, // 2A8 + public BGSKeywordForm, // 2C0 + public TESDescription, // 2E0 + public BGSInstanceNamingRulesForm // 308 { public: virtual ~TESObjectARMO() = default; + public: - inline BGSModelMaterialSwap& GetMaleModel() { return _MaleModel; } - inline BGSModelMaterialSwap& GetWomanModel() { return _WomanModel; } - inline TESForm* GetRace() { return _RaceForm; } - inline BGSKeyword** GetKeywords() { return _Keywords; } - inline std::uint32_t GetKeywordCount() const { return _KeywordCount; } - private: - char padA8[0x8]; - TESForm* _RaceForm; - char padB8[0x48]; - BGSModelMaterialSwap _MaleModel; - BGSModelMaterialSwap _WomanModel; - // Old data (Message icons and model) - char pad1A0[0xB0]; - // TESModelRDT - char pad250[0x80]; - BGSKeyword** _Keywords; - std::uint32_t _KeywordCount; - char pad2DC[0xE4]; + std::uint64_t unk318; // 318 + std::uint64_t unk320; // 320 + std::uint64_t unk328; // 328 + std::uint64_t unk330; // 330 + std::uint64_t unk338; // 338 + std::uint64_t unk340; // 340 + std::uint64_t unk348; // 348 + std::uint64_t unk350; // 350 + std::uint32_t unk358; // 358 + std::uint8_t unk35C[0x8]; // 35C + std::uint8_t unk364[0x8]; // 364 + std::uint32_t unk36C; // 36C + BSTArray modelArray; // 370 - BSTArray + TESObjectARMO* armorTemplate; // 388 + BGSAttachParentArray attachParents; // 390 + std::uint8_t unk3B0[0x10]; // 3B0 }; static_assert(sizeof(TESObjectARMO) == 0x3C0); } } } -} \ No newline at end of file +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectBOOK.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectBOOK.h new file mode 100644 index 00000000..5a360879 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectBOOK.h @@ -0,0 +1,60 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESObjectSTAT; + + // 1.11.240.0: size 0x248, vtable RVA 0x3095FA8, 154 virtual functions + class TESObjectBOOK : + public TESBoundObject, // 000 + public TESFullName, // 090 + public BGSModelMaterialSwap, // 0A8 + public TESIcon, // 0F8 + public TESValueForm, // 120 + public TESWeightForm, // 130 + public TESDescription, // 140 + public BGSDestructibleObjectForm, // 168 + public BGSMessageIcon, // 178 + public BGSPickupPutdownSounds, // 1A8 + public BGSKeywordForm, // 1C0 + public BGSFeaturedItemMessage // 1E0 + { + public: + virtual ~TESObjectBOOK() = default; + + public: + std::uint8_t data[0x18]; // 1F0 - OBJ_BOOK + TESObjectSTAT* inventoryModel; // 208 + std::uint64_t unk210; // 210 + std::uint64_t unk218; // 218 + TESDescription unk220; // 220 + }; + static_assert(sizeof(TESObjectBOOK) == 0x248); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectCELL.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectCELL.h index da19dfae..a4cea371 100644 --- a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectCELL.h +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectCELL.h @@ -18,7 +18,9 @@ namespace CKPE { namespace Forms { - class TESObjectCELL : public TESForm, public TESFullName + class TESObjectCELL : + public TESForm, // 000 + public TESFullName // 028 { public: constexpr static std::uint8_t TYPE_ID = ftCell; @@ -108,6 +110,7 @@ namespace CKPE char _pad3[0x8]; TESFormArray* _navmeshes; BSTArray _items; + char pad98[0xD8]; // 98 - up to 170 (see the TESObjectCELL generated layout notes in docs) public: [[nodiscard]] inline const TESObjectREFR** GetItemsConst() const noexcept(true) { return (const TESObjectREFR**)_items.data(); } [[nodiscard]] inline TESObjectREFR** GetItems() noexcept(true) { return (TESObjectREFR**)_items.data(); } @@ -145,6 +148,7 @@ namespace CKPE public: virtual ~TESObjectCELL() = default; }; + static_assert(sizeof(TESObjectCELL) == 0x170); } } } diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectCONT.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectCONT.h new file mode 100644 index 00000000..36b61d7b --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectCONT.h @@ -0,0 +1,69 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + class BGSListForm; + + struct CONT_DATA + { + std::int8_t contFlags; // 00 + }; + static_assert(sizeof(CONT_DATA) == 0x1); + + // 1.11.240.0: size 0x220, vtable RVA 0x3097668, 154 virtual functions + class TESObjectCONT : + public TESBoundAnimObject, // 000 + public TESContainer, // 090 + public TESFullName, // 108 + public BGSModelMaterialSwap, // 120 + public TESWeightForm, // 170 + public BGSDestructibleObjectForm, // 180 + public BGSOpenCloseForm, // 190 + public BGSKeywordForm, // 198 + public BGSForcedLocRefType, // 1B8 + public BGSPropertySheet, // 1C8 + public BGSNativeTerminalForm, // 1D8 + public TESMagicCasterForm, // 1E8 + public TESMagicTargetForm // 1E9 + { + public: + virtual ~TESObjectCONT() = default; + + public: + CONT_DATA data; // 1E9 + std::uint8_t unk1EA[0x6]; // 1EA + BGSSoundDescriptorForm* openSound; // 1F0 + BGSSoundDescriptorForm* closeSound; // 1F8 + BGSSoundDescriptorForm* takeAllSound; // 200 + BGSListForm* containsOnlyList; // 208 + std::uint8_t unk210[0x10]; // 210 + }; + static_assert(sizeof(TESObjectCONT) == 0x220); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectDOOR.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectDOOR.h new file mode 100644 index 00000000..9727ae28 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectDOOR.h @@ -0,0 +1,60 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + + // 1.11.240.0: size 0x1B0, vtable RVA 0x3098BB8, 154 virtual functions + class TESObjectDOOR : + public TESBoundAnimObject, // 000 + public TESFullName, // 090 + public BGSModelMaterialSwap, // 0A8 + public BGSDestructibleObjectForm, // 0F8 + public BGSOpenCloseForm, // 108 + public BGSKeywordForm, // 110 + public BGSNativeTerminalForm, // 130 + public TESMagicCasterForm, // 140 + public TESMagicTargetForm // 141 + { + public: + virtual ~TESObjectDOOR() = default; + + public: + std::uint8_t unk141[0x7]; // 141 + BGSLocalizedString altOpenText; // 148 - by position (same member order and sizes as the game after the last base) + BGSLocalizedString altCloseText; // 158 - by position (same member order and sizes as the game after the last base) + BGSSoundDescriptorForm* openSound; // 168 - by position (same member order and sizes as the game after the last base) + BGSSoundDescriptorForm* closeSound; // 170 - by position (same member order and sizes as the game after the last base) + BGSSoundDescriptorForm* loopSound; // 178 - by position (same member order and sizes as the game after the last base) + std::int8_t flags; // 180 - by position (same member order and sizes as the game after the last base) + std::uint8_t unk181[0x7]; // 181 + std::uint8_t unk188[0x10]; // 188 + BSTArray randomTeleports; // 198 - BSTArray, by position (same member order and sizes as the game after the last base) + }; + static_assert(sizeof(TESObjectDOOR) == 0x1B0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectLIGH.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectLIGH.h index 40e21415..dd604c28 100644 --- a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectLIGH.h +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectLIGH.h @@ -1,10 +1,24 @@ -// Copyright © 2023-2025 aka CKPE team. All rights reserved. +// Copyright © 2020-2025 aka CKPE team. All rights reserved. // Contacts: // License: https://www.gnu.org/licenses/lgpl-3.0.html #pragma once -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include namespace CKPE @@ -15,23 +29,67 @@ namespace CKPE { namespace Forms { - // size = 0x268 - class TESObjectLIGH : public TESForm + struct OBJ_LIGH + { + std::int32_t time; // 00 + std::uint32_t radius; // 04 + std::uint32_t color; // 08 + std::uint32_t flags; // 0C - REX::TEnumSet + float fallOffExponent; // 10 + float fov; // 14 + float nearDistance; // 18 + float flickerPeriodRecip; // 1C + float flickerIntensityAmplitude; // 20 + float flickerMovementAmplitude; // 24 + float attenConstant; // 28 + float attenScalar; // 2C + float attenExponent; // 30 + float godrayNearClipDistance; // 34 + }; + static_assert(sizeof(OBJ_LIGH) == 0x38); + + class BGSSoundDescriptorForm; + class BGSLensFlare; + class BGSGodRays; + + // 1.11.240.0: size 0x268, vtable RVA 0x308F650, 154 virtual functions + class TESObjectLIGH : + public TESBoundAnimObject, // 000 + public TESFullName, // 090 + public BGSModelMaterialSwap, // 0A8 + public TESIcon, // 0F8 + public BGSMessageIcon, // 120 + public TESWeightForm, // 150 + public TESValueForm, // 160 + public BGSDestructibleObjectForm, // 170 + public BGSEquipType, // 180 + public BGSPropertySheet, // 190 + public BGSOpenCloseForm, // 1A0 + public BGSKeywordForm // 1A8 { public: + virtual ~TESObjectLIGH() = default; + constexpr static std::uint8_t TYPE_ID = ftLight; - virtual ~TESObjectLIGH() = default; - - [[nodiscard]] inline NiAPI::NiRGB GetSpecularColor() const noexcept(true) { return m_SpecularColor; } - + [[nodiscard]] inline NiAPI::NiRGB GetSpecularColor() const noexcept(true) { return *reinterpret_cast(&data.color); } + CKPE_READ_PROPERTY(GetSpecularColor) NiAPI::NiRGB SpecularColor; - private: - char pad28[0x1B8]; - NiAPI::NiRGB m_SpecularColor; + + public: + std::uint8_t unk1C8[0x10]; // 1C8 + OBJ_LIGH data; // 1D8 - DATA (the 3 bytes at 0x1E0 were named m_SpecularColor: they are data.color) + float fade; // 210 - FNAM + std::uint32_t unk214; // 214 + BGSSoundDescriptorForm* sound; // 218 - SNAM + TESTexture goboTexture; // 220 - NAM0 + std::uint8_t emittanceColor[0xC]; // 248 - NiColor, by position after goboTexture + std::uint32_t unk254; // 254 + BGSLensFlare* lensFlare; // 258 - LNAM + BGSGodRays* godRays; // 260 - WGDR }; - static_assert(sizeof(TESObjectLIGH) == 0x1E8); + static_assert(sizeof(TESObjectLIGH) == 0x268); } } } -} \ No newline at end of file +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectMISC.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectMISC.h new file mode 100644 index 00000000..3724a7c3 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectMISC.h @@ -0,0 +1,56 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x1E8, vtable RVA 0x3099A10, 156 virtual functions + class TESObjectMISC : + public TESBoundObject, // 000 + public TESFullName, // 090 + public BGSModelMaterialSwap, // 0A8 + public TESIcon, // 0F8 + public TESValueForm, // 120 + public TESWeightForm, // 130 + public BGSDestructibleObjectForm, // 140 + public BGSMessageIcon, // 150 + public BGSPickupPutdownSounds, // 180 + public BGSKeywordForm, // 198 + public BGSFeaturedItemMessage // 1B8 + { + public: + virtual ~TESObjectMISC() = default; + + virtual void sub_4D0() { return; } // 154 - RVA 0xC4B350 + virtual void sub_4D8() { return; } // 155 - RVA 0xC4B340 + + public: + BSTArray componentData; // 1C8 - BSTArray>* + std::uint64_t unk1E0; // 1E0 + }; + static_assert(sizeof(TESObjectMISC) == 0x1E8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectSTAT.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectSTAT.h new file mode 100644 index 00000000..7668d28e --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectSTAT.h @@ -0,0 +1,58 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSMaterialObject; + + struct TESObjectSTATData + { + BGSMaterialObject* materialObj; // 00 + float materialThresholdAngle; // 08 + float leafAmplitude; // 0C + float leafFrequency; // 10 + }; + static_assert(sizeof(TESObjectSTATData) == 0x18); + + // 1.11.240.0: size 0x148, vtable RVA 0x309AC88, 154 virtual functions + class TESObjectSTAT : + public TESBoundObject, // 000 + public TESFullName, // 090 + public BGSModelMaterialSwap, // 0A8 + public BGSPropertySheet, // 0F8 + public BGSForcedLocRefType, // 108 + public BGSNavmeshableObject // 118 + { + public: + virtual ~TESObjectSTAT() = default; + + public: + TESObjectSTATData data; // 118 + std::uint32_t unk130; // 130 + std::uint32_t unk134; // 134 + std::uint64_t unk138; // 138 + std::uint8_t unk140; // 140 + std::uint8_t unk141[0x7]; // 141 + }; + static_assert(sizeof(TESObjectSTAT) == 0x148); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectTREE.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectTREE.h new file mode 100644 index 00000000..e45c0c33 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectTREE.h @@ -0,0 +1,60 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BaseTreeData; + + struct OBJ_TREE + { + float trunkFlexibility; // 00 + float branchFlexibility; // 04 + float trunkAmplitude; // 08 + float frontAmplitude; // 0C + float backAmplitude; // 10 + float sideAmplitude; // 14 + float frontFrequency; // 18 + float backFrequency; // 1C + float sideFrequency; // 20 + float leafFlexibility; // 24 + float leafAmplitude; // 28 + float leafFrequency; // 2C + }; + static_assert(sizeof(OBJ_TREE) == 0x30); + + // 1.11.240.0: size 0x158, vtable RVA 0x309B7D8, 154 virtual functions + class TESObjectTREE : + public TESBoundObject, // 000 + public BGSModelMaterialSwap, // 090 + public TESFullName, // 0E0 + public TESProduceForm // 0F8 + { + public: + virtual ~TESObjectTREE() = default; + + public: + OBJ_TREE data; // 118 + BaseTreeData* baseData; // 148 + std::int32_t type; // 150 - REX::TEnumSet + std::uint32_t unk154; // 154 + }; + static_assert(sizeof(TESObjectTREE) == 0x158); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESObjectWEAP.h b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectWEAP.h new file mode 100644 index 00000000..c2622e92 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESObjectWEAP.h @@ -0,0 +1,137 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class ActorValueInfo; + class BGSAimModel; + class BGSEquipSlot; + class BGSImpactDataSet; + class BGSSoundDescriptorForm; + class BGSZoomData; + class SpellItem; + class TESAmmo; + class TESLevItem; + + struct TESObjectWEAPData + { + std::uint8_t tboInstanceData[0x10]; // 00 - TBO_InstanceData (vptr, refcount) + BGSSoundDescriptorForm* attackSound; // 10 + BGSSoundDescriptorForm* attackSound2D; // 18 + BGSSoundDescriptorForm* attackLoop; // 20 + BGSSoundDescriptorForm* attackFailSound; // 28 + BGSSoundDescriptorForm* idleSound; // 30 + BGSSoundDescriptorForm* equipSound; // 38 + BGSSoundDescriptorForm* unEquipSound; // 40 + BGSSoundDescriptorForm* fastEquipSound; // 48 + void* blockBashData; // 50 - BGSBlockBashData* + BGSImpactDataSet* impactDataSet; // 58 + TESLevItem* npcAddAmmoList; // 60 + TESAmmo* ammo; // 68 + BGSEquipSlot* equipSlot; // 70 + SpellItem* effect; // 78 + void* keywords; // 80 - BGSKeywordForm* + BGSAimModel* aimModel; // 88 + BGSZoomData* zoomData; // 90 + void* rangedData; // 98 - RangedData* + void* enchantments; // A0 - BSTArray* + void* materialSwaps; // A8 - BSTArray* + void* damageTypes; // B0 - BSTArray>* + void* actorValues; // B8 - BSTArray>* + float attackSeconds; // C0 + float reloadSpeed; // C4 + float speed; // C8 + float reach; // CC + float minRange; // D0 + float maxRange; // D4 + float attackDelaySec; // D8 + float damageToWeaponMult; // DC + float outOfRangeDamageMult; // E0 + float secondaryDamage; // E4 + float criticalChargeBonus; // E8 + float weight; // EC + float soundLevelMult; // F0 + float attackActionPointCost; // F4 + float fullPowerSeconds; // F8 + float minPowerPerShot; // FC + float colorRemappingIndex; // 100 + float criticalDamageMult; // 104 + std::int32_t staggerValue; // 108 - REX::TEnumSet + std::uint32_t value; // 10C + std::uint32_t flags; // 110 - REX::TEnumSet + std::int32_t soundLevel; // 114 - REX::TEnumSet + std::int32_t hitBehavior; // 118 - REX::TEnumSet + ActorValueInfo* skill; // 120 + ActorValueInfo* resistance; // 128 + std::uint16_t ammoCapacity; // 130 + std::uint16_t attackDamage; // 132 + std::uint16_t rank; // 134 + std::int8_t accuracyBonus; // 136 + std::uint8_t type; // 137 - REX::TEnum + }; + static_assert(sizeof(TESObjectWEAPData) == 0x138); + + // 1.11.240.0: size 0x3B0, vtable RVA 0x309E6E0, 154 virtual functions + class TESObjectWEAP : + public TESBoundObject, // 000 + public TESFullName, // 090 + public BGSModelMaterialSwap, // 0A8 + public TESIcon, // 0F8 + public TESEnchantableForm, // 120 + public BGSDestructibleObjectForm, // 138 + public BGSEquipType, // 148 + public BGSPreloadable, // 158 + public BGSMessageIcon, // 160 + public BGSPickupPutdownSounds, // 190 + public BGSBlockBashData, // 1A8 + public BGSKeywordForm, // 1C0 + public TESDescription, // 1E0 + public BGSInstanceNamingRulesForm // 208 + { + public: + virtual ~TESObjectWEAP() = default; + + public: + TESObjectWEAPData weaponData; // 218 - TESObjectWEAP::Data (0x138, starts with a vptr) + void* firstPersonModel; // 350 - BGSModelMaterialSwap* + TESObjectWEAP* weaponTemplate; // 358 + void* embeddedWeaponMod; // 360 - BGSMod::Attachment::Mod* + BGSAttachParentArray attachParents; // 368 + std::uint32_t unk388; // 388 + std::uint32_t unk38C; // 38C + std::uint64_t unk390; // 390 + std::uint32_t unk398; // 398 + std::uint32_t unk39C; // 39C + std::uint8_t unk3A0[0x10]; // 3A0 + }; + static_assert(sizeof(TESObjectWEAP) == 0x3B0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESPackage.h b/CKPE.Fallout4/Include/EditorAPI/T/TESPackage.h new file mode 100644 index 00000000..93c535e4 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESPackage.h @@ -0,0 +1,86 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESPackageData; + class PackageLocation; + class PackageTarget; + + class TESCombatStyle; + class TESQuest; + + struct PACKAGE_DATA + { + std::uint32_t packFlags; // 00 + std::int8_t packType; // 04 + std::int8_t interruptOverrideType; // 05 + std::int8_t maxSpeed; // 06 + std::uint16_t foBehaviorFlags; // 08 + std::uint16_t packageSpecificFlags; // 0A + }; + static_assert(sizeof(PACKAGE_DATA) == 0xC); + + struct PACK_SCHED_DATA + { + std::int8_t month; // 00 + std::int8_t dayOfWeek; // 01 + std::int8_t date; // 02 + std::int8_t hour; // 03 + std::int8_t min; // 04 + std::int32_t duration; // 08 + }; + static_assert(sizeof(PACK_SCHED_DATA) == 0xC); + + struct PackageSchedule + { + PACK_SCHED_DATA psData; // 00 + }; + static_assert(sizeof(PackageSchedule) == 0xC); + + // 1.11.240.0: size 0x118, vtable RVA 0x3006220, 124 virtual functions + class TESPackage : + public TESForm // 000 + { + public: + virtual ~TESPackage() = default; + + public: + PACKAGE_DATA data; // 28 + std::uint32_t unk34; // 34 + TESPackageData* packData; // 38 + PackageLocation* packLoc; // 40 + PackageTarget* packTarg; // 48 + BGSIdleCollection* idleCollection; // 50 + PackageSchedule packSched; // 58 + std::uint8_t unk64[0x4]; // 64 + std::uint8_t packConditions[0x18]; // 68 - TESCondition (0x18 in the CK) + TESCombatStyle* combatStyle; // 80 + TESQuest* ownerQuest; // 88 + std::uint8_t onBegin[0x20]; // 90 - PackageEventAction (0x20 in the CK) + std::uint8_t onEnd[0x20]; // B0 - PackageEventAction + std::uint8_t onChange[0x20]; // D0 - PackageEventAction + std::uint64_t unkF0; // F0 + std::uint64_t unkF8; // F8 + std::uint64_t unk100; // 100 + std::uint64_t unk108; // 108 + std::uint64_t unk110; // 110 + }; + static_assert(sizeof(TESPackage) == 0x118); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESProduceForm.h b/CKPE.Fallout4/Include/EditorAPI/T/TESProduceForm.h new file mode 100644 index 00000000..c7c80cfb --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESProduceForm.h @@ -0,0 +1,38 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + class TESBoundObject; + } + + // 1.11.240.0: size 0x20, vtable RVA 0x30219D8, 21 virtual functions + class TESProduceForm : + public BaseFormComponent // 000 + { + public: + virtual ~TESProduceForm() = default; + + public: + Forms::BGSSoundDescriptorForm* harvestSound; // 08 + Forms::TESBoundObject* produceItem; // 10 + std::int8_t produceChance[4]; // 18 + std::uint32_t unk1C; // 1C + }; + static_assert(sizeof(TESProduceForm) == 0x20); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESQuest.h b/CKPE.Fallout4/Include/EditorAPI/T/TESQuest.h index 6664590e..f74e5c18 100644 --- a/CKPE.Fallout4/Include/EditorAPI/T/TESQuest.h +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESQuest.h @@ -1,10 +1,15 @@ -// Copyright © 2023-2025 aka CKPE team. All rights reserved. +// Copyright © 2020-2025 aka CKPE team. All rights reserved. // Contacts: // License: https://www.gnu.org/licenses/lgpl-3.0.html #pragma once -#include +#include +#include +#include +#include +#include +#include namespace CKPE { @@ -14,20 +19,77 @@ namespace CKPE { namespace Forms { - // size = 0x270 - // func = 129 - class TESQuest : public TESForm + class BGSLocation; + + struct QUEST_DATA + { + float questDelayTime; // 00 + std::uint16_t flags; // 04 + std::int8_t priority; // 06 + std::int8_t questType; // 07 + }; + static_assert(sizeof(QUEST_DATA) == 0x8); + + // 1.11.240.0: size 0x270, vtable RVA 0x304A590, 129 virtual functions + class TESQuest : + public BGSStoryManagerTreeForm, // 000 + public TESFullName // 028 { public: + virtual ~TESQuest() = default; + constexpr static std::uint8_t TYPE_ID = ftQuest; - virtual ~TESQuest() = default; + virtual void sub_400() { return; } // 128 - RVA 0xACB470, return a1 + 224; + public: - private: - char pad28[0x248]; + BSTArray aliases; // 40 - BSTArray + std::uint32_t unk58; // 58 + std::uint32_t unk5C; // 5C + BGSLocation* nonDormantLocation; // 60 - LNAM + std::uint64_t unk68; // 68 + BSFixedString swfFile; // 70 - SNAM + std::uint64_t filter; // 78 - FLTR chunk (CK only), string + std::uint32_t unk80; // 80 + std::uint32_t unk84; // 84 + std::uint64_t unk88; // 88 + std::uint64_t unk90; // 90 + std::uint64_t unk98; // 98 + std::uint8_t unkA0; // A0 + std::uint8_t unkA1[0x3]; // A1 + QUEST_DATA data; // A4 + std::uint32_t eventID; // AC - ENAM + BSTArray stages; // B0 - BSTArray + BSTArray unkC8; // C8 - element type not identified yet + std::uint8_t objConditions[0x18]; // E0 - TESCondition (0x18 bytes in the CK, vptr + list head + owner; both owners are set after construction) + std::uint8_t storyManagerConditions[0x18]; // F8 - TESCondition + std::uint8_t unk110[0xC]; // 110 + std::uint8_t unk11C[0x8]; // 11C + std::uint32_t unk124; // 124 + std::uint64_t unk128; // 128 + std::uint32_t unk130; // 130 + std::uint8_t unk134[0xC]; // 134 + std::uint64_t unk140; // 140 + std::uint8_t unk148[0xC]; // 148 + std::uint8_t unk154[0x8]; // 154 + std::uint32_t unk15C; // 15C + std::uint64_t unk160; // 160 + std::uint32_t unk168; // 168 + std::uint8_t unk16C[0xC]; // 16C + std::uint64_t unk178; // 178 + BSTArray topics[6]; // 180 - BSTArray[6] (destructor loops over 6 arrays) + BSTArray unk210; // 210 - element type not identified yet + void* textGlobal; // 228 - BSTArray* + std::uint64_t unk230; // 230 + std::uint8_t unk238; // 238 + std::uint8_t unk239[0x7]; // 239 + std::uint64_t unk240; // 240 + BSTArray unk248; // 248 - element type not identified yet + std::uint64_t unk260; // 260 + std::uint64_t unk268; // 268 }; static_assert(sizeof(TESQuest) == 0x270); } } } -} \ No newline at end of file +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESRace.h b/CKPE.Fallout4/Include/EditorAPI/T/TESRace.h new file mode 100644 index 00000000..993be079 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESRace.h @@ -0,0 +1,117 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSVoiceType; + class BGSBodyPartData; + class ActorValueInfo; + + + class BGSMaterialType; + class BGSArtObject; + class BGSTextureSet; + class BGSSoundDescriptorForm; + class TESObjectWEAP; + class TESQuest; + + // 1.11.240.0: size 0xC28, vtable RVA 0x304C8C8, 125 virtual functions + class TESRace : + public TESForm, // 000 + public TESFullName, // 028 + public TESDescription, // 040 + public TESSpellList, // 068 + public BGSSkinForm, // 078 + public BGSBipedObjectForm, // 090 + public BGSKeywordForm, // 0A0 + public BGSAttackDataForm, // 0C0 + public BGSPropertySheet, // 0D0 + public BGSPreloadable // 0E0 + { + public: + virtual ~TESRace() = default; + + virtual void sub_3E0() { return; } // 124 - RVA 0xB1C9E0 + + public: + TESModel skeletonModel[2]; // E8 + TESModel skeletonChargenModel[2]; // 158 + std::uint8_t data[0x100]; // 1C8 - RACE_DATA + float clampFaceGeoValue; // 2C8 + float clampFaceGeoValue2; // 2CC + BGSTextureModel bodyTextureModels[2]; // 2D0 + BGSBehaviorGraphModel behaviorGraph[2]; // 340 + BSFixedString rootBehaviorGraphName[2]; // 3B0 - the CK has a single name array (no behaviorGraphProjectName) + BGSVoiceType* defaultVoiceType[2]; // 3C0 + BGSBodyPartData* bodyPartData; // 3D0 + BGSSoundTagComponent unk3D8; // 3D8 + BGSAttachParentArray unk3E0; // 3E0 + std::uint8_t unk400[0x80]; // 400 + std::uint64_t unk480; // 480 + BGSMaterialType* bloodImpactMaterial; // 488 - by order before meatCapTextureSet + BGSArtObject* dismemberBlood; // 490 - by order before meatCapTextureSet + BGSTextureSet* meatCapTextureSet; // 498 - CNAM + BGSTextureSet* meatCollarTextureSet; // 4A0 - by order after meatCapTextureSet + BGSSoundDescriptorForm* corpseOpenSound; // 4A8 - ONAM + BGSSoundDescriptorForm* corpseCloseSound; // 4B0 - LNAM + BSFixedString bipedObjectNames[32]; // 4B8 + ActorValueInfo* bipedObjectConditions[32]; // 5B8 + BSTArray equipSlotArray; // 6B8 - BSTArray + std::uint32_t validEquipTypes; // 6D0 - VNAM + std::uint32_t unk6D4; // 6D4 + TESObjectWEAP* unarmedWeapon; // 6D8 - by order between validEquipTypes and armorParentRace + TESRace* morphRace; // 6E0 - by order between validEquipTypes and armorParentRace + TESRace* armorParentRace; // 6E8 - RNAM + TESQuest* dialogueQuest; // 6F0 - by order after armorParentRace + std::uint8_t unk6F8[0x10]; // 6F8 + BSTArray unk708; // 708 - element type not identified yet + std::uint8_t unk720[0x418]; // 720 + BSTArray unkB38; // B38 - element type not identified yet + std::uint8_t unkB50[0xC]; // B50 + std::uint8_t unkB5C[0x8]; // B5C + std::uint32_t unkB64; // B64 + std::uint64_t unkB68; // B68 + std::uint32_t unkB70; // B70 + std::uint8_t unkB74[0xC]; // B74 + std::uint64_t unkB80; // B80 + std::uint8_t unkB88[0x40]; // B88 + std::uint64_t unkBC8; // BC8 + std::uint64_t unkBD0; // BD0 + TESTexture hairColorLookupTexture; // BD8 + TESTexture hairColorLookupTextureExt; // C00 + }; + static_assert(sizeof(TESRace) == 0xC28); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESRaceForm.h b/CKPE.Fallout4/Include/EditorAPI/T/TESRaceForm.h new file mode 100644 index 00000000..dd4b6894 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESRaceForm.h @@ -0,0 +1,36 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESRace; + } + + // 1.11.240.0: size 0x10, vtable RVA 0x3021C80, 22 virtual functions + class TESRaceForm : + public BaseFormComponent // 000 + { + public: + virtual ~TESRaceForm() = default; + + virtual bool SwitchRace(Forms::TESRace* pRace) noexcept(true) { return false; } // 21 - RVA 0x8F4EE0, *(_QWORD *)(a1 + 8) = a2;; return 1; + + public: + Forms::TESRace* formRace; // 08 + }; + static_assert(sizeof(TESRaceForm) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESReactionForm.h b/CKPE.Fallout4/Include/EditorAPI/T/TESReactionForm.h new file mode 100644 index 00000000..e876309f --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESReactionForm.h @@ -0,0 +1,34 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + class GROUP_REACTION; + + // 1.11.240.0: size 0x20, vtable RVA 0x3021F00, 21 virtual functions + class TESReactionForm : + public BaseFormComponent // 000 + { + public: + virtual ~TESReactionForm() = default; + + public: + BSSimpleList reactionList; // 08 + std::int8_t groupFormType; // 18 + std::uint8_t unk19[0x7]; // 19 + }; + static_assert(sizeof(TESReactionForm) == 0x20); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESRegion.h b/CKPE.Fallout4/Include/EditorAPI/T/TESRegion.h new file mode 100644 index 00000000..19f79ef4 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESRegion.h @@ -0,0 +1,43 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x68, vtable RVA 0x302DB90, 126 virtual functions + class TESRegion : + public TESForm // 000 + { + public: + virtual ~TESRegion() = default; + + virtual void sub_3E0() { return; } // 124 - RVA 0x95D4B0 + virtual void sub_3E8() { return; } // 125 - RVA 0x95D630 + + public: + std::uint32_t unk28; // 28 + std::uint32_t unk2C; // 2C + std::uint64_t unk30; // 30 + void* pointLists; // 38 - BSSimpleList* + std::uint64_t unk40; // 40 + std::uint64_t unk48; // 48 + std::uint64_t unk50; // 50 + std::uint32_t unk58; // 58 + std::uint8_t unk5C[0xC]; // 5C + }; + static_assert(sizeof(TESRegion) == 0x68); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESShout.h b/CKPE.Fallout4/Include/EditorAPI/T/TESShout.h new file mode 100644 index 00000000..523c04e9 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESShout.h @@ -0,0 +1,40 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0xD0, vtable RVA 0x307C0F8, 124 virtual functions + class TESShout : + public TESForm, // 000 + public TESFullName, // 028 + public BGSMenuDisplayObject, // 040 + public BGSEquipType, // 050 + public TESDescription // 060 + { + public: + virtual ~TESShout() = default; + + public: + std::uint8_t variations[0x48]; // 88 - Variation + }; + static_assert(sizeof(TESShout) == 0xD0); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESSoulGem.h b/CKPE.Fallout4/Include/EditorAPI/T/TESSoulGem.h new file mode 100644 index 00000000..667e1ecf --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESSoulGem.h @@ -0,0 +1,35 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x1F8, vtable RVA 0x30A19B8, 156 virtual functions + class TESSoulGem : + public TESObjectMISC // 000 + { + public: + virtual ~TESSoulGem() = default; + + public: + TESSoulGem* linkedSoulGem; // 1E8 + std::int8_t currentSoul; // 1F0 + std::int8_t soulCapacity; // 1F1 + std::uint8_t unk1F2[0x6]; // 1F2 + }; + static_assert(sizeof(TESSoulGem) == 0x1F8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESSound.h b/CKPE.Fallout4/Include/EditorAPI/T/TESSound.h new file mode 100644 index 00000000..42a7d274 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESSound.h @@ -0,0 +1,37 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSSoundDescriptorForm; + + // 1.11.240.0: size 0xA8, vtable RVA 0x307CB28, 154 virtual functions + class TESSound : + public TESBoundAnimObject // 000 + { + public: + virtual ~TESSound() = default; + + public: + BGSSoundDescriptorForm* descriptor; // 90 + std::uint64_t unk98; // 98 + std::uint8_t unkA0; // A0 + std::uint8_t unkA1[0x7]; // A1 + }; + static_assert(sizeof(TESSound) == 0xA8); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESSpellList.h b/CKPE.Fallout4/Include/EditorAPI/T/TESSpellList.h new file mode 100644 index 00000000..5adba744 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESSpellList.h @@ -0,0 +1,31 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + class SpellData; + + // 1.11.240.0: size 0x10, vtable RVA 0x3022250, 21 virtual functions + class TESSpellList : + public BaseFormComponent // 000 + { + public: + virtual ~TESSpellList() = default; + + public: + SpellData* spellData; // 08 - TESSpellList::SpellData + }; + static_assert(sizeof(TESSpellList) == 0x10); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESTexture1024.h b/CKPE.Fallout4/Include/EditorAPI/T/TESTexture1024.h new file mode 100644 index 00000000..cff067a6 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESTexture1024.h @@ -0,0 +1,26 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + // 1.11.240.0: size 0x28, vtable RVA 0x30B8FB8, 27 virtual functions + class TESTexture1024 : + public TESTexture // 000 + { + public: + virtual ~TESTexture1024() = default; + }; + static_assert(sizeof(TESTexture1024) == 0x28); + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESTopicInfo.h b/CKPE.Fallout4/Include/EditorAPI/T/TESTopicInfo.h index 63076c69..b91dbf47 100644 --- a/CKPE.Fallout4/Include/EditorAPI/T/TESTopicInfo.h +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESTopicInfo.h @@ -18,12 +18,16 @@ namespace CKPE class TESTopic; // size = 0xE0 // func = 126 - class TESTopicInfo : public TESForm + class TESTopicInfo : + public TESForm // 000 { public: constexpr static std::uint8_t TYPE_ID = ftTopicInfo; virtual ~TESTopicInfo() = default; + // CK 1.11.240.0: 126 virtual functions (TESForm has 124) + virtual void sub_3E0() { return; } // 124 - RVA 0xB6A6D0 + virtual void sub_3E8() { return; } // 125 - RVA 0xB6A7B0 public: struct Response { diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESWaterForm.h b/CKPE.Fallout4/Include/EditorAPI/T/TESWaterForm.h new file mode 100644 index 00000000..dd31dcc4 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESWaterForm.h @@ -0,0 +1,131 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class TESImageSpace; + + class BGSSoundDescriptorForm; + + class SpellItem; + + class BGSMaterialType; + + struct WaterShaderData + { + float maxDepth; // 00 + std::uint32_t shallowWaterColor; // 04 + std::uint32_t deepWaterColor; // 08 + float shallowFogColorRange; // 0C + float deepFogColorRange; // 10 + float shallowAlpha; // 14 + float deepAlpha; // 18 + float shallowFogAlphaRange; // 1C + float deepFogAlphaRange; // 20 + std::uint32_t underwaterFogColor; // 24 + float underwaterFogAmount; // 28 + float underwaterFogDistNear; // 2C + float underwaterFogDistFar; // 30 + float normalMagnitude; // 34 + float normalFalloffShallow; // 38 + float normalFalloffDeep; // 3C + float reflectionAmount; // 40 + float fresnelAmount; // 44 + float surfaceEffectFalloff; // 48 + float displacementForce; // 4C + float displacementVelocity; // 50 + float displacementFalloff; // 54 + float displacementDampener; // 58 + float displacementSize; // 5C + std::uint32_t reflectionWaterColor; // 60 + float sunSpecularPower; // 64 + float sunSpecularMagnitude; // 68 + float sunSparklePower; // 6C + float sunSparkleMagnitude; // 70 + float lightRadius; // 74 + float lightBrightness; // 78 + float shininess; // 7C + float noiseWindDirections[3]; // 80 + float noiseWindSpeeds[3]; // 8C + float amplitude[3]; // 98 + float uvScales[3]; // A4 + float noiseFalloff[3]; // B0 + float siltAmount; // BC + std::uint32_t lightSiltColor; // C0 + std::uint32_t darkSiltColor; // C4 + bool ssrEnabled; // C8 + }; + static_assert(sizeof(WaterShaderData) == 0xCC); + + // 1.11.240.0: size 0x290, vtable RVA 0x30B8570, 124 virtual functions + class TESWaterForm : + public TESForm, // 000 + public TESFullName // 028 + { + public: + virtual ~TESWaterForm() = default; + + public: + bool needUpdate; // 40 + std::uint8_t unk41[0x3]; // 41 + std::uint8_t unk44[0x8]; // 44 + std::uint8_t unk4C[0x8]; // 4C + std::uint8_t unk54[0x8]; // 54 + std::uint8_t unk5C[0x8]; // 5C + std::uint8_t unk64[0x8]; // 64 + std::uint8_t unk6C[0xC]; // 6C + TESTexture unk78; // 78 + TESTexture unkA0; // A0 + TESTexture unkC8; // C8 + std::uint16_t unkF0; // F0 + std::uint8_t unkF2[0x6]; // F2 + BGSMaterialType* materialType; // F8 + BGSSoundDescriptorForm* waterSound; // 100 + WaterShaderData data; // 108 - DATA + std::uint8_t unk1D4[0x4]; // 1D4 + std::uint64_t unk1D8; // 1D8 + std::uint8_t unk1E0; // 1E0 + std::uint8_t unk1E1[0x7]; // 1E1 + TESWaterForm* waterWeatherControl[3]; // 1E8 + std::uint64_t unk200; // 200 + std::uint32_t unk208; // 208 + std::uint32_t unk20C; // 20C + std::uint32_t unk210; // 210 + std::uint32_t unk214; // 214 + std::uint32_t unk218; // 218 + std::uint32_t unk21C; // 21C + std::uint32_t unk220; // 220 + std::uint32_t unk224; // 224 + SpellItem* consumeSpell; // 228 + SpellItem* contactSpell; // 230 + std::uint64_t unk238; // 238 + std::uint64_t unk240; // 240 + std::uint64_t unk248; // 248 + std::uint64_t unk250; // 250 + std::uint64_t unk258; // 258 + std::uint64_t unk260; // 260 + std::uint8_t unk268; // 268 + std::uint8_t unk269[0x7]; // 269 + TESImageSpace* imageSpace; // 270 + std::uint8_t linearVelocity[0xC]; // 278 - NiPoint3 + std::uint8_t angularVelocity[0xC]; // 284 - NiPoint3 + }; + static_assert(sizeof(TESWaterForm) == 0x290); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESWeather.h b/CKPE.Fallout4/Include/EditorAPI/T/TESWeather.h new file mode 100644 index 00000000..854bf3c2 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESWeather.h @@ -0,0 +1,73 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSGodRays; + class BGSLensFlare; + class BGSReferenceEffect; + class BGSShaderParticleGeometryData; + class TESImageSpace; + + // 1.11.240.0: size 0x1308, vtable RVA 0x30B90E0, 124 virtual functions + class TESWeather : + public TESForm // 000 + { + public: + virtual ~TESWeather() = default; + + public: + std::uint32_t context; // 28 + std::uint8_t unk2C[0x4]; // 2C + TESTexture1024 cloudTexture[32]; // 30 + std::int8_t cloudLayerSpeedY[32]; // 530 + std::int8_t cloudLayerSpeedX[32]; // 550 + std::uint32_t cloudColorData[32][8]; // 570 + float cloudAlpha[32][8]; // 970 + std::uint32_t cloudLayerDisabledBits; // D70 + std::int8_t weatherData[20]; // D74 + float fogData[18]; // D88 + std::uint32_t colorData[19][8]; // DD0 + float fogColorScales[4][8]; // 1030 + std::uint8_t weatherSpellData[0x20]; // 10B0 - SpellData + std::uint8_t soundList[0x10]; // 10D0 - WeatherSoundList + BSTArray skyStatics; // 10E0 - BSTArray + std::uint32_t numCloudLayers; // 10F8 + std::uint8_t unk10FC[0x4]; // 10FC + TESImageSpace* imageSpace[8]; // 1100 + BGSGodRays* godRays[8]; // 1140 + std::uint8_t directionalAmbientLightingColors[0x100]; // 1180 - BGSDirectionalAmbientLightingColors + TESModel aurora; // 1280 + BGSLensFlare* sunGlareLensFlare; // 12B8 + float volatilityMult; // 12C0 + float visibilityMult; // 12C4 + BGSShaderParticleGeometryData* precipitationData; // 12C8 + BGSReferenceEffect* referenceEffect; // 12D0 + std::uint32_t unk12D8; // 12D8 + std::uint32_t unk12DC; // 12DC + std::uint64_t unk12E0; // 12E0 + std::uint32_t unk12E8; // 12E8 + std::uint32_t unk12EC; // 12EC + BSTArray unk12F0; // 12F0 - element type not identified yet (CK only) + }; + static_assert(sizeof(TESWeather) == 0x1308); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESWordOfPower.h b/CKPE.Fallout4/Include/EditorAPI/T/TESWordOfPower.h new file mode 100644 index 00000000..6cb90d43 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESWordOfPower.h @@ -0,0 +1,35 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + // 1.11.240.0: size 0x50, vtable RVA 0x307D338, 124 virtual functions + class TESWordOfPower : + public TESForm, // 000 + public TESFullName // 028 + { + public: + virtual ~TESWordOfPower() = default; + + public: + BGSLocalizedString translation; // 40 + }; + static_assert(sizeof(TESWordOfPower) == 0x50); + } + } + } +} diff --git a/CKPE.Fallout4/Include/EditorAPI/T/TESWorldSpace.h b/CKPE.Fallout4/Include/EditorAPI/T/TESWorldSpace.h new file mode 100644 index 00000000..a851a465 --- /dev/null +++ b/CKPE.Fallout4/Include/EditorAPI/T/TESWorldSpace.h @@ -0,0 +1,129 @@ +// Copyright © 2020-2025 aka CKPE team. All rights reserved. +// Contacts: +// License: https://www.gnu.org/licenses/lgpl-3.0.html + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace CKPE +{ + namespace Fallout4 + { + namespace EditorAPI + { + namespace Forms + { + class BGSLightingTemplate; + + class TESWaterForm; + + class BGSEncounterZone; + + class BGSLocation; + + class BGSMusicType; + + class TESClimate; + + struct WORLD_MAP_DATA + { + std::uint32_t usableWidth; // 00 + std::uint32_t usableHeight; // 04 + std::int16_t nwCellX; // 08 + std::int16_t nwCellY; // 0A + std::int16_t seCellX; // 0C + std::int16_t seCellY; // 0E + }; + static_assert(sizeof(WORLD_MAP_DATA) == 0x10); + + struct WORLD_MAP_OFFSET_DATA + { + float mapScale; // 00 + float mapOffsetX; // 04 + float mapOffsetY; // 08 + float mapOffsetZ; // 0C + }; + static_assert(sizeof(WORLD_MAP_OFFSET_DATA) == 0x10); + + // 1.11.240.0: size 0x2B8, vtable RVA 0x30BABA8, 126 virtual functions + class TESWorldSpace : + public TESFormIDListView, // 000 + public TESFullName, // 028 + public TESTexture // 040 + { + public: + virtual ~TESWorldSpace() = default; + + public: + std::uint8_t unk68[0xC]; // 68 + std::uint32_t unk74; // 74 + std::uint32_t unk78; // 78 + std::uint32_t unk7C; // 7C + std::uint64_t unk80; // 80 + std::uint32_t unk88; // 88 + std::uint8_t unk8C[0xC]; // 8C + std::uint64_t unk98; // 98 + std::uint64_t unkA0; // A0 + std::uint64_t unkA8; // A8 + TESClimate* climate; // B0 + std::int8_t flags; // B8 - DATA + std::uint8_t unkB9; // B9 + std::uint16_t parentUseFlags; // BA - REX::TEnumSet + std::int8_t worldFlags; // BC + std::uint8_t unkBD; // BD + std::uint8_t unkBE[0xA]; // BE + std::uint64_t unkC8; // C8 + std::uint64_t unkD0; // D0 + std::uint64_t unkD8; // D8 + std::uint64_t unkE0; // E0 + std::uint64_t unkE8; // E8 + TESWorldSpace* parentWorld; // F0 + BGSLightingTemplate* lightingTemplate; // F8 + TESWaterForm* worldWater; // 100 + TESWaterForm* lodWater; // 108 + float lodWaterHeight; // 110 + WORLD_MAP_DATA worldMapData; // 114 + WORLD_MAP_OFFSET_DATA worldMapOffsetData; // 124 + std::uint8_t unk134[0x4]; // 134 + BGSMusicType* musicType; // 138 + std::uint8_t minimumCoords[0x8]; // 140 - NiPoint2 + std::uint8_t maximumCoords[0x8]; // 148 - NiPoint2 + float defaultLandHeight; // 150 + float defaultWaterHeight; // 154 + float distantLODMult; // 158 + std::uint32_t unk15C; // 15C + BGSEncounterZone* encounterZone; // 160 + BGSLocation* location; // 168 + std::uint64_t unk170; // 170 + TESTexture canopyShadowTexture; // 178 + TESTexture waterEnvMap; // 1A0 + TESTexture unk1C8; // 1C8 + TESTexture unk1F0; // 1F0 + std::uint8_t unk218[0xC]; // 218 + std::uint8_t unk224[0x8]; // 224 + std::uint32_t unk22C; // 22C + std::uint64_t unk230; // 230 + std::uint32_t unk238; // 238 + std::uint8_t unk23C[0xC]; // 23C + std::uint64_t unk248; // 248 + BSTArray unk250; // 250 - element type not identified yet + std::uint8_t largeRefData[0x38]; // 268 - BGSLargeRefData (0x38 in the CK) + std::uint32_t unk2A0; // 2A0 + std::uint8_t lvlDataCellStartX; // 2A4 + std::uint8_t lvlDataCellStartY; // 2A5 + std::uint8_t lvlDataCellWidthX; // 2A6 + std::uint8_t lvlDataCellWidthY; // 2A7 + char* lvlDataCellA; // 2A8 + char* maxHeightData; // 2B0 + }; + static_assert(sizeof(TESWorldSpace) == 0x2B8); + } + } + } +}