[Mod]Flowerpot[flowerpot]

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

[Mod]Flowerpot[flowerpot]

by sofar » Post

This minetest mod adds a simple, single-node (meaning, plant and pot are one node together) non-entity flowerpot that can contain `plantlike` and `normal` drawtype nodes.

The player can place these pots as normal nodes, and then right-click the pot with a plant or plantlike node, and the pot then will contain a slightly smaller version of the plant. If punched, the plant that was put in the pot will be returned to the puncher.

The concept works through the use of object materials. The empty flowerpot node has the same model, but part of the mesh is transparent and therefore not visible. If a plant is inserted, the transparent textures are replaced with the texture of the plant node, and thus it looks like the plant is inserted, while effectively the pot is a single node without metadata.

There are no crafting recipes for each variant. The player can craft pots and potentially use `/giveme` to give filled versions of the
flowerpot, but the creative inventory does not contain them as they are easily filled already.

The model was made in blender from scratch by the author.

The texture of the flowerpot itself was created from the flowerpot texture of the excellent Isabella II texture pack, which is Public
Domain. The texture has been reworked to allow for a more detailed texturing of the flowerpot model.

The flowerpot mod has an API that can be used by other mods to create new plant-flowerpot combinations. See api.md for usage information.

Recipe to craft a flower pot:

Image

Image

Download: https://github.com/minetest-mods/flower ... master.zip
Code: https://github.com/minetest-mods/flowerpot
License(s): LGPL-2.1+, CC-BY-SA-3.0, Public-Domain
Last edited by sofar on Sat Feb 11, 2017 03:51, edited 3 times in total.

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [MOD]Flowerpot[flower|pot|flowerpot]

by octacian » Post

Nice! Someone actually made a good flowerpot mod! Thanks sofar.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: [Mod]Flowerpot[flowerpot]

by GreenXenith » Post

ooooooh purty :3
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Flowerpot[flowerpot]

by sofar » Post

I must say I hadn't seen DOOMed's version until just now. I knew about Pithy's version. However, I decided to make a simple one for 2 main reasons: style, and implementation. DOOMed's version uses many custom textures and models, and this implementation doesn't. I also find pithy's API unwieldly and overly complex (confusing even).

I also didn't see protection bits in place, and things like missing node sounds.

Please test :)

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: [Mod]Flowerpot[flowerpot]

by GreenXenith » Post

I have tested.
1: Cracking animation "hovers" above the pot when breaking
2: The inventory image is a bit small
3: Maybe allow to plant cacti?
4: Papyrus in the pot is a bit big. Maybe a tad bit smaller?
5: White dandelions and violets stick out of the pot (similar to papyrus).
6: Grass also sticks out, and why even bother potting it?
Other than that, great :D
Any chance this being added to MT game? Or any flower pots for that matter?
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

User avatar
D00Med
Member
Posts: 949
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med
Location: Australia...somewhere

Re: [Mod]Flowerpot[flowerpot]

by D00Med » Post

Lol, nice mod xD and good timing too.
Still, can't have too much of a good thing, and yours is a lot more efficient with texturing.
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Flowerpot[flowerpot]

by sofar » Post

GreenDimond wrote:I have tested.
1: Cracking animation "hovers" above the pot when breaking
2: The inventory image is a bit small
3: Maybe allow to plant cacti?
4: Papyrus in the pot is a bit big. Maybe a tad bit smaller?
5: White dandelions and violets stick out of the pot (similar to papyrus).
6: Grass also sticks out, and why even bother potting it?
Other than that, great :D
Any chance this being added to MT game? Or any flower pots for that matter?
The simplicity of the code here is what causes some of these effects - they're mostly tradeoffs to assure that the smaller plants aren't too tiny, but still allow almost everything to be planted.

The pot itself is only 6 pixels width, yet we allow 16 pixel wide plants to go in there. I can't just shrink it to make it fit perfectly - something has to give somewhere.

Same for the tile cracking - that's something I can't prevent, the engine just does that on all node faces. It doesn't know anything about the model. Unfixable, and a minor visual problem anyway. I don't want to add mesh duplicates just for that.

Why potting grass? You mean, why not? I don't see a reason to prevent people's creativity, If they like it, they can use it.

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod]Flowerpot[flowerpot]

by Desour » Post

Looks nice, I'll test.
Edit: I tested it, it's super!
But:
Image
sofar wrote:Unfixable, and a minor visual problem anyway. I don't want to add mesh duplicates just for that.
What about a nodebox?

Image
Well, stuff for creativity is nice, but these oversized plants are a bit meh. In real life you don't plant wheat into a flower pot.
Attachments
screenshot_20170203_162157.png
screenshot_20170203_162157.png (28.47 KiB) Viewed 1919 times
screenshot_20170203_162230.png
screenshot_20170203_162230.png (5.73 KiB) Viewed 1919 times
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Flowerpot[flowerpot]

by sofar » Post

DS-minetest wrote:What about a nodebox?
Same problem, besides, that wouldn't allow you to put plant textures on it, so you'd just have an empty pot.

Do you really care that much? I mean, you see it for what, 1 second?
DS-minetest wrote:But these oversized plants are a bit meh. In real life you don't plant wheat into a flower pot.
Don't like em? Don't use em.

User avatar
D00Med
Member
Posts: 949
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med
Location: Australia...somewhere

Re: [Mod]Flowerpot[flowerpot]

by D00Med » Post

Could you use a mask to stop plants being oversized?
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Flowerpot[flowerpot]

by sofar » Post

D00Med wrote:Could you use a mask to stop plants being oversized?
lol, so I can actually fix this in the model, and just have (pushed a new commit).

What I did was omit the bottom 2x2 pixels from each bottom corner from the UV map. It adds a few more triangles but isn't that expensive to do, and this doesn't mean any more weird tricks like texture modifiers, which are expensive.

Image

Even if you don't like wheat in a pot, this still looks reasonable, and it will make almost all plants fit good enough.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: [Mod]Flowerpot[flowerpot]

by burli » Post

good job. Well done. Now this flower pot can move to minetest game

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod]Flowerpot[flowerpot]

by Desour » Post

sofar wrote:
DS-minetest wrote:What about a nodebox?
Same problem, besides, that wouldn't allow you to put plant textures on it, so you'd just have an empty pot.
I mean only for the empty pot a nodebox.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Flowerpot[flowerpot]

by sofar » Post

DS-minetest wrote:
sofar wrote:
DS-minetest wrote:What about a nodebox?
Same problem, besides, that wouldn't allow you to put plant textures on it, so you'd just have an empty pot.
I mean only for the empty pot a nodebox.
You can't UV map a nodebox, so it wouldn't look anywhere nearly as good as the current model, and it would force me to create 2 textures, not one, and it would look different when empty?

But why not just make a second model? That would solve ALL those problems!

Answer: that would be the least worst solution. But I just don't care enough about the digging cracks. sorry - I'm already doing a different mod:

viewtopic.php?f=9&t=16585

:)

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod]Flowerpot[flowerpot]

by paramat » Post

Indeed the digging cracks are not a problem.
I don't find this fundamental enough to be in MTGame, it's more of a specialist decor mod thing.

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod]Flowerpot[flowerpot]

by TenPlus1 » Post

Since it's a flowerpot you could use the 'dig_immediate = 3' group to pick up the node without cracks appearing.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: [Mod]Flowerpot[flowerpot]

by burli » Post

TenPlus1 wrote:Since it's a flowerpot you could use the 'dig_immediate = 3' group to pick up the node without cracks appearing.
+1

I guess you don't need a pickaxe to dig a flowerpot ;-)

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Flowerpot[flowerpot]

by sofar » Post

TenPlus1 wrote:Since it's a flowerpot you could use the 'dig_immediate = 3' group to pick up the node without cracks appearing.
I have indeed considered, and will likely do just that.

Aaaand I just did. Pushed.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Flowerpot[flowerpot]

by sofar » Post

paramat wrote:Indeed the digging cracks are not a problem.
I don't find this fundamental enough to be in MTGame, it's more of a specialist decor mod thing.
Well, considering that it contains an API that may be desirable to subgame and other mod makers, it's not just "a decor thing" anymore. Plus it's an alternate storage for certain plants :).

User avatar
Wuzzy
Member
Posts: 4781
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod]Flowerpot[flowerpot]

by Wuzzy » Post

Good:
- Dry shrub and bush stems looks great
- All 5 grass/dry grass sizes, with random size like for the actual plants
- Grass and dry grass and jungle grass look good
- API, plus it is ultra simple
- Nice-looking flower pot mesh
- Protection support
- Native support for many Minetest Game plants
- More or less sane selection boxes
- Code looks clean, no obvious beginner mistakes can be found

Bad:
- Mod does not actually register only a single node. Lies! >:-O Actually, it is one node for the empty pot and one additional node per plant, just like in [flowerpots]
- Ugly inventory icon
- Punching for retrieving flower, although it is breakable by hand
- Almost impossible to get flower in creative without breaking the flower pot
- No potted cactus :-(
- Flower pot can float / it does not drop when blow below is removed
- Flowers look too small
- Ugly flower pot color, does not look like clay bricks at all. It looks a bit too colorless
- Flowers appear darker in flower pot than on ground. Makes flowers sad. :-(

Overall, this mod is OK, but I think it needs some work on the graphical appearance. The darkness problem really bothers me.
I think both [flowerpot] and [flowerpots] are legitimate mods.

EDIT: Bug:
You can obtain the 5 different grass/dry grass sizes by getting the flower pot, but those are normally unobtainable in Minetest Game.

EDIT 2: I just noticed the darkness bug also applies to [flowerpots]. :-( Must be an engine bug, then.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Flowerpot[flowerpot]

by sofar » Post


sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Flowerpot[flowerpot]

by sofar » Post

Ok let's see if we can fix some of these (excellent) review issues found:

Bad:
- Mod does not actually register only a single node. Lies! >:-O Actually, it is one node for the empty pot and one additional node per plant, just like in [flowerpots]
Can't and Won't, because entity-based pots that avoid this issue are unreliable and prone to entity issues. Trust me on that one, using entities would really make them suck.

I do however not mark them visible for the creative inventory, of course.
- Ugly inventory icon
This one is harder, because the pot is only 6px. it would still be tiny. I'm not a fan of the current look either, so I'll look for a better inventory icon. For your subgame though, don't you just want to grab the texture from an MC-like texture pack? (yes you can't do that now since it has no inventory icon, and I'll fix that).
- Punching for retrieving flower, although it is breakable by hand
not sure what you want? you want the pot to be dug instead?
- Almost impossible to get flower in creative without breaking the flower pot
oh, I see, yeah, you just get both almost instantly. Hmmm, that is indeed something I should address.
- No potted cactus :-(
fixed and pushed.
- Flower pot can float / it does not drop when blow below is removed
Fixing, I'll also make it drop 2 items if there's a plant in it.
- Flowers look too small
Will look at this, sizing is important.
- Ugly flower pot color, does not look like clay bricks at all. It looks a bit too colorless
you're going to theme it anyway. Don't push your luck :P
- Flowers appear darker in flower pot than on ground. Makes flowers sad. :-(
engine issue causing all mesh nodes to be rendered darker.
Overall, this mod is OK, but I think it needs some work on the graphical appearance. The darkness problem really bothers me.
I think both [flowerpot] and [flowerpots] are legitimate mods.
Any specifics - please do tell (textures welcome, but if you're gonna skin it for mineclone 2, then please don't suggest mineclone 2 textures ... ;))
EDIT: Bug:
You can obtain the 5 different grass/dry grass sizes by getting the flower pot, but those are normally unobtainable in Minetest Game.
Not sure what you want. Do you want that grass randomly chooses a length in the pot? what about wheat / cotton?

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Flowerpot[flowerpot]

by sofar » Post

- Mod does not actually register only a single node. Lies! >:-O Actually, it is one node for the empty pot and one additional node per plant, just like in [flowerpots]
Ohhh now I understand what you mean here.

"Single node" in this mod means "a pot with a plant is one node". I'm stating this because there is another mod that has a "pot" node that is 1m high and you can put another node on top of it.

It's not lying, it's just that I wasn't specific enough and you assumed too much :)

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Flowerpot[flowerpot]

by sofar » Post

- Flowers look too small
Will look at this, sizing is important.
So, in reality, the pot is 15px high (or 15/16 in nodes) with the plant. That leaves 1px (at 16px) of space underneath another node. The MC pot is only barely larger, I mean, it's 6.25cm difference. I'm not so sure it's worth changing, but I'll try.

User avatar
Wuzzy
Member
Posts: 4781
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod]Flowerpot[flowerpot]

by Wuzzy » Post

About the bug:
Normally, when you dig grass in Minetest Game, you only get grass of ONE size (default:grass_5 if I recall correctly), the other grass sizes all drop the same. The other 4 grass sizes are unobtainable (not in game, not in Creative Mode), probably to avoid inventory clutter. Which is GOOD.

Now just dig some flower pots with different grasses inside and your inventory is quickly cluttered with different-sized grasses, item the player should never legally obtain, apparently. The fix is that they only drop default:grass_5.
what about wheat / cotton?
Sounds interesting, but how? You can not put these into pots because you can't obtain them, at least not in normal gameplay. You can only obtain these plants with /giveme, because they don't drop themselves.

Yay for cactus!

PS: If you place a wooden door into a flowerpot, the game crashes. xD

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests