Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
c017dc5
Add contributors to CONTRIBUTING.md
AmeliaCute Nov 24, 2025
34b601a
Update issue templates
AmeliaCute Nov 24, 2025
75d8f31
Merge pull request #38 from ReDevCafe/community/issue-template
AmeliaCute Nov 24, 2025
da5766f
WIP
AmeliaCute Dec 17, 2025
b2a4dc5
EXPERIMENTAL: add GameRegistries
AmeliaCute Dec 18, 2025
327c9c5
WIP
AmeliaCute Dec 24, 2025
8e04408
Update offsets for GObjects, GNames, and GWorld in Offset.h
AmeliaCute Dec 24, 2025
22d4a1a
Merge pull request #41 from ReDevCafe/update/2.0
AmeliaCute Dec 24, 2025
a680bb3
Merge 22d4a1ac73be6a584117a82e6cb751e2174234f3 into c017dc5ba5595deda…
AmeliaCute Dec 24, 2025
ba838b0
[skip ci] update include submodule to latest main
github-actions[bot] Dec 24, 2025
ff5bd77
update submodule to latest commit
AmeliaCute Dec 24, 2025
a2bd4c3
MAIS LAISSE MOI PR
AmeliaCute Dec 24, 2025
0be4bcc
AAAAAAAAAAA
AmeliaCute Dec 24, 2025
c4026e9
Merge pull request #42 from ReDevCafe/fix/2.0.1
AmeliaCute Dec 24, 2025
7242e37
Update includes
AmeliaCute Dec 24, 2025
e43d96d
WIP
AmeliaCute Sep 17, 2025
b9a2f9a
Cleaning and Adding functions
AmeliaCute Sep 19, 2025
818c6ad
Include fixes
AmeliaCute Sep 26, 2025
c376263
Switching to CLANG
AmeliaCute Oct 7, 2025
923feb2
Remove goofy readme
AmeliaCute Oct 7, 2025
f7f775b
Temp fix for issue #35
AmeliaCute Oct 8, 2025
c9afe8a
Wip fixing API
AmeliaCute Oct 9, 2025
80e4f66
Fixing Player::GetLifeType
AmeliaCute Oct 9, 2025
496ff0b
Cleaning a little bit the CMake
AmeliaCute Nov 3, 2025
c3802a5
Adding config
AmeliaCute Nov 3, 2025
20a50f6
Revert ModLoader unnecessary code
AmeliaCute Nov 3, 2025
2d95cc2
Fixing logger deadlock #35
AmeliaCute Nov 4, 2025
a154eb7
Update to latest include branch commit
AmeliaCute Nov 4, 2025
c343a83
WIP
AmeliaCute Sep 17, 2025
0d42af0
Include fixes
AmeliaCute Sep 26, 2025
723b778
Switching to CLANG
AmeliaCute Oct 7, 2025
d72394c
Remove goofy readme
AmeliaCute Oct 7, 2025
b4c852c
Temp fix for issue #35
AmeliaCute Oct 8, 2025
bf2b938
Wip fixing API
AmeliaCute Oct 9, 2025
f650784
Fixing Player::GetLifeType
AmeliaCute Oct 9, 2025
a677bb3
Cleaning a little bit the CMake
AmeliaCute Nov 3, 2025
fd8c321
Adding config
AmeliaCute Nov 3, 2025
e6041d4
Revert ModLoader unnecessary code
AmeliaCute Nov 3, 2025
5eade0f
Fixing logger deadlock #35
AmeliaCute Nov 4, 2025
7da81b3
WIP + Clean
AmeliaCute Nov 12, 2025
d50f324
Engine FNames (CTor + ToString Class)
AmeliaCute Nov 12, 2025
7096e87
Full FName Conversion
AmeliaCute Nov 21, 2025
6c0a23b
I guess everything is good for FNames
AmeliaCute Nov 21, 2025
f8113b2
Replace FName with API_FName
AmeliaCute Nov 24, 2025
3dffab1
TMap Iterator
AmeliaCute Nov 24, 2025
fa8e0b8
WIP
AmeliaCute Nov 30, 2025
7918357
TMap reallocation
AmeliaCute Nov 30, 2025
1f9d738
TEST
AmeliaCute Nov 30, 2025
2ebfda8
test 2
AmeliaCute Nov 30, 2025
e327b64
LLVM LLVM 21.1.0 instead of 21.1.3
AmeliaCute Nov 30, 2025
85bbc85
fucking cache
AmeliaCute Nov 30, 2025
83a6133
Fixing my own complaints
AmeliaCute Dec 1, 2025
7758e77
duh
AmeliaCute Dec 1, 2025
fcb5214
Fixing my own complaints v2
AmeliaCute Dec 1, 2025
84fb16d
TCHOUPI
AmeliaCute Dec 15, 2025
67336b4
Windows Threads to Standard Threads and other fixes..
AmeliaCute Dec 17, 2025
88c0b4b
WIP
AmeliaCute Dec 24, 2025
b36a43f
Update includes
AmeliaCute Dec 24, 2025
b73a3be
OPTIQUE 2000
AmeliaCute Dec 24, 2025
28a568f
Merge branch 'fix/clean-api' of https://github.com/ReDevCafe/FantasyL…
AmeliaCute Dec 24, 2025
49cdcc2
Refactor archive file handling methods in ModEnvironnement
AmeliaCute Dec 24, 2025
7b748e1
Update subproject commit reference in include
AmeliaCute Dec 24, 2025
28ed1e6
Rebase de con pour la 2.0.3
AmeliaCute Jan 4, 2026
3dc8045
fix vscode merge editor shit
AmeliaCute Jan 4, 2026
c089af2
Refactor GameData and Pattern classes to utilize CommonData for base …
AmeliaCute Jan 5, 2026
58d057c
WIP
AmeliaCute Dec 17, 2025
60c9435
EXPERIMENTAL: add GameRegistries
AmeliaCute Dec 18, 2025
55dbc91
Merge branch 'fea/clean-api/registry' of https://github.com/ReDevCafe…
AmeliaCute Jan 5, 2026
62cf6df
WIP NEED LOT OF CLEANING
AmeliaCute Jan 8, 2026
05948c2
update include
AmeliaCute Jan 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG REPORT] "
labels: bug
assignees: AmeliaCute, EltyDev

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
```



```


