-
Posts
300 -
Joined
-
Last visited
-
Feedback
0%
About Kori

Informations
-
Gender
Male
-
Country
Germany
-
Nationality
German
Development
- Github
Kori's Achievements
-
Kori started following Official Additional Equipment Page issue , Client Dark mode , [Fix] Guild name "Noname" after leaving a guild and 6 others
-
The window title bar switches to dark when Windows is set to dark mode, and updates live when the setting is changed while the client is running. Only one file to edit: EterLib/MSWindow.cpp 1. Search for: CMSWindow::TWindowClassSet CMSWindow::ms_stWCSet; HINSTANCE CMSWindow::ms_hInstance = NULL; Add below: // Windows apps-theme setting; missing value (Wine, pre-1809) means light. static bool IsSystemDarkMode() { DWORD value = 1; DWORD size = sizeof(value); if (::RegGetValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", L"AppsUseLightTheme", RRF_RT_REG_DWORD, nullptr, &value, &size) != ERROR_SUCCESS) return false; return value == 0; } // dwmapi is loaded dynamically: under Wine the call just fails and the // Linux window manager keeps drawing the frame in the desktop theme. static void ApplySystemTitleBarTheme(HWND hWnd) { using DwmSetWindowAttributeFn = HRESULT(WINAPI*)(HWND, DWORD, LPCVOID, DWORD); constexpr DWORD UseImmersiveDarkMode = 20; constexpr DWORD UseImmersiveDarkModeBefore20H1 = 19; static HMODULE s_dwm = ::LoadLibraryA("dwmapi.dll"); if (!s_dwm) return; static auto s_setAttr = reinterpret_cast<DwmSetWindowAttributeFn>( ::GetProcAddress(s_dwm, "DwmSetWindowAttribute")); if (!s_setAttr) return; BOOL dark = IsSystemDarkMode() ? TRUE : FALSE; if (FAILED(s_setAttr(hWnd, UseImmersiveDarkMode, &dark, sizeof(dark)))) s_setAttr(hWnd, UseImmersiveDarkModeBefore20H1, &dark, sizeof(dark)); } 2. Search for: case WM_ACTIVATEAPP: m_isActive = (wParam == WA_ACTIVE) || (wParam == WA_CLICKACTIVE); break; Add below: // Sent when the user toggles light/dark mode while the client runs. case WM_SETTINGCHANGE: if (lParam && ::lstrcmpiW((LPCWSTR)lParam, L"ImmersiveColorSet") == 0) { ApplySystemTitleBarTheme(hWnd); ::SetWindowPos(hWnd, nullptr, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED); } break; 3. Search for (inside CMSWindow::Create): SetWindowLongPtrW(m_hWnd, GWLP_USERDATA, (LONG_PTR)this); Add below: ApplySystemTitleBarTheme(m_hWnd);
-
- 4
-
-
-
-
First of all: Thanks to Mitachi for the question on Discord and to Sauber for explaining how something like this happens. Reason: On guild leave the client called CPythonGuild::Destroy(), which wiped the whole guild name cache (m_GuildNameMap), including the names of other guilds. The server sends each guild name only once per session (CHARACTER::m_known_guild), so every text tail created afterwards fell back to "Noname" until relog. have a nice day
- 1 reply
-
- 3
-
-
official Official Unpacked Updates Metin2 - No Spam
Kori replied to pollux's topic in Guides & HowTo
GF-26.1.11 Protos Alternative download links → Mediafire GF-26.1.11 Patch Alternative download links → Alternate_1 ( in work ) GF-26.1.11 locales- 147 replies
-
- 252
-
-
-
-
-
-
-
-
-
You can fix the errors yourself, can't you? I can help you with one of them : The tutorial was generated by AI, but it solves exactly that problem. I tested it and everything works, and you also fixed a bug in the process: there was something wrong in the repo regarding the “do not drop” setting for the sword's aura, which had been set incorrectly, and you'll fix that right away with
-
DefineExtractor – Update & Refactor April 2026 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Build System: CMake The project has been fully migrated to CMake. No more manual VS project setup required. • New CMakeLists.txt – C++20, automatic thread library linking • New CMakePresets.json – Debug and Release selectable directly from the VS toolbar dropdown Output: build/debug/DefineExtractor.exe Output: build/release/DefineExtractor.exe • New CMAKE_VS_SETUP.md – step-by-step build guide for Visual Studio 2022/2026 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Performance Optimizations Analysis revealed 4 stacked issues causing ~96% CPU load and long runtimes on large codebases (e.g. 449,000 lines): 1. Double file reading (HIGH) Every file was read twice — once sequentially upfront for line counting, then again during actual parsing. Fix: Line count is now accumulated atomically by worker threads during parsing. No pre-scan pass at all. 2. regex_search on every single line (HIGH) A complex 4-branch regex pattern was called on every one of 449k+ lines. Fix: shouldRunDefineRegex() pre-filter — the regex only fires when both '#' AND the define name are present in the line (~0.1% of lines). 3. anyIfStartRegex inside every active #ifdef block (MEDIUM) A regex was used to detect nested #if / #ifdef / #ifndef directives. Fix: Replaced by isAnyIfStart() — plain string character checks, no regex. 4. getIndent() scanned the entire line (MEDIUM) Used std::accumulate which always iterated to the end of the string. Fix: Now breaks at the first non-whitespace character. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Unit Tests (TDD) Performance helper functions were extracted into DefineExtractor/helpers.h and are now fully unit-tested (Red → Green → Refactor cycle). • Framework: Catch2 v2 (single-header, no external install required) • 18 tests — all passing • Coverage: getIndent(), isAnyIfStart(), shouldRunDefineRegex() ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Documentation & Repository • README.md – fully rewritten: CMake build, presets, test guide, updated project layout (DE/EN) • CONTRIBUTING.md – bug reports, feature requests, PR workflow, code style guidelines (DE/EN) • SECURITY.md – confidential vulnerability reporting process (DE/EN) • CODE_OF_CONDUCT.md – community standards, Contributor Covenant 2.1 (DE/EN) • dependabot.yml – fixed invalid package-ecosystem: "" → "github-actions" • .gitignore – cleaned up: removed leftover game-server entries, added build/ and Output/ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Built & tested with Visual Studio 2026 / MSVC 19.50 / Ninja
-
DefineExtractor – Extract Preprocessor Defines from C/C++ Code Lightweight & Fast Tool for Extracting Preprocessor Macros 🛠 Features: Extracts `#define` macros from C and C++ source code. Supports complex macros, including those with parameters. Fast & efficient – parses large codebases with minimal overhead. Standalone tool – no dependencies required, runs directly. Ideal for static analysis, reverse engineering, and code auditing. How It Works: - Scans `.c`, `.cpp`, `.h`, and `.hpp` files for `#define` statements. - Extracts macro names, values, and parameters. - Outputs structured results for easy processing. Download & Usage: GitHub Repository: DefineExtractor on GitHub How to use: Clone the repository: git clone [Hidden Content] Compile the tool (if needed) or run the precompiled binary. Extract macros from source files. View extracted defines in the output. FAQ: What is this tool useful for? - Reverse engineering legacy codebases. - Static analysis of C/C++ projects. - Automating the extraction of preprocessor macros. Is it open-source? Yes! The project is fully open-source under the MIT license. Can it handle large projects? Absolutely! It is optimized for performance and can process large amounts of code efficiently. Feedback & Contributions Welcome! - Found a bug or have a feature request? Open an issue on GitHub! - Contributions are welcome – feel free to submit a pull request. GitHub Repo: DefineExtractor on GitHub or [Hidden Content] V0.4 Video: Changelogs Update 0.3: Update 0.4 Update 0.5:
-
I don't know if it gives the same result. So far I only know that you have to have it +1 we the actual index
-
There's not really much to say about it, you don't have to increase the index when you add new armor or hair
-
import re import os # Directory containing the source files SOURCE_PATH = "path/to/server/source" BLACKLIST_FILES = ["empire_text_convert.cpp"] # Globals to store translations and results translations = {} untranslated_texts = [] success_count = 0 failure_count = 0 def list_locale_files(): """Lists all locale_string_x.txt files in the current directory.""" return [f for f in os.listdir() if f.startswith("locale_string_") and f.endswith(".txt")] def load_translations(file_path): """Loads translations from the selected locale string file.""" global translations print(f"Loading translations from: {file_path}") pattern = r'"(.*?)"' raw_key = None with open(file_path, "r", encoding="utf-8") as file: for line in file: line = line.strip() if not line: continue match = re.search(pattern, line) if match: extracted = match.group(1) if raw_key is None: raw_key = extracted else: translations[raw_key] = extracted raw_key = None def process_file(file_path): """Processes a .cpp file, replacing texts with translations.""" global success_count, failure_count print(f"Processing file: {file_path}") pattern = r'LC_TEXT.*?"(.*?)"' updated_lines = [] with open(file_path, "r", encoding="utf-8") as file: lines = file.readlines() for line in lines: match = re.search(pattern, line) if match: original_text = match.group(1) if original_text in translations: translated_text = translations[original_text] updated_lines.append(line.replace(f'"{original_text}"', f'"{translated_text}"')) success_count += 1 else: untranslated_texts.append(original_text) updated_lines.append(line) failure_count += 1 else: updated_lines.append(line) # Write updated content back to the file with open(file_path, "w", encoding="utf-8") as file: file.writelines(updated_lines) def scan_source_directory(): """Scans the source directory for .cpp files and processes them.""" for root, dirs, files in os.walk(SOURCE_PATH): for file in files: if file.endswith(".cpp") and file not in BLACKLIST_FILES: process_file(os.path.join(root, file)) def save_untranslated_texts(): """Saves untranslated texts to a file.""" if untranslated_texts: with open("untranslated_texts.txt", "w", encoding="utf-8") as file: for text in set(untranslated_texts): # Remove duplicates file.write(f"{text}\n") print(f"Untranslated texts saved to 'untranslated_texts.txt'") def main(): # Step 1: List available locale string files locale_files = list_locale_files() if not locale_files: print("No locale string files found.") return print("Available locale string files:") for i, file in enumerate(locale_files, start=1): print(f"{i}. {file}") # Step 2: User selects a locale string file try: choice = int(input("Select a file by number: ")) if choice < 1 or choice > len(locale_files): print("Invalid selection.") return selected_file = locale_files[choice - 1] except ValueError: print("Invalid input.") return # Step 3: Load translations load_translations(selected_file) # Step 4: Process source files scan_source_directory() # Step 5: Save untranslated texts and show stats save_untranslated_texts() print(f"\nTranslation completed!") print(f" Successfully translated: {success_count}") print(f" Failed to translate: {failure_count}") if __name__ == "__main__": main() Here is a revised version with minor improvements.
- 1 reply
-
- 2
-
-
After a long time I tried to add armor and realized how annoying it is to use the ShapeDataCount or the HairDataCount every time, so I did it “automatically” via Source we open: GameLib/RaceDataFile.cpp replace the whole code with: I think that should be clear and understandable. I have tested it and it works without any problems
-
I have the same "problem" I have to reset the filter after every login, map change or character change then it works. Did you get this fixed?
-
Hello Devs, I use this system: my error in a video : [Hidden Content] I dont use the ENABLE_ACCE_SYSTEM system here my code parts: ItemData.h / Client source enum EWearPositions { WEAR_BODY, // 0 WEAR_HEAD, // 1 WEAR_FOOTS, // 2 WEAR_WRIST, // 3 WEAR_WEAPON, // 4 WEAR_NECK, // 5 WEAR_EAR, // 6 #ifndef ENABLE_ADDITIONAL_EQUIPMENT_PAGE WEAR_UNIQUE1, // 7 WEAR_UNIQUE2, // 8 #endif WEAR_ARROW, // 9 (7) WEAR_SHIELD, // 10 (8) #ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE WEAR_BELT, // 11 (9) WEAR_PENDANT, // 10 (PENDANT) WEAR_GLOVES, // 11 (GLOVES) #endif WEAR_COSTUME_BODY, WEAR_COSTUME_HAIR, #ifdef ENABLE_ACCE_SYSTEM WEAR_COSTUME_ACCE, #endif #ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE WEAR_UNIQUE1, // 24 - 23 WEAR_UNIQUE2, // 25 - 24 #endif WEAR_MAX_NUM, }; enum EItemWearableFlag { WEARABLE_BODY = (1 << 0), WEARABLE_HEAD = (1 << 1), WEARABLE_FOOTS = (1 << 2), WEARABLE_WRIST = (1 << 3), WEARABLE_WEAPON = (1 << 4), WEARABLE_NECK = (1 << 5), WEARABLE_EAR = (1 << 6), #ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE WEARABLE_ARROW = (1 << 7), WEARABLE_SHIELD = (1 << 8), WEARABLE_BELT = (1 << 9), WEARABLE_ABILITY = (1 << 10), WEARABLE_COSTUME_BODY = (1 << 11), WEARABLE_COSTUME_HAIR = (1 << 12), #ifdef ENABLE_ACCE_SYSTEM WEARABLE_COSTUME_ACCE = (1 << 13), #endif WEARABLE_UNIQUE = (1 << 13), #else WEARABLE_UNIQUE = (1 << 7), WEARABLE_SHIELD = (1 << 8), WEARABLE_ARROW = (1 << 9), WEARABLE_HAIR = (1 << 10), WEARABLE_ABILITY = (1 << 11), WEARABLE_COSTUME_BODY = (1 << 12), #ifdef ENABLE_ACCE_SYSTEM WEARABLE_COSTUME_ACCE = (1 << 13), #endif #endif }; dump_proto source part: int get_Item_WearFlag_Value(string inputString) { string arWearrFlag[] = { "WEAR_BODY", "WEAR_HEAD", "WEAR_FOOTS", "WEAR_WRIST", "WEAR_WEAPON", "WEAR_NECK", "WEAR_EAR", "WEAR_ARROW", "WEAR_SHIELD", "WEAR_BELT", "WEAR_PENDANT", "WEAR_GLOVES", "WEAR_COSTUME_BODY", "WEAR_COSTUME_HAIR", #ifdef ENABLE_ACCE_SYSTEM "WEAR_COSTUME_ACCE", #endif "WEAR_UNIQUE" }; item_lenght.h /common enum EItemWearableFlag { WEARABLE_BODY = (1 << 0), WEARABLE_HEAD = (1 << 1), WEARABLE_FOOTS = (1 << 2), WEARABLE_WRIST = (1 << 3), WEARABLE_WEAPON = (1 << 4), WEARABLE_NECK = (1 << 5), WEARABLE_EAR = (1 << 6), #ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE WEARABLE_ARROW = (1 << 7), WEARABLE_SHIELD = (1 << 8), WEARABLE_BELT = (1 << 9), WEARABLE_PENDANT = (1 << 10), WEARABLE_GLOVES = (1 << 11), WEARABLE_COSTUME_BODY = (1 << 12), WEARABLE_COSTUME_HAIR = (1 << 13), #ifdef __ACCE_SYSTEM__ WEARABLE_COSTUME_ACCE = (1 << 14), #endif WEARABLE_UNIQUE = (1 << 14), #else WEARABLE_UNIQUE = (1 << 7), WEARABLE_SHIELD = (1 << 8), WEARABLE_ARROW = (1 << 9), WEARABLE_HAIR = (1 << 10), WEARABLE_ABILITY = (1 << 11), WEARABLE_COSTUME_BODY = (1 << 12), #ifdef __ACCE_SYSTEM__ WEARABLE_COSTUME_ACCE = (1 << 13), #endif #endif }; length.h/common: enum EWearPositions { WEAR_BODY, // 0 WEAR_HEAD, // 1 WEAR_FOOTS, // 2 WEAR_WRIST, // 3 WEAR_WEAPON, // 4 WEAR_NECK, // 5 WEAR_EAR, // 6 #ifndef ENABLE_ADDITIONAL_EQUIPMENT_PAGE WEAR_UNIQUE1, // 7 WEAR_UNIQUE2, // 8 #endif WEAR_ARROW, // 7 WEAR_SHIELD, // 8 #ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE WEAR_BELT, // 9 WEAR_PENDANT, // 10 (PENDANT) WEAR_GLOVES, // 11 (GLOVES) // Second Equipment WEAR_SECOND_BODY, // 12 WEAR_SECOND_HEAD, // 13 WEAR_SECOND_FOOTS, // 14 WEAR_SECOND_WRIST, // 15 WEAR_SECOND_WEAPON, // 16 WEAR_SECOND_NECK, // 17 WEAR_SECOND_EAR, // 18 WEAR_SECOND_ARROW, // 19 WEAR_SECOND_SHIELD, // 20 WEAR_SECOND_BELT, // 21 WEAR_SECOND_PENDANT, // 22 WEAR_SECOND_GLOVES, // 23 #endif #ifndef ENABLE_ADDITIONAL_EQUIPMENT_PAGE WEAR_ABILITY1, // 11 - 10 WEAR_ABILITY2, // 12 - 11 WEAR_ABILITY3, // 13 - 12 WEAR_ABILITY4, // 14 - 13 WEAR_ABILITY5, // 15 - 14 WEAR_ABILITY6, // 16 - 15 WEAR_ABILITY7, // 17 - 16 WEAR_ABILITY8, // 18 - 17 #endif WEAR_COSTUME_BODY, // 24 WEAR_COSTUME_HAIR, // 25 #ifdef __ACCE_SYSTEM__ WEAR_COSTUME_ACCE, // 26 #endif #ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE WEAR_UNIQUE1, // 27 WEAR_UNIQUE2, // 28 #else WEAR_RING1, // 22 - 21 :New ring slot 1 (left) WEAR_RING2, // 23 - 22 : New ring slot 2 (right) WEAR_BELT, // 24 - 21 : New belt slot #endif //WEAR_MAX_NUM, }; ProtoReader.cpp/db int get_Item_WearFlag_Value(string inputString) { string arWearrFlag[] = { "WEAR_BODY", "WEAR_HEAD", "WEAR_FOOTS", "WEAR_WRIST", "WEAR_WEAPON", "WEAR_NECK", "WEAR_EAR", "WEAR_ARROW", "WEAR_SHIELD", "WEAR_BELT", "WEAR_PENDANT", "WEAR_GLOVES", "WEAR_COSTUME_BODY", "WEAR_COSTUME_HAIR", #ifdef ENABLE_ACCE_SYSTEM "WEAR_COSTUME_ACCE", #endif "WEAR_UNIQUE" }; I hope anyone can help me with my proplem
-
official Official Extra Equipment Page [22.1]
Kori replied to msnas's topic in Features & Metin2 Systems
I have this issue, any ideas ? i use the T4mp clean source without systems [Hidden Content] -
I had a space error in my db source. Thanks
-
Hello Devs, i have added this system: when i try to login then im stuck in the loadingscreen. i dont have a error in my syserr.txt here a gif: [Hidden Content]
