Taking Questions about Mixintos and Overrides

Good question. You just found the harvest_overlay I was looking for. :smile:

1 Like

Yay! :smiley: Iā€™m glad my problems can help someone, lol

When messing around with rp_geoffers_nightmares, Iā€™ve had to deal with those too. I would guess that the answer is ā€œNoā€. Trying to override ../horde/... isnā€™t working (which isnā€™t too surprising). I would say this is outside of the ā€œmodsā€ area and somewhat still in the ā€œengineā€ portionā€¦

But allowing materials/textures to reside inside mod folders is definitely something that would be nice :smiley:

1 Like

Drat, fudge and, tartar sauce :cry:


hmmā€¦ though, I did just find stonehearth.smod/data/effects/thoughts/sleepy/sleepy.json, which points to horde/material/thoughts/sleepy/sleepy_material.xml, which points to the sleepy.png.

Do you think it would be possible to jerry-rig the json to point to another xml to point to another png? Or will we encounter a similar problem since the png-pointer in the xml file starts in the horde folder?

I do not recommend it. Butā€¦ yes. You can workaround it. It wonā€™t work anymore, but rp_geoffers_nightmares will give you an idea how it worked with r27 (and probably still does).

The short version is that you can define an xml that is inside mods/ or whereever you want, but I highly expect that this will not work if the directory is .smodā€™ed. I havenā€™t tested it (or it was too long ago), but I would say chances are slim.

Nevertheless, you shouldnā€™t do that. Relative paths that go beyond the top directory are dangerous and will likely be disabled at some point. I would much rather have proper material/texture support for mods than relying on this hack not breaking :wink:

As would I! :smiley:

Perhaps we can bring @sdeeā€™s attention to this inability to change icons for the sleep and hungry thoughts? Maybe? Pretty please? With :candy: on top :smile:

1 Like

Good it works now.
What was the command for enabling te debugging function again?

"enable_debug_keys" : true,
1 Like

Regarding modding in the horde folder, @not_owen_wilson once casually threw off ā€œā€¦and then people will be able to swap out the renderer for whatever they wantā€ but that was a.) right after he joined the company and b.) so shockingly awesome that c.) my brain didnā€™t parse anything he said right afterwards, or think to ask him what the first half of his sentence was.

But still! Paging him in now.

3 Likes

I did a little bit of work on this last week :slight_smile: Still tonnes to do! Eventually weā€™ll want to deprecate most (all?) of that ā€˜hordeā€™ directory and move the appropriate rendering code into the mod-level, so that mods will be able to re/define the rendering pipeline themselves (at least, as much as they can via the horde shader/material/pipeline interface).

There are the usual issues to resolve (dealing with conflicting mods, etc.), but this should hopefully behave in a reasonable manner.

4 Likes

Is there a way as of now to add new resources to existing tabs in the stockpile?

My bamboo bundles are ā€œbamboo_resourceā€ in their json file so they use use them for crafting bamboo furniture but I realized now it doesnā€™t fit into any of the stockpile categories and my workers get confused if you start editing the stockpile permissions. . . :frowning: I havenā€™t found a way yet to add them to the Resources: Wood category yetā€¦

Any ideas?

1 Like

Try tagging them as "bamboo_resource wood"?

2 Likes

Yes, the resources are just tags so adding wood will make them count as wood.

1 Like

Wonā€™t that make them a substitute for wood in recipes too?
What if we wanted to add our own catagories to the stockpile menu?

For some reason I canā€™t change the model of a juniper tree with a mixinto. The juniper trees models are unique, unlike the oak ones that have 3 models for each size. But I wanted to change the model and add two more models at the same time. I remember I could do it with old methods (swapping the files directly in the stonehearth.smod).

I checked the syntax of my json files(at first I had some mistakes) but now I donā€™t know what is wrong. When I launch the game everything is normal, but I notice that there are no trees of that type I tried to change.
This is my mixinto file:

{
	"components": {
		"unit_info": {
			 "name": "my tree", 
			 "description": "description."
		},
		"model_variants": [
		  {
			"models": [
			   {
				  "items": [
					 "file(/models/trees/juniper_medium/medium_juniper1.qb)",
					 "file(/models/trees/juniper_medium/medium_juniper2.qb)",
					 "file(/models/trees/juniper_medium/medium_juniper3.qb)"
				  ]
			   }
			]
		  }
		 ]
	}
}

The manifest file:

 {
"info" : {
      "name" : "Candyland2"
   },

   "mixintos" : {
      "stonehearth:berry_bush" : [
         "file(/mixintos/berry_bush.json)"
      ],
	  "stonehearth:medium_juniper_tree" : [
		 "file(/mixintos/medium_juniper.json)"
	  ]
   },
   
   "overrides" : {
	  "stonehearth/renderers/terrain/terrain_renderer.json" : "candyland2/terrain_renderer.json"
   }
}

Maybe I could do it with one override+one mixintoā€¦ Any help?

Remember that mixintos are additive. Therefore, you merely add your own trees. To verify that your mixinto is working, check the log file and the name/description in the game.

That being said, the issue is that it likely isnā€™t compatible-ish.

"model_variants": [
   {
      "models": [
         {
            "type": "one_of",
            "items": [
               "file(large_oak_tree.qb)", 
               "file(large_oak_tree_2.qb)", 
               "file(large_oak_tree_3.qb)"
            ]
         }
      ]
   }
],

Since you canā€™t add or overwrite that first element in the array ( model_variants.models) with a mixinto, the only way to change that would be an override.

Iā€™m not sure what happens when you add another, unnamed model variantā€¦ I suppose itā€™s ignored? Itā€™s tried to spawn nonetheless (I think villagers work along those lines)? Something like that.

Mmā€¦ The thing is, I used a mixinto to change the berry bush. And it worked like a charm.
I guess Iā€™ll use an override, thenā€¦
EDIT: the log says invalid file path o_0
Iā€™ll check againā€¦ it has to be syntax.

Well, there you go. :wink: You could always use Jefferson to see where your path actually points towards to.

1 Like

jofferson doesnā€™t notice my mixintos :frowning:

Thatā€™sā€¦weird. Did you check the errors? Can you zip up the (faulty) thing?