**Expected behavior**
```



```

**Screenshots / Videos**
If applicable, add screenshots to help explain your problem.

FLiAPI Version: `1.10`

Mod list:
```
-
-

```


**Additional context**
Add any other context about the problem here.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.16)
project(FantasyLifeI-ModLoader LANGUAGES CXX C)

set(VERSION 1.00)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
option(MLDEBUG "Enable ModLoader debug code" ON)

add_subdirectory(DllProxy)
Expand All @@ -26,8 +25,8 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()


target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_link_libraries(${PROJECT_NAME} PRIVATE user32 kernel32)

file(GLOB_RECURSE PROJECT_SOURCE "src/*.cpp")
target_sources(${PROJECT_NAME} PUBLIC src/Lib/miniz.c ${PROJECT_SOURCE})
target_sources(${PROJECT_NAME} PRIVATE src/Lib/miniz.c ${PROJECT_SOURCE})
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
AmeliaCute
EltyDev
2 changes: 1 addition & 1 deletion include
Submodule include updated 153 files
1 change: 0 additions & 1 deletion src/API/Skill/SkillData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "API/Skill/SkillData.hpp"
#include "API/Engine/FName.hpp"
#include "API/Common/Common.hpp"

void SkillData::SetName(LANG lang, FString string)
Expand Down
6 changes: 6 additions & 0 deletions src/CommonData.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "CommonData.hpp"

#ifdef _WIN32
int64_t CommonData::sizeImage = 0;
uintptr_t CommonData::baseAddress = 0;
#endif
20 changes: 5 additions & 15 deletions src/GameData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,25 @@
#include "API/Entities/Player/Player.hpp"
#include "ModLoader.hpp"
#include "Offset.h"
#include "CommonData.hpp"

#ifdef _WIN32
#include <Windows.h>
#else
#endif

GameData::GameData(uintptr_t baseAddress, uint32_t imageSize) :
GameData::GameData() :
_staticDataManager(nullptr),
_dynamicDataManager(nullptr)
{
ModLoader::logger->verbose("Initialize GameData");
this->_baseAddress = baseAddress;
this->_imageSize = imageSize;
}

void GameData::init()
{
this->_gObjects = reinterpret_cast<FUObjectArray *>(this->_baseAddress + GOBJECTS_OFFSET);
this->_gWorld = reinterpret_cast<void *>(this->_baseAddress + GWORLD_OFFSET);
this->_gNames = reinterpret_cast<void *>(this->_baseAddress + GNAMES_OFFSET);
this->_gObjects = reinterpret_cast<FUObjectArray *>(CommonData::GetBaseAddress() + GOBJECTS_OFFSET);
this->_gWorld = reinterpret_cast<void *>(CommonData::GetBaseAddress() + GWORLD_OFFSET);
this->_gNames = reinterpret_cast<void *>(CommonData::GetBaseAddress() + GNAMES_OFFSET);
this->waitObject(&this->_gObjects);
this->waitObject(&this->_staticDataManager, "StaticDataManager", 1);
ModLoader::logger->verbose("Found StaticDataManager => ", std::hex, this->_staticDataManager);
Expand Down Expand Up @@ -66,15 +65,6 @@ Player *GameData::getPlayer() {
return _player.get();
}

uintptr_t GameData::getBaseAddress() {
return _baseAddress;
}

uint32_t GameData::getImageSize()
{
return _imageSize;
}

FUObjectArray *GameData::getGObjects() {
return _gObjects;
}
Expand Down
132 changes: 132 additions & 0 deletions src/GameRegistries.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
#include "GameRegistries.hpp"
#include "GameData.hpp"
#include "ModLoader.hpp"
#include "SDK/DP1Project.h"

// Initialize merged registries
std::shared_ptr<MergedRegistry<FGDBattleCommandNameNoun>> GameRegistries::BATTLE_COMMAND_NOUN = nullptr;
std::shared_ptr<MergedRegistry<FGDPlantDungeonText_Noun>> GameRegistries::PLANT_DUNGEON_NOUN = nullptr;
std::shared_ptr<MergedRegistry<FGDItemText_Noun>> GameRegistries::ITEM_NOUN = nullptr;
std::shared_ptr<MergedRegistry<FGDLifeText_Noun>> GameRegistries::LIFE_NOUN = nullptr;
std::shared_ptr<MergedRegistry<FGDSkillText>> GameRegistries::SKILL_NOUN = nullptr;
std::shared_ptr<MergedRegistry<FGDQuestRequestMapText_Noun>> GameRegistries::QUEST_REQUEST_NOUN = nullptr;
std::shared_ptr<MergedRegistry<FGDQuestTitleText>> GameRegistries::QUEST_TITLE_NOUN = nullptr;
std::shared_ptr<MergedRegistry<FGDMapText_Noun>> GameRegistries::MAP_NOUN = nullptr;
std::shared_ptr<MergedRegistry<FGDMenuText_Noun>> GameRegistries::MENU_NOUN = nullptr;
std::shared_ptr<MergedRegistry<FGDCharaText_Noun>> GameRegistries::CHARA_NOUN = nullptr;
std::shared_ptr<MergedRegistry<FGDSystemText_Noun>> GameRegistries::SYSTEM_NOUN = nullptr;
std::shared_ptr<MergedRegistry<ItemMaterialData>> GameRegistries::ITEM_MATERIAL = nullptr;

// Game source IDs
uint16_t GameRegistries::_battleCommandNounSourceId = 0;
uint16_t GameRegistries::_plantDungeonNounSourceId = 0;
uint16_t GameRegistries::_itemNounSourceId = 0;
uint16_t GameRegistries::_lifeNounSourceId = 0;
uint16_t GameRegistries::_skillNounSourceId = 0;
uint16_t GameRegistries::_questRequestNounSourceId = 0;
uint16_t GameRegistries::_questTitleNounSourceId = 0;
uint16_t GameRegistries::_mapNounSourceId = 0;
uint16_t GameRegistries::_menuNounSourceId = 0;
uint16_t GameRegistries::_charaNounSourceId = 0;
uint16_t GameRegistries::_systemNounSourceId = 0;
uint16_t GameRegistries::_itemMaterialSourceId = 0;

void GameRegistries::init(GameData* gameData)
{
ModLoader::logger->verbose("Initialize Game Registries");
auto* sdm = gameData->getStaticDataManager();

bindNounPRE(sdm);
bindItem(sdm);
}

void GameRegistries::bindNounPRE(UStaticDataManager* sdm)
{
ModLoader::gameData->waitObject(&sdm->m_BattleCommandNameNoun);
BATTLE_COMMAND_NOUN = std::make_shared<MergedRegistry<FGDBattleCommandNameNoun>>();
auto battleCommandSource = std::make_shared<TMapRegistrySource<FName, FGDBattleCommandNameNoun>>("BattleCommandNoun", 0, &sdm->m_BattleCommandNameNoun->m_dataMap);
battleCommandSource->BuildIndex();
_battleCommandNounSourceId = BATTLE_COMMAND_NOUN->AddSource(battleCommandSource);
ModLoader::logger->verbose("Binded Battle Command Noun Registry!");

ModLoader::gameData->waitObject(&sdm->m_PlantDungeonText_Noun);
PLANT_DUNGEON_NOUN = std::make_shared<MergedRegistry<FGDPlantDungeonText_Noun>>();
auto plantDungeonSource = std::make_shared<TMapRegistrySource<FName, FGDPlantDungeonText_Noun>>("PlantDungeonNoun", 0, &sdm->m_PlantDungeonText_Noun->m_dataMap);
plantDungeonSource->BuildIndex();
_plantDungeonNounSourceId = PLANT_DUNGEON_NOUN->AddSource(plantDungeonSource);
ModLoader::logger->verbose("Binded Plant Dungeon Noun Registry!");

ModLoader::gameData->waitObject(&sdm->m_ItemText_Noun);
ITEM_NOUN = std::make_shared<MergedRegistry<FGDItemText_Noun>>();
auto itemNounSource = std::make_shared<TMapRegistrySource<FName, FGDItemText_Noun>>("ItemNoun", 0, &sdm->m_ItemText_Noun->m_dataMap);
itemNounSource->BuildIndex();
_itemNounSourceId = ITEM_NOUN->AddSource(itemNounSource);
ModLoader::logger->verbose("Binded Item Noun Registry!");

ModLoader::gameData->waitObject(&sdm->m_LifeText_Noun);
LIFE_NOUN = std::make_shared<MergedRegistry<FGDLifeText_Noun>>();
auto lifeNounSource = std::make_shared<TMapRegistrySource<FName, FGDLifeText_Noun>>("LifeNoun", 0, &sdm->m_LifeText_Noun->m_dataMap);
lifeNounSource->BuildIndex();
_lifeNounSourceId = LIFE_NOUN->AddSource(lifeNounSource);
ModLoader::logger->verbose("Binded Life Noun Registry!");

ModLoader::gameData->waitObject(&sdm->m_SkillText);
SKILL_NOUN = std::make_shared<MergedRegistry<FGDSkillText>>();
auto skillNounSource = std::make_shared<TMapRegistrySource<FName, FGDSkillText>>("SkillNoun", 0, &sdm->m_SkillText->m_dataMap);
skillNounSource->BuildIndex();
_skillNounSourceId = SKILL_NOUN->AddSource(skillNounSource);
ModLoader::logger->verbose("Binded Skill Noun Registry!");

ModLoader::gameData->waitObject(&sdm->m_QuestRequestMapText_Noun);
QUEST_REQUEST_NOUN = std::make_shared<MergedRegistry<FGDQuestRequestMapText_Noun>>();
auto questRequestSource = std::make_shared<TMapRegistrySource<FName, FGDQuestRequestMapText_Noun>>("QuestRequestNoun", 0, &sdm->m_QuestRequestMapText_Noun->m_dataMap);
questRequestSource->BuildIndex();
_questRequestNounSourceId = QUEST_REQUEST_NOUN->AddSource(questRequestSource);
ModLoader::logger->verbose("Binded Quest Request Noun Registry!");

ModLoader::gameData->waitObject(&sdm->m_QuestTitleText);
QUEST_TITLE_NOUN = std::make_shared<MergedRegistry<FGDQuestTitleText>>();
auto questTitleSource = std::make_shared<TMapRegistrySource<FName, FGDQuestTitleText>>("QuestTitleNoun", 0, &sdm->m_QuestTitleText->m_dataMap);
questTitleSource->BuildIndex();
_questTitleNounSourceId = QUEST_TITLE_NOUN->AddSource(questTitleSource);
ModLoader::logger->verbose("Binded Quest Title Noun Registry!");

ModLoader::gameData->waitObject(&sdm->m_MapText_Noun);
MAP_NOUN = std::make_shared<MergedRegistry<FGDMapText_Noun>>();
auto mapNounSource = std::make_shared<TMapRegistrySource<FName, FGDMapText_Noun>>("MapNoun", 0, &sdm->m_MapText_Noun->m_dataMap);
mapNounSource->BuildIndex();
_mapNounSourceId = MAP_NOUN->AddSource(mapNounSource);
ModLoader::logger->verbose("Binded Map Noun Registry!");

ModLoader::gameData->waitObject(&sdm->m_MenuText_Noun);
MENU_NOUN = std::make_shared<MergedRegistry<FGDMenuText_Noun>>();
auto menuNounSource = std::make_shared<TMapRegistrySource<FName, FGDMenuText_Noun>>("MenuNoun", 0, &sdm->m_MenuText_Noun->m_dataMap);
menuNounSource->BuildIndex();
_menuNounSourceId = MENU_NOUN->AddSource(menuNounSource);
ModLoader::logger->verbose("Binded Menu Noun Registry!");

ModLoader::gameData->waitObject(&sdm->m_CharaText_Noun);
CHARA_NOUN = std::make_shared<MergedRegistry<FGDCharaText_Noun>>();
auto charaNounSource = std::make_shared<TMapRegistrySource<FName, FGDCharaText_Noun>>("CharaNoun", 0, &sdm->m_CharaText_Noun->m_dataMap);
charaNounSource->BuildIndex();
_charaNounSourceId = CHARA_NOUN->AddSource(charaNounSource);
ModLoader::logger->verbose("Binded Chara Noun Registry!");

ModLoader::gameData->waitObject(&sdm->m_SystemText_Noun);
SYSTEM_NOUN = std::make_shared<MergedRegistry<FGDSystemText_Noun>>();
auto systemNounSource = std::make_shared<TMapRegistrySource<FName, FGDSystemText_Noun>>("SystemNoun", 0, &sdm->m_SystemText_Noun->m_dataMap);
systemNounSource->BuildIndex();
_systemNounSourceId = SYSTEM_NOUN->AddSource(systemNounSource);
ModLoader::logger->verbose("Binded System Noun Registry!");
}

void GameRegistries::bindItem(UStaticDataManager* sdm)
{
ModLoader::gameData->waitObject(&sdm->m_ItemMaterialData);
ITEM_MATERIAL = std::make_shared<MergedRegistry<ItemMaterialData>>();
auto itemMaterialSource = std::make_shared<WrappedRegistrySource<ItemMaterialData, FGDItemMaterialData>>("ItemMaterial", 0, &sdm->m_ItemMaterialData->m_dataMap);

itemMaterialSource->BuildIndex();
_itemMaterialSourceId = ITEM_MATERIAL->AddSource(itemMaterialSource);
ModLoader::logger->verbose("Binded Material Item Registry!");
}
12 changes: 8 additions & 4 deletions src/Hook/Pattern.cpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
#include "Hook/Pattern.hpp"
#include "CommonData.hpp"
#include "GameData.hpp"
#include "Hook/MemoryHelper.hpp"
#include "ModLoader.hpp"

Pattern::Pattern(uint8_t *pattern, const char *mask) : _pattern(pattern), _mask(mask) {}

size_t Pattern::getSize() {
size_t Pattern::getSize()
{
return strlen(_mask);
}

uint8_t *Pattern::getPattern() {
uint8_t *Pattern::getPattern()
{
return _pattern;
}

const char *Pattern::getMask() {
const char *Pattern::getMask()
{
return _mask;
}

Expand All @@ -24,5 +28,5 @@ uintptr_t Pattern::find(uintptr_t baseAddress, uint32_t range)

uintptr_t Pattern::find(uintptr_t startOffset)
{
return MemoryHelper::findPattern(ModLoader::gameData->getBaseAddress() + startOffset, ModLoader::gameData->getImageSize(), this->_pattern, this->_mask);
return MemoryHelper::findPattern(CommonData::GetBaseAddress() + startOffset, CommonData::GetSizeImage(), this->_pattern, this->_mask);
}
44 changes: 11 additions & 33 deletions src/Mod/ModEnvironnement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,46 +106,26 @@ void ModEnvironnement::resolveOrder(std::vector<ModObject*> mods)
_modsList = std::move(sorted);
}

bool ModEnvironnement::findModJsonInArchive(const std::filesystem::path& archivePath, std::string& foundPath)
bool ModEnvironnement::findFileInArchive(const std::filesystem::path& archivePath, const std::string& suffix, std::string& foundPath)
{
mz_zip_archive archive;
memset(&archive, 0, sizeof(archive));

if(!mz_zip_reader_init_file(&archive, archivePath.string().c_str(), 0)) return false;
if(!mz_zip_reader_init_file(&archive, archivePath.string().c_str(), 0))
return false;

mz_uint num = mz_zip_reader_get_num_files(&archive);
const size_t suffixLen = suffix.size();

for(mz_uint i = 0; i < num; ++i)
{
mz_zip_archive_file_stat stat;
if(!mz_zip_reader_file_stat(&archive, i, &stat)) continue;

std::string fname = stat.m_filename;
if(fname.size() >= 8 && fname.substr(fname.size() - 8) == "Mod.json")
{
foundPath = fname;
mz_zip_reader_end(&archive);
return true;
}
}

mz_zip_reader_end(&archive);
return false;
}

bool ModEnvironnement::findModLibInArchive(const std::filesystem::path& archivePath, const std::string& libName, std::string& foundPath)
{
mz_zip_archive archive;
memset(&archive, 0, sizeof(archive));

if(!mz_zip_reader_init_file(&archive, archivePath.string().c_str(), 0)) return false;
mz_uint num = mz_zip_reader_get_num_files(&archive);
for (mz_uint i = 0; i < num; ++i)
{
mz_zip_archive_file_stat st;
if (!mz_zip_reader_file_stat(&archive, i, &st)) continue;
std::string fname = st.m_filename;

if (fname.size() >= libName.size() && fname.compare(fname.size() - libName.size(), libName.size(), libName) == 0)
const char* fname = stat.m_filename;
size_t fnameLen = strlen(fname);

if(fnameLen >= suffixLen && strncmp(fname + fnameLen - suffixLen, suffix.c_str(), suffixLen) == 0)
{
foundPath = fname;
mz_zip_reader_end(&archive);
Expand Down Expand Up @@ -174,8 +154,6 @@ bool ModEnvironnement::readContentFromArchive(const std::filesystem::path& archi
{
mz_zip_archive_file_stat stat;
if(!mz_zip_reader_file_stat(&archive, i, &stat)) continue;
//if(stat.m_filename == "") break;

std::string fname = stat.m_filename;
if(fname.size() >= internalName.size() && fname.compare(fname.size() - internalName.size(), internalName.size(), internalName) == 0)
{
Expand Down Expand Up @@ -242,7 +220,7 @@ void ModEnvironnement::SetupEnvironnnement(std::string modDirs)
if(entryPath.extension() == ".fliarchive")
{
std::string modJsonInternal;
if(!findModJsonInArchive(entryPath, modJsonInternal))
if(!findFileInArchive(entryPath, "Mod.json", modJsonInternal))
{
ModLoader::logger->warn("Invalid mod (no metadata) ", entryPath);
continue;
Expand All @@ -265,7 +243,7 @@ void ModEnvironnement::SetupEnvironnnement(std::string modDirs)

std::string internalModPath;
std::string modLibIdentifier = "CompiledBin.bin";
if(!findModLibInArchive(entryPath, modLibIdentifier, internalModPath))
if(!findFileInArchive(entryPath, modLibIdentifier, internalModPath))
{
ModLoader::logger->warn("Invalid mod (no content) ", entryPath);
continue;
Expand Down
Loading