# EFMI Green Texture Fix — Post-1.5 Update Guide ## Who this is for Mods built with EFMI Tools **v0.5.x or older** (Alpha-5, Alpha-6, Alpha-7 format) that show **green or wrong-colored textures** after the 1.5 game update. Mods built with EFMI Tools v0.6+ using RabbitFX are unaffected. You can check which format your mod uses by opening its `.ini` file and looking at the first line: `; EFMI ALPHA-7 INI` (or ALPHA-5, ALPHA-6). --- ## Why it happens Old EFMI mods inject textures by writing directly to pixel shader texture slots: ```ini ps-t17 = Resource_Texture0 ; diffuse ps-t19 = Resource_Texture1 ; normalmap ``` The 1.5 update changed which slot numbers the game shader reads textures from. The mod is still injecting into the old slots (e.g. t17), but the shader is now reading from a different slot — so a normalmap (which appears green/teal) lands where the diffuse should be, causing the green look. **Important:** Setting `ps-t0` or `ps-t1` directly will **crash** the game — EFMI uses those slots internally. This is why the old mods used high-numbered slots in the first place. --- ## The Fix — Replace ps-t## with RabbitFX RabbitFX is EFMI's texture injection system that handles slot lookup automatically. It works in both old and new format mods and is update-resilient. ### Find affected lines Open your mod's `.ini` and search for `ps-t` inside `[CommandList_Draw_ComponentN]` blocks. They look like: ```ini [CommandList_Draw_Component0] run = CommandList\EFMIv1\OverrideTextures ib = ref Resource_Component0_IB ... ps-t17 = Resource_Texture0 ← these are the problem ps-t18 = Resource_Texture2 ps-t19 = Resource_Texture1 ``` ### Replace with RabbitFX For components with **diffuse + normalmap**: ```ini Resource\RabbitFX\Diffuse = ref Resource_TextureX ; your diffuse resource Resource\RabbitFX\Normalmap = ref Resource_TextureY ; your normalmap resource run = CommandList\RabbitFX\SetTextures ``` For components with **diffuse only** (e.g. armor, accessories): ```ini Resource\RabbitFX\Diffuse = ref Resource_TextureX run = CommandList\RabbitFX\SetTextures ``` ### What to drop - `ps-t## = Resource_TextureN` lines — replace all of them with RabbitFX - Emission/LUT texture slots (e.g. the old `ps-t18 = Resource_Texture2` emission) — this slot was removed from the 1.5 shader entirely, just delete the line ### Identifying which resource is diffuse vs normalmap Look at the resource definitions at the bottom of the `.ini`: ```ini [Resource_Texture0] filename = Textures/Components-X t=HHHHHHHH BC7-sRGB.dds ← BC7-sRGB = diffuse [Resource_Texture1] filename = Textures/Components-X t=HHHHHHHH BC5-Linear.dds ← BC5-Linear = normalmap ``` - **BC7-sRGB** = diffuse → use `RabbitFX\Diffuse` - **BC5-Linear** = normalmap → use `RabbitFX\Normalmap` If the filename doesn't include the format, the DDS filename itself (the texture hash written in the filename like `t=HHHHHHHH`) can be cross-referenced against the `[TextureOverride_TextureN]` sections, or just open the file in a DDS viewer — normalmaps look green/purple, diffuse looks like the actual texture. --- ## IB Hash Changes (separate issue) If your mod is **not intercepting at all** (character renders completely vanilla with mod enabled) the IB hashes may have changed. This is per-character and separate from the texture slot issue. ### Diagnosing with the hash fixer tool The `efmi_hash_fixer.py` script (see companion tool) will tell you which hashes in your mod are stale and which are still valid. ### Getting a frame analysis dump 1. **Disable the mod in IMM** (important — old mods use `handling = skip` which suppresses the game's draw calls, hiding the real hashes from the dump) 2. Load into the game **in the field** with the character visible on screen (operator selection screen uses a different render path and may not capture all components) 3. Enable hunting mode — key is set in your `d3dx.ini` under `toggle_hunting` (an on-screen overlay will appear when active) 4. Capture a frame — key is set in your `d3dx.ini` under `analyse_frame` 5. Disable hunting mode 6. A `FrameAnalysis-YYYY-MM-DD-HHMMSS` folder will appear in your EFMI install directory > **Finding your keys:** Open `d3dx.ini` in your EFMI folder and search for > `toggle_hunting` and `analyse_frame`. The values on those lines are your bindings. ### Running the hash fixer ``` python efmi_hash_fixer.py "path\to\mod\folder" ``` Diagnose only — shows all hashes and detected issues, writes nothing. ``` python efmi_hash_fixer.py "path\to\mod\folder" "path\to\FrameAnalysis-folder" ``` Auto-matches old hashes to new ones by index count, then patches the `.ini` (backs up the original first). ``` python efmi_hash_fixer.py "path\to\mod\folder" --map OLDHASH=NEWHASH OLDHASH2=NEWHASH2 ``` Manual hash replacement if you already know the new hashes. ### Important notes on hash matching - The tool matches by **index count** — if a component's mesh was reshaped with a different number of indices, it won't auto-match and you'll need to identify it manually - **Ambiguous matches** (multiple draw calls with the same index count) need manual resolution with `--map` - Small shared components (eyes, accessories) may match across multiple characters — check the candidates make sense before applying - LOD hashes (lower-detail versions) may not appear if the character was close to the camera during capture; move the camera further back and recapture --- ## After fixing - Test with **only one version of the mod enabled** at a time in IMM (Normal and Ult variants of the same character share some hashes — running both simultaneously causes conflicts) - If textures are correct but toggles don't work, the key bindings may also need updating — that's a separate issue from the texture slot fix --- ## Which mods need this fix Any mod with `ps-t##` lines inside `CommandList_Draw_ComponentN` blocks. Quick check: ``` grep -i "ps-t" your_mod.ini ``` If you see results inside draw command lists (not in `TextureOverride` sections which are fine), the mod needs the RabbitFX conversion. Mods already using `Resource\RabbitFX\Diffuse` / `run = CommandList\RabbitFX\SetTextures` do **not** need this fix.