Nodebox inventory image

Post Reply
PetiAPocok
Member
Posts: 28
Joined: Thu Apr 23, 2020 14:43
GitHub: PetiAPocok
In-game: PetiAPocok
Location: Hungary

Nodebox inventory image

by PetiAPocok » Post

If you register a node which drawtype is "nodebox" and don't define an inventory image, then the engine(?) generates an inventory image for the node automatically, if I understand everything correctly...
My question is, can I get that generated inventory image somehow? Is there a method for that? Or is the image stored somewhere, where I can access it?

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: Nodebox inventory image

by Nathan.S » Post

I think the only option right now is to take a screenshot, though there is a PR adding a feature where you could save the inventory images.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: Nodebox inventory image

by Napiophelios » Post

I have used Nodebox editor for some inventory images,
but it's not ideal if you need a lot of them.
Image
test.png
test.png (169.48 KiB) Viewed 1144 times

PetiAPocok
Member
Posts: 28
Joined: Thu Apr 23, 2020 14:43
GitHub: PetiAPocok
In-game: PetiAPocok
Location: Hungary

Re: Nodebox inventory image

by PetiAPocok » Post

Nathan.S wrote:
Fri May 15, 2020 22:29
I think the only option right now is to take a screenshot, though there is a PR adding a feature where you could save the inventory images.
Well, I've thought about the screenshots... But it isn't just one or two nodes...
Napiophelios wrote:
Fri May 15, 2020 23:54
I have used Nodebox editor for some inventory images, but it's not ideal if you need a lot of them.
Sadly I need one image for all the nodes that doesn't have a defined one...
And I have to think about the future nodes too... So it would be nice if it were something automatic.

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: Nodebox inventory image

by AiTechEye » Post

if im right its not images, its models showen directly but you can show them in formspec.

item_image[X,Y;W,H;item name;name;label]

https://dev.minetest.net/formspec

PetiAPocok
Member
Posts: 28
Joined: Thu Apr 23, 2020 14:43
GitHub: PetiAPocok
In-game: PetiAPocok
Location: Hungary

Re: Nodebox inventory image

by PetiAPocok » Post

Sadly I don't want to show them in a formspec. I'm trying to upgrade the frame mod (https://github.com/minetest-mods/frame). So far everything works, but the nodes with nodebox drawtype are shown incorrectly. And I want to get the inventory image of them, so I can display it in the frame.

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: Nodebox inventory image

by AiTechEye » Post

you can spawn an entity with visual="wielditem", make it flat, untill there is a better solution

Code: Select all

minetest.register_entity("mod:item",{
	visual="wielditem",
	visual_size={x=.50,y=.50,z=0.05},
	collisionbox = {-0.2,-0.4,-0.2,0.2,0.4,0.2},
	textures={"default:fence"}
})

User avatar
TPH
Member
Posts: 69
Joined: Sun Jul 23, 2023 00:49
IRC: TPH
In-game: TubberPupper-TubberPupperHusker-TPH
Location: Ontario, Canada
Contact:

Re: Nodebox inventory image

by TPH » Post

Sorry for necro-bumping 3 years later but, any update on this? I'm curious to if I could get or otherwise generate the inventory_image for an entity similarly to how nodes get an auto-generated inventory_image (for spawn eggs)
Your fellow anthro-therian (copper) husky furry :D (hopefully not too cringe lol). How do ye' do?

User avatar
Desour
Member
Posts: 1473
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: Nodebox inventory image

by Desour » Post

The generated image is only available on the client, not on the server. And, actually, it's in many cases not a generated image, but a mesh is drawn instead of a plain image.

Anyway, in your case @TPH, you can register a node with the mesh of your entity, and don't make that node place-able.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
TPH
Member
Posts: 69
Joined: Sun Jul 23, 2023 00:49
IRC: TPH
In-game: TubberPupper-TubberPupperHusker-TPH
Location: Ontario, Canada
Contact:

Re: Nodebox inventory image

by TPH » Post

Thanks for the info Desour :D - didn't get a notification sorry

Oooooh ok :O thank you
Your fellow anthro-therian (copper) husky furry :D (hopefully not too cringe lol). How do ye' do?

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 8 guests