# Known Fixable Issues

### Some decls are Inaccurate when Testing in the Sandbox

##### The Sandbox uses the packaged .decl files from the `base\generated\decls` folder. Older decls that were previously removed from the `base\declTree` folder may still be present in the packaged mod. Here is how you can clean up your decls.

- Delete ALL files under the `base\generated\decls` folder. 
    - New decls will automatically be generated before you package your mod.
    - If your mod has a custom map, DO NOT delete the other folders in your `base\generated` folder because they are needed to package your map. If they were accidentally deleted, be sure to do a Slow Map, Full Map, &amp; Collision/Nav build before packaging your mod.

### Custom Maps have unusually-large File Sizes

##### Fully-baked custom maps can have very large file sizes. Here is how you can reduce it.

- DO NOT package the `virtualtextures\maps\...\custom_map_name.rawdb` file. 
    - This is a very large file that is not utilized on the Doom Eternal Sandbox.
    - Delete the .rawdb file for the mod in your "ActiveMods" folder to conserve file space. Keep the file in your "idStudio" folder because idStudio reads it.
- For more information on what files you should package for your mod, see guide: [https://wiki.eternalmods.com/books/0-idstudio/page/what-files-should-i-package-for-my-idstudio-mod](https://wiki.eternalmods.com/books/0-idstudio/page/what-files-should-i-package-for-my-idstudio-mod)

### Most Geo are Invisible when Testing in the Sandbox

##### Geo are mostly invisible or flickering in the Sandbox due to an issue with the `dvdpc\base\packagemapspec.json` file. Here is how to fix it.

- See guide (scroll down to the "Some models are invisible..." header): [https://wiki.eternalmods.com/books/0-idstudio/page/how-do-i-upload-mods-to-the-mod-portal](https://wiki.eternalmods.com/books/0-idstudio/page/how-do-i-upload-mods-to-the-mod-portal)
- If geo are invisible after loading an existing save or checkpoint, see the "Loading a Custom Map may crash at 80%" guide below.

### Loading a Custom Map may crash at 80%

##### Loading an existing save for a custom map may crash at 80%. If the game does not crash, then all geo on a custom layer will be invisible unless a checkpoint is loaded. The 80% crash stems from the use of custom visibility layer. Here is how to fix it.

- If custom layers were used, replace them all with vanilla layers. Repurposing vanilla layers will not impact the levels they are associated with.
- Replacing layers on entities can be done quickly by opening a .refmap file in `base\maps\...\custom_map_name\refmap_name.refmap` with a raw text editor and issuing a mass find/replace command to find the full custom layer name and replace it with the full repurposed vanilla layer name.
- Be sure that the repurposed vanilla layer decl only has its layerParent set to "world" and each custom layer should be repurposed to a different vanilla layer.

For example, change the custom layer:

```
	layers {
		"game/custom_map_name/visibility/vis_visibility_layer"
	}
```

To:

```
	layers {
		"game/sp/e1m1_intro/visibility/vis_barge"
	}
```

- Any other custom layers that are not for visibility (main\_level, master\_level, etc) should be activated in a **target/change\_layer** entity or **devMenuOption** decl.

Here is what activating a layer in a **devMenuOption** decl looks like:

```
declType( devMenuOption ) {
	edit = {
		devMenuList = {
			num = 1;
			item[0] = {
				devMenuDisplayName = "Custom Map - Master Level";
				devMenuMapName = "maps/custom_map_name.map";
				devMenuInventoryLoadout = "devinvloadout/dlc/e4m1_rig";
				devMenuActiveLayers = {
					num = 1;
					item[0] = "game/custom_map_name/master_level";
				}
			}
		}
	}
}
```

- For more information on how to create idStudio mods, see guide: [https://wiki.eternalmods.com/books/0-idstudio/page/how-do-i-create-idstudio-mods](https://wiki.eternalmods.com/books/0-idstudio/page/how-do-i-create-idstudio-mods)

<p class="callout info">Changing layers on a entities does not require you to rebuild your map.</p>

### Custom SFX &amp; Music prevent Vanilla Audio from Playing

##### There are issues with both the `mods.pck` &amp; `music_mods.pck` files that is generated when a new idStudio mod is created. Here is how to fix them.

- See guide: [https://wiki.eternalmods.com/books/0-idstudio/page/fixing-custom-audio-idstudio](https://wiki.eternalmods.com/books/0-idstudio/page/fixing-custom-audio-idstudio)