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

User avatar
h-v-smacker
Member
Posts: 115
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: 311
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: 115
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: 311
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: 115
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: 311
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: 311
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: 115
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: 311
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: 115
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: 311
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: 115
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: 116
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.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

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

by Sokomine » Post

Merak wrote: How is it used? Is the citybuilder mod needed? I have tried to use it and could not figure it out.
The rope as such is just a node that you can craft, place and climb up/down. If you want some serious climbing, take the vines and rope mod with its great ropebox.

The combination of rope and rail is used for the mineshafts in the larger mines. I needed a node where a cart can travel through (thus, rail) and where players could climb up and down (thus, rope) for the middle of the mineshaft. It's part of my citybuilder mod and can even be crafted there. Looks like this:
Image
Attachments
rope_rail.jpg
rope_rail.jpg (111.29 KiB) Viewed 2259 times
A list of my mods can be found here.

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

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

by ThorfinnS » Post

Any ideas what's going on here?

Code: Select all

2020-10-14 10:01:06: ERROR[Main]: ModError: Failed to load and run script from \\STEVE-PC\Inbox\mt\bin\..\mods\cottages\init.lua:
2020-10-14 10:01:06: ERROR[Main]: \\STEVE-PC\Inbox\mt\bin\..\builtin\game\register.lua:182: bad argument #5 to 'register_item_raw' (table expected, got function)
2020-10-14 10:01:06: ERROR[Main]: stack traceback:
2020-10-14 10:01:06: ERROR[Main]: 	[C]: in function 'register_item_raw'
2020-10-14 10:01:06: ERROR[Main]: 	\\STEVE-PC\Inbox\mt\bin\..\builtin\game\register.lua:182: in function 'register_item'
2020-10-14 10:01:06: ERROR[Main]: 	\\STEVE-PC\Inbox\mt\bin\..\builtin\game\register.lua:208: in function 'register_node'
2020-10-14 10:01:06: ERROR[Main]: 	...EVE-PC\Inbox\mt\bin\..\mods\cottages/nodes_furniture.lua:54: in main chunk
2020-10-14 10:01:06: ERROR[Main]: 	[C]: in function 'dofile'
2020-10-14 10:01:06: ERROR[Main]: 	\\STEVE-PC\Inbox\mt\bin\..\mods\cottages\init.lua:121: in main chunk
Minetest 5.3.0.

Happens to many of the dofiles that define nodes, Anvil and pitchfork seems to load fine.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

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

by Sokomine » Post

ThorfinnS wrote: Happens to many of the dofiles that define nodes, Anvil and pitchfork seems to load fine.
Are you using the latest version? I'm more or less on latest MT and don't have any problems there. Can't see any obvious errors there either.

Cottages currently has a problem with the well. If you punch it with just one empty bucket in your inventory, it will place and immediately take the bucket away, not giving you a filled one. It works if you have two buckets in your inventory. Need to find out what causes that bug.
A list of my mods can be found here.

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

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

by ThorfinnS » Post

My bad. We were using someone else's fork of your mod. So while I confirmed through git pull that we had the latest copy, it wasn't pulling from your repo.

HighPopes
Member
Posts: 48
Joined: Tue Sep 22, 2020 01:38
GitHub: HighPopes

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

by HighPopes » Post

The rope rails are a neat idea. I like that the anvil works and doesn't dupe the item like the castle plus anvil does. I think the anvil mod did the same.

I'm getting a rendering problem with the hay floor mat thing. It shows as a half box that's solid black. Does anyone know of a fix for this error?

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

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

by Sokomine » Post

HighPopes wrote: I'm getting a rendering problem with the hay floor mat thing. It shows as a half box that's solid black. Does anyone know of a fix for this error?
Sounds strange. The "some hay" node is similar to snow. It uses a slightly dyed straw texture. Can you see the textures of the hay block?
A list of my mods can be found here.

HighPopes
Member
Posts: 48
Joined: Tue Sep 22, 2020 01:38
GitHub: HighPopes

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

by HighPopes » Post

Yeah, that texture works. I'm having trouble getting the rope rail to work. How do you use it? The cart doesn't pass through it just stops.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

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

by Sokomine » Post

