Store nodes with no inventory [Autostore]

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

Store nodes with no inventory [Autostore]

by Nathan.S » Post

Image
I created this mod specifically for use on servers, for something of an admin shop, a place where people can buy stuff, but unlike other mods it doesn't require any inventory of the item being sold, or keep any of the payment, basically it's an unlimited supply that simply removes the items it takes in as payment.

The store exists in two states, an unconfigured and configured state. Simply place a store, put in what item you want to sell and what the payment should be, enter the quantities you will charge and give out, and give the store a name. When you click the save button the store changes into a configured store and is ready to use to buy from.

This mod adds an autostore privilege which is required to dig or place the nodes, anybody can click the save button once an unconfigured store is placed, so be careful with placing them if you aren't setting them up right away.

Download: https://github.com/NathanSalapat/autost ... master.zip
Browse Code: https://github.com/NathanSalapat/autostore
License: CC by SA 4.0
Attachments
screenshot.png
(45.17 KiB) Not downloaded yet
Last edited by Nathan.S on Sun Sep 24, 2017 02:03, edited 1 time in total.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Store nodes with no inventory [Autostore]

by azekill_DIABLO » Post

looks nice!

+1 for inovation and pixely textures

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Store nodes with no inventory [Autostore]

by Don » Post

+1
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
maikerumine
Member
Posts: 1364
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: Store nodes with no inventory [Autostore]

by maikerumine » Post

This is clever and very clean. I bet this would help reduce server lad on heavily populated shop areas. I know the ESM server is a bit laggy around the shops.;

Thank you for this mod, I will use it for all the weapon and armor shops so I don't have to refill all the time!!
Extreme Survival Minetest-->viewtopic.php?f=10&t=12959

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

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Post

Nice, let me know if you have any issues or think of some improvements.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

TG-MyinaWD
Member
Posts: 356
Joined: Thu May 08, 2014 21:22
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .
Location: Far Eden

Re: Store nodes with no inventory [Autostore]

by TG-MyinaWD » Post

Ideas
You can setup a ATM like one that you can withdraw/transfer your Minegold (OR whatever the money was).
Limit of time shop open/close.
Limit each time a item can by bought by same player.

All got for now ;) btw Followed you on Twitter. (Mine is @MinetestWidDos)
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.

User avatar
rubenwardy
Moderator
Posts: 6151
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: Store nodes with no inventory [Autostore]

by rubenwardy » Post

The name confused me a little, I thought it meant

Store [nodes with no inventory]

Nice mod though. I find economies quite interesting in games. Cool video: http://youtube.com/watch?v=W39TtF14i8I

User avatar
ParaklataChotou
Member
Posts: 209
Joined: Sat Jun 18, 2016 17:09
GitHub: paraklatachotou
IRC: CareBearWhoCares
In-game: AutistCortana

Re: Store nodes with no inventory [Autostore]

by ParaklataChotou » Post

Thank you natan. I'll try this mod. I removed smartshop - that mod was really glitchy, and I installed simple shop - but I need to replace items. this could be an excellent option for me. Thank you. I'll try on my debug world. and then, try on my server.
Last edited by ParaklataChotou on Fri Sep 16, 2016 10:39, edited 1 time in total.
Visit my server: freextress.ddnsking.com 30002 . mobs, npcs, interesting places, pvp.

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

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Post

I actually created this mod to be used on a server, as we wanted to have admin shops, but didn't want to have to fill them with items to sell.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
ParaklataChotou
Member
Posts: 209
Joined: Sat Jun 18, 2016 17:09
GitHub: paraklatachotou
IRC: CareBearWhoCares
In-game: AutistCortana

Re: Store nodes with no inventory [Autostore]

by ParaklataChotou » Post

Nathan.S wrote:I actually created this mod to be used on a server, as we wanted to have admin shops, but didn't want to have to fill them with items to sell.
Natan, the mod needs to be patched:

Code: Select all

win64\bin\..\mods\autostore\init.lua:81: attempt to concatenate local 'cost_amount' (a nil value)
2016-09-17 01:02:19: ERROR[Main]: stack traceback:
2016-09-17 01:02:19: ERROR[Main]: 	...test-0.4.14-b11720a-win64\bin\..\mods\autostore\init.lua:81: in function <...test-0.4.14-b11720a-win64\bin\..\mods\autostore\init.lua:52>
It causes a server crash too. If you can fix it would be great.
Visit my server: freextress.ddnsking.com 30002 . mobs, npcs, interesting places, pvp.

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

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Post

Odd, I just tried it on a local game and don't get any error.
I wonder if maybe the input boxes for the quantities for some reason were a non-number.

Looking at your error codes it looks like you might not have the latest version? Line 81 in the current code doesn't have cost_amount at all. I'd try updating https://github.com/NathanSalapat/autostore
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
ParaklataChotou
Member
Posts: 209
Joined: Sat Jun 18, 2016 17:09
GitHub: paraklatachotou
IRC: CareBearWhoCares
In-game: AutistCortana

Re: Store nodes with no inventory [Autostore]

by ParaklataChotou » Post

Nathan.S wrote:Odd, I just tried it on a local game and don't get any error.
I wonder if maybe the input boxes for the quantities for some reason were a non-number.

Looking at your error codes it looks like you might not have the latest version? Line 81 in the current code doesn't have cost_amount at all. I'd try updating https://github.com/NathanSalapat/autostore
I've got 4.14 downloaded on official page. I'll download this new patch. Thanks
Visit my server: freextress.ddnsking.com 30002 . mobs, npcs, interesting places, pvp.

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

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Post

no problem, be sure to let me know if you continue to have any problems.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
ParaklataChotou
Member
Posts: 209
Joined: Sat Jun 18, 2016 17:09
GitHub: paraklatachotou
IRC: CareBearWhoCares
In-game: AutistCortana

Re: Store nodes with no inventory [Autostore]

by ParaklataChotou » Post

Nathan.S wrote:no problem, be sure to let me know if you continue to have any problems.
Ok. It's working fine at the moment. Thank you. This mod it's really amazing: lite, practical and efficient. I'm testing this mod on my server.
IP:minepastry.zapto.org
Port: 30000
viewtopic.php?f=10&t=15384
Visit my server: freextress.ddnsking.com 30002 . mobs, npcs, interesting places, pvp.

User avatar
ParaklataChotou
Member
Posts: 209
Joined: Sat Jun 18, 2016 17:09
GitHub: paraklatachotou
IRC: CareBearWhoCares
In-game: AutistCortana

Re: Store nodes with no inventory [Autostore]

by ParaklataChotou » Post

:\\\\\\\\\\\ :( T.T

Code: Select all

2016-09-19 17:24:18: ERROR[Main]: stack traceback:
2016-09-19 17:24:18: ERROR[Main]: 	...test-0.4.14-b11720a-win64\bin\..\mods\autostore\init.lua:118: in function <...test-0.4.14-b11720a-win64\bin\..\mods\autostore\init.lua:110>
Visit my server: freextress.ddnsking.com 30002 . mobs, npcs, interesting places, pvp.

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

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Post

ParaklataChotou wrote::\\\\\\\\\\\ :( T.T

Code: Select all

2016-09-19 17:24:18: ERROR[Main]: stack traceback:
2016-09-19 17:24:18: ERROR[Main]: 	...test-0.4.14-b11720a-win64\bin\..\mods\autostore\init.lua:118: in function <...test-0.4.14-b11720a-win64\bin\..\mods\autostore\init.lua:110>
Is that all the error gives? Nothing else in the debug file? Right now I'm really not sure what could be going on. Just tried making something crash, and got nothing. When I entered values of zero to be selling the store just showed empty boxes.

Do you know who was setting up the store when it crashed, and if so could you ask them what they were trying to sell, possibly there is some odd situation that I hadn't thought of.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
ParaklataChotou
Member
Posts: 209
Joined: Sat Jun 18, 2016 17:09
GitHub: paraklatachotou
IRC: CareBearWhoCares
In-game: AutistCortana

Re: Store nodes with no inventory [Autostore]

by ParaklataChotou » Post

Do you mean about give command? Well, I'm using to add items. Oh, you mean if I add more than one item inside these autostores machines could produce an error? Well, maybe.
Visit my server: freextress.ddnsking.com 30002 . mobs, npcs, interesting places, pvp.

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

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Post

To get the stores you need to use give, there is no crafting, so that wouldn't create an error.

The store should have two items added to it when being set up, the item being sold, and whatever you are asking for payment. The amounts default to 1, but you can change that to any numerical value.

I never tested the code to see how it handles people selling/buying mobs or anything that isn't an node, craftitem, or tool, possibly something could be happening if you are trying to sell animals or something.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
ParaklataChotou
Member
Posts: 209
Joined: Sat Jun 18, 2016 17:09
GitHub: paraklatachotou
IRC: CareBearWhoCares
In-game: AutistCortana

Re: Store nodes with no inventory [Autostore]

by ParaklataChotou » Post

Nathan.S wrote:To get the stores you need to use give, there is no crafting, so that wouldn't create an error.

The store should have two items added to it when being set up, the item being sold, and whatever you are asking for payment. The amounts default to 1, but you can change that to any numerical value.

I never tested the code to see how it handles people selling/buying mobs or anything that isn't an node, craftitem, or tool, possibly something could be happening if you are trying to sell animals or something.
Wait, I was talking about the /giveme command.
Of course, I added the item on give section. And I tested the transaction and it works fine. But sometimes the autostore crashes the server - such as the smartshop did - , and on debug info says that 'there's an error of int.lua in the 110 line'. Or maybe it's the world I've created who caused this issue. Or it's caused becaused I added so many autostores for each kind of item/block in the server - maybe. I was testing so many kinds of mobs mods when I created this server. I used /clearobjects to delete all unknown files floating in my world; but maybe these mods damaged the world configuration - maybe. I used v5 to create my world.

BUT MAYBE YOU'RE RIGHT. THE MOBS ITEMS CAUSES THIS PROBLEM. I'LL ADD THE MOBS TO SIMPLE SHOP, AND OTHER ITEMS ON AUTOSTORE. THANKS AGAIN.
Visit my server: freextress.ddnsking.com 30002 . mobs, npcs, interesting places, pvp.

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

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Post

I wish the error code was more specific, it could help me debug this, as there is no reason this should be crashing the server.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

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

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Post

Little update.
The nodes now have an option on creating them to put in a short description text. useful if you're selling something that can't be crafted and you want to say what it does, or to list the healing properties of food, uses for an item, etc.

The description can be left blank if wished. This should make no changes to existing nodes, and if you want to add the text you'll have to dig and replace the nodes.

Image
Attachments
autostore.png
(164.46 KiB) Not downloaded yet
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Store nodes with no inventory [Autostore]

by azekill_DIABLO » Post

+1

User avatar
christoferlevich
Member
Posts: 324
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: Store nodes with no inventory [Autostore]

by christoferlevich » Post

I'm having an issue getting the thing to open so I can set it up. It has worked. I have some shops set and love them. Still, sometimes, when I right click on freshly placed boxes they don't open so I can't set them up. Any thoughts?

Update - I deleted and reloaded the mod. It didn't change the problem. Could this mod conflict with other mods? I think I am running the latest MT release... not sure whats wrong.
everything can be a learning experience...

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

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Post

I don't know of any conflicts. Are you getting any error messages in the debug?
Double check that you have the needed priv and that you are placing the unconfigured stores.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
christoferlevich
Member
Posts: 324
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: Store nodes with no inventory [Autostore]

by christoferlevich » Post

Nathan.S wrote:I don't know of any conflicts. Are you getting any error messages in the debug?
Double check that you have the needed priv and that you are placing the unconfigured stores.
No. No error messages. I create a new game just to test autostore. Granted myself the priv. The autostore is responding like a regular node.

I didn't know I could place anything but an unconfigured store - how do I place a configured store?
everything can be a learning experience...

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests