Kalacious's Currency System and Shop!

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by DarknessFalls, Aug 8, 2013.

  1. DarknessFalls

    DarknessFalls Rpg Maker Jesus - JS Dev. Veteran

    Messages:
    1,393
    Likes Received:
    209
    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: Aug 14, 2013
    #21
  2. DarknessFalls

    DarknessFalls Rpg Maker Jesus - JS Dev. Veteran

    Messages:
    1,393
    Likes Received:
    209
    First Language:
    English
    #22
  3. JJR

    JJR Member Veteran

    Messages:
    36
    Likes Received:
    0
    First Language:
    English
    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: Aug 17, 2013
    #23
  4. DarknessFalls

    DarknessFalls Rpg Maker Jesus - JS Dev. Veteran

    Messages:
    1,393
    Likes Received:
    209
    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
     
    #24
  5. JJR

    JJR Member Veteran

    Messages:
    36
    Likes Received:
    0
    First Language:
    English
    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. =)
     
    #25
  6. metalrose1988

    metalrose1988 Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    english
    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: Mar 21, 2014
    #26
  7. Mouser

    Mouser Veteran Veteran

    Messages:
    1,246
    Likes Received:
    264
    First Language:
    English
    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: Mar 21, 2014
    #27
  8. metalrose1988

    metalrose1988 Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    english
    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!
     
    #28
  9. Momochon

    Momochon Villager Member

    Messages:
    15
    Likes Received:
    0
    First Language:
    English
    How do I put this in the script editor? Is it plug and play?
     
    #29
  10. NickWyatt1

    NickWyatt1 Villager Member

    Messages:
    9
    Likes Received:
    1
    First Language:
    English
    Hope this helps...

    Untitled.png
     
    #30
  11. NickWyatt1

    NickWyatt1 Villager Member

    Messages:
    9
    Likes Received:
    1
    First Language:
    English
    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: Jun 23, 2014
    #31
  12. ShinGamix

    ShinGamix DS Style 4Ever! Veteran

    Messages:
    3,906
    Likes Received:
    448
    Location:
    Alien Ship
    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: Jul 5, 2015
    #32
  13. Stareagleman

    Stareagleman Villager Member

    Messages:
    9
    Likes Received:
    3
    Location:
    Sweden
    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/


    [​IMG]
     
    Last edited by a moderator: Aug 8, 2016
    #33

Share This Page