[Mod] cottages [cottages] (medieval, farming, country life)

User avatar
h-v-smacker
Member
Posts: 110
Joined: Wed Nov 29, 2017 23:04
GitHub: h-v-smacker
In-game: Smacker

Re: [Mod] cottages [cottages] (medieval, farming, country li

by h-v-smacker » Post

ThorfinnS wrote:
h-v-smacker wrote:The same change should happen to the stone mill now, since they are soft of yin-and-yang of farming in cottages.
Truth. We were just waiting to see if anyone was interested in the expanded function. If not, there wasn't much point in making a general use case if it was only for us. If you are, I'd be happy to cut the crew loose on the mill API. Odds are it's only a couple hours, including testing.
I think I already added this function, since the handmill works in a more simple way. But mostly I spent time on fixing the threshing floor UI bug, which I found when I went to test the mill. You might wanna pull the current repo state.
Linux Forks, the Best Forks: linux-forks.de // Play @ LinuxWorks Next Generation

ThorfinnS
Member
Posts: 241
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] cottages [cottages] (medieval, farming, country li

by ThorfinnS » Post

Thought so. Looks like you already did it, assuming the examples like grinding cobble into gravel work. But haven't done much more than give it a cursory glance. Reason we got started on the threshing floor api was because it did pretty much what we wanted to do, then ran into your fork that accepts more than just wheat. Sweet!

User avatar
h-v-smacker
Member
Posts: 110
Joined: Wed Nov 29, 2017 23:04
GitHub: h-v-smacker
In-game: Smacker

Re: [Mod] cottages [cottages] (medieval, farming, country li

by h-v-smacker » Post

ThorfinnS wrote:Thought so. Looks like you already did it, assuming the examples like grinding cobble into gravel work. But haven't done much more than give it a cursory glance. Reason we got started on the threshing floor api was because it did pretty much what we wanted to do, then ran into your fork that accepts more than just wheat. Sweet!
Oh, those things most certainly work, the reason they are disabled is mostly because these functions are relegated to (also forked) technic devices on the linuxforks server. In fact, the fork of technic I'm running has an electrical threshing machine, which was largely inspired by the threshing floor from cottages. Since we have both mods (and I run both forks), the way it's set up is that cottages is the "little brother" of technic equipment-wise: the most basic farming stuff comes from cottages, then goes the non-powered machine set from technic, then proper power machines.
Linux Forks, the Best Forks: linux-forks.de // Play @ LinuxWorks Next Generation

ThorfinnS
Member
Posts: 241
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] cottages [cottages] (medieval, farming, country li

by ThorfinnS » Post

h_v_smacker, I don't recall whether I mentioned this in the PR, but if I didn't, here's all a mod maker need do to register his products with that function call.

Our tweaks mod has an optional depend on cottages, and in the init.lua the following three lines to fully integrate farming_redo:

Code: Select all

	cottages:add_threshing_product("default:grass_1",{"farming:seed_wheat", "farming:seed_oat"})
	cottages:add_threshing_product("default:dry_grass_1",{"farming:seed_barley", "farming:seed_rye"})
	cottages:add_threshing_product("default:junglegrass",{"farming:seed_rice", "farming:seed_cotton"})
Each of the outputs has equal probability, though we are in the middle of testing a variant where you can specify frequencies, so you can return rarer seeds on occasion.

We have a farmable marram grass we are about ready to release, and wanted to make sure it was easy to incorporate into the game. It works without the threshing floor, but I think it's going to work better with it. And there are other farm products in the chain, and this way we don't have to do a PR for each.

User avatar
h-v-smacker
Member
Posts: 110
Joined: Wed Nov 29, 2017 23:04
GitHub: h-v-smacker
In-game: Smacker

Re: [Mod] cottages [cottages] (medieval, farming, country li

by h-v-smacker » Post

ThorfinnS wrote:h_v_smacker, I don't recall whether I mentioned this in the PR, but if I didn't, here's all a mod maker need do to register his products with that function call.

Our tweaks mod has an optional depend on cottages, and in the init.lua the following three lines to fully integrate farming_redo:

Code: Select all

	
	cottages:add_threshing_product("default:grass_1",{"farming:seed_wheat", "farming:seed_oat"})
	cottages:add_threshing_product("default:dry_grass_1",{"farming:seed_barley", "farming:seed_rye"})
	cottages:add_threshing_product("default:junglegrass",{"farming:seed_rice", "farming:seed_cotton"})
Each of the outputs has equal probability, though we are in the middle of testing a variant where you can specify frequencies, so you can return rarer seeds on occasion.

We have a farmable marram grass we are about ready to release, and wanted to make sure it was easy to incorporate into the game. It works without the threshing floor, but I think it's going to work better with it. And there are other farm products in the chain, and this way we don't have to do a PR for each.
Actually no. As long as said functionality is not present in upstream, you need to introduce a mod version check as well:

Code: Select all

if minetest.get_modpath("cottages") and cottages.mod and cottages.mod == "linuxforks" then
      cottages:add_threshing_product("default:dry_grass_1", {"farming:seed_barley", "farming:seed_rye"})
      ...
end
As for adding seed-dropping grasses by default as a threshable item, I am personally opposed to it, because it cuts corners in otherwise more interesting gameplay mechanics. Basically it allows you to enjoy farming products without becoming a farmer. Like straight from hunter-gatherer to baker or something.
Linux Forks, the Best Forks: linux-forks.de // Play @ LinuxWorks Next Generation

ThorfinnS
Member
Posts: 241
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] cottages [cottages] (medieval, farming, country li

by ThorfinnS » Post

Oh, you mean in Sokomine's mod. Truth.

Yeah, going straight to baker changes stuff, sort of. There's nothing stopping the player from placing the grass he's dug, then digging it again, and repeat until you get lucky and harvest a seed. Using the floor is just a shortcut to wearing out the mouse. But it's why we are testing the version we are. It usually just generates a straw. Rarely it will generate the seed. I can't think we will run into any issues with it; it's pretty basic. Those who want to get 100% conversion of grass to seeds can still wear out the mouse. Those who aren't as patient have to settle for what they get. The trick is making it just good enough to make it worthwhile NOT to do the clickfest. Which is basically all we are testing now.

ThorfinnS
Member
Posts: 241
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] cottages [cottages] (medieval, farming, country li

by ThorfinnS » Post

I'm away from my coding machine at the moment, so I haven't pulled the most recent code, but on either your fork or Sokomine's, if you have a threshable product in the second slot, but not in the first, it crashes to main menu. It works properly if you run out in the first slot, but not if you start with nothing there.

User avatar
h-v-smacker
Member
Posts: 110
Joined: Wed Nov 29, 2017 23:04
GitHub: h-v-smacker
In-game: Smacker

Re: [Mod] cottages [cottages] (medieval, farming, country li

by h-v-smacker » Post

ThorfinnS wrote:I'm away from my coding machine at the moment, so I haven't pulled the most recent code, but on either your fork or Sokomine's, if you have a threshable product in the second slot, but not in the first, it crashes to main menu. It works properly if you run out in the first slot, but not if you start with nothing there.
I remember seeing a bug like that. Also I tested the current state of my fork, and it doesn't crash. So if my memory serves me right here, this issue was one of those I fixed when I tried to add the same API for mill as you did for threshing floor and went to test the result.
Linux Forks, the Best Forks: linux-forks.de // Play @ LinuxWorks Next Generation

ThorfinnS
Member
Posts: 241
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] cottages [cottages] (medieval, farming, country li

by ThorfinnS » Post

I'm guessing that's why the mill has only one input slot? That seems to be the easiest fix. Yeah, there's a lot of extra code that will never be used, but not much of an inconvenience to have to add only one stack at a time.

User avatar
h-v-smacker
Member
Posts: 110
Joined: Wed Nov 29, 2017 23:04
GitHub: h-v-smacker
In-game: Smacker

Re: [Mod] cottages [cottages] (medieval, farming, country li

by h-v-smacker » Post

ThorfinnS wrote:I'm guessing that's why the mill has only one input slot? That seems to be the easiest fix. Yeah, there's a lot of extra code that will never be used, but not much of an inconvenience to have to add only one stack at a time.
The mill has one slot because it's output ratio is lower. With a threshing floor, you'll be through one stack of wheat in like three hits of a stick, while a mill will go through one stack in 5 or 7 or something like that.
Linux Forks, the Best Forks: linux-forks.de // Play @ LinuxWorks Next Generation

ThorfinnS
Member
Posts: 241
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] cottages [cottages] (medieval, farming, country li

by ThorfinnS » Post

Depends on what kind of game you play, I guess.

One stack of wheat makes enough bread to play a day or two real time. Even if you increase the rate that the hunger mod goes through food to the point that early game survival is unlikely unless you start in an apple grove. If you were trying to feed a city, sure, having to take another few seconds to add the next stack would be something of a pain, though I think the better way to handle it is like the (I forget who started it; most recently updated by bell07, iirc) compost mod, where left click with a valid input in hand places the stack into the device, left click with empty hand retrieves whatever is in the first output slot.

TenPlus1's mortar and pestle (farming redo) is a LITTLE more balanced, as it takes four input grains to make one output of flour, which makes one loaf of bread, but its still trivial to produce insane amounts of food.

User avatar
h-v-smacker
Member
Posts: 110
Joined: Wed Nov 29, 2017 23:04
GitHub: h-v-smacker
In-game: Smacker

Re: [Mod] cottages [cottages] (medieval, farming, country li

by h-v-smacker » Post

ThorfinnS wrote:Depends on what kind of game you play, I guess.

One stack of wheat makes enough bread to play a day or two real time. Even if you increase the rate that the hunger mod goes through food to the point that early game survival is unlikely unless you start in an apple grove. If you were trying to feed a city, sure, having to take another few seconds to add the next stack would be something of a pain, though I think the better way to handle it is like the (I forget who started it; most recently updated by bell07, iirc) compost mod, where left click with a valid input in hand places the stack into the device, left click with empty hand retrieves whatever is in the first output slot.

TenPlus1's mortar and pestle (farming redo) is a LITTLE more balanced, as it takes four input grains to make one output of flour, which makes one loaf of bread, but its still trivial to produce insane amounts of food.
Look, it's not that hard to add a second slot to the mill as well. I just thought that the disparity of input capacity was due to different output rate. Also if you want to feed a city, you basically need technic and digtron )))
Linux Forks, the Best Forks: linux-forks.de // Play @ LinuxWorks Next Generation

Merak
Member
Posts: 58
Joined: Sat Nov 05, 2016 20:34

Re: [Mod] cottages [cottages] (medieval, farming, country li

by Merak » Post

Sokomine wrote:
Fri Jun 30, 2017 23:39
The latest addition to cottages is a rope copied from Bas080's fine vines and rope mod plus a special rail with a rope on top. They're needed for the mines in my citybuilder mod for the central shaft (climb up+down, walk, ride through with a cart).
How is it used? Is the citybuilder mod needed? I have tried to use it and could not figure it out.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests