[Mod] Farming [0.1.8]

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

[Mod] Farming [0.1.8]

by sapier » Wed Dec 21, 2011 08:11

Hello

Farming mod adds farming as in minecraft. You can convert dirt/grass nodes into plowed land and plant seeds. Seeds will grow while beeing in full sunlight and finaly get harvestable.

Usage:

-create a hoe (same reciep as in minecraft)
wood wood
none stick
none stick
Image

-plow dirt with grass to get seed

-place seed on plowed dirt

-wait some time for wheat to grow (it only grows when it has enough light)

-harvest using hoe

Depends on flowers mod included in nature_pack
nature_pack

License: GPLv2+

Link:
Version 0.0.2
Version 0.0.3
Version 0.0.4
Version 0.0.5
Version 0.0.6
Version 0.0.7
Version 0.0.8
Version 0.0.9
Version 0.1.0
Version 0.1.1
Version 0.1.2
Version 0.1.3
Version 0.1.4
Version 0.1.5
Version 0.1.6
Version 0.1.8

Changes 0.0.3:
-Added stone and steel hoe
-added rhy

Changes 0.0.4:
-major code cleanup
-initial inteface for other mods to add own crops
-add water dependent grow / dry of seed
(It's not a bug, seeds without water but without sun won't dry out, but not grow either)

Changes 0.0.5
-get seeds from jungle grass, tallgrass, and seldom from grass on dirt
-added potatoes
-improoved graphics

Changes 0.0.6
-fixed bug discovered by dannydark, crash on hiting crop with pure hand

Changes 0.0.7
-harvestable crop is now a node instead of entity so at least those will be there after deleting objects
-added straw, you always get straw when harvesting, but only crop and seed if using a hoe!

Changes 0.0.8
-fixed bug not having any chance to get rhy seed

Changes 0.0.9
-added corn

Changes 0.1.0
-improved api to support textures saved within external mod folder

Changes 0.1.1
-added mese hoe
-plowed land reverts to dirt within at max 5 minutes

Changes 0.1.2
-improoved plowed land -> dirt algorithm (thanks to Hackeridze)

Changes 0.1.3
-major code reorganization removing some possible performance problems

Changes 0.1.4
-added workaround to fix crops growing on dirt/grassland when entities disappeared for some time

Changes 0.1.5
-fixed hoe's not beeing damaged
-added missing mesehoe texture

Changes 0.1.6
-updated to new item system

Changes 0.1.8
-fixed plowed dirt got diggable with last version
-fixed plowed dirt reverting on crop was harvestable


