Economies for game item buying and selling

Avatar

By bitcraft 11 Jul 2018 13:03

Champion · 166 comments

I just wanted to open a thread here in case anyone would like to offer their opinion about a feature idea I had last night.  It will support buying and selling of items in a way that will be easy for game designers to tweak.  I've linked it here, but I'll also paste the core of it here.

https://github.com/Tuxemon/Tuxemon/issues/429

* An economy is defined by buy/sell prices of items.
* Alternate economies can be defined
* All NPC's/shops are part of the "default" economy.
* Economies have a parent/child relationship, children override parents, parents provide value not in children.

A different economy can be used for a different region, affecting prices of all items. Economies should be able to be defined in JSON.

Economies don't need to be for different maps/regions, either.  It could be used for a single NPC who has special prices for a few items.

Last edited by bitcraft (11 Jul 2018 13:10)

Avatar

By christian 12 Jul 2018 07:19

New member · 8 comments

Could you elaborate on the last bullet point?

Avatar

By bitcraft 24 Jul 2018 01:04

Champion · 166 comments

Suppose you have a Economy for the entire game:
* apples are $1
* oranges are $2
* grapes are $5

You could have a child Economy for a NPC:
* apples are $10

In that case, from that NPC, apples are $10, but all other items are normal price.

You might also make children Economies for regions under the default Economy.  And NPCs could be under the regional Economy.

Avatar

By Sanglorian 24 Jul 2018 10:05

Champion · 490 comments

Is an economy also defined by availability? For example could you have

* apples are not available
* oranges are $2
* grapes are $5

And an NPC
* apples are $10

Avatar

By bitcraft 26 Jul 2018 21:55

Champion · 166 comments

not sure about that, because you would be adding items to npcs in JSON.  are you looking for an enforcement of items?  for instance, the game will report an error if apples are in an economy where they are not defined?

Avatar

By Sanglorian 26 Jul 2018 23:28

Champion · 490 comments

Oops! I'd forgotten that we were adding item quantities to each NPC; nevermind smile