RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Script Fal-MapName, display map name on map!

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 83
Hello people.

Here a script that allow you to display the map name on map with a  handsome fade effect

Intructions: Just copy and paste to your project. yeah! easy like eat a peace of cake, but if you want to configure some thing like the display position you can do it in the module Fal_map_name of the script.

if you want to disable de display window you can activate the switch 50 (by deafault) you can change it.

Ok here the script. remember Just copy and paste to your project!!

Code: [Select]
#=================================================================#
#=================================================================#
#  #*****************#      Display map name on map with fade     #
#  #*** By Falcao ***#      effect. Just copy and paste.          # 
#  #*****************#                 Enjoy!                     #
#         RMVX                                                    #
#=================================================================#

module Fal_map_name
#------------------------------------------------------------------ 
# Window display disable Switch
Disable_window = 50
#------------------------------------------------------------------
# Change display position, you ca choose between two display
# positions, change  1 or 2
#
# 1 = Upper frontal position
# 2 = Lower left
Change_posision = 1
#------------------------------------------------------------------
end

class Window_Nmap < Window_Base
  def initialize
    super(185, -70, 190, 50)
    self.opacity = 200
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.size = 20
    data = load_data("Data/MapInfos.rvdata")
    self.contents.draw_text(0, -7, 150, 32, data[$game_map.map_id].name, 2)
  end
end

class Game_System
  attr_accessor  :fade_time
  alias falcao_fading_initialize initialize
  def initialize
    @fade_time = 0
    falcao_fading_initialize
  end
end

class Scene_Map
  include Fal_map_name
  alias falcaoVX_Mname_main main
  def main
    @map_name = Window_Nmap.new
    if $game_switches[Disable_window] == false
      @map_name.visible = true
    else
      @map_name.visible = false
    end
    if Change_posision == 2
    @map_name.x = -200; @map_name.y = 300
    end
    falcaoVX_Mname_main
    @map_name.dispose
  end
  alias falcaoVX_Mname_update update
  def update
    if $game_switches[Disable_window] == false
      @map_name.visible = true
    else
      @map_name.visible = false
    end
    @map_name.y += 2 if @map_name.y < 0 and Change_posision <= 1
    @map_name.x += 5 if @map_name.x < -4 and Change_posision >= 2
    if $game_system.fade_time == 140
      @map_name.y -= 3 if @map_name.y > -90 and Change_posision <= 1
      @map_name.x -= 7 if @map_name.x < 20 and Change_posision >= 2
      @map_name.contents_opacity -= 5
      @map_name.opacity -= 5
    else
      $game_system.fade_time += 1
    end
      falcaoVX_Mname_update
    end
    alias falcao_transfer_player update_transfer_player
    def update_transfer_player
      @map_name.refresh
      return unless $game_player.transfer?
      @map_name.contents_opacity = 255; @map_name.opacity = 200
      if Change_posision <= 1
        @map_name.x = 185; @map_name.y = -70
      elsif Change_posision >= 2
         @map_name.x = -200; @map_name.y = 300
       end
       $game_system.fade_time = 0
       falcao_transfer_player
     end
   end
 

**
Rep: +0/-0Level 84
very nice script  :D
(vc é brasileiro?)

**
Rep:
Level 83
Thank you!  ;D

Im not brasilero im salvadorean  :D Central America

**
Rep: +0/-0Level 83
Y <3 ?
Silver - GIAW 11 (Normal)
Question please, why do you have this piece in the script?

class Game_System
  attr_accessor  :fade_time
  alias falcao_fading_initialize initialize
  def initialize
    @fade_time = 0
    falcao_fading_initialize
  end
end

What does it do exactly? I am asking because I am trying to use your script and another I made to build my own window inside the Menu that will show you the name of the map you are in and possibly a small description about it for you. But, I am not sure what this part of your script is actually doing for the script itself. Please explain... Thank you.
"If you see it, it is not truly there. If you dream it, it will never appear when you waken. If you love it, it will never leave you. Love him... Though he is not real and though you may never see him when you awaken tomorrow." ~ Sorceress of Gaida, Quote from: Eriscadia - The Fall of Nations
http://rpgmaker.net/games/1352/

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
I'm no pro for scripting, but checkin out those terms in there, I would guess that it defines and initializes the fade on the map name and sets how long it fades for or something like that.

**
Rep: +0/-0Level 83
Y <3 ?
Silver - GIAW 11 (Normal)
So then this would need to be removed for it to show up correctly inside my menu then, am I correct?

(Soooooo sry for all the questions I have been asking in the forums btw, but everyone has been very nice to me and answered all my questions.)  :)   <3   <3   <3
"If you see it, it is not truly there. If you dream it, it will never appear when you waken. If you love it, it will never leave you. Love him... Though he is not real and though you may never see him when you awaken tomorrow." ~ Sorceress of Gaida, Quote from: Eriscadia - The Fall of Nations
http://rpgmaker.net/games/1352/

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
I have no clue what you would need to do with this lol, I was just trying to figure out what it basically means, since that's what you asked. I'm not a scripter hah.

Cool that you're trying to script or get into scripting though. Good luck.

**
Rep: +0/-0Level 83
Y <3 ?
Silver - GIAW 11 (Normal)
"If you see it, it is not truly there. If you dream it, it will never appear when you waken. If you love it, it will never leave you. Love him... Though he is not real and though you may never see him when you awaken tomorrow." ~ Sorceress of Gaida, Quote from: Eriscadia - The Fall of Nations
http://rpgmaker.net/games/1352/

**
Rep:
Level 83
Question please, why do you have this piece in the script?

class Game_System
  attr_accessor  :fade_time
  alias falcao_fading_initialize initialize
  def initialize
    @fade_time = 0
    falcao_fading_initialize
  end
end

What does it do exactly? I am asking because I am trying to use your script and another I made to build my own window inside the Menu that will show you the name of the map you are in and possibly a small description about it for you. But, I am not sure what this part of your script is actually doing for the script itself. Please explain... Thank you.

That part of the script allow you fade the display window,

That work in the map only it is not necessary if you wanna add the map name window to the menu scene