Variable Price Shops

Discussion in 'RGSS3 Script Requests' started by Sketchward, Jul 30, 2019.

  1. Sketchward

    Sketchward Veteran Veteran

    Messages:
    55
    Likes Received:
    3
    Location:
    Canada
    First Language:
    English
    Hi all,

    I need someone with better RGSS3 skills than I have to make a script that will allow me to set an item's price in a shop as equal to one of the GUI variables in storage, which can then change throughout the game.

    The reason I am doing this is so that an item can cost one amount in one location (Equal to Variable 0001), and cost something else in other locations (Equal to Variable 0002, 0003, etc.) for the purposes of buying and selling goods for profit while traveling between areas.

    Thanks for your time !
     
    #1
  2. A-Moonless-Night

    A-Moonless-Night WINTER IS COMING Veteran

    Messages:
    477
    Likes Received:
    342
    Location:
    New Zealand
    First Language:
    English
    Primarily Uses:
    RMVXA
    #2
  3. Sketchward

    Sketchward Veteran Veteran

    Messages:
    55
    Likes Received:
    3
    Location:
    Canada
    First Language:
    English
    That's almost perfect, but I run into a problem.

    As in the example above, I need an item to cost one amount (Variable 0001) in one location, but cost another amount in other locations (0002, 0003, etc.)

    As Modern Algebra's script relies on note tags on the item page in the database, I can only set each item as equal to one variable rather than different variables in different locations.
     
    #3
  4. Sketchward

    Sketchward Veteran Veteran

    Messages:
    55
    Likes Received:
    3
    Location:
    Canada
    First Language:
    English
    I used to have a script made by Ossra called ExaSE that handled this, but he seems to have been offline for 2 years and the link I had saved to his script is now 404'd. But the way it would lay out in the event window was:

    Code:
    var goods = [
    [0,2,1,$gameVariables.value(0001)],
    [0,3,1,$gameVariables.value(0002)],
    [0,4,1,$gameVariables.value(0003)],
    [0,5,1,$gameVariables.value(0004)]];
    exaSE.adjustSellPrice item 2 var 0001;
    exaSE.adjustSellPrice item 3 var 0002;
    exaSE.adjustSellPrice item 4 var 0003;
    exaSE.adjustSellPrice item 5 var 0004;
    SceneManager.push(Scene_Shop);
    SceneManager.prepareNextScene(goods, false);
    Where the inputs were [Boolean, Item Database Number, Game Variable Number].
     
    #4
  5. ZirconStorms

    ZirconStorms VX & VX Ace Scripts Veteran

    Messages:
    315
    Likes Received:
    102
    First Language:
    English
    Primarily Uses:
    RMVXA
    https://www.rpgmakercentral.com/topic/719-shop-taxes-vxa/
    Hate to be that guy, but are you sure you're not thinking of an MV plugin?
    https://forums.rpgmakerweb.com/index.php?threads/scenemanager-push-scene_shop.65882/#post-630903 has a link for a .js script.

    Also it'd be a bit of a pain, but you could have dummy variables that'd just connect to other variables with the real value. That would allow you to use the script mentioned above without having to worry about notetags being unchangeable.So say for example, in the notetags, you have it set to variable 1. Then, you could say that variable 1 has the same value to whatever variable has the price you really want.
     
    #5
  6. Sketchward

    Sketchward Veteran Veteran

    Messages:
    55
    Likes Received:
    3
    Location:
    Canada
    First Language:
    English
    Aah yeah it could have been an MV script.

    That's a good idea, I'll try that! Thank you.
     
    #6
    ZirconStorms likes this.

Share This Page