This project is a workspace for modding Il2Cpp-based Unity Android games using the ByNameModding (BNM) library. It features modern dump analysis tools to streamline the mod development process.
The ultimate interactive tool for navigating your game dump with a pro terminal experience:
- Smart Class Search: Fast search with Auto-complete suggestions (Press Tab).
- Reverse Lookup: Search by method or field name to find the owning class.
- Namespace Browser: Explore the game's architecture by namespace.
- Multi-Selection: Select multiple methods/fields at once to generate a combined snippet.
- BNM Utility Cheat Sheet: Quick access to boilerplate code for MonoStrings, Coroutines, Lists, etc.
- Save to File: Directly append generated snippets to
bnm_snippets.cpp. - Nerd Font Support: Optimized for terminal users using Nerd Fonts.
A fast, direct search utility for quick queries:
- Modern UI (Rich): Clean, colorful table and panel displays.
- Smart Signature Generator: Generates accurate C++ function pointers for hooks.
- Type Translation: Maps C# types directly to BNM C++ types.
- Unity Lifecycle Detector: Automatically identifies methods like
Update,FixedUpdate, etc.
To obtain the required dump.json file for this project, you must use the following tool:
- Tool: ngentood/dump
After running the tool, place the resulting .json files into the source_dump_json/ directory.
Ensure you have the required libraries installed:
pip install rich questionaryNote: For the best experience with icons, use a terminal font from Nerd Fonts.
Interactive Explorer (Recommended):
python interactive_search.pyDirect Search:
python search_dump.py <keyword>source_dump_json/: Directory containing.jsonand.csdump results.interactive_search.py: Interactive menu-based explorer and snippet generator.search_dump.py: Direct command-line search utility.bnm_snippets.cpp: (Auto-generated) File where saved snippets are stored.TUTORIAL_BNM.md: A comprehensive guide on writing C++ mod code using BNM.GEMINI.md: Contextual instructions for AI development.
- Explore: Run
python interactive_search.py. - Find & Pick: Use "Smart Search" to find your class, then "Pick Specific Methods".
- Generate: Review the C++ code in the "PRO BNM Snippets" panel.
- Save: Choose 'Yes' to save the snippet to
bnm_snippets.cpp. - Apply: Copy the code from your file to your main C++ project and implement your logic.
While the snippet generators are highly accurate, the code serves as a template. You MUST:
- Rename Parameters: Change generic names like
arg0to meaningful ones. - Check Instances: Always verify
instance != nullptrbefore use. - Hook Method: The script recommends
InvokeHookfor Unity methods andBasicHookfor others.
- Use Namespaces: Always include the namespace in your BNM code to prevent collisions.
- C++20 Requirement: BNM (especially Coroutines) requires your project to be compiled with
-std=c++20.