-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add experimental leveled characters support, better dungeons su…
…pport and more (#1715)
- Loading branch information
Showing
176 changed files
with
3,470 additions
and
994 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added experimental `TESModPlatform.EvaluateLeveledNpc` native. It is unstable and shouldn't be used in user plugins. This native is required for SkyMP. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#pragma once | ||
#include "LeveledListBase.h" | ||
|
||
#pragma pack(push, 1) | ||
|
||
namespace espm { | ||
|
||
class LVLN final : public LeveledListBase | ||
{ | ||
public: | ||
static constexpr auto kType = "LVLN"; | ||
}; | ||
|
||
static_assert(sizeof(LVLN) == sizeof(RecordHeader)); | ||
|
||
} | ||
|
||
#pragma pack(pop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#pragma once | ||
#include "RecordHeader.h" | ||
|
||
#pragma pack(push, 1) | ||
|
||
namespace espm { | ||
|
||
class LeveledListBase : public RecordHeader | ||
{ | ||
public: | ||
enum LeveledItemFlags | ||
{ | ||
AllLevels = 0x01, //(sets it to calculate for all entries < player level, | ||
// choosing randomly from all the entries under) | ||
Each = 0x02, // (sets it to repeat a check every time the list is called | ||
// (if it's called multiple times), otherwise it will use the | ||
// same result for all counts.) | ||
UseAll = 0x04, // (use all entries when the list is called) | ||
SpecialLoot = 0x08, | ||
}; | ||
|
||
struct Entry | ||
{ | ||
char type[4] = { 'L', 'V', 'L', 'O' }; | ||
uint16_t dataSize = 0; | ||
uint32_t level = 0; | ||
uint32_t formId = 0; | ||
uint32_t count = 0; | ||
}; | ||
|
||
struct Data | ||
{ | ||
const char* editorId = ""; | ||
uint8_t chanceNone = 0; | ||
uint8_t leveledItemFlags = 0; | ||
uint32_t chanceNoneGlobalId = 0; | ||
uint8_t numEntries = 0; | ||
const Entry* entries = nullptr; | ||
}; | ||
|
||
Data GetData(CompressedFieldsCache& compressedFieldsCache) const noexcept; | ||
}; | ||
|
||
static_assert(sizeof(LeveledListBase) == sizeof(RecordHeader)); | ||
static_assert(sizeof(LeveledListBase::Entry) == 18); | ||
|
||
} | ||
|
||
#pragma pack(pop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.