Jump to content

Recommended Posts

Posted

My mod:https://mods.vintagestory.at/heavyforlonarmor

Mod that I have compatibility problems with:https://mods.vintagestory.at/show/mod/11264

The problem is that my and this mod ovverite the game file "game:worldproperties/block/metal.json" the problem is that spearexpansion has always load priority. my added metal stays in game and isnt causing errors but It no longer can be made becasue alloy recipes are gone. I tied patching it with compatibility lib patch structure, but it didnt rly worked. help plzz

heres the patch file \assets\heavyforlonarmor\compatibility\spearexpantion\patches

 

there is the patch itself.

 

[
  {
        "file": "game:worldproperties/block/metal.json",
        "op": "addmerge",
        "path": "/variants",
        "value": [{code: "temporalit", meltPoint: 1668, boilPoint: 3287, density: 4510, specificHeatCapacity: 0.54, elemental: false, tier: 4}],
        "dependsOn":[{ "modid": "spearexpantion" }]
 
    },
  {
        "file": "game:worldproperties/block/metal.json",
        "op": "addmerge",
        "path": "/variants",
        "value": [{code: "ancientgold", meltPoint: 1020, boilPoint: 1040, density: 4510, specificHeatCapacity: 0.54, elemental: false, tier: 3}],
        "dependsOn": [{ "modid": "spearexpantion" }]
    },
  {
        "file": "game:worldproperties/block/metal.json",
        "op": "addmerge",
        "path": "/variants",
        "value": [{code: "hardmeteor", meltPoint: 1020, boilPoint: 1040, density: 4510, specificHeatCapacity: 0.54, elemental: false, tier: 3}],
        "dependsOn": [{ "modid": "spearexpantion" }]
    }
]

 

 

  • Solution
Posted

For as far as I can see your alloy recipe works just fine even with that other mod (though you are lacking a language string for material-ancientgold)

image.thumb.png.07406ac11d0a6e2feffb7257be09ef44.png


Your real problem lies elsewhere, namely in the combustibleProps that are required to exist and have a melting point that is reachable with existing fuel sources for it to show up as moldable, which disappears once you add "spearexpantion".

The reason why this happens is because both your mod and "spearexpantion" put patches inside the game domain folder with the same name (meaning the files themselves end up overriding each other). This is why you never put anything inside the game domain folder unless absolutely necessary. Simply move the patch files from "assets/game/patches" into "assets/heavyforlonarmor/patches" and prefix the target file with "game:" (some already have this) and problem is solved.

image.thumb.png.4c3706a4e0bc5f2e7b65278217ae2f79.png

  • Like 2
Posted (edited)

Well, that solution was surprisingly (and might I add disappointingly) easy.

This is btw an interesting side effect of the ModMaker. I can only assume that we will see more of this in the future.

Edited by Brady_The
Posted
1 hour ago, Brady_The said:

Well, that solution was surprisingly (and might I add disappointingly) easy.

This is btw an interesting side effect of the ModMaker. I can only assume that we will see more of this in the future.

Wait the modmaker puts stuff in game domain folder? 😬

I'm surprised I haven't seen this one before then.

Posted (edited)
1 hour ago, The Insanity God said:

Wait the modmaker puts stuff in game domain folder? 😬

I'm surprised I haven't seen this one before then.

Don't mind me, I am just an AI hallucinating things.

The ModMaker doesn't do that, but it generates the same file names. So if people use the ModMaker and put patches into the game domain (because that's what you do if you refuse to go through the wiki tutorials to understand the finer details of modding VS) you'll get those results.

Hm, I wonder if those domain issues are mentioned anywhere on the wiki. I might have to take a look.

Edited by Brady_The
  • Thanks 1
Posted

rly thanks for the solution i will try it soon cause now its a lil bit turbulent. By th way i didnt use modmaker XD i didnt know it even existed I just looked at what other mods are doing and just figuring things out by reverse engineering stuff

  • Like 1
Posted (edited)

The JSON Patching page on the wiki states ModMaker uses the `game` domain by default:
https://wiki.vintagestory.at/index.php/Modding%3AJSON_Patching
> By default, when you generate a mod using ModMaker 3000™, the folder structure will use game as the domain, and use the same file name as the vanilla JSON file. This can lead to mod conflicts.

But I tested ModMaker in VS1.21.6, 1.20.12, and 1.19.8, and could not reproduce the issue.
It might have been the case in versions older than 1.19.
 

Edited by Spoonail
  • Like 2
Posted (edited)
2 hours ago, Octan Corp said:

I just looked at what other mods are doing and just figuring things out by reverse engineering stuff

That's how you do it!

I personally would go ahead and move all patches into the heavyforlonarmor domain. This happened once. It can happen again if somebody else is using ModMaker created patches to modify something you change too. All but the first three of your patches fit the ModMaker naming pattern.

Edited https://wiki.vintagestory.at/Modding:JSON_Patching#File_Path_and_Name_Considerations to reflect current implementations.

Edited by Brady_The
  • Like 1
Posted

I finnaly had the time to implement the fix. it worked like a charm. rly rly thanks for helping me ya all

vs community is by far the best and most helpfull one ive encountered in games by far. this is one of one the reasons I made this mod it the first place to be part of it

 

tyyyy

  • Like 2
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.