• Announcements

    • RagingHobo

      Forum Upgraded!   07/17/2017

      We have successfully upgraded our forum to the latest version! Some things have moved around but don't worry everything is still there, we still need to find updated versions of the plugins we were using previously to restore everything to the way it was. There will be a running topic in the Feedback and Support in case you notice something wrong. Before you do so please clear your browser cache and close your browser completely to rule out a caching issue. Thank you for your patience during the outage and while we get everything back to 150%  
Tsukihime

Gab Manager

10 posts in this topic

Gab Manager

-Tsukihime

 

The original gab window script says this

 

 

These script calls can only be used from a map. The Gab Window will not appear in battle or anywhere else.

So I added a gab window to every scene.

 

Download

 

Script: http://db.tt/EM8xWrro

Required: Gab Window

 

Usage

 

Show a gab window by calling

 

 

 

 

SceneManager.show_gab(args)

Instructions for what the gabs are can be found in the gab window script.

 

You can choose where to position the gab window by super'ing the `create_gab_window` method in your own scene classes and setting the x and y values.

 

Example

 

With the Gab Manager is it very easy to add extra gabs everywhere.

 

scene_gabs_shop.JPG

 

Of course, you need to fine-tune the window and gab and overall looks, but you probably would be doing that anyways.

 

This piece of code accomplishes the above:

 

 

 

 

class Scene_Shop < Scene_MenuBase

  def create_gab_window
    super
    @gab_window.x = 150
    @gab_window.y = -10
  end

  alias :scene_gabs_do_buy :do_buy
  def do_buy(number)
    text = sprintf("Purchased %d %s for %d %s!", number, @item.name, buying_price*number, Vocab::currency_unit)
    SceneManager.show_gab(text, 0)
    scene_gabs_do_buy(number)
  end

  alias :scene_gabs_do_sell :do_sell
  def do_sell(number)
    text = sprintf("Sold %d %s for %d %s!", number, @item.name, selling_price*number, Vocab::currency_unit)
    SceneManager.show_gab(text, 0)
    scene_gabs_do_sell(number)
  end
end
Edited by Tsukihime
Galv likes this

Share this post


Link to post
Share on other sites

whoa... i only put in one scene(and in rough way) and you made it possible in all scene... nice one :D.

and it's only by adding it in scene_base... of course... it's parent of all scene. why don't i think about that before. :D.

 

but i think you should put yanfly addon in topic title. so people will now it's add on to yanfly gab window script tsuki.

Share this post


Link to post
Share on other sites

Is it possible that the shop example should actually spell

Scene_Shop < Scene_MenuBase

 

?


(You have Scene_Base, which provokes a superclass mismatch error.)

Edited by Caveras

Share this post


Link to post
Share on other sites

def create_gab_window
  super
  @gab_window.x = 150
  @gab_window.y = -10
end

Those are the positions play around with the values and see how they work.

Quick question - is it possible to have the name of the map (when you enter a new map) appear in a gab window instead of the default method?  Thanks.

I think yanfly had a script for that based on the gab manager but I am not sure.

Share this post


Link to post
Share on other sites

If you would read, it's an add on for that script you linked to... to make it work in all scenes, not just the map...

Share this post


Link to post
Share on other sites
I notice a lot of similarity to function in a lot of your others codes too. Not just in comparison to YF but Japanese coders as well.

It is not unthinkable that two or more people might come up with the same idea or the same implementation, especially if it a small script.

 

Someone once PM'd me accusing me of plagiarizing a whole bunch of scripters from all sorts of places and not leaving any credits whatsoever. This included scripts from XP/VX and japanese scripts that I've never seen before. Apparently I'm supposed to be crediting the original person who came up with the idea and it is my responsibility to see whether any of these scripts have already been written or not. Too much work, I'd rather "plagiarize" than try to find the original script.

 

Of course, the scripts themselves were written differently, but all that mattered was that I "stole ideas" without proper attribution.

Edited by Tsukihime
Dark Horseman likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.