[Mod] Farming Redo [1.42] [farming]

User avatar
TenPlus1
Member
 
Posts: 2637
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Update

by TenPlus1 » Wed Oct 02, 2019 18:15

- Added some nil checks when placing seed items on nodes with on_rightclick active
 

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

Re: [Mod] Farming Redo [1.42] [farming]

by ThorfinnS » Thu Oct 03, 2019 16:26

Oh, cool.

Looking forward to seeing if nil checks gets rid of the occasional weirdnesses interacting with lib_ecology. One just had to learn which plants not to plant or you would get warning messages popping up all the time. Strawberries for sure. Couple others, too, but I don't recall which.
 

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

Re: [Mod] Farming Redo [1.42] [farming]

by ThorfinnS » Fri Nov 29, 2019 20:55

Trying to figure out whether you had a detectable pattern in mind when assigning groups.

For example, the thing you plant with corn is in group food_corn, beets is food_beetroot, but the juicer is food_juicer. So looks like I can't just strip off anything with group food_* and get plantable things.

Clyde did his cucina_vegana by having anything plantable be seed=1. An improvement, but not quite as useful as it might be. For example, setting seed=2 might mean you plant one of the crop, while seed=1 means it has a seed distinct from the crop.

Makes it easier to adapt things to farming_nextgen, as well as things like the threshing floor and handmill from cottages.

Question is whether that's capability you are interested in including, or if it's something that should be a stand-alone mod. It wouldn't be that hard to do an on-load parsing of registration data, then add the group seed=2 (or whatever), but maybe coming up with some suggested standard across mods, and people either embrace that voluntary standard or not, at penalty of not integrating well with other mods.

What I'm asking, then, is whether there's some standard that would work better with your long-term vision, and also whether you want to add that (PR or on your own) or simply do it through a stand-alone mod.
 

User avatar
TenPlus1
Member
 
Posts: 2637
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Farming Redo [1.42] [farming]

by TenPlus1 » Sat Nov 30, 2019 21:48

The food_* groups were for easy recipes so that the same group name could be used for different items and still make the recipe :) the farming redo mod however has a global table called farming.registered_plants that holds any information on a crop/seed/growth/light you might need though.

https://notabug.org/TenPlus1/farming/sr ... pi.txt#L12
 

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

Re: [Mod] Farming Redo [1.42] [farming]

by ThorfinnS » Sun Dec 01, 2019 20:15

Right. That was in my post, but it got too long, and that's part of what ended up on the cutting room floor.

The situation is that one student is writing a generalized backpack mod, where there is an easier to craft backpack limited to specific types of items. So there's a cheap seed packet you can make early, way before you have wool, because between cucina vegana and farming redo all the inventory space is filled before you find a place to build. All spaces are filled with stuff you wouldn't or couldn't collect but for the existence of those mods. Why bother with leaves if there's no mod that uses them, for instance. Just toss 'em out. Who needs to hold onto dirt if you have no farming mods?

Hardcoding it is easy, though a bit slow. Iterating through the register_plants table for each and every item as you are trying to move into the container is much, much slower than just checking that it's in an appropriate group. Allowing all items named farming:* works, and is sufficiently fast, but allows pots, pans, cutting boards, juicers, bean poles, etc., plus all the finished products, which kind of defeats the purpose of having an early, cheap bag specifically for seeds.

So the plan is to iterate through the table once at load time, adding groups to items as appropriate. I was just interested in knowing if there was anything on the back burner such that if you decided to add groups for seeds and such, like Clyde did, this would overwrite your group assignments and cause problems. We would code for that now, rather than worry about it being a future compatibility and maintenance issue.
 

User avatar
TenPlus1
Member
 
Posts: 2637
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Updated to version 1.43

by TenPlus1 » Mon Dec 02, 2019 07:46

- Scythe works on use instead of right-click.
- Added {seed=2} group to plantable food items.
 

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

Re: [Mod] Farming Redo [1.42] [farming]

by ThorfinnS » Mon Dec 02, 2019 19:54

Awesome.

I'll grab it before he shows up to the computer lab this afternoon.

Thanks!
 

Previous

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 6 guests