MCPcopy Index your code
hub / github.com/Garethp/Mods-of-Mistria-Installer

github.com/Garethp/Mods-of-Mistria-Installer @v0.10.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.10.3 ↗ · + Follow
1,141 symbols 5,498 edges 139 files 4 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

# Mods of Mistria Installer

This is the in-progress installer for Fields of Mistria mods. As it's currently very early in development, please keep in mind that it may have many bugs and may not work on all systems. Similarly, it won't support all mods that have been release up until now, each mod will need to be updated to work with this installer, which many modders are already doing.

Installation

  1. Create a mods folder to put your mods
  2. On Windows, you'll want to create "mods" folder inside your Fields of Mistria folder, next to the data.win file
  3. On the Steam Deck (or other Linux distros) you can also create a mods folder inside your Fields of Mistria folder, or you can create a mistria-mods folder in your home directory.
  4. Download the installer from the releases page.
  5. Double-click the installer to run it. If it's not able to detect the Fields of Mistria location, try placing the installer in your Fields of Mistria folder, next to data.win.
  6. Click the "Install" button to install the mods. If you have mods in your mods folder, they should appear in a list.
  7. Next time the game updates, run the installer again to re-install your mods

Troubleshooting

I installed a new cosmetic, but it's not appearing in existing games First try downloading the latest version of MOMI and re-installing. Many cosmetic mods will add that cosmetic will also add that cosmetic to be sold in a shop however installers older than 0.1.3 aren't able to add items to the shop. If updating the MOMI installer doesn't work, check the description of the mod to see if it talks about how to acquire the cosmetic. For example, some mods may choose to only add the item to the Saturday Markets. If you're still having issues, feel free to come to the Discord Server to ask for help.

The installer says it cannot find the Fields of Mistria Location Try placing the installer in your Fields of Mistria folder, next to data.win, this should allow the installer to find the game.

The installer says it cannot find the mods folder Make sure you have created a folder called "mods" in your Fields of Mistria folder, next to data.win, or a folder called mistria-mods in your home directory if you're on the Steam Deck/Linux.

The installer says it didn't find any mods to install Make sure you have mods in your mods folder and the mods are compatible with the installer. If you're unsure, check the mod folder, inside it there should be a manifest.json file. If there's not, the mod is not compatible and will have to be updated by the mod author.

The installer cannot install mods that are .zip files, so make sure the mods are extracted. When extracting, make sure that the mod folder is directly inside the mods folder, not inside another folder. For example, if you're installing "Effe's Decor - Fridge", make sure that the folder structure is mods -> Effe's Decor - Fridge -> manifest.json and not mods -> Effe's Decor - Fridge -> Effe's Decor - Fridge -> manifest.json.

I've got a different problem If your problem isn't listed above, please come and ask in the Fields of Mistria Discord. There's a #modding channel that you'll see after you accept the rules and that's the best place to get help. To provide more information, try downloading the -cli version of the installer, running that and then screenshotting the window that popped up. The -cli version doesn't look as nice, but should provide more information about what's going wrong.

Mod Format

If you're a modder and want to make your mod compatible with this installer, feel free to refer to the mods folder for example mods. Below is information for what you'll need. This is not a comprehensive list and more documentation will be added in the future.

manifest.json

{
  "author": "Mod Author Name",
  "name": "Mod Name",
  "version": "1.0.0",
  "minInstallerVersion": "0.1.3",
  "manifestVersion": 1
}

Your mod will be given an ID that's based on the author and name fields, so make sure that those two combined are unique. From version 0.1.3 onwards, the installer will check the minInstallerVersion field to make sure that the installer is new enough to install the mod and tell the user if they're unable to install the mod without updating the installer. The manifestVersion field isn't used yet, but will allow for backwards compatibility in future versions of the installer if large changes are made to how mods are structured.

fiddle/

JSON files in the fiddle/ folder will get merged into the game's __fiddle__.json file. You can name the files however you want and have multiple JSON values in one file or split them up into multiple files as you see fit.

localisation/

JSON files in the localisation/ folder will get merged into the game's __localisation__.json file. You can name them however you want, but they should end in .eng.json or .jpn.json (or using a similar language code) to specify the language they're for. For now Mistria only supports English, but more languages may be supported in the future. Here's an example file:

localisation/first_mod.eng.json

{
  "letters/first_mod/subject_line": "Olrics Favour",
  "letters/first_mod/local": "I found something when rummaging through my items the other day and I want you to have it.\n\nCome see me at the Blacksmith shop when you have a moment."
}

outfits/

If you want to add new outfits to the game, you can do so by placing a JSON definition for the outfit in the outfits/ folder and the sprites should be in a images/ folder. Files that are multiple frames of the same animation should be in their own folder, separate from other sprites. Here's an example file:

{
  "dolphin_tail": {
    "name": "Dolphin Tail",
    "description": "A dolphins tale.",
    "ui_slot": "back",
    "default_unlocked": true,
    "ui_sub_category": "capes",
    "lut_file": "images/lut.png",
    "ui_item": "images/ui.png",
    "outline_file": "images/outline.png",
    "animation_files": {
      "back_gear": "images/tail_animation"
    },
    "price_override": 0 // This is an optional field, but cannot be below 0
  }
}

For a full example, check out the dolphin_tail example.

objects/

If you want to add new objects to the game, you can do so by placing a JSON definition for the object in the objects/ folder. The format of the file should be

{
  "object_id": {
    "category": "category",
    "overwrites_other_mod": false,
    "data": {
      ...
    }
  }
}

The category of the object must be one of the following: "breakable", "building", "bush", "crop", "dig_site", "furniture", "grass", "rock", "stump", "tree". Trying to add another value will result in MOMI having an error for the mod.

overwrites_other_mod is required for all objects but doesn't change how MOMI works. In a future version of MOMI, this key will be used to automatically detect and warn users about conflicting mods. In that future update, if two mods add objects with the same ID and they both have overwrites_other_mod set to false, the installer will warn the user that these two mods probably conflict with each other.

Here's an example file:

{
  "my_new_object": {
    "category": "furniture",
    "overwrites_other_mod": false,
    "data": {
      "size": [
        3,
        2
      ],
      "collision_grid": "2",
      "south": {
        "sprite": "spr_decor_dragon_statue_v1_spring_south",
        "offset": [
          12,
          8
        ]
      },
      "north": {
        "sprite": "spr_decor_dragon_statue_v1_spring_north",
        "offset": [
          12,
          8
        ]
      }
    }
  }
}

items/

If you want to add new items to the game, you can do so by placing a JSON definition for the item in the items/ folder. The format of the file should be

{
  "item_id": {
    "overwrites_other_mod": false,
      ...
  }
}

overwrites_other_mod is required for all items but doesn't change how MOMI works. In a future version of MOMI, this key will be used to automatically detect and warn users about conflicting mods. In that future update, if two mods add items with the same ID and they both have overwrites_other_mod set to false, the installer will warn the user that these two mods probably conflict with each other.

An example of a full file is:

{
  "wheedle_statue":  {
    "icon_sprite": "spr_ui_item_dragon_statue_replica_v1",
    "name": "Wheedle Statue",
    "overwrites_other_mod": false,
    "description": "items/furniture/mistrian_history_set/dragon_statue_replica_v1/description",
    "object": "dragon_statue_replica_v1",
    "tags": [
      "furniture",
      "mistrian_history_set",
      "misc_decor"
    ],
    "recipe_key": "dragon_statue_replica",
    "crafting_level_requirement": 20,
    "recipe": [
      {
        "count": 100,
        "item": "ore_stone"
      },
      {
        "count": 2,
        "item": "monster_core"
      },
      {
        "count": 2,
        "item": "monster_horn"
      },
      {
        "hours": 0,
        "minutes": 30
      }
    ],
    "value": { 
      "bin": "self.recipe*1.1"
    }
  }
}

stores/

If you want to add categories to a store, or new items to a category in a store, you can do so by placing a JSON in the stores/ folder of your mod. In your JSON, you can either define a list of new categories to add to a store, a list of new items to add to categories or both. Below is an example of the options that you can set:

{
  "items": [
    {
      "item": "seed_turnip",
      "store": "general",
      "category": "modded_icon",
      "season": "spring"
    },
    {
      "item": { "cosmetic":  "froggy_hat" },
      "store": "general",
      "category": "modded_icon"
    },
    {
      "item": { "recipe_scroll":  "custom_recipe" },
      "store": "general",
      "category": "modded_icon"
    },
    {
      "item": { "cosmetic":  "froggy_hat" },
      "store": "louis",
      "category": "modded_icon",
      "random_stock": true
    }
  ],
  "categories": [
    {
      "store": "general",
      "icon_name": "modded_icon",
      "sprite": "images/icon_modded.png"
    },
    {
      "store": "louis",
      "icon_name": "modded_icon",
      "sprite": "images/icon_modded.png",
      "target_selections": 5
    }
  ]
}

If multiple mods add a category with the same icon_name to the same store, only one category by that name will be added. The category key for an item should always match the icon_name of the category you want to add it to, whether it's a category that's been modded in or a vanilla category. If you set the season key for an item, it will be added to the seasonal stock for that category, otherwise it will be added to the year-round stock.

sprites/

If you want to add new sprites to the game, you can do so by placing the sprites in the images/ folder and then creating a definition JSON file in the sprites/ folder. Here's an example file:

{
  "spr_furniture_stone_storage_chest_spring_v1_bounce": {
    "is_animated": true,
    "location": "images/v1/bounce",
    "origin_x": 16,
    "origin_y": 56,
    "margin_left": 3,
    "margin_right": 29,
    "margin_bottom": 39,
    "margin_top": 15
  }
}

For a full example, take a look at the Effe's Decor - Fridge example. Files that are multiple frames of the same animation should be in their own folder, separate from other sprites. For reference, the full list of sprite properties that you can control are:

{
  "sprite_name": {
    "location": "imageLocation.png",
    "is_animated": true,
    "bounding_box_mode": 2,
    "origin_x": 0,
    "origin_y": 0,
    "margin_right": 0,
    "margin_left": 0,
    "margin_top": 0,
    "margin_bottom": 0,
    "is_player_sprite": true,
    "is_ui_sprite": true
  }
}

shadows/

If you want to add shadow sprites to the game, create a JSON file in the shadows/ folder with the following shape:

{
  "shadow_sprite_name": {
    "regular_sprite_name": "spr_regular_sprite_name",
    "sprite": "images/sprite.png",
    "is_animated": false
  }
}

This will create new sprites in the data.win folder with the name shadow_sprite_name as well as an entry in animation/generated/shadow_manifest.json which will look like:

{
  "spr_regular_sprite_name": "shadow_sprite_name"
}

If you use this, please set minInstallerVersion in your manifest.json to no lower than 0.1.4

aurie/

Note: At the moment, Aurie mods will not install on the Steam Deck/Linux

If you have Aurie DLLs as part of your mod, put them in the aurie/ folder of your mod. MOMI will then automatically install Aurie onto the players setup, register the keys necessary and copy your DLL into the correct Aurie folder. If you do this, please set minInstallerVersion in your manifest.json to no lower than 0.2.0.

Contributing Translations

If you're interested in contributing translations of MOMI into other languages, that would be super appreciated! Here's some steps on how to go about doing that!

  1. There's a main localisation file for English located at ModsOfMistriaInstallerLib/Lang/Resources.resx, go ahead and download it.
  2. Go to this page to upload and edit the file.
  3. If a string things like {0} and {1} in them, those are placeholders where MOMI will put other strings in at runtime, make sure that your translation keeps them.
  4. When you're done editing, click "Save and download .resx"
  5. Look up the "Language Culture Name" of your language from [this table](https://docwiki.embarcadero.com/RADStudio/Athens//en/Language_Culture_Names,

Extension points exported contracts — how you extend this code

IPreinstallInfo (Interface)
(no doc)
ModsOfMistriaInstallerLib/IPreinstallInfo.cs
IFileModifier (Interface)
(no doc)
ModsOfMistriaInstallerLib/Utils/IFileModifier.cs
IMod (Interface)
(no doc)
ModsOfMistriaInstallerLib/ModTypes/IMod.cs
ISubModuleInstaller (Interface)
(no doc)
ModsOfMistriaInstallerLib/Installer/ISubModuleInstaller.cs
IGenerator (Interface)
(no doc)
ModsOfMistriaInstallerLib/Generator/IGenerator.cs
IPreUninstallInfo (Interface)
(no doc)
ModsOfMistriaInstallerLib/IPreinstallInfo.cs
IModuleInstaller (Interface)
(no doc)
ModsOfMistriaInstallerLib/Installer/IModuleInstaller.cs

Core symbols most depended-on inside this repo

wait
called by 10794
ModsOfMistriaInstallerLibTests/Fixtures/__mist__.js
face
called by 4583
ModsOfMistriaInstallerLibTests/Fixtures/__mist__.js
next_line
called by 3837
ModsOfMistriaInstallerLibTests/Fixtures/__mist__.js
bark_speech
called by 3392
ModsOfMistriaInstallerLibTests/Fixtures/__mist__.js
animate
called by 1866
ModsOfMistriaInstallerLibTests/Fixtures/__mist__.js
place_actor
called by 1348
ModsOfMistriaInstallerLibTests/Fixtures/__mist__.js
close_textbox
called by 1324
ModsOfMistriaInstallerLibTests/Fixtures/__mist__.js
walk_slow
called by 1086
ModsOfMistriaInstallerLibTests/Fixtures/__mist__.js

Shape

Method 648
Function 310
Class 168
Enum 8
Interface 7

Languages

C#73%
TypeScript27%

Modules by API surface

ModsOfMistriaInstallerLibTests/Fixtures/__mist__.js310 symbols
ModsOfMistriaInstallerLibTests/Models/OutfitTest.cs30 symbols
ModsOfMistriaInstallerLibTests/EndToEnd/CutscenesTest.cs27 symbols
ModsOfMistriaInstallerLibTests/Tools/DecompilerTest.cs25 symbols
ModsOfMistriaInstallerLib/ModTypes/RarMod.cs25 symbols
ModsOfMistriaInstallerLib/ModTypes/ZipMod.cs24 symbols
ModsOfMistriaInstallerLib/ModTypes/FolderMod.cs23 symbols
ModsOfMistriaInstallerLibTests/Fixtures/MockMod.cs22 symbols
ModsOfMistriaInstallerLib/ModTypes/IMod.cs21 symbols
ModsOfMistriaInstallerLibTests/Utils/JsonNestHandlerTest.cs16 symbols
ModsOfMistriaInstallerLib/Tools/Compiler/ExpressionCompiler.cs16 symbols
ModsOfMistriaInstallerLib/Installer/UMT/GraphicsPacker.cs16 symbols

For agents

$ claude mcp add Mods-of-Mistria-Installer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page