Restores the early CastleMiner Z pumpkin-themed grenade model from version 1.8.0 for regular grenades, sticky grenades, and thrown grenade projectiles.
Current mod version shown in source: 0.0.1.0
- Overview
- What this mod restores
- Features at a glance
- Requirements
- Installation
- Required asset layout
- How it works
- Behavior notes
- Troubleshooting
- Development notes
- Credits
PumpkinGrenades is a small CastleForge / ModLoader mod that restores the old pumpkin-themed grenade visuals from CastleMiner Z 1.8.0.
In that older version of the game, both the regular grenade and sticky grenade used a pumpkin grenade model loaded from:
Props\Weapons\Conventional\Grenade\Pumpkin\Model
Modern CastleMiner Z builds load the normal grenade model instead:
Props\Weapons\Conventional\Grenade\Model
This mod patches the newer game at runtime so the old pumpkin model can be used again without replacing the whole game content folder.
PumpkinGrenades targets the important grenade visual paths:
| Area | Restored? | Notes |
|---|---|---|
| Regular grenade inventory / held model | Yes | Replaces the inventory item class model. |
| Sticky grenade inventory / held model | Yes | Uses the same pumpkin model, matching CastleMiner Z 1.8.0. |
| Thrown grenade projectile model | Yes | Replaces GrenadeProjectile._grenadeModel. |
| Item icon render framing | Yes | Uses a UI-only Harmony patch to better center and scale the rendered icon. |
| Gameplay stats / explosion behavior | No | This is a visual restore, not a balance/gameplay rewrite. |
| Feature | What it does |
|---|---|
| Old pumpkin model restore | Loads the old Pumpkin/Model.xnb from the mod asset folder. |
| Regular grenade support | Applies the pumpkin model to InventoryItemIDs.Grenade. |
| Sticky grenade support | Applies the pumpkin model to InventoryItemIDs.StickyGrenade. |
| Projectile support | Applies the pumpkin model to thrown grenade projectile visuals. |
| Local ContentManager | Loads model dependencies from !Mods\PumpkinGrenades\Assets. |
| HiDef fallback lookup | Falls back to Content\HiDefContent for shared vanilla dependencies. |
| Icon framing patch | Re-centers/rescales the pumpkin model when the game renders inventory icons. |
| No command dependency | Runs automatically when loaded. No slash commands are required. |
PumpkinGrenades is built for the CastleForge ecosystem and requires:
- CastleMiner Z
- CastleForge ModLoader
- Harmony through the mod's embedded resolver / CastleForge reference setup
Recommended target environment:
| Item | Recommended value |
|---|---|
| Game version | 1.9.9.8 |
| Framework | CastleForge ModLoader |
| Mod version | 0.0.1.0 |
| Platform | x86 / .NET Framework 4.8.1 project setup |
| ModLoaderExtensions | Not required by this mod |
- Install and verify CastleForge ModLoader.
- Build or download
PumpkinGrenades.dll. - Place the DLL in the CastleMiner Z
!Modsfolder. - Add the required pumpkin grenade XNB assets under
!Mods\PumpkinGrenades\Assets. - Launch the game.
- Check the ModLoader log for successful model application messages.
Expected DLL placement:
CastleMiner Z\!Mods\PumpkinGrenades.dll
Expected mod asset folder:
CastleMiner Z\!Mods\PumpkinGrenades\Assets\
Depending on your packaging flow, the DLL may sit directly in !Mods, while the asset folder lives under !Mods\PumpkinGrenades\.
For the restored 1.8.0 pumpkin grenade model, use this layout:
CastleMiner Z\
└─ !Mods\
├─ PumpkinGrenades.dll
└─ PumpkinGrenades\
└─ Assets\
├─ Newpumpkingrenade_0.xnb
├─ 1024pumpkingrenadetex2GLOWXTREME_0.xnb
├─ PropShader_hidef_0.xnb
└─ Pumpkin\
└─ Model.xnb
| File | Purpose |
|---|---|
Assets\Pumpkin\Model.xnb |
Old pumpkin grenade model. |
Assets\Newpumpkingrenade_0.xnb |
Main pumpkin grenade texture dependency. |
Assets\1024pumpkingrenadetex2GLOWXTREME_0.xnb |
Glow/second-material texture dependency used by the model. |
Assets\PropShader_hidef_0.xnb |
Effect dependency requested by the old model. The loader can also fall back to the installed game's Content\HiDefContent copy if present. |
The extracted PNG names are not enough for model loading. XNA model dependencies need processed
.xnbfiles with the names the model requests.
PumpkinGrenades applies two main runtime changes.
The mod patches:
DNA.CastleMinerZ.GrenadeProjectile.Init()
After the vanilla game initializes grenade projectile content, the mod replaces the static projectile model field:
GrenadeProjectile._grenadeModel
This affects thrown grenade visuals.
The mod patches:
DNA.CastleMinerZ.Inventory.InventoryItem.Initalize(ContentManager)
After vanilla item classes are registered, the mod replaces the protected model field on the grenade item classes:
ModelInventoryItemClass._model
This affects regular grenade and sticky grenade inventory / held item visuals.
The game renders model-based inventory icons from temporary item entities. The old pumpkin model has different bounds/origin than the newer grenade model, so the icon can appear too small, off-center, or clipped.
PumpkinGrenades includes UI-only CreateEntity(..., ItemUse.UI, ...) patches for grenade item classes so the rendered icon can be centered and scaled independently from the physical world model.
This matches CastleMiner Z 1.8.0. The old game registered both regular grenades and sticky grenades with the same pumpkin grenade model.
The two pumpkin texture files are not separate regular/sticky textures. They are texture dependencies used by the same model, likely a main material plus a glow/secondary material.
PumpkinGrenades does not change:
- grenade damage,
- explosion radius,
- sticky behavior,
- recipes,
- inventory IDs,
- multiplayer packet formats.
This is primarily a client-side visual mod. Players without the mod should still be able to play, but they will see their own local grenade visuals.
For consistent visuals, all players should install the same mod and asset set.
Add this file to the asset folder:
!Mods\PumpkinGrenades\Assets\PropShader_hidef_0.xnb
or make sure the installed game has:
Content\HiDefContent\PropShader_hidef_0.xnb
Add:
!Mods\PumpkinGrenades\Assets\Newpumpkingrenade_0.xnb
Add:
!Mods\PumpkinGrenades\Assets\1024pumpkingrenadetex2GLOWXTREME_0.xnb
Tune the icon transform values in the grenade UI icon patch:
float iconSize = isSticky ? 28.0f : 48.0f;
float offsetX = isSticky ? 0.0f : 0.0f;
float offsetY = isSticky ? 0.0f : 0.0f;Helpful tuning direction:
| Problem | Adjustment |
|---|---|
| Icon too small | Increase iconSize. |
| Icon too large / clipped | Decrease iconSize. |
| Too far left | Increase offsetX. |
| Too far right | Decrease offsetX. |
| Too low | Increase offsetY. |
| Too high | Decrease offsetY. |
Restart the game or reset the item icon atlas after tuning, because the game caches rendered item icons.
The physical world/held model and the inventory icon are different render paths. The world model can be correct while the icon still needs UI transform tuning.
Check which CreateEntity patch is actually being hit in the log. Sticky grenade icon generation may go through a different class path depending on the game build. Add temporary logging around the patch to print the item class type and item ID.
Important files:
PumpkinGrenades.cs
PumpkinGrenadeModelLoader.cs
Patching\GamePatches.cs
Important runtime hooks:
GrenadeProjectile.Init()
InventoryItem.Initalize(ContentManager)
GrenadeInventoryItemClass.CreateEntity(...)
StickyGrenadeInventoryItemClass.CreateEntity(...)
Important runtime fields:
GrenadeProjectile._grenadeModel
ModelInventoryItemClass._model
The mod uses a folder-rooted ContentManager so the old model can load dependencies from the mod folder instead of requiring files to be placed directly in the game's content directory.
- RussDev7 - CastleForge / PumpkinGrenades mod implementation.
- CastleForge ModLoader - runtime mod loading and Harmony patch support.
- DigitalDNA Games / CastleMiner Z - original CastleMiner Z game and historical pumpkin grenade assets.