Graphics:
Obviously the Graphics are really ugly so if anyone can supply better graphics, you're welcome ;-)
By the way you may use graphics from minecraft as I do in private but as I don't have copyrights for them I can't provide those ones ;-(

Screenshot fields
Image

Screenshot with mc textures (wheat only rhy isn't available in mc)
http://www.mediafire.com/i/?oqv5dhl2k8z7a2c
Last edited by sapier on Mon Mar 19, 2012 17:59, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
darket
Member
 
Posts: 34
Joined: Sun Nov 27, 2011 10:35
Location: Russian

by darket » Wed Dec 21, 2011 08:51

Where is screenshots?
 

User avatar
darket
Member
 
Posts: 34
Joined: Sun Nov 27, 2011 10:35
Location: Russian
 

User avatar
Jordach
Member
 
Posts: 4523
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Dec 21, 2011 12:23

sapier wrote:Hello

I've created a farming mod, currently only with wood hue and wheat, but it's planed to make tools more generic and add other growing things too.

Usage:

-create a hue (same reciep as in minecraft)
wood stick
none stick
none stick

-plow dirt with grass to get seed

-place seed on plowed dirt

-wait some time for wheat to grow (it only grows when it has enough light)

-harvest using hue


Link:

http://d01.megashares.com/dl/97f3661/farming-0.0.1.zip

Graphics:
If anyone can supply better graphics, you're welcome ;-)


Planed features:
-make growing dependent of water nearby
-fix bug hue not weared out on use (does anyone know why


It's hoes, not hues.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
Calinou
Moderator
 
Posts: 3156
Joined: Mon Aug 01, 2011 14:26
Location: Troyes, France
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Wed Dec 21, 2011 13:02

First, please add screenshots - 90% of people will not download some content (mod/texturepack/whatever) without a screenshot, sometimes assuming the download would be a virus.

Secondly, the recipe in Minecraft is more like this:
http://minecraftwiki.net/wiki/Hoe

Also, avoid using that hosting site - try http://mediafire.com or http://omploader.org instead.
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Wed Dec 21, 2011 13:14

First of all thanks for your suggestions

I haven't played mc for a while I'll fix the hoe reciep.

And upload to another source (just took the first file sharing site google found).
And add screenshots.

I've already fixed hoes in my first post ;-)
Last edited by sapier on Wed Dec 21, 2011 21:17, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
Hackeridze
Member
 
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Wed Dec 21, 2011 18:23

I made a wheat mod, but without hoe, so may I steal it from your mod?
My game: RTMG
GENTOO USER
 

User avatar
MrThebuilder3
Member
 
Posts: 104
Joined: Sat Nov 19, 2011 18:26
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Wed Dec 21, 2011 19:43

Of course you may use the hoe, but you can use my mod too ;-)

I'm going to add some other crops soon. I intended it to be a base for either improove baking mod or write a new one.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
Hackeridze
Member
 
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Thu Dec 22, 2011 07:17

Nemo08 make hoes for me, here they are
dl.dropbox.com/u/28862246/hoe.zip

But thanks)

You may steal all-that-you-want from my code) I will add growing dependent of water nearby in next version)
http://c55.me/minetest/forum/viewtopic.php?id=574 here you can download rtmmp and find wheat in "wheat" dirrectory
Last edited by Hackeridze on Thu Dec 22, 2011 07:19, edited 1 time in total.
My game: RTMG
GENTOO USER
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Thu Dec 22, 2011 19:00

I've been first ;-), already added water dependent grow in 0.0.4 ;-)

What about joining forces rather than start a feature race?
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
dannydark
Member
 
Posts: 428
Joined: Fri Aug 12, 2011 21:28
Location: Manchester, UK

by dannydark » Fri Dec 23, 2011 18:54

