diff --git a/config/schemas/mod.json b/config/schemas/mod.json index ae31268d6..ac8364194 100644 --- a/config/schemas/mod.json +++ b/config/schemas/mod.json @@ -65,7 +65,7 @@ }, "modType" : { "type" : "string", - "enum" : [ "Translation", "Town", "Test", "Templates", "Spells", "Music", "Maps", "Sounds", "Skills", "Other", "Objects", "Mechanics", "Interface", "Heroes", "Graphical", "Expansion", "Creatures", "Compatibility", "Campaigns", "Artifacts", "AI" ], + "enum" : [ "Translation", "Town", "Test", "Templates", "Spells", "Music", "Maps", "Sounds", "Skills", "Other", "Objects", "Mechanics", "Interface", "Heroes", "Graphical", "Expansion", "Creatures", "Compatibility", "Campaigns", "Artifacts", "AI", "Resources" ], "description" : "Type of mod, e.g. Town, Artifacts, Graphical." }, "author" : { diff --git a/docs/modders/Mod_File_Format.md b/docs/modders/Mod_File_Format.md index 846b07ba6..1d925f772 100644 --- a/docs/modders/Mod_File_Format.md +++ b/docs/modders/Mod_File_Format.md @@ -31,7 +31,7 @@ // Type of mod, list of all possible values: // "Translation", "Town", "Test", "Templates", "Spells", "Music", "Maps", "Sounds", "Skills", "Other", "Objects", - // "Mechanics", "Interface", "Heroes", "Graphical", "Expansion", "Creatures", "Compatibility", "Campaigns", "Artifacts", "AI" + // "Mechanics", "Interface", "Heroes", "Graphical", "Expansion", "Creatures", "Compatibility", "Campaigns", "Artifacts", "AI", "Resources" // // Some mod types have additional effects on your mod: // Translation: mod of this type is only active if player uses base language of this mod. See "language" property. diff --git a/launcher/modManager/modstateitemmodel_moc.cpp b/launcher/modManager/modstateitemmodel_moc.cpp index 2ce68d341..4ae93f6ec 100644 --- a/launcher/modManager/modstateitemmodel_moc.cpp +++ b/launcher/modManager/modstateitemmodel_moc.cpp @@ -54,6 +54,7 @@ QString ModStateItemModel::modTypeName(QString modTypeID) const QT_TR_NOOP("Campaigns"), QT_TR_NOOP("Artifacts"), QT_TR_NOOP("AI"), + QT_TR_NOOP("Resources"), }; if (modTypes.contains(modTypeID)) diff --git a/lib/modding/ModManager.cpp b/lib/modding/ModManager.cpp index 01e961197..5918e7510 100644 --- a/lib/modding/ModManager.cpp +++ b/lib/modding/ModManager.cpp @@ -807,7 +807,10 @@ void ModDependenciesResolver::tryAddMods(TModList modsToResolve, const ModsStora { resolvedOnCurrentTreeLevel.insert(*it); // Not to the resolvedModIDs, so current node children will be resolved on the next iteration assert(!vstd::contains(sortedValidMods, *it)); - sortedValidMods.push_back(*it); + if(storage.getMod(*it).getValue("modType").String() == "Resources") // Resources needs to load before core to make it possible to override core elements with new resources + sortedValidMods.insert(sortedValidMods.begin(), *it); + else + sortedValidMods.push_back(*it); it = modsToResolve.erase(it); continue; }