sene_shop

Discussion in 'Learning Javascript' started by Tatsumaro, Jan 26, 2018.

Thread Status:
Not open for further replies.
  1. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    hi im going to tray to explain as best as i can. When i enter menu shop im want the window_ShopBuy to be always visible and when you select buy to proceed as usual. Later i mayte change the layout to something like this shop_upgrade.jpg

    i'm using A LOT of plugins but YEP_ShopMenuCore and SOUL_GraphicShop (whit a lot of */ code */)
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,333
    Likes Received:
    6,446
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    and what is your question?

    If you want someone to write a plugin for you, this is the wrong section - you'll need to post in plugin requests, and it'll need a lot more details than what you gave above.

    If you want to learn how to write such a plugin yourself, then you're in the correct section - but we would need exact questions or the code of what you have so far, and an indication about your experience as a javascript programmer.
     
    #2
  3. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    when enter menu shop im want the window_ShopBuy to be always visible . what peace of code can i edit to accomplish this?
     
    #3
  4. Gamefall Team

    Gamefall Team Nebula Games Leader Veteran

    Messages:
    337
    Likes Received:
    420
    Location:
    Italy
    First Language:
    Italian
    Primarily Uses:
    RMMV
    You can can edit this part of the code:

    Code:
    Scene_Shop.prototype.createBuyWindow = function() {
        var wy = this._dummyWindow.y;
        var wh = this._dummyWindow.height;
        this._buyWindow = new Window_ShopBuy(0, wy, wh, this._goods);
        this._buyWindow.setHelpWindow(this._helpWindow);
        this._buyWindow.setStatusWindow(this._statusWindow);
        this._buyWindow.hide();   <-- HERE
        this._buyWindow.setHandler('ok',     this.onBuyOk.bind(this));
        this._buyWindow.setHandler('cancel', this.onBuyCancel.bind(this));
        this.addWindow(this._buyWindow);
    };
    
    You can delete the "this._buyWindow.hide()". But the buy window is hidden often when you buy something or when you cancel the buy action, so you have to edit other part of the Scene_Shop code.
    So if you need to be always open, i suggest to edit directly the hide method of the Window_ShopBuy.

    Code:
    Window_ShopBuy.prototype.hide = function() { }
    This way you will be sure that the Window_ShopBuy will never be hidden.
     
    #4
    Tatsumaro likes this.
  5. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    HI so i "//this._buyWindow.hide();" 3 times in the rpg_scenes and it works :D, but its steal not perfect, when i enter the shop menu the buyWindow its not visible, it only remains visible after i enter the buy command, from that point it works as intended, how do i force it to be visible from the start?

    EDIT: ok its done i just need to edit "//this._buyWindow.hide();" in YEP_ShopMenu




    THANKS
    Gamefall Team

    PS: we should have an honer system like league of legends
     
    Last edited: Jan 26, 2018
    #5
  6. Gamefall Team

    Gamefall Team Nebula Games Leader Veteran

    Messages:
    337
    Likes Received:
    420
    Location:
    Italy
    First Language:
    Italian
    Primarily Uses:
    RMMV
    @Tatsumaro It's strange, if you remove the hide method from the creation of the window (so the createBuyWindow in Scene_Shop), it should be visible from the start.
    I suggest to not make the edits directly in the rpg scenes, but you should create a new plugin file and edit them there, and then you should insert it in your plugin manager.
    Maybe you're using other plugins that make changes on the Scene_Shop.
     
    #6
    Tatsumaro likes this.
  7. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    I love that but my .js skills are a joke ;)
     
    #7
  8. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    solved
     
    Last edited: Jan 29, 2018
    #8
  9. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,598
    Likes Received:
    10,511
    First Language:
    English
    Primarily Uses:
    RMVXA

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #9
Thread Status:
Not open for further replies.

Share This Page