Smart Re-Patching
Learn how Smart Re-patching keeps your translation mod working after game updates.
Smart Re-patching is Mafkers’ flagship feature that keeps your translation mod working even after game updates.
How It Works
When a game updates, the update can change file hashes or structure, breaking your translation mod. Smart Re-patching solves this:
- Version Detection: Mafkers monitors your game’s version
- Hash Comparison: When the game updates, Mafkers detects changed files
- Delta Translation: Only strings that actually changed are re-translated
- Cache Utilization: Previous translations are reused from cache
This saves 80-95% of LLM cost compared to full re-translation.
Using Smart Re-Patching
- Open Mafkers
- Go to “History” tab
- If a game has been updated, you’ll see an “Update available” badge
- Click “Re-patch”
- Mafkers will:
- Re-extract strings from updated game files
- Compare with cached translations
- Only translate new/changed strings
- Inject updated translations
How Cache Works
Mafkers stores translation cache locally on your device (in ~/.mafkers/db.sqlite). Each translated string is cached with:
- Source text
- Translated text
- Source language
- Target language
- Context hash
When re-patching, Mafkers looks up each source string in the cache. If found, the cached translation is used (no LLM call needed). Only strings not in cache are sent to the LLM.
// Cache lookup example
const cached = await db.get('translations', {
source: "Hello, world!",
sourceLang: "en",
targetLang: "id"
});
if (cached) {
return cached.translated; // Use cached translation
} else {
return await llm.translate(source, sourceLang, targetLang);
}What Triggers Re-Patch
- Game update (version change detected)
- Manual re-patch (via History → Re-patch button)
- File hash mismatch (game file was modified)
Limitations
- If game update changes the engine version significantly, full re-translation may be needed
- Cache is per-project (different games have different caches)
- Cache is stored locally - uninstalling Mafkers deletes cache
Cache Persistence
Cache is stored in ~/.mafkers/db.sqlite. If you uninstall Mafkers, the cache is deleted. Consider backing up this file if you want to preserve translation history.