[mod] AdvancedMarket [advanced_market]

arsdragonfly
Member
 
Posts: 31
Joined: Wed May 01, 2013 07:55

[mod] AdvancedMarket [advanced_market]

by arsdragonfly » Fri Sep 20, 2013 14:32

Trade everything everywhere, no chest-shops involved! Acts like a stock market!!!
Github repo:https://github.com/arsdragonfly/advanced_market
License:CC0
Dependencies:money,locked_signs

Quick start:
Dig some dirt.
Hold the dirt in your hand.
/am sell 5
(sell these dirt at the price of 5$ each dirt block)
/am buy default:dirt 1 5
(buy 1 dirt block at the price of 5$, in this case the deal is then concluded)
/am refreshbuffer
(the dirt is in your "buffer", and you use this command to put it back into your inventory.)

Buy low , sell high and maybe become a monopoly! :D
This mod is still WIP and has many bugs to be fixed :P

New feature
Added vieworder (/am vieworder)
Added cancelorder (/am cancelorder <order_number>
Added viewlog (/am viewlog)
Added getname (/am getname) to get the engine name of the item you're holding, like default:dirt.

A diagram to help you understand all the stuff:
Image

Data structure:
+ Spoiler

Full readme:
+ Spoiler
Last edited by arsdragonfly on Sat May 31, 2014 13:17, edited 2 times in total.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Fri Sep 20, 2013 14:35

I recommend you change your commands to /am or amarket. Shorter.
 

arsdragonfly
Member
 
Posts: 31
Joined: Wed May 01, 2013 07:55

by arsdragonfly » Fri Sep 27, 2013 13:01

rubenwardy wrote:I recommend you change your commands to /am or amarket. Shorter.

Updated.
https://github.com/arsdragonfly/advanced_market/commit/0f1e84ce6fa170a355d5e3edfc28be6a08e511b9
 

User avatar
Dan Duncombe
Member
 
Posts: 904
Joined: Thu May 09, 2013 21:11

by Dan Duncombe » Fri Sep 27, 2013 16:12

arsdragonfly wrote:
rubenwardy wrote:I recommend you change your commands to /am or amarket. Shorter.

Updated.
https://github.com/arsdragonfly/advanced_market/commit/0f1e84ce6fa170a355d5e3edfc28be6a08e511b9


Not to mean anything, but my money mod uses craftitem money, not virtual accounts, intentionally, because I don't like the virtual account concept, it is too easily tweaked by admin.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Fri Sep 27, 2013 16:56

You can go into players/name.txt and edit their inventory.
 

User avatar
Dan Duncombe
Member
 
Posts: 904
Joined: Thu May 09, 2013 21:11

by Dan Duncombe » Fri Sep 27, 2013 18:44

rubenwardy wrote:You can go into players/name.txt and edit their inventory.

Not if they keep their money in a chest
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

arsdragonfly
Member
 
Posts: 31
Joined: Wed May 01, 2013 07:55

by arsdragonfly » Sat Sep 28, 2013 00:46

Dan Duncombe wrote:
rubenwardy wrote:You can go into players/name.txt and edit their inventory.

Not if they keep their money in a chest

For the safety of your personal account, you can use your "virtual" money to buy any item which you think is valuable.
Manipulating a craftitem-based market is as easy as /giveme blah blah blah and /am buy(or sell) blah blah blah :P
Also, virtual money can be easily divided. This is a great advantage as well.
E.g. suggest cobblestone worth 0.01$/brick , 0.01craftitemoney/brick, buying 50 cobblestone would be harder on a craftitem-based market.
 

User avatar
Dan Duncombe
Member
 
Posts: 904
Joined: Thu May 09, 2013 21:11

by Dan Duncombe » Sat Sep 28, 2013 10:13

arsdragonfly wrote:
Dan Duncombe wrote:
rubenwardy wrote:You can go into players/name.txt and edit their inventory.

Not if they keep their money in a chest

For the safety of your personal account, you can use your "virtual" money to buy any item which you think is valuable.
Manipulating a craftitem-based market is as easy as /giveme blah blah blah and /am buy(or sell) blah blah blah :P
Also, virtual money can be easily divided. This is a great advantage as well.
E.g. suggest cobblestone worth 0.01$/brick , 0.01craftitemoney/brick, buying 50 cobblestone would be harder on a craftitem-based market.

You can't use giveme if you don't have the priv. Anyway, you could just give yourself 50 diamonds and sell them to the server admin and cheat that way.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

arsdragonfly
Member
 
Posts: 31
Joined: Wed May 01, 2013 07:55

by arsdragonfly » Sat Dec 07, 2013 08:55

Updated!
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Sat Dec 07, 2013 10:11

arsdragonfly wrote:Updated!

Cool, please also update image previews, they're down :/
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

arsdragonfly
Member
 
Posts: 31
Joined: Wed May 01, 2013 07:55

by arsdragonfly » Sat Dec 07, 2013 11:45

Krock wrote:
arsdragonfly wrote:Updated!

Cool, please also update image previews, they're down :/

Are they ok now?
 

arsdragonfly
Member
 
Posts: 31
Joined: Wed May 01, 2013 07:55

by arsdragonfly » Sat Dec 14, 2013 09:25

bump
 

arsdragonfly
Member
 
Posts: 31
Joined: Wed May 01, 2013 07:55

Re: [mod] AdvancedMarket [advanced_market]

by arsdragonfly » Sat May 31, 2014 13:18

Update and bump!
 

arsdragonfly
Member
 
Posts: 31
Joined: Wed May 01, 2013 07:55

Re: [mod] AdvancedMarket [advanced_market]

by arsdragonfly » Mon Jul 14, 2014 15:14

Updated. Now with fewer bugs.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [mod] AdvancedMarket [advanced_market]

by rubenwardy » Mon Jul 14, 2014 18:26

Usually with stock markets you put limits on it, rather than a set price. Like, I want to sell for no less than £5. I want to buy for no more than £6 pounds.
 

arsdragonfly
Member
 
Posts: 31
Joined: Wed May 01, 2013 07:55

Re: [mod] AdvancedMarket [advanced_market]

by arsdragonfly » Mon Jul 14, 2014 23:08

rubenwardy wrote:Usually with stock markets you put limits on it, rather than a set price. Like, I want to sell for no less than £5. I want to buy for no more than £6 pounds.

That's the way it works. You can try it out yourself by wash buying/selling.
 

arsdragonfly
Member
 
Posts: 31
Joined: Wed May 01, 2013 07:55

Re: [mod] AdvancedMarket [advanced_market]

by arsdragonfly » Thu Jul 09, 2015 10:51

Mod updated with some tweaks/fixes.
 

Anonymous_moose
Member
 
Posts: 38
Joined: Tue Aug 27, 2013 20:25

Re:

by Anonymous_moose » Fri Jul 10, 2015 19:00

Dan Duncombe wrote:
rubenwardy wrote:You can go into players/name.txt and edit their inventory.

Not if they keep their money in a chest


Anyone can get it if it is in a chest.
A locked chest, on the other hand....
 

User avatar
programmingchicken
Member
 
Posts: 537
Joined: Sat Apr 18, 2015 02:20
GitHub: ProgrammingChicken
IRC: gamer chicken
In-game: gamerdude

Re: Re:

by programmingchicken » Sun Jul 12, 2015 23:39

Anonymous_moose wrote:
Dan Duncombe wrote:
rubenwardy wrote:You can go into players/name.txt and edit their inventory.

Not if they keep their money in a chest


Anyone can get it if it is in a chest.
A locked chest, on the other hand....

Can be edited with a mod to default_game and a priv.
I'm bold. I'm sarcastic. I'm PChicken.
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

Re: [mod] AdvancedMarket [advanced_market]

by prestidigitator » Mon Jul 13, 2015 08:36

Pretty cool. I'd suggest renaming "refreshbuffer" to something more user-centric and more intuitive, and possibly enhancing and breaking it up into smaller functions, with the understanding that the amount of stuff being handled by a user at any one time might grow quite a bit beyond test scenarios. Also an "account" metaphor might make more sense to many users than "buffer". Maybe something like:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
/am deposit
-> Put 5 default:wood from hand into account (5 in stock)

/am balance
-> $0
-> 5 default:wood

/am sell all default:wood for $5
-> Selling default:wood for $5 each (5 in stock, no limit)

/am orders
-> Selling default:wood for $5 each (5 in stock, no limit)

-> Henry bought 3 default:wood for $5 each ($15 total)

/am balance
-> $15
-> 2 default:wood

/am withdraw all default:wood
-> Withdrew 2 default:wood from account into inventory (0 in stock)

/am orders
-> Selling default:wood for $5 each (0 in stock, no limit)

/am deposit
-> Put 10 wool:white from hand into account

/am deposit
-> Put 4 default:steel_ingot from hand into account

/am balance
-> $15
-> 10 wool:white
-> 4 default:steel_ingot

/am sell 2 wool:white for $10
-> Selling wool:white for $10 each (10 in stock, limit 2)

/am sell all default:steel_ingot for $50
-> Selling default:steel_ingot for $50 (4 in stock, no limit)

/am buy all default:steel_ingot for $40
-> Buying default:steel_ingot for $40 (4 in stock, no limit)

-> Henry bought 1 wool:white for $10

/am balance
-> $25
-> 9 wool:white
-> 4 default:steel_ingot

/am orders
-> Selling default:wood for $5 each (0 in stock, no limit)
-> Selling wool:white for $10 each (9 in stock, limit 1)
-> Selling default:steel_ingot for $50 each (4 in stock, no limit)
-> Buying default:steel_ingot for $40 each (4 in stock, no limit)

-> Henry bought 2 default:steel_ingot

/am sell 0 wool:white
-> Canceling sale of wool:white

-> Bought 3 default:steel_ingot from Stan for $38 each ($114 total)
-> Henry bought 5 default:steel_ingot for $50 each ($250 total)

/am buy 10 default:mese_crystal for $100
-> Buying default:mese_crystal for $100 each (0 in stock, limit 10)

/am buy 5 default:mese_crystal
-> Buying default:mese_crystal for $100 each (0 in stock, limit 5)

/am orders
-> Selling default:wood for $5 each (0 in stock, no limit)
-> Selling default:steel_ingot for $50 each (0 in stock, no limit)
-> Buying default:steel_ingot for $40 each (0 in stock, no limit)
-> Buying default:mese_crystal for $100 each (0 in stock, limit 5)


(It's pointless to worry about what admins can do. Admins control mods, not the other way around. While mods should be designed to make it difficult to accidentally do something destructive, they should ultimately be focused on empowering admins rather than limiting them.)
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 10 guests

cron