---
title: Ingame Mod View Setup
---

This page is aimed at developers that want their wiki to be accessible via the oracle index mod.

## Project Setup
1. Create your wiki directory / content layout as normal, following the instructions of moddedmc.wiki
2. Make sure you have _meta.json files with entries for **all** your content. Oracle Index uses the meta.json files to build the
navigation bar.
3. Copy the entire wiki to your mods resources folder. This can be automated, see [auto gradle sync](../developer/gradle_task). The correct path is: "resources/assets/oracle_index/books/your-mod-id/".
4. The oracle index will automatically load your mods resources.

The resulting directory tree should look like this:

<center>
<ModAsset location="oracle-index:folder_layout" width={600} />
</center>

There is no hot-reloading. Use the moddedmc.wiki live preview to create your wiki contents. However a resource reload will refresh the content ingame.

The ingame wiki resources can be added through resource packs (which may also be contained inside mods). Take a look at the oritech repo for an example
of how to set things up. An example of a resource pack is on github in the oracle index repo:
https://github.com/Rearth/Oracle-Index/tree/26.1.2/example_resource_pack

### Markdown compatibility

Oracle Index supports the Markdown and MDX features commonly needed by ModdedMC wikis, including tables, alerts, images, code tabs, callouts, recipes, audio, and video links. See the [Markdown and MDX reference](./markdown) for syntax and exact limitations.

This is a dedicated in-game renderer rather than a web browser. Arbitrary HTML, JSX, JavaScript, CSS, and custom React components are not evaluated. Unsupported HTML blocks are ignored. A plain `<img>` is supported, while `<center>`, `<div>`, and `<span>` wrapper tags are discarded when they use their plain tag forms.

For schema 1 wikis, image and audio files belong under `assets/<namespace>/` within the wiki directory. Legacy-format wikis use `.assets/<namespace>/`. The old `.assets/item/<namespace>/` directory is unnecessary because a registry item ID is rendered using its in-game model.

Content pages with a valid `id` also receive an in-game properties panel. Its stack size, durability, mining information, light level, and similar values come from the active game registries.

### Item Links
One extra feature added by the Oracle Index is the ability to link relevant items for a wiki page. To do so, a new parameter is added to the mdx frontmatter: "related_items", which contains an array
of ingame item IDs. This can look as follows:
```
---
title: Generators
icon: oritech:basic_generator_block
related_items: [oritech:basic_generator_block, oritech:bio_generator_block, oritech:lava_generator_block, oritech:fuel_generator_block, oritech:big_solar_panel_block]
---
Here would be your content.
```

These links will automatically be generated for content wiki entries.

### Custom Book / Opening the Screens
Oracle Index does not come with a guide book by default. However, in your mod, you can very easily just add a new book item, and open the desired screen when the book is used.
You could also open the book via other mechanisms, such as a button in another screen.

Call the following code on the client side:
```java
// Oritech is the wiki name here.
// Entry resources always use the oracle_index namespace.
Identifier entry = Identifier.fromNamespaceAndPath(
    "oracle_index", "books/oritech/docs/intro.mdx"
);
OracleClient.openScreen("oritech", entry, Minecraft.getInstance().screen);
```
