[Alpha23+] BreweryMod

possible but nope ^^ i have 8 mods which i update etc so that i dont want to double it xD Sry! Also i overwrite the old files so they dont exist anymore xD

2 Likes

Having an issue with the flowers. You can harvest them but the Hearthling will not put them in stockpiles and if you try to move them to another location it generates the following error.

develop-3116 (x64)[M]
@stonehearth/components/ghost_form/ghost_form_component.lua:203: Could not find root entity uri for iconic uri /brewerymod/entities/furniture/allium_pot/allium_pot_iconic.json. Is there an issue with catalog?
stack traceback:
radiant/modules/common.lua:237: in function 'report_traceback’
radiant/modules/common.lua:456: in function ‘verify’
…earth/components/ghost_form/ghost_form_component.lua:203: in function ‘_calculate_root_uri’
…earth/components/ghost_form/ghost_form_component.lua:185: in function 'set_placement_info’
stonehearth/lib/entity_forms/entity_forms_lib.lua:86: in function 'initialize_ghost_form_components’
stonehearth/lib/entity_forms/entity_forms_lib.lua:170: in function 'create_ghost_entity’
stonehearth/lib/entity_forms/entity_forms_lib.lua:187: in function ‘place_ghost_entity’
…h/components/entity_forms/entity_forms_component.lua:459: in function ‘_place_item’
…h/components/entity_forms/entity_forms_component.lua:388: in function ‘place_item_on_ground’
…tonehearth/call_handlers/place_item_call_handler.lua:82: in function <…tonehearth/call_handlers/place_item_call_handler.lua:71>

1 Like

As can be seen here I have the potted form still sitting on the ground. The error occurs when I click on one and try to use the move tool and then only after I select the new location.

But on a good note. They do move and place the item

1 Like

thanks for the info: its now fixed :smiley:

sooo next update - i have changed the models for strawberry and garlic so its looks now better with the fallow xD

3 Likes

ok next update: all plants are now renewable^^

2 Likes

Wiese, since you seem to be so helpful, which Thank you, I have a quick question. I went through all of my mods I had installed and balanced the value_in_gold and level_requirement of all the added items to my liking, just before alpha 18. Obviously that all got blown away with the new version of all the mods, and it was kind of a lot of work. I believe the best solution for me for this kind of a thing going forward, would be to make my own mod that used a Mixin to overwrite the value_in_gold for the mod with the value I wanted. Then when the other mods updated, like this one, and I downloaded a new version, I wouldn’t have to go into 50 different files to reapply my updates, just ensure my mods settings still matched the original mod. i.e. you rename grapes or something, I would have to rename as well. Right?

I cannot figure out how to create the manifest and files. Do I need a separate json file for every file you have in your mod, or can I do your mod overwrite with a single json file with the updated value_in_gold for each entity I wanted to change?

Not that I don’t love the hard work every mod maker has made, and I am not re-distributing this at all, just trying to get all the mods to have similar values, so I cannot just farm gold by growing potatoes continuously.

Thanks for any help you want to give!

1 Like

normally you must do it for every file but with the new mixinto it should be an option to make one file and say then in the manifest in which files it should mixin …

it should be something like:

{
“entity_data”: {
“mixintypes”: {
“stonehearth:net_worth”: “override”
},
“stonehearth:net_worth”: [
“value_in_gold”: 1,
“rarity”: “common”,
“shop_info”: {
“buyable”: false,
“sellable”: true,
“shopkeeper_level”: 1,
“shopkeeper_type”: “caravan”
]
}

and for the manifest:

“brewerymod/entities/containers/empty_barrel/empty_barrel.json” : “file(mixin/yourfile.jona)”,

BUT: not tested ^^

1 Like

and again new update:D now they are renewable AND moveable :smiley:

Thx @BrunoSupremo for his help :smiley:

now i only need to look how the actuall spawns works with the game concept xD

1 Like

There is a few things I want to talk about.

I noticed that there is a command to chop trees
"stonehearth/data/commands/plant_tree/plant_tree.json": "file(data/commands/plant_tree/plant_tree.json)"
But it is exactly the same as the same command in stonehearth mod. Is it old unused code?

I also noticed that you added the crops at
"stonehearth/services/server/farming/data/initial_crops.json": "file(services/server/farming/data/initial_crops.json)",
But in that file you added them only for the ascendancy and north alliance. Other kingdoms like rayyas or bastioneers are not getting the crops.

While at it, all crops starts at level 0? Is this by design to get everything from the start? I think it would be a nice touch to spread them through some levels, with some unlocking at higher farming levels.

And a few food items (like the carrot_juice) has this structure

   "entity_data": {
      "stonehearth:drink_container": {
         "effect": "fiddle",
         "drink": "brewerymod:cooking:carrot_juice_serving"
      },

That “drink_container” and “drink” are special actions to make them drink instead of eat and is not something from your mod, but from the cook mod. What would happen if a hearthling tries to use it in a game without the other mod? (I’m not able to test this now by myself)

1 Like

heyho - yes the command was old code - from when this command doesnt exist xD

for farming: im honest for rayya i dont think the most of the crops work with dessert xD and for bastioneers - this i dont want to touch because i have really no idea of the idea in the background but @Wharp can say if its ok with his mod

and drinking is a special action: this mod is a companion mod for the cookmod and froggy was faster then the devs and added thirstlevel to the hearthlings - so they need water etc. instead of only food.

for a game without thirst/cookmod - this happens:

= nothing - you can produce it but it will not be used xD

for some items like blueberries i have make it that they have both food and drink

1 Like

I guess one solution for crops not being “compatible” with the kingdom or the biome would be to add them as seeds, so they can buy them at higher levels like it happens with both default kingdoms buying the others seeds.

3 Likes

good idea but doesnt work xD or i must add the files into the stonehearthfolder or it will not find it and when i do this there will be problems with translation :smiley:

this feature is still to new for modding … but perhaps the devs can help after their return - for now i will add all crops to all kingdoms

ok mom perhaps im just stupid xD

soooooooooooo it works now - but now i must show my artistics … and thats a horror for me … so bad bruno :stuck_out_tongue:

Sorry :smile: Well, if it were me, I would simple copy the seeds already in game and just change the food icon at the crate top.

:stuck_out_tongue: and there we are at the artistic part xDDD and this i do at the moment xD

edit: so im complete and the update is up xD

whistle but if you want you could look into the generation file because i cant make it to spawn correctly on foothills and mountains whistle

I was going to answer through the PM, but this is too much text and was hard to write there, beside it can be useful for someone else later too.

All the plants are generate after the tree generation. First all the trees spawns, then after that, only in the spaces not yet occupied that the algorithm for the plants can starts.

The hard part of what you need is that you can’t bump the spawn for a single plant type, but bump for every plant on the same elevation. (When I say plant, I mean just the flowers and such, not the trees. Trees are always separated from the other plants)
The code you wanna check is this

        "noise_map_parameters": {
           "terrain_based": {
              "plains": {
                 "1": {
                    "probability": 0,
                    "density": 0.6
                 },
                 "2": {
                    "probability": 0.35,
                    "density": 0.8
                 }
              },
              "foothills": {
                 "1": {
                    "probability": 0.35,
                    "density": 0.7
                 }
              },

I can’t explain this in short, so I will write this mini tutorial on the spawning mechanic.
This is how it works:
The game checks a chunk of land with 16x16 blocks. It then chose ONE type of plant to populate that area. That’s why we can’t have plants between trees or multiple different objects close to each other, because a chunk can only have one type of object in its entire area. It chose which plant based on the weight you set for each one. Higher weight, higher chances to be selected. Like so:

    "weights": {
       "plains": {
          "1": {
             "stonehearth:plants:brightbell": 2,
             "stonehearth:plants:silkweed": 1,

Then it procedes to slice that piece of land into smaller chunks, the amount is based on the grid_multiple setting you used for it.

     "stonehearth:plants:silkweed": {
        "placement_type": "dense",
        "parameters": {
           "grid_multiple": 4,
           "item_density": 0.1,
           "exclusion_radius": 1

If you used “grid_multiple”: 4, it will slice that chunk into 4 rows and 4 columns, (4x4). Each of these smaller pieces of land will be used to spawn the selected item right at the center of each spot, so at this point in the algorithm you will have 16 plants there in a 4x4 grid.

To make it more natural and less organized in a grid, the game uses the value of exclusion_radius to move the items, making the grid not so perfect aligned anymore. The number used is the amount of blocks it can move in a direction, so the number 3 for example, can move it 3 blocks to the north, while his neighbor moves a little to the west, and so on.

Finally the game checks the item_density, which is basically a percentage of chances to spawn in each of this smaller spots, so you don’t end with and over crowded chunk. A value of 0.3 would spawn around 30% of the original 16 plants, so around 5 only will be present

But all of this algorithm will only happen IF, and only if, that chunk of land is selected to be used.

How the game selects them? Based on the values you use at the noise_map_parameters. That’s what makes the game chose more or less chunks to populate with plants.
probability is the amount of chances it can select the chunks. 1 is max, so it will select all chunks left, 0.5 would select around half of them, and so on.
density is used to influence the “item_density” of the item. So you can restrict even more the chances to spawn
We have this “density” at the “noise_map_parameters” for each elevation and it is useful because we can change the item_density based on elevation. So the same type of plant can spawn more in an elevation and less in another, while keeping that “grid algorithm” above.

All that said, try the following, at that noise_map_parameters, in the elevation desired, bump the probability and density both to 1 (max). You will easily understand it after you see in action.

Sorry for the super long text, I couldn’t find a way to explain it, and would not really help to just say which values you need to change without understanding what they do.

Keep in mind that eventually you will want to have different files for different biomes, instead of using the same for all of them like you are doing now. That is because if you bump the values to make it work better in temperate, maybe in the desert (or other biomes) it could end up too crowded. Yep, that’s a lot of work.

5 Likes

ok now after reading all - i like how it is :stuck_out_tongue:

Boooaaahhh xD very nice writing xD

so all in all i must first lower the tree generation ^^

Lol, that’s a way too.

I will keep thinking about this problem later. There must be an easier way.

1 Like

hmmmm perhaps a little to much :joy: but no prob to find something to harvest xDDD

1 Like