Kalacious's Currency System and Shop!

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
Better. I dont think the thread will be approved so I may post it here and change the name of the thread to Kalacious's scripts.

The scripts have been updated to reflect better documentation, alignments and other small fixes.
 
Last edited by a moderator:

JJR

Member
Veteran
Joined
Jul 22, 2013
Messages
36
Reaction score
0
First Language
English
Primarily Uses
For the shop is it possible to add functionality to specify which shop items get generated to? In your example you have it so that you are using the script call in the shop or event you are using for the shop script.

So lets say for example in the start of my game I have shop1, shop2 and shop3.

In those shops:

shop1 -itemA, itemB, itemC

shop2 - itemD, itemE, itemF

shop3 - itemG, itemH, itemEYE

Now as the game progresses you discover something that unlocks new itemJ in shop2, so you do $kc_shop.create_item(0, 2, 20) in an event. And it populates the new item in for shop2. Great, but if you go into the other shops, they also have the new itemJ.

EDIT: I thought of an alternate solution. What about making items in the shop have an option for not visible? And then we could setup the game with some kind of triggers that make items visible in the shop.
 
Last edited by a moderator:

DarknessFalls

Rpg Maker Jesus - JS Dev.
Veteran
Joined
Jun 7, 2013
Messages
1,393
Reaction score
210
First Language
English
Your edit is a good idea, your first one is a bad idea, let me explain why:

When you create either a static shop, or create a shop via script calls you are creating an object, that object contains all the information needed about that shop, about the items in that shop, the currencies it uses, the way it behaves and so on. When you call the shop, using that object - that object is converted to an array of items, prices and the currency to us - manipulating this is not all that difficult, but it can be tricky and would require new script calls. I am not opposed to creating them, how ever, option two or your edit is much more interesting - if we allowed an option item to be hidden and then set an event trigger, such as a switch then the item could appear - problem though - 1 switch per item, as each item could be "hidden"

So that leads us back to option one - adding items to the shop object, the way your doing it would require a slight fix - add_item('Currency', item_object) where item_object is the item you create, this concept states add an item to this shop 'Currency', if the item exists - do nothing, else add it.

All in all

I will add the first one :p Don't expect it today, ill try but no promises - I'm working on a new currency shop, but it will come :D
 

JJR

Member
Veteran
Joined
Jul 22, 2013
Messages
36
Reaction score
0
First Language
English
Primarily Uses
That would be really great if you could figure out a way to make that work correctly. But even if not thanks for trying to do it. =)
 

metalrose1988

Villager
Member
Joined
Oct 24, 2013
Messages
8
Reaction score
0
First Language
english
Primarily Uses
Unless I am blind, how do we set up a sell value of an item to one of these scripted currency stores?

For an example..

Player can sell a Ruby to a Mineral Store Merchant and receive 10 currency, where as they could sell Ore and receive 1 currency.

What we do for this?

Nevermind, I figured it out!

Thanks! I love this script!  :)
 
Last edited by a moderator:

Mouser

Veteran
Veteran
Joined
Aug 19, 2012
Messages
1,245
Reaction score
264
First Language
English
Primarily Uses
You really need to put a warning/explanation in the OP stating that this is GPL'd code and what the ramifications of that are for a project. A lot of people won't be able to use this in their projects because of that (not just commercial ones, either).

In short, if you use this script you must give an unencrypted copy of the game with the full source code of every script the game uses - whether by Enterbrain, you, or anyone else, to anyone you distribute the game to.

You'll get a lot more people able to use your code if you go with a MIT/BSD license or even one of the Creative Commons.

Edit: In fact, I don't think you CAN legally use your script in RPG Maker (whether your project is "free" or not makes no difference) because you can't distribute the source code of many of the 'hidden' classes. That's before you even look at the source code for the engine itself, which you can't distribute under any circumstances. The only possible legal use would to create a game that only you played - even distributing for play testing is right out.

The GPL (any version) is NOT a developer-friendly license.
 
Last edited by a moderator:

metalrose1988

Villager
Member
Joined
Oct 24, 2013
Messages
8
Reaction score
0
First Language
english
Primarily Uses
How do we go about distributing currencies as a reward?

For an example, someone completed a side quest and received 5 lucky tokens (as an extra currency). Would we use a script call for such? I attempted at playing around with "$kc_currency.increase(curr_vocab, value)" but only got an error with the main interpretor. 

Thanks!
 

Momochon

Villager
Member
Joined
Apr 13, 2014
Messages
15
Reaction score
0
First Language
English
Primarily Uses
How do I put this in the script editor? Is it plug and play?
 

NickWyatt1

Villager
Member
Joined
Mar 14, 2014
Messages
9
Reaction score
1
First Language
English
Primarily Uses
How do we go about distributing currencies as a reward?

For an example, someone 

completed

 a side quest and received 5 lucky tokens (as an extra currency). Would we use a script call for such? I attempted at playing around with "$kc_currency.increase(curr_vocab, value)" but only got an error with the main interpretor. 

Thanks!
Hope this helps...

Untitled.png
 

NickWyatt1

Villager
Member
Joined
Mar 14, 2014
Messages
9
Reaction score
1
First Language
English
Primarily Uses
Would there be any way to add this command into Currency Script

$kc_currency.exists?(curr_vocab, value)

This would make it possible to use a conditional branch.
 
Last edited by a moderator:

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,905
Reaction score
451
First Language
April Fools
Primarily Uses
N/A
How can I connect the new currency to an item in my database and use it in a variable hud, mainly need to know what variable I could use for the new currency.?
 
Last edited by a moderator:

Stareagleman

Villager
Member
Joined
Feb 6, 2016
Messages
9
Reaction score
3
First Language
Swedish, 2 Eng
Primarily Uses
N/A
I got a question. would it be possible to somehow change this part


  SHOPS_HASH = {
    'GC' => {
      :item_type => [0, 0],
      :item_id => [4, 5, 6],
      :price => [10, 14],


Into this part or something like it


  SHOPS_HASH = {
    'GC' => {


    'RT' => {
      :item_type => [0, 0],
      :item_id => [4, 5, 6],
      :price => [10, 14],


with some change to prices, i mean you call the shop set up a price all you need to really get several currencies


is what you add in call currency/currencies and price/prices on a note im not exactly a pro or anything. I just got


a thought since items can be added several with different prices, Should't Currencies be possible the same in that regard?


2 currency beginning with an end of each are on it on that i put up.


if i have 1 A and one B i need on price 1A and one B there too.  and since we see :price => [10, 14], the [10, 14], the number is per item.


But if you can make one :price => [10, 14],  per item instead or something like that. you can make the number 10, 14 be instead the numbers can be


about each currency Listen in the shop in same order. 10 GC and 14 RT. Can you possibly make something like that Darknessfalls


or make it like this in a sense :price => [10, 14], :price => [10, 14], would that be possible? :)


By the way, Your script stores a variable per currency right? then should't it be possible to name it in a Variable or a branch as posted above


and use that As a way to exhange the money gold to silver and so on Like 1 change bronze into silver, 2 change bronze into gold 3 change silver


4 change gold. and so on untill you have change t.ex 1 gold into 5 silver. check variable gold exist 1 then change 1 gold into silver else you


have not enough gold/silver/bronze text. and put you back to first options? :)


? :)


Like this sort of it calls variables. 


put in number check if it exists. if it does it makes the change if not


it makes else.


All one should need to do is change variables/branch and the Choices into


the right ones.. am i not into something here?


Also i know they use game data. But script data should be possible


as well to use right? :)


http://blog.rpgmakerweb.com/tutorials/creating-a-bank/


 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top