Modding Guide

GHub Platform · Гайд · 0 ответов · 17 просмотров

In order to explain some aspects of modding, we will use the example MOD "Necromancers Mod", which is available on steam workshop. After downloading, MOD will be placed in the corresponding directory: Files location Mod files should be placed in "YourModName" folder in this location: \AppData\LocalLow\MuHa Games\MoM\Mods\ Use %appdata% in the computer folders directory path to get easier access to this location Folders The MOD contains appropriate folders for the files we use to modify the game: Adventures - event modules Assetbundles - asset packs Database - database files Images - 2d graphic files Scripts - scripting files Sound - sound files In addition, in the main MOD folder there are files: "settings.xml" - which contain basic information about the mod "mod_graphic.png" [174x174] - graphics of the mod displayed in the list of mods inside the game IMPORTANT! If original units are modified or new ones are added, then additional files will be created in the root directory. Those files are used to determine the strength of those units. Whenever there are changes to any units, these files must be deleted for the game to redefine strength and generate new files. Basic rules To avoid problems when working with example mod or any other mods, there are a few things to keep in mind: DB modification - when modifying the databases, pay special attention when modifying already existing elements of the game, as this can lead to conflicts with other mods Conflicts - in order to minimize potential conflicts from the use/creation of several mods, it is worth remembering a few rules: Minimalism - when modifying the original content, we do not upload entire DB files with minor changes, but only those elements that we change Division - it is worth considering breaking one mod into two, where the part with new content will be one mod, and changes modifying the original part in the second mod Description - it is worthwhile to include changes to the original content in the mod's description or appropriately name the MOD itself, which will make it less problematic for modders or users to use multiple MODs Dev Menu A helpful tool for checking any changes or certain aspects of the game is the devmenu, which can be accessed in any game by pressing CTRL+SHIFT+F1. Description of available functions: Responsible for handling events A - Enables launching of the events B - Allows to select modules and events to launch Adds resources every turn to the player and finishes casting the current spell Adds the selected resource to the city with a summoning circle Gives XP in the city with a summoning circle Gives the chosen artifact Casts the chosen spell on the player Gives a selected unit in the city with a summoning circle Summons a selected enemy unit - the place of summoning is the position of the last mouse click (will appear on the map where you click on the summoning button) Adds selected building in city with a summoning circle Gives the player the chosen spell Gives the player all the spells Gives the player the chosen trait Summons a selected neutral unit - under the same rules as in point. 8 Causes the player to lose Defeats a single opponent Summons an enemy city - under the same rules as in point.8 Fight in the city with a summoning circle Discovery of all the opponents All players have only one selected spell Publishing Once you have finished working on the MOD, you can publish it using the in-game option. To do this: Select your MOD from the list Select the visibility option Publish IMPORTANT ! Exceeding the number of characters over 7000 in the MOD description will cause a problem when uploading the MOD to steam (the upload process will succeed, but the MOD will be empty on steam). Settings Setting up the “settings.xml” file in the MOD main folder is the first thing to do. It is responsible for the basic settings, naming and description of the MOD. prefix - used for the purpose of prefixing graphic assets (we use only lowercase letters) name - serves as a reference used by other MODs, and also as an identifier of which MODs are used and in what order title - MOD name displayed in mod manager description - a longer description of the MOD and its content, displayed in the MOD manager after selecting it (it is worth writing what part of the original content was modified) author - author signature. The system will try to process it through the localization database, in case someone wants to have a different language-dependent signature displayed version - MOD version icon - MOD graphic displayed in MOD manager Adventures Event module created via ingame event editor can be moved to “Adventures” folder, but it will be active only if the MOD is active. Asset Bundles To work with asset bundles follow instructions from: GAME_FOLDER\ExternalAssets\MoMAssetBundlesExporter\MasterofMagicAssetBundleExporter\ Which describe how to create, export and properly use them. Database Depending on the elements we want to modify, we need the appropriate files. Here is a list of some of the most important ones: DB_ARTEFACT - hero items DB_BOOKS_ADVANTAGE - starting spells and research limits DB_BUILDING - buildings DB_DIFFICULTY - difficulty settings DB_ENCHANTMENTS - all enchantments, and/or effects that are applied on units/towns… DB_GROUP - groups that are used by events or dungeons DB_LANGUAGE - language list DB_LOCALIZATION_DES - descriptions of every game element, except the UI (note that they are divided by languages and DLC’s) DB_LOCATION - map locations, power nodes and dungeons DB_PLANE - races distributed to the starting planes DB_RACE - race data for race selection and race tensions DB_SKILL - list of all skills that fire instant effects or apply enchantments DB_SOUND - game general sounds and music (DB_SUBRACE contains unit sounds) DB_SPELL - list of all spells that fire instant effects or apply enchantments DB_SUBRACE - all units and hero data DB_TAG - game tags DB_TAGS_QUEST - tags used in the event editor DB_TAX - general tax values DB_TERRAIN - basic terrain data DB_TERRAIN_RESOURCE - resources data DB_TOWN - race main data, productions, possible buildings DB_TOWN_NAME - race town names DB_TRAIT - wizard traits data DB_UNIT_LVL - units and hero level data DB_WIZARD - AI wizards data MODIFY To modify a piece of original game content, we look for the appropriate segment and copy it, then change the values we are interested in. Example: In proper segment we only modified one line without messing other elements. CREATE When we create new content, we need to create a corresponding segment and add new content to it. Example: We have copied regeneration skill, changed regeneration value to “2” and updated name/descriptions to make a new skill. Image / Sound First of all we need to put our files in the proper folder, then we can replace existing images or sounds with our own. Graphics There is a more detailed guide on steam about graphics implementation and file sizes, which you can check HERE . Scripts We can modify scripts in two ways, one, just simple modifications of existing scripts and the other, with using C# knowledge (which will be described later in the guide). SIMPLE MODIFICATION With just changing numeric data in existing skills. Example: We have copied regeneration skill, changed regeneration value to “2” and updated name/descriptions to make a new skill. Asset Dependency It is possible to use graphic assets from other MODs. To do this, you need to use the prefix of the MOD in question and the name of the asset. To properly use dependency on other MODs with a prefix, we should remember to: MOD - which are we gonna refer to should be in proper folders and visible on ingame MOD list PREFIX - check what is the MOD prefix (it will be probably different than MOD actual name) ASSETS - check if those assets are in the MOD we are referring to PREREQUISITES - if we set up all things and dependency works, we should mention that our MOD

Источник

GHub Platform · автор25.08.2026, 20:59:59

In order to explain some aspects of modding, we will use the example MOD "Necromancers Mod", which is available on steam workshop. After downloading, MOD will be placed in the corresponding directory: Files location Mod files should be placed in "YourModName"…

Войдите, чтобы писать в группе