Jump to content

Boulders drop mod


AngelEyes

Recommended Posts

I've been trying to create a mod that makes loose boulders and rocks drop actual boulders in addition to the small stones, which then can be chiseled into single stone bricks.

But I have probably messed it up somewhere, because now the boulders and rocks have no shape or texture and they don't drop anything. If anyone is willing to take a look at the mod file and see where it all went wrong I would greatly appreciate it.

boulders.zip

Link to comment
Share on other sites

16 hours ago, AngelEyes said:

I've been trying to create a mod that makes loose boulders and rocks drop actual boulders in addition to the small stones, which then can be chiseled into single stone bricks.

But I have probably messed it up somewhere, because now the boulders and rocks have no shape or texture and they don't drop anything. If anyone is willing to take a look at the mod file and see where it all went wrong I would greatly appreciate it.

 

I think this is close to what you want.  Refactored and tested in about 15 minutes so it might need more work.  Notable changes
1.  Removed your game assets and replaced them with patches (generated the patches using modmaker, so they're not necessarily perfect)
2.  Added the "domain" to asset references where required (either game: or boulders:)
3. Fixed a bit of invalid json (I used an autoformatter to get this done quickly, which is why everything looks a little different)
4. Made some (perhaps irrelevant) changes to your modinfo.json

To-Do

The language file i.e. assets\boulders\lang\en.json
 

boulders0.0.1.zip

Edited by Spear and Fang
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, AngelEyes said:

Looks like it worked, thanks a lot for the help!

My pleasure.  Happy modding!

The biggest takeaway is the whole "domain" thing.  In this case, there's only two of them
boulders:
the assets in your mod - more specifically, the boulders blocktype, and the one recipe
game:
everything else that your mod leverages but is not in your mod, including blocks/items, sounds, textures, and shapes

So in your mod, every time we reference an asset that's not a "boulder", you need to prefix that asset with game:.  You'll see I added quite a few of them.
And in the case of the patches (which are simply modifying files directly in the game itself), we need to reference the boulder in your mod (with boulders:).

The recipe is referencing assets from both places but lives in your mod, so it needs game: to point outside of your domain.

Edited by Spear and Fang
Link to comment
Share on other sites

2 hours ago, Spear and Fang said:

My pleasure.  Happy modding!

The biggest takeaway is the whole "domain" thing.  In this case, there's only two of them
boulders:
the assets in your mod - more specifically, the boulders blocktype, and the one recipe
game:
everything else that your mod leverages but is not in your mod, including blocks/items, sounds, textures, and shapes

So in your mod, every time we reference an asset that's not a "boulder", you need to prefix that asset with game:.  You'll see I added quite a few of them.
And in the case of the patches (which are simply modifying files directly in the game itself), we need to reference the boulder in your mod (with boulders:).

The recipe is referencing assets from both places but lives in your mod, so it needs game: to point outside of your domain.

Yeah, I wasn't aware that more specific domains were needed, but it makes sense that it does.

I got a language file working now too, the only issue with it is that the names aren't pluralized when you have more than one boulder in a stack. But I'm willing to live with that.

It looks like this:

{
	"item-boulder-chalk": "Chalk boulder",
	"item-boulder-chert": "Chert boulder",
	"item-boulder-conglomerate": "Conglomerate boulder",
	"item-boulder-limestone": "Limestone boulder",
	"item-boulder-claystone": "Claystone boulder",
	"item-boulder-granite": "Granite boulder",
	"item-boulder-sandstone": "Sandstone boulder",
	"item-boulder-shale": "Shale boulder",
	"item-boulder-basalt": "Basalt boulder",
	"item-boulder-peridotite": "Peridotite boulder",
	"item-boulder-phyllite": "Phyllite boulder",
	"item-boulder-slate": "Slate boulder",
	"item-boulder-obsidian": "Obsidian boulder",
	"item-boulder-bauxite": "Bauxite boulder",
	"item-boulder-andesite": "Andesite boulder",
}

 

  • Like 1
Link to comment
Share on other sites

×
×
  • 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.