Skip to content

Commit

Permalink
runtime 1.12.36, tick version to 0.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ianpatt committed Jul 3, 2024
1 parent 6161138 commit 7768c5e
Show file tree
Hide file tree
Showing 25 changed files with 706 additions and 702 deletions.
4 changes: 2 additions & 2 deletions cmake/versioning.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
set(SFSE_VERSION_MAJOR 0)
set(SFSE_VERSION_MINOR 2)
set(SFSE_VERSION_PATCH 9)
set(SFSE_VERSION_PATCH 10)

set(RUNTIME_VERSION_MAJOR 1)
set(RUNTIME_VERSION_MINOR 12)
set(RUNTIME_VERSION_PATCH 32)
set(RUNTIME_VERSION_PATCH 36)
set(RUNTIME_VERSION_TYPE 0)

math(
Expand Down
2 changes: 1 addition & 1 deletion sfse/GameChargen.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include "sfse/GameChargen.h"

RelocPtr<MenuActor*> TESNPCData::g_actorCheckpoint(0x06888110);
RelocPtr<MenuActor*> TESNPCData::g_actorCheckpoint(0x06888108);
4 changes: 2 additions & 2 deletions sfse/GameChargen.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class ChargenDataModel : public IDataModel, public BSTSingletonSDM<ChargenDataMo

static ChargenDataModel* GetSingleton()
{
RelocPtr<ChargenDataModel*> singleton(0x0687A6C8);
RelocPtr<ChargenDataModel*> singleton(0x0687A670);
return *singleton;
}

// Contains main UI data model wrappers, decode these later
// This function will pull data from the TESNPC into this wrapper
DEFINE_MEMBER_FN_1(Update, void, 0x018A6E4C, MenuActor*); // unk2 removed in 1.9.51
DEFINE_MEMBER_FN_1(Update, void, 0x018A6ECC, MenuActor*); // unk2 removed in 1.9.51
};

extern RelocPtr<MenuActor*> g_actorCheckpoint;
Expand Down
2 changes: 1 addition & 1 deletion sfse/GameConsole.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "sfse/GameConsole.h"
#include <stdarg.h>

RelocPtr <ConsoleLog*> g_console(0x0687A250);
RelocPtr <ConsoleLog*> g_console(0x0687A210);