HighPopes wrote: Yeah, that texture works. I'm having trouble getting the rope rail to work. How do you use it?
The rope rail allows you to climb up and down like with a ladder (or with the rope). In addition it acts like a rail node for a cart. You can build mineshafts like this one:
Image
As a player, you can climb up and down in the shaft, and the cart can travel from one side of the shaft to the other without having to stop due to lack of rails.

The diffrent stages of mines in my citybuilder mod make use of it (not that they're of much use yet...citybuilder needs much more work).
Attachments
rope_and_rail.jpg
rope_and_rail.jpg (116.59 KiB) Viewed 2259 times
A list of my mods can be found here.

Baobab2
New member
Posts: 7
Joined: Tue Mar 16, 2021 12:10
In-game: Baobab

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

by Baobab2 » Post

I have this problem with version 5.4.1 of minetest

2021-05-08 19:00:59: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'cottages' in callback environment_Step(): ...inetest-5.4.1-win64\bin\..\mods\cottages/nodes_anvil.lua:233: bad argument #1 to 'hud_remove' (number expected, got nil)
2021-05-08 19:00:59: ERROR[Main]: stack traceback:
2021-05-08 19:00:59: ERROR[Main]: [C]: in function 'hud_remove'
2021-05-08 19:00:59: ERROR[Main]: ...inetest-5.4.1-win64\bin\..\mods\cottages/nodes_anvil.lua:233: in function 'func'
2021-05-08 19:00:59: ERROR[Main]: D:\minetest-5.4.1-win64\bin\..\builtin\common\after.lua:20: in function <D:\minetest-5.4.1-win64\bin\..\builtin\common\after.lua:5>
2021-05-08 19:00:59: ERROR[Main]: D:\minetest-5.4.1-win64\bin\..\builtin\game\register.lua:422: in function <D:\minetest-5.4.1-win64\bin\..\builtin\game\register.lua:406>
2021-05-08 19:00:59: ERROR[Main]: stack traceback:


is it known ?
this happens when a player uses anvil

errant
Member
Posts: 31
Joined: Sun Jan 03, 2021 18:19

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

by errant » Post

I got a tree trunk water well used in a setup to make ice. Basically I have an ice machine that hits the well with a bucket and sends a bucket of water to the freezer for ice.
Image

It worked for a day, but now the tree trunk water well doesn't fill water anymore (bug). Because there's an empty bucket in the well, I can't remove it either.

Pointing this out as a player (not the admin of a server).
Attachments
screenshot_20210907_195542.png
screenshot_20210907_195542.png (930.96 KiB) Viewed 2259 times

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

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

by ThorfinnS » Post

Baobab2 wrote:
Sat May 08, 2021 17:10
I have this problem with version 5.4.1 of minetest

2021-05-08 19:00:59: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'cottages' in callback environment_Step(): ...inetest-5.4.1-win64\bin\..\mods\cottages/nodes_anvil.lua:233: bad argument #1 to 'hud_remove' (number expected, got nil)
2021-05-08 19:00:59: ERROR[Main]: stack traceback:
2021-05-08 19:00:59: ERROR[Main]: [C]: in function 'hud_remove'
2021-05-08 19:00:59: ERROR[Main]: ...inetest-5.4.1-win64\bin\..\mods\cottages/nodes_anvil.lua:233: in function 'func'
2021-05-08 19:00:59: ERROR[Main]: D:\minetest-5.4.1-win64\bin\..\builtin\common\after.lua:20: in function <D:\minetest-5.4.1-win64\bin\..\builtin\common\after.lua:5>
2021-05-08 19:00:59: ERROR[Main]: D:\minetest-5.4.1-win64\bin\..\builtin\game\register.lua:422: in function <D:\minetest-5.4.1-win64\bin\..\builtin\game\register.lua:406>
2021-05-08 19:00:59: ERROR[Main]: stack traceback:


is it known ?
this happens when a player uses anvil
It happens when trying to repair a tool that has no damage. I have not looked into it more than that.

User avatar
Lupercus
Member
Posts: 30
Joined: Tue Jan 03, 2017 02:08
GitHub: lupercus13
IRC: Lupercus-Server
In-game: Lupercus

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

by Lupercus » Post

here is rooster from xdecor i added, and scarecrow added from decoblocks.
Attachments
Screenshot from 2022-04-08 18-31-39.png
Screenshot from 2022-04-08 18-31-39.png (757.66 KiB) Viewed 1922 times

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 19 guests