Store nodes with no inventory [Autostore]

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

Store nodes with no inventory [Autostore]

by Nathan.S » Thu May 05, 2016 14:48

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: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

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 » Thu May 05, 2016 20:18

+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: 1350
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: Store nodes with no inventory [Autostore]

by maikerumine » Thu May 05, 2016 21:38

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!!
 

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

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Thu May 05, 2016 22:56

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
 

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

Re: Store nodes with no inventory [Autostore]

by TG-MyinaWD » Fri May 06, 2016 04:18

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: 5890
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Store nodes with no inventory [Autostore]

by rubenwardy » Fri May 06, 2016 13:24

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 » Thu Sep 15, 2016 17:31

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: 924
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Thu Sep 15, 2016 23:30

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 » Sat Sep 17, 2016 08:37

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: 924
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Sat Sep 17, 2016 13:11

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 » Sun Sep 18, 2016 02:48

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: 924
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Mon Sep 19, 2016 02:05

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 » Mon Sep 19, 2016 03:04

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 » Mon Sep 19, 2016 21:58

:\\\\\\\\\\\ :( 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: 924
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Tue Sep 20, 2016 01:54

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 » Tue Sep 20, 2016 07:59

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: 924
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Tue Sep 20, 2016 11:48

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 » Tue Sep 20, 2016 16:00

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: 924
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Tue Sep 20, 2016 16:21

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: 924
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Wed May 17, 2017 14:50

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: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

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

Re: Store nodes with no inventory [Autostore]

by christoferlevich » Mon Aug 21, 2017 10:25

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: 924
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Store nodes with no inventory [Autostore]

by Nathan.S » Wed Aug 23, 2017 22:29

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: 323
Joined: Thu Dec 01, 2016 23:44
Location: Athol, Massachusetts
GitHub: ChristoferL

Re: Store nodes with no inventory [Autostore]

by christoferlevich » Thu Aug 24, 2017 09:18

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...
 

Next

Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 4 guests