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

User avatar
h-v-smacker
Member
 
Posts: 97
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: 188
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: 97
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: 188
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: 97
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: 188
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: 188
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: 97
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: 188
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.
 

Previous

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 4 guests