Jump to content
Sign in to follow this  
A.

Show Info On Map

Recommended Posts

Show Info On Map

 

 

Version: 1.1

Author: Adrien. (A.)

Usage: Plug and Play

Blog: Labs

 

capture_by_createdthoughts-d4l6dtg.png

 

Notes: Thought I would post it here, regardless of the review it got. Third ever script. The code template used will be the last time I use it....

Compatibility?: No issue.

FAQ?: Seriously? See image.

 

Version Notes:

 

1.0 - init release (stable)

1.1 - feature request granted - switch (credit to shaz for helping)

 

 

 


#==============================================================================
# â–  Map Info
#
#
# Author: Adrien. (A.)
# Version: 1.1
# Log: 1.0 (init release), 1.1 - adds switch ability
# Comptaibility?: No issue?
#
# This script show information on the map in the form of a box. Its very basic,
# very simple and very easy to use. The new version 1.1 allows for you to use
# a switch to say: if on, turn off the box and if off, make the box visable.
#
# Thanks to shaz for helping out with understanding switches in version 1.1
#
#------------------------------------------------------------------------------
#  Plug and Play
#==============================================================================

module INFO
 #--------------------------------------------------------------------------
 # â— SWITCH_NUM = Switch
 #     --> must be on if you want the window to display. 
 #--------------------------------------------------------------------------
 SWITCH_NUM = 10
end


class Window_Show_InfoMap < Window_Base
 #--------------------------------------------------------------------------
 # â— initialize
 #--------------------------------------------------------------------------
 def initialize
       super(0, 0, 300, fitting_height(2))
       refresh
 end
 #--------------------------------------------------------------------------
 # â— refresh
 #     --> update the contents of the window
 #--------------------------------------------------------------------------            
 def refresh
       self.contents.clear  
       @total_sec = Graphics.frame_count / Graphics.frame_rate
       contents.clear
       draw_window_content
 end

 #--------------------------------------------------------------------------
 # â— draw_window_content
 #     --> Draw window contents
 #--------------------------------------------------------------------------
 def draw_window_content
       cx = text_size(16).width
       change_color(system_color)
       draw_text(x-190, y, 50, line_height, "Map Name: ")
       change_color(normal_color)
       draw_text(x-125, y, 70, line_height, $game_map.display_name, 2)
       change_color(system_color)
       draw_text(x-190, y+20, 70, line_height, "Party Size: ")
       change_color(normal_color)
       draw_text(x-170, y+20, 70, line_height, $game_party.max_battle_members, 2)
       change_color(system_color)
       draw_text(x-25, y, 50, line_height, "Gold: ")
       change_color(normal_color)
       draw_text(x, y, 70, line_height, $game_party.gold, 2)
       change_color(system_color)
       draw_text(x-25, y+20, 50, line_height, "Steps: ")
       change_color(normal_color)
       draw_text(x, y+20, 70, line_height, $game_party.steps, 2)
 end

 #--------------------------------------------------------------------------
 # â— update
 #     --> update the time
 #     --> if the switch is on, show the window else close it.
 #--------------------------------------------------------------------------
 def update
       super
       sec = (Graphics.frame_count / Graphics.frame_rate) % 1
       if sec > @total_sec % 1 or sec == 0
         refresh
       end
       if $game_switches[iNFO::SWITCH_NUM]
         self.visible = true
       else
         self.visible = false
       end
 end

end


class Scene_Map

 #--------------------------------------------------------------------------
 # â— create_all_windows
 #     --> alias adrein_create_all_windows_add_iyuth6764
 #     --> add create_window_show_infomap to be created on the map.
 #--------------------------------------------------------------------------
 alias adrein_create_all_windows_add_iyuth6764 create_all_windows
 def create_all_windows
   adrein_create_all_windows_add_iyuth6764
   create_window_show_infomap
 end

 #--------------------------------------------------------------------------
 # â— create_window_show_infomap
 #     --> creates a new show_infomap window
 #--------------------------------------------------------------------------
 def create_window_show_infomap
   @show = Window_Show_InfoMap.new
   @show.x = 200
   @show.y = 0
 end

end

 

 

Edited by A.

Share this post


Link to post
Share on other sites

Shoot man, I didn't know you scripted too. Does it always stay on screen or is it timed? Does it open and close with a switch?

It shows everything that you seen at the image. It can't open or close with switchs (from my mind, i tried.) and it stays a whole time (not in the battles.)

Share this post


Link to post
Share on other sites

Shoot man, I didn't know you scripted too. Does it always stay on screen or is it timed? Does it open and close with a switch?

 

If you want I can make it open and close with a switch. But it always stays on the map.

Share this post


Link to post
Share on other sites

ill do it asap and post the results

 

Feature request fulfilled see OP. if you any questions please post. if you have any feature requests please post. if you have any script suggestions please pm me.

Edited by A.

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted