DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
Kalacious Currency Generator and Currency Shop! 1.0.1
 ​
Creator: Kalacious (AKA Vindictive Personality)

Introduction

This set of scripts is designed to allow you to create your own currencies and also set up shops to use those scripts.

Features


  • Create new currencies
  • Create new shops for those currencies.
Screenshots

Currencies Screen:




Currencies Shop For GC currency:




How to Use

The details are in the headers of both scripts. The headers are well detailed, well documented.

Demo

None.

Script

Currency Script https://gist.github.com/AdamKyle/6046633

Currency Shop - Requires Currency Script https://gist.github.com/AdamKyle/6046623

FAQ
Questions? Please make sure to read the script headers as they are well documented. If you have questions or bug fixes or what have you please post.

Credit and Thanks

RM Community for your help.

Author's Notes
Version 1.0.1 brings some small fixes.

Version 1.0.2 Aligns some text in the description window and moves some icons over. We also allow for a bit longer Text for description, for exmple: Used for Ascended gear and stuffs..... Will work. I wouldn't go over it.

Tutorial 1 - Making a shop using the script (not script calls)

Some people have been having issues setting up shops using currencies and I thought I would take a moment to explain how to do that using no script calls, other then one you need for the NPC to open the shop.

First lets set up our currencies in the currency script:



module CURR #-------------------------------------------------------------------------- # * Currency hash object created. The vocab here is the key, where # as the value is a hash of key=>value that defines the currency. #-------------------------------------------------------------------------- CURR_HASH = { 'GC' => { :full_name => 'Guild Coin', :icon => 330, :max => 9999, :description => 'Used for Ascended gear.', :obtained => 'Guild Battles' }, 'RT' => { :full_name => 'Resource Token', :icon => 278, :max => 9999, :description => 'Used for crafting.', :obtained => 'Jobs' }, 'CC' => { :full_name => 'Celestial Coin', :icon => 526, :max => 9999, :description => 'Used for Celestial gear.', :obtained => 'Celestial Rips' }, } COLOR_CURRENCY_NAME = 5 COLOR_CURRENCY_SYM = 5 COLOR_CURRENCY_OBTAINED = 2 COLOR_CURRENCY_DESCRIPT = 2 SHOW_IN_MENU = falseend

Next, we need to head over to the script shop and pick a currency to make shops from:



module SHOPS #-------------------------------------------------------------------------- # * Create your shop objects here based on a particular vocab. #-------------------------------------------------------------------------- SHOPS_HASH = { 'GC' => { :item_type => [0, 0], :item_id => [1, 2], :price => [10, 14], }, 'RT' => { :item_type => [0, 0], :item_id => [1, 2], :price => [10, 14], } }end

Here you can see that I went ahead and created two shops, notice how the Key of in the hash matches that of the currency in the currency script? You cannot have shops for currencies that do not exist.

Ok so now you want to call the shop, GS.create_shop('RT', true); will create a shop using the RT Currency, and set it so you can only buy items.


Tutorial 2 - Using the Script calls to create shops!

Some people are confused on how to create shops using only the script calls. lets delve into that, shall we? First we need to make sure we have some currencies set up, tutorial one, above, goes into that. Once we have some currencies set up we need to understand some basic and fundamental scrip calls: $kc_shop.create_item(item_type, item_id, price) - This creates a single item, this item is then stored in object of items call the master inventory list. item type is: 0 - items, 1 - weapons or 2 - armor. Item id is the id of that item in its respected type, where as price is - well how much it costs.

So:  $kc_shop.create_item(0, 1, 20) is: an item of id 1 at the price of 20.

No lets create some items shall we?

$kc_shop.create_item(0, 1, 20)$kc_shop.create_item(0, 2, 20)$kc_shop.create_item(0, 3, 20)There, now we have three items. - wait, where am I creating these? All of these script calls are being done on the NPC you want, or the event, that is the shop for this type of shop.

--- See the Screen Shot ---



Next, since we have out items created, and our currency we need to create and call the shop into existence.

So we need this call: GS.call_shop(master_inventory, 'curr', puchase_only = false). How do we use it? like so:

GS.call_shop($kc_shop.inventory, 'GC',  false)The above states, create me a shop based on the inventory list I passed in for the currency value of GC (note the string GC), where I can buy and sell items.

So we have the following:



Ok now lets run this:



Your database is going to be different from mine but you can see we have items 1, 2 and 3.

WAIT!!!!!!! - I have a shop called GC already set up in the hash with item 4,5 and 6....

So you created a hash shop called GC with item id 4, 5 and 6. Then you used the script calls to create a GC shop with item id 1,2 and 3? No problem. Two different script calls. The script call from Tutorial 1: GS.create_shop('RT', true); will create you shops BASED on that currencies hash in the shop script where as GS.call_shop($kc_shop.inventory, 'GC',  false) will create you a shop BASED on the inventory list you created for the NPC or event that is to act as the shop.

Why have both?

The hash is good for setting up static shops, shops that wont change. the other is for setting up fresh shops on the fly. You must always create the inventory list BEFORE calling the shop, you cannot alter the inventory list after the shop is called.

Note: you cannot create static shops and then have the script calls manipulate the static shop inventory list. That is not a feature I have built yet one I am looking at.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
wow, this is pretty nice... I hope it works fine with other shop modifying scripts...

btw, can you also have an item require more than 1 currency?
 
Last edited by a moderator:

Probotector 200X

Probotect and Serve
Veteran
Joined
Mar 14, 2012
Messages
913
Reaction score
168
Primarily Uses
Currencies~! I'm still looking for a currency script that fits what I want...

I'll just ask if some of the things I'd like to see are possible...

-Can enemies drop the new currencies? (like, you go to another country with a different main currency, so...those enemies drop that currency instead!)

-Can the new currency shops, use multiple currencies for one item? Like what adiktuzmiko asked. From the looks of the screenshots, and studying the script itself, it doesn't look like it's set up for that.

BUT, even if it can't do that, it does look pretty cool and I'll probably use it anyway!
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
wow, this is pretty nice... I hope it works fine with other shop modifying scripts...

btw, can you also have an item require more than 1 currency?
No you cannot. At this time you can only have one currency per shop. Each shop can either be set up in script or through script calls.

Currencies~! I'm still looking for a currency script that fits what I want...

I'll just ask if some of the things I'd like to see are possible...

-Can enemies drop the new currencies? (like, you go to another country with a different main currency, so...those enemies drop that currency instead!)

-Can the new currency shops, use multiple currencies for one item? Like what adiktuzmiko asked. From the looks of the screenshots, and studying the script itself, it doesn't look like it's set up for that.

BUT, even if it can't do that, it does look pretty cool and I'll probably use it anyway!
Enemies cannot drop different currencies. They can only drop gold. this is something I am looking at with the enemy drop table.

Shops can only have one currency.

Script Notes:

This is not an update, this is a documentation note. You might be freaking out that: call_shop(master_inventory, curr, puchase_only = false) and create_shop(curr, purchase_only = false) are not working. Please remember they are apart of the GS Module, you MUST do: GS.create_shop(curr, purchase_only = false) or GS.call_shop
 

JJR

Member
Veteran
Joined
Jul 22, 2013
Messages
36
Reaction score
0
First Language
English
Primarily Uses
I was having trouble getting the shop call to work. Then I went back and reread Kal's post more closely, for the script call I didn't have 'RT' I had RT and I kept getting an error. In case anyone else comes across the same problem now they know. :)
 

JJR

Member
Veteran
Joined
Jul 22, 2013
Messages
36
Reaction score
0
First Language
English
Primarily Uses
Kal is there a way to specify which shop items get generated to? When i use $kc_shop.create_item(0, 1, 10) both shops get that item generated. I could use the other method of setting items in there directly by making the shop with the SHOPS_HASH but that wouldn't allow me to give new items into shops during the course of game play.
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
Update: - Tutorial two has been posted - with screen shots! :D

@JJR - In regards to your question, yes. Make sure you are using the proper script calls.

GS.call_shop(master_inventory, 'curr', puchase_only = false)The above is for  script calls when you create the inventory list, see Tutorial 2. You pass in the inventory list, the curency for that shop, as a string, note the quotes, and true/false for purchase only. this will create you a shop on the fly.

GC.create_shop('curr', purchase_only = false)The above will create you a shop, a static shop, based on the currency, again note the string, and the HASH based shop. that is the shop you set up in the script it's self.

Hope this clears up confusion :D

Update II: Features Coming!

Version 1.1 Will bring the following new features:

  • Give Currencies when fighting enemies, that is add them to the new enemies drop object.
  • Modify static shop inventories, that is the hash shop, via scrip calls before opening the shop.
If you would like to see a feature added, please let me know :D
 
Last edited by a moderator:

Probotector 200X

Probotect and Serve
Veteran
Joined
Mar 14, 2012
Messages
913
Reaction score
168
Primarily Uses
Well, if you are asking for feature ideas...

When you say enemies can drop new currencies, do you mean instead of Gold? Or in addition to? Like, an enemy drops 100 gold, 200 silver, and 50 credits?

Also, is shops with items that cost multiple currencies out of the question? I have a hunch it would take a lot of rewriting, as well as some pretty big changes to the shop scene to implement properly.

Oh, and Currency exchange? Could that be done? And with variable exchange rates? Like with each currency exchange station, you set-up the exchange rate for each currency with each other currency, but only if those are valid exchanges?

Like at one place, 1 Gold gets you 3 Silver, in another place, 1 Gold only gets you 2 Silver. Meanwhile, one shop lets you exchange Silver and Credits, but another shop does not.
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
Well, if you are asking for feature ideas...

When you say enemies can drop new currencies, do you mean instead of Gold? Or in addition to? Like, an enemy drops 100 gold, 200 silver, and 50 credits?

Also, is shops with items that cost multiple currencies out of the question? I have a hunch it would take a lot of rewriting, as well as some pretty big changes to the shop scene to implement properly.

Oh, and Currency exchange? Could that be done? And with variable exchange rates? Like with each currency exchange station, you set-up the exchange rate for each currency with each other currency, but only if those are valid exchanges?

Like at one place, 1 Gold gets you 3 Silver, in another place, 1 Gold only gets you 2 Silver. Meanwhile, one shop lets you exchange Silver and Credits, but another shop does not.
You have some good and some ambitious ideas, all of which I will consider for sure, I like the currency exchange idea. As for multiple currencies in a shop - its not that it would affect the shop class, because everything I do is an extension of the shop class so NO shop class script should be broken by my shop script. Its a fact of "realism", I have never seen a store that takes more then one currency, now if its more then one currency on an item, then no I havent seen that. If its something like McDonalds where they take both US and Candian Dollars (here in canada) then ya I could see that.

The problem with that is you would have to choose which currency, then that currency would have to be used. not too hard to implement, but I was going for more the idea of Rift, multiple vendors each with their own currency.

As you can tell with my script I am new to window making and all that so It would be a challenging. I wont say no the idea, but I wont say yes, with out first experimenting.

As for enemies. I plan to create my own enemy object, that would work with another script I am currently using (thus a requirement), where you can have the default item's and gold and all that drop BUT you could also have additional things drop, such as currencies, such as wepons, armor, key items and so on and so forth. there would be a static version, much like shops where you set up a hash and use a script call to call that, and a "on the fly" version where you use script calls.
 

Probotector 200X

Probotect and Serve
Veteran
Joined
Mar 14, 2012
Messages
913
Reaction score
168
Primarily Uses
Thank you for considering my ideas...

First I must confirm something...it sounds like you say this should work with other shop scripts...really? Like, a skill shop or "common event shop"? Because that would be really cool, and would fit some of the things I'd like some of these features for. Well, maybe I'll try it out soon.

On the subject of multiple currencies for one item: I've played a few games that have multiple currencies in the same shop, sometimes more than one at once at the same time.

Here's an example from Warcraft 3:

7cjf.png


There are 2 resources, or currencies if you will. Gold, and Lumber. Most things you buy in a "shop" only take Gold, but some cost Lumber as well. Many things that you wouldn't buy in a standard shop, such as the "Creature Carapace" upgrade in the screenshot, cost Gold and Lumber at the same time. Now, Warcraft 3 has a totally different interface than RPG Maker, but...I happen to love these things that cost Gold and Lumber! (yes, I'm planning on making "Lumber" a currency...)

Another example, this one from Marvel Avengers Alliance:

mkan.png


In one shop, there's items that cost Gold, and items that cost Silver and "Shield Points". I hear it's common for browser type games like this to have various currencies (there's always at least one that's more "premium" than others.)

Those examples, well, those games are designed with having various resources/currencies as important things to manage. They are almost always visible, so...what I'm saying is that I'm not sure how that could be translated into RPG Maker. One thing I love is the icons by the numerical costs in the shops.

Again, these are just ideas. I love items that have multiple currency costs in one, but I know it's not very realistic...

Anyway, looking forward to more updates!
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
One thing I am currently working on is a new troop drop script to deal with dropping items from troop - more on that to come. As for this script working with other shops, my words may have been misleading - it should not crash any other shop script on the market - as the classes I created EXTEND those of the base shop scripts. This does not mean that it will allow you to purchase skills or other items with currencies created here. The script makers would have to alter their scripts to allow that.

I have created my own shop objects, my own item objects and my own currency objects.

As for multiple currencies, I see your example - I will look into it, but no promises.
 

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,906
Reaction score
458
First Language
April Fools
Primarily Uses
N/A
Like the idea but without being able to use it with other things besides your shops, I will wait till into the future to use it.
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
Version 1.0.2 is released this is for the currencies script - it brings small alignment changes and fixes to icons.

@ShinGamix - But you can make your own shops with my stuffs .. LOL 
 

Probotector 200X

Probotect and Serve
Veteran
Joined
Mar 14, 2012
Messages
913
Reaction score
168
Primarily Uses
Oh, my bad for that assumption...me being over-eager again and not understanding things. BUT, I'm sure if a little work is done this could be compatible with say...a skill shop, and that would be pretty cool. I...could possibly look into that myself...hmm...
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
Oh, my bad for that assumption...me being over-eager again and not understanding things. BUT, I'm sure if a little work is done this could be compatible with say...a skill shop, and that would be pretty cool. I...could possibly look into that myself...hmm...
That would be up to the person who created the skill shop to incorporate my script with theirs.
 

JJR

Member
Veteran
Joined
Jul 22, 2013
Messages
36
Reaction score
0
First Language
English
Primarily Uses
To get around that you could create a Learn Skill item and populate your shop using Kal's scripts. You have to use both of his scripts in conjunction to make your shops.(noob like me this is worth saying more than once)
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
JJR - That would be an awesome idea, just create a shop with items that allow you to learn skills, and use what ever currencies you want.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
yeah, have something like skill scrolls... and also, that way, you can allow the player to have a skill scroll even if he cannot learn it yet... saves him from the effort of needing to go back to the shop when he can finally learn the skill...
 

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
If my new thread ever gets approved  - then Ill have a new surprise for you guys and your currencies!!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
Multi-currency shops? or support for other shops?
 

Latest Threads

Latest Posts

Latest Profile Posts

Anybody know how to make an enemy have a line of sight? I'm trying to make Persona-like enemies.
zomboars.jpg

Concept art

Zomboars- main enemies in my story
mutant pigs addicted to beer
SF_People1_3 added!
index.php

I haven't been on here in forever wow(missed my forum birthday T-T). Anyways, I'm dabbling in BGMs, here's something I'm actually willing to share.

Forum statistics

Threads
109,203
Messages
1,043,022
Members
141,713
Latest member
Quincy_
Top