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

User avatar
h-v-smacker
Member
 
Posts: 102
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 » Mon Oct 28, 2019 19:12

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: 200
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

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

by ThorfinnS » Mon Oct 28, 2019 19:36

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: 102
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 » Tue Oct 29, 2019 00:38

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: 200
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

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

by ThorfinnS » Sun Nov 03, 2019 22:51

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: 102
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 » Mon Nov 04, 2019 01:12

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: 200
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

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

by ThorfinnS » Mon Nov 04, 2019 15:49

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: 200
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

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

by ThorfinnS » Sat Nov 16, 2019 15:47

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: 102
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 » Sun Nov 17, 2019 11:06

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: 200
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

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

by ThorfinnS » Mon Nov 18, 2019 04:18

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: 102
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 » Mon Nov 18, 2019 16:35

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: 200
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

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

by ThorfinnS » Mon Nov 18, 2019 22:14

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: 102
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 » Tue Nov 19, 2019 11:37

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
 

Previous

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 11 guests