void Console_Print(const char* fmt, ...)
{
Expand Down
2 changes: 1 addition & 1 deletion sfse/GameConsole.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class ConsoleLog
{
public:
DEFINE_MEMBER_FN_2(VPrint, void, 0x029CD9B8, const char* fmt, va_list args);
DEFINE_MEMBER_FN_2(VPrint, void, 0x029CDA48, const char* fmt, va_list args);
};

extern RelocPtr <ConsoleLog*> g_console;
Expand Down
2 changes: 1 addition & 1 deletion sfse/GameData.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class TESDataHandler :

static TESDataHandler* GetSingleton()
{
RelocPtr<TESDataHandler*> singleton(0x0642EB08);
RelocPtr<TESDataHandler*> singleton(0x0642EB38);
return *singleton;
}

Expand Down
1,308 changes: 654 additions & 654 deletions sfse/GameEvents.h

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions sfse/GameForms.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "sfse/GameForms.h"

RelocAddr<TESForm::_GetFormByNumericID> TESForm::GetFormByNumericID(0x014CD590);
RelocAddr<TESForm::_GetFormByEditorID> TESForm::GetFormByEditorID(0x014CD6F0);
RelocAddr<TESForm::_GetFormByNumericID> TESForm::GetFormByNumericID(0x014CD600);
RelocAddr<TESForm::_GetFormByEditorID> TESForm::GetFormByEditorID(0x014CD760);
10 changes: 5 additions & 5 deletions sfse/GameLock.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ static_assert(sizeof(BSNonReentrantSpinLock) == 0x4);
class BSReadWriteLock
{
public:
DEFINE_MEMBER_FN_0(lock_read, void, 0x02E1CF10);
DEFINE_MEMBER_FN_0(lock_read, void, 0x02E1CF20);
DEFINE_MEMBER_FN_0(lock_write, void, 0x0058ADE8);
DEFINE_MEMBER_FN_0(unlock_read, void, 0x02E1D0D8);
DEFINE_MEMBER_FN_0(unlock_read, void, 0x02E1D0E8);
DEFINE_MEMBER_FN_0(unlock_write, void, 0x0059B8B4);

private:
Expand All @@ -34,9 +34,9 @@ static_assert(sizeof(BSReadWriteLock) == 0x8);
class BSSpinLock
{
public:
DEFINE_MEMBER_FN_0(lock, void, 0x02E1AD20);
DEFINE_MEMBER_FN_0(try_lock, bool, 0x02E1AE30);
DEFINE_MEMBER_FN_0(unlock, void, 0x02E1ADF0);
DEFINE_MEMBER_FN_0(lock, void, 0x02E1AD30);
DEFINE_MEMBER_FN_0(try_lock, bool, 0x02E1AE40);
DEFINE_MEMBER_FN_0(unlock, void, 0x02E1AE00);

private:
// members
Expand Down
4 changes: 2 additions & 2 deletions sfse/GameObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ class TESNPC :
u8 pronoun; // 448
u8 pad449[7]; // 449

DEFINE_MEMBER_FN_1(DeriveGeneticParentAppearance, void, 0x01B4CD18, TESNPC* source);
DEFINE_MEMBER_FN_1(CopyAppearance, void, 0x01B4B150, TESNPC* source);
DEFINE_MEMBER_FN_1(DeriveGeneticParentAppearance, void, 0x01B4CD98, TESNPC* source);
DEFINE_MEMBER_FN_1(CopyAppearance, void, 0x01B4B1D0, TESNPC* source);
};
static_assert(sizeof(TESNPC) == 0x450); // Un-verified after 1.10.31
static_assert(sizeof(TESNPC::HeadPartData) == 0x28);
Expand Down
2 changes: 1 addition & 1 deletion sfse/GameRTTI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

typedef void* (*_Runtime_DynamicCast_Internal)(void* srcObj, u32 arg1, const void* fromType, const void* toType, u32 arg4);

RelocAddr <_Runtime_DynamicCast_Internal> Runtime_DynamicCast_Internal(0x03786250); // __RTDynamicCast
RelocAddr <_Runtime_DynamicCast_Internal> Runtime_DynamicCast_Internal(0x03786280); // __RTDynamicCast

void* Runtime_DynamicCast(void* srcObj, const void* fromType, const void* toType)
{
Expand Down
10 changes: 5 additions & 5 deletions sfse/GameReferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ class TESObjectREFR : public TESForm
u8 unkE2; // CB
u8 flags; // CC

DEFINE_MEMBER_FN_0(IsInSpaceship, bool, 0x02C96D34)
DEFINE_MEMBER_FN_0(IsInSpace, bool, 0x01A2E634)
DEFINE_MEMBER_FN_0(IsInSpaceship, bool, 0x02C96DD4)
DEFINE_MEMBER_FN_0(IsInSpace, bool, 0x01A2E6B4)
DEFINE_MEMBER_FN_1(HasKeyword, bool, 0x01381618, BGSKeyword*);
};
static_assert(offsetof(TESObjectREFR, data) == 0x78);
Expand Down Expand Up @@ -377,10 +377,10 @@ class Actor : public TESObjectREFR

// This function is very slow, do not use for realtime updates, mainly used for "entire character changed"
// The fields represent which subsets of chargen to update, usually you want (false, 0x28, false)
DEFINE_MEMBER_FN_3(UpdateAppearance, void, 0x025EE970, bool unk1, u32 flags, bool changeRace);
DEFINE_MEMBER_FN_3(UpdateAppearance, void, 0x025EEA00, bool unk1, u32 flags, bool changeRace);

DEFINE_MEMBER_FN_0(UpdateChargenAppearance, void, 0x0243B774);
DEFINE_MEMBER_FN_1(SetSkinTone, void, 0x0243B33C, u32 skinToneIndex);
DEFINE_MEMBER_FN_0(UpdateChargenAppearance, void, 0x0243B804);
DEFINE_MEMBER_FN_1(SetSkinTone, void, 0x0243B3CC, u32 skinToneIndex);

u64 unkF0[(0x240 - 0xF0) >> 3]; // F0
void* unk240; // 240
Expand Down
8 changes: 4 additions & 4 deletions sfse/GameSettings.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "sfse/GameSettings.h"

RelocPtr <INISettingCollection *> SettingT<INISettingCollection>::pCollection(0x068967D8);
RelocPtr <INIPrefSettingCollection *> SettingT<INIPrefSettingCollection>::pCollection(0x068967F8);
RelocPtr <RegSettingCollection *> SettingT<RegSettingCollection>::pCollection(0x068953E8);
RelocPtr <GameSettingCollection *> SettingT<GameSettingCollection>::pCollection(0x06877858);
RelocPtr <INISettingCollection *> SettingT<INISettingCollection>::pCollection(0x068967B8);
RelocPtr <INIPrefSettingCollection *> SettingT<INIPrefSettingCollection>::pCollection(0x068967D8);
RelocPtr <RegSettingCollection *> SettingT<RegSettingCollection>::pCollection(0x068953E0);
RelocPtr <GameSettingCollection *> SettingT<GameSettingCollection>::pCollection(0x06877890);

u32 Setting::GetType(void) const
{
Expand Down
2 changes: 1 addition & 1 deletion sfse/GameSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class GameSettingCollection : public SettingCollectionMap<Setting>
public:
virtual ~GameSettingCollection();

DEFINE_MEMBER_FN_1(GetSetting, Setting*, 0x0157ED84, const char*);
DEFINE_MEMBER_FN_1(GetSetting, Setting*, 0x0157EDF4, const char*);
};
static_assert(sizeof(GameSettingCollection) == 0x158);

Expand Down
12 changes: 6 additions & 6 deletions sfse/GameStreams.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ class BSResourceNiBinaryStream : public NiBinaryStream
u64 uiStreamPos; // 20
BSResource::ErrorCode eLastError; // 28

DEFINE_MEMBER_FN_1(Construct, void, 0x03694148, const char* apName);
DEFINE_MEMBER_FN_0(Destroy, void, 0x036941EC);
DEFINE_MEMBER_FN_1(Seek_Impl, void, 0x036949F4, s64 iNumBytes);
DEFINE_MEMBER_FN_1(GetBufferInfo_Impl, void, 0x0369444C, BufferInfo& info);
DEFINE_MEMBER_FN_2(DoRead_Impl, u64, 0x036942D4, void* apBuffer, u64 auiBytes);
DEFINE_MEMBER_FN_2(DoWrite_Impl, u64, 0x03694338, const void* apBuffer, u64 auiBytes);
DEFINE_MEMBER_FN_1(Construct, void, 0x03694118, const char* apName);
DEFINE_MEMBER_FN_0(Destroy, void, 0x036941BC);
DEFINE_MEMBER_FN_1(Seek_Impl, void, 0x036949C4, s64 iNumBytes);
DEFINE_MEMBER_FN_1(GetBufferInfo_Impl, void, 0x0369441C, BufferInfo& info);
DEFINE_MEMBER_FN_2(DoRead_Impl, u64, 0x036942A4, void* apBuffer, u64 auiBytes);
DEFINE_MEMBER_FN_2(DoWrite_Impl, u64, 0x03694308, const void* apBuffer, u64 auiBytes);
};
static_assert(sizeof(BSResourceNiBinaryStream) == 0x30);
2 changes: 1 addition & 1 deletion sfse/GameUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class UI :

static UI* GetSingleton()
{
RelocPtr<UI*> singleton(0x066707D0);
RelocPtr<UI*> singleton(0x066707C8);
return *singleton;
}
};
Expand Down
2 changes: 1 addition & 1 deletion sfse/Hooks_Data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "sfse/GameSettings.h"
#endif

RelocAddr <uintptr_t> GameDataLoad_Target(0x0252D2C0 + 0x114E); // End of this function before the retn
RelocAddr <uintptr_t> GameDataLoad_Target(0x0252D350 + 0x114E); // End of this function before the retn

void Hook_GameData_Loaded()
{
Expand Down
2 changes: 1 addition & 1 deletion sfse/Hooks_Script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ bool GetSFSEVersion_Execute(const SCRIPT_PARAMETER* paramInfo, const char*, TESO
}

typedef bool (*_ConsoleCommandInit)(void* unk1);
RelocAddr <_ConsoleCommandInit> ConsoleCommandInit(0x01B0FA80);
RelocAddr <_ConsoleCommandInit> ConsoleCommandInit(0x01B0FB00);
_ConsoleCommandInit ConsoleCommandInit_Original = nullptr;

void ConsoleCommandInit_Hook(void* unk1)
Expand Down
2 changes: 1 addition & 1 deletion sfse/Hooks_Version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const char * kHook_ShowVersion_FormatString =
"%08x v%s [SFSE " __PREPRO_TOKEN_STR__(SFSE_VERSION_INTEGER) "."
__PREPRO_TOKEN_STR__(SFSE_VERSION_INTEGER_MINOR) "."
__PREPRO_TOKEN_STR__(SFSE_VERSION_INTEGER_BETA) "]";
RelocAddr <uintptr_t> kHook_ShowVersion_Offset(0x02182330 + 0x5D);
RelocAddr <uintptr_t> kHook_ShowVersion_Offset(0x021823C0 + 0x5D);

void Hooks_Version_Apply()
{
Expand Down
4 changes: 2 additions & 2 deletions sfse/NiObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class NiObjectNET : public NiObject
BSReadWriteLock extraLock; // 28
BSTArray<NiPointer<NiExtraData>>* pExtra; // 30

DEFINE_MEMBER_FN_1(AddExtraData, bool, 0x036A11EC, NiExtraData* pkExtra);
DEFINE_MEMBER_FN_1(AddExtraData, bool, 0x036A11BC, NiExtraData* pkExtra);
};
static_assert(sizeof(NiObjectNET) == 0x38);

Expand Down Expand Up @@ -201,7 +201,7 @@ class NiAVObject : public NiObjectNET
u32 unk128; // 128
u32 unk12C; // 12C

DEFINE_MEMBER_FN_1(Update, void, 0x03698BE4, NiUpdateData& apData);
DEFINE_MEMBER_FN_1(Update, void, 0x03698BB4, NiUpdateData& apData);
};
static_assert(sizeof(NiAVObject) == 0x130);
static_assert(offsetof(NiAVObject, m_pkParent) == 0x38);
Expand Down
2 changes: 1 addition & 1 deletion sfse/ScaleformManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BSScaleformManager

static BSScaleformManager* GetSingleton()
{
RelocPtr<BSScaleformManager*> singleton(0x068752E0);
RelocPtr<BSScaleformManager*> singleton(0x068752F0);
return *singleton;
}
};
2 changes: 1 addition & 1 deletion sfse/ScaleformMemory.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "sfse/ScaleformMemory.h"

RelocPtr<Scaleform::MemoryHeap*> Scaleform::Memory::pGlobalHeap(0x0638CDD8);
RelocPtr<Scaleform::MemoryHeap*> Scaleform::Memory::pGlobalHeap(0x0638CE18);

void* ScaleformHeap_Allocate(u64 size)
{
Expand Down
9 changes: 5 additions & 4 deletions sfse_common/sfse_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// these have to be macros so they can be used in the .rc
#define SFSE_VERSION_INTEGER 0
#define SFSE_VERSION_INTEGER_MINOR 2
#define SFSE_VERSION_INTEGER_BETA 9
#define SFSE_VERSION_VERSTRING "0, 0, 2, 9"
#define SFSE_VERSION_INTEGER_BETA 10
#define SFSE_VERSION_VERSTRING "0, 0, 2, 10"
#define SFSE_VERSION_PADDEDSTRING "0001"
#define SFSE_VERSION_RELEASEIDX 17

Expand Down Expand Up @@ -45,13 +45,14 @@
#define RUNTIME_VERSION_1_11_36 MAKE_EXE_VERSION(1, 11, 36) // 0x010B0240
#define RUNTIME_VERSION_1_12_30 MAKE_EXE_VERSION(1, 12, 30) // 0x010C01E0 editor released
#define RUNTIME_VERSION_1_12_32 MAKE_EXE_VERSION(1, 12, 32) // 0x010C0200 hotfix
#define RUNTIME_VERSION_1_12_36 MAKE_EXE_VERSION(1, 12, 36) // 0x010C0240

#define PACKED_SFSE_VERSION MAKE_EXE_VERSION(SFSE_VERSION_INTEGER, SFSE_VERSION_INTEGER_MINOR, SFSE_VERSION_INTEGER_BETA)

// information about the state of the game at the time of release
#define SFSE_TARGETING_BETA_VERSION 0
#define CURRENT_RELEASE_RUNTIME RUNTIME_VERSION_1_12_32
#define CURRENT_RELEASE_SFSE_STR "0.2.9"
#define CURRENT_RELEASE_RUNTIME RUNTIME_VERSION_1_12_36
#define CURRENT_RELEASE_SFSE_STR "0.2.10"

#if GET_EXE_VERSION_SUB(RUNTIME_VERSION) == RUNTIME_TYPE_BETHESDA
#define SAVE_FOLDER_NAME "Starfield"
Expand Down
4 changes: 2 additions & 2 deletions sfse_readme.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Starfield Script Extender v0.2.9 pre-alpha
Starfield Script Extender v0.2.10 pre-alpha
by Ian Patterson, Stephen Abel, and Expired

The Starfield Script Extender, or SFSE for short, is a modder's resource that expands the scripting capabilities of Starfield. As the editor is not out, it's mostly a plugin loader for now. Depending on where modders show interest, this will expand to Scaleform and Papyrus (or other things) over time.

[ Compatibility ]

SFSE will support the latest version of Starfield available on Steam, currently 1.12.32. The Gamepass/MS Store/EGS version is unsupported. Do not email asking for support.
SFSE will support the latest version of Starfield available on Steam, currently 1.12.36. The Gamepass/MS Store/EGS version is unsupported. Do not email asking for support.

[ Installation ]

Expand Down
3 changes: 3 additions & 0 deletions sfse_whatsnew.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.2.10
- support for 1.12.36

0.2.9
- support for 1.12.32

Expand Down

0 comments on commit 7768c5e

Please sign in to comment.