Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Graphical Location Name for Maps?[XP] (Like Mog's VXversion)

Script Request Template
This is a request for a new script, an edit or debug of an existing script.

How I'm requestioning a script that is basically what Mog's Map Location Script does, which is display a picture (graphic you place in a specific folder) and the maps name. He created a version for VX but I can't seem to find one for the XP anywhere?!!? He created various scripts for the Menu's for XP so I'm guessing the XP version of the Map Location might exist too. if you know where to find this please let me know, you would be so awesome, and i could possibly create a custom character spritesheet for you ^^ thanks in advance!
 
I have that kinda script here, it's not MOG's But it does exactly what you said up there.
Code:
#==============================================================================

# Location Names with Pictures or Text by Blizzard

# Version: 2.11b

# Type: Game Playability Improvement

# Date: 14.11.2006

# Date v2.1b: 7.7.2007

# Date v2.11b: 30.7.2007

# 

# NOTE: This script WILL corrupt old savegames!

# 

# Instructions:

#   Connect map IDs with picture names. All pictures MUST be in the the Names

#   folder in your picture folder. If you don't have a picture, the map name

#   will be written out using the default text engine from RMXP. Please set up

#   the font you wish the text to be displayed in this case.

#==============================================================================

 

LOCATION_FONT = 'Verdana'

LOCATION_SIZE = 32

LOCATION_BOLD = true

LOCATION_ITALIC = false

LOCATION_COLOR = Color.new(255, 255, 255) # Color.new(R, G, B, A)

DISPLAY_TIME = 4 # in seconds

 

#==============================================================================

# Game_System

#==============================================================================

 

class Game_System

  

  attr_accessor :map_name_id

  attr_accessor :name_timer

  

  alias init_names_later initialize

  def initialize

    init_names_later

    @map_name_id = 0

    @name_timer = 0

  end

  

end

 

#==============================================================================

# Name_Sprite

#==============================================================================

 

class Name_Sprite < Sprite

  

  attr_accessor :timer

  

  def initialize

    super

    if $game_system.map_name_id == $game_map.map_id

      @timer = $game_system.name_timer

    else

      @timer = 0

    end

    if @timer < 16

      self.opacity = @timer * 15

    elsif @timer > 16 + 20 * DISPLAY_TIME

      self.opacity = 255 - (@timer - 16 - 20 * DISPLAY_TIME)* 15

    end

    $game_system.map_name_id = $game_map.map_id

    self.z = 6000

    self.bitmap = get_image($game_map.map_id)

    self.bitmap == nil ? self.dispose : self.x = 640 - self.bitmap.width

  end

  

  def get_image(id)

    case id

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# START of Database

# 

#   Use this template to configure this add-on:

# 

#     when ID then name = 'FILE_NAME'

#   

#   ID - map ID where the picture should be displayed

#   FILE_NAME - the file name of the picture file in the Pictures/Names folder

# 

#   If you don't have a picture and want the name displayed anyway, please use:

# 

#     when ID then name = nil

# 

#   Instead of an image normal text will be displayed in the chosen font.

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

    when 1 then name = 'Map1.png'

    when 3, 4 then name = nil

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# END of Database

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

    else

      return nil

    end

    if name == nil

      bitmap = Bitmap.new(1, 1)

      bitmap.font.name = LOCATION_FONT

      bitmap.font.size = LOCATION_SIZE

      w = bitmap.text_size($game_map.name).width + 40

      bitmap.dispose

      bitmap = Bitmap.new(w, LOCATION_SIZE + 16)

      bitmap.font.name = LOCATION_FONT

      bitmap.font.size = LOCATION_SIZE

      bitmap.font.bold = LOCATION_BOLD

      bitmap.font.italic = LOCATION_ITALIC

      bitmap.font.color = LOCATION_COLOR

      bitmap.draw_text(0, 8, w, LOCATION_SIZE + 8, $game_map.name, 1)

    else

      bitmap = RPG::Cache.picture("Names\\#{name}")

    end

    return bitmap

  end

  

  def dispose

    $game_system.name_timer = @timer

    super

  end

  

end

 

#==============================================================================

# Spriteset_Map

#==============================================================================

 

class Spriteset_Map

  

  attr_accessor :name

  

  alias init_name_later initialize

  def initialize

    init_name_later

    @name = Name_Sprite.new if $game_system.LOCATION_NAMES

  end

  

  alias upd_name_later update

  def update

    if @name != nil 

      unless @name.disposed?

        @name.timer += 1

        @name.opacity += 15 if @name.timer < 16

        @name.opacity -= 15 if @name.timer > 16 + 20 * DISPLAY_TIME

        if @name.opacity == 0

          @name.dispose

          @name = nil

        end

      else

        @name = nil

      end

    end

    upd_name_later

  end

  

  alias dispose_name_later dispose

  def dispose

    dispose_name_later

    unless @name == nil

      $game_system.name_timer = @name.timer

      @name.dispose

    end

    @name = nil

  end

  

end

 

#============================================================================== 

# Scene_Title

#============================================================================== 

 

class Scene_Title

 

  alias main_location_later main

  def main

    $map_infos = load_data('Data/MapInfos.rxdata')

    for key in $map_infos.keys

      $map_infos[key] = $map_infos[key].name

    end

    main_location_later

  end

  

end

 

#============================================================================== 

# Game_Map 

#============================================================================== 

 

class Game_Map

        

  def name

    return $map_infos[@map_id]

  end

   

end

 
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top