Great mod! ^_^ only issue I do have is if someone uses the /clearobjects command it also clears all crops :(

EDIT: Also it would be nice to have the crops drawn plantlike (crossed) if thats possible?

EDIT 2: I've just found a bug, when you hit crops with your fist it crashes the server:
Code: Select all
20:16:10: ERROR[ServerThread]: ERROR: An unhandled exception occurred: LuaError: error running function 'on_punch': ...home/minetest/bin/../data/mods/farming/init.lua:174: attempt to index local 'tool' (a nil value)
20:16:10: ERROR[ServerThread]: stack traceback:

In thread 7ff96b548700:
/home/minetest/source/src/server.cpp:99: virtual void* ServerThread::Thread(): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 7ff96b548700:
#0  virtual void* ServerThread::Thread()
(Leftover data: #1  void Server::Receive())
(Leftover data: #2  void Server::ProcessData(irr::u8*, irr::u32, irr::u16))
(Leftover data: #3  RemoteClient* Server::getClient(irr::u16))
(Leftover data: #4  void BlockEmergeQueue::addBlock(irr::u16, v3s16, irr::u8))
DEBUG STACK FOR THREAD 7ff96d351720:
#0  int main(int, char**)
#1  void dedicated_server_loop(Server&, bool&)
(Leftover data: #2  void Server::step(float))
Last edited by dannydark on Fri Dec 23, 2011 20:20, edited 1 time in total.
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Fri Dec 23, 2011 20:23

I'm sorry but I think by now I can't fix either of the problems you mentioned.
I think both depend on the same thing.

1) All crops growing are luaentitys. I think cleanobjects removes all entitys so crops are gone

2) entities currently do only have two visual modes: cube(without any transparency) or sprite(the one used by now)

Probably it would be a nice feature request to add drawing visual "plant"
Last edited by sapier on Fri Dec 23, 2011 20:50, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
dannydark
Member
 
Posts: 428
Joined: Fri Aug 12, 2011 21:28
Location: Manchester, UK

by dannydark » Fri Dec 23, 2011 21:28

hmmmm.... that makes sense, maybe there is another way to do crops other than using entities?

Also what about my 2nd edit with regards to the bug that crashes the server on punching crops with fists?
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Fri Dec 23, 2011 21:41

Already fixed in 0.0.6

The problem is i use "on_step" to grow the crops and two internal variables. One to decide if it's time to grow and one to decide time to dry.

Nodes neither do have an on_step hook nor is it possible to add own variables.

To solve this problem I would have to use the global on_step and store all data in global data structures.
Thats possible... but in my opinon ugly and most likely to be buggy.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
dannydark
Member
 
Posts: 428
Joined: Fri Aug 12, 2011 21:28
Location: Manchester, UK

by dannydark » Fri Dec 23, 2011 21:49

ah ok fair enough ^_^, thanks for the fix updated to 0.0.6 now.

Also only a minor thing but the mod loaded string that gets printed to the console has a typo.
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Fri Dec 23, 2011 22:03

ooops :-) fixed the typo localy but won't release a new version by now ;-)

I do hope entities get (at least) a new draw mode plantlike in a later minetest versions ;-)
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
dannydark
Member
 
Posts: 428
Joined: Fri Aug 12, 2011 21:28
Location: Manchester, UK

by dannydark » Fri Dec 23, 2011 22:51

and maybe a way to exclude them from the /clearobjects command ^_^
 

User avatar
Hackeridze
Member
 
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Sat Dec 24, 2011 09:59

In my wheat mod i use nodes, and it's looks and work flawlessly. But no on_step.
Last edited by Hackeridze on Sat Dec 24, 2011 10:00, edited 1 time in total.
My game: RTMG
GENTOO USER
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sat Dec 24, 2011 11:48

It's just a matter of personal preference.

As I expected the changes in minetest are really small to support plantlike entities:

Image

For the brave ones you need this patches:

texture transparency patch for entities
http://www.mediafire.com/?8xxzdcvxs56ze3z

plant visual mode patch
http://ompldr.org/vYndhMw

And you have to change visual for the entities from "sprite" to "plant" in init.lua


@Hackeridze
You neither do use fixed intervals for growing nor do you have a hoe ;-). And of course no potatoes ;)
Last edited by sapier on Sat Dec 24, 2011 13:57, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
Hackeridze
Member
 
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Sat Dec 24, 2011 14:19

Hoe is in 0,4 with random wheat growing :P
My game: RTMG
GENTOO USER
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sat Dec 24, 2011 17:10

By now it's a "will be" for 0.4.
What about a christmas release? ;-)
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
Hackeridze
Member
 
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Sat Dec 24, 2011 17:25

sapier wrote:By now it's a "will be" for 0.4.
What about a christmas release? ;-)

It "will be" on monday, for now i have no computer with internet and forking for mods documentation.
My game: RTMG
GENTOO USER
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sat Dec 24, 2011 22:24

@dannydark found a partial solution for your delete objects problem
Harvestable crops don't need an on_step action anymore therefore those can be nodes.

The caveeat is to force users to use the hoe for harvesting I had to add straw ... at least you can burn it ;-)
Last edited by sapier on Sun Dec 25, 2011 02:57, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
dannydark
Member
 
Posts: 428
Joined: Fri Aug 12, 2011 21:28
Location: Manchester, UK

by dannydark » Sun Dec 25, 2011 01:03

@sapier nice one mate just updated on my server works great, I don't tend to use the /clearobjects too often anyway but at least if I do now it won't remove peoples harvest-able crops ^_^ also I like the straw idea.

Happy Christmas.
 

Next

Return to Old Mods



Who is online

Users browsing this forum: No registered users and 3 guests