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.
Player-Named Maps

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Player-Named Maps
Version: 1.0
Author: modern algebra
Date: December 8, 2009

Version History


  • <Version 1.0> 12.08.2009 - Original Release

Description


This was a bizarre request and very close to useless, but basically this script allows you to call a scene that lets the player change the name of the maps. It only really makes sense if you have another script that actually shows the names of the maps in-game. It might be useful for a stronghold or something.

Features

  • Allows the player to name maps, so it might be good for a stronghold or something of that sort
  • Uses a dummy actor, which means you would be able to import 96x96 pictures of landscapes and import them as facesets and use them to represent the map in the naming screen
  • Exact same setup as the regular Input Hero Name scene

Screenshots

It looks the exact same as the Input Hero Name screen, and probably would even if you had a custom Input Name script.

Instructions

Place this script in your editor, above Main and below the default scripts

To call the map naming scene, use this code in a call script:
      
Code: [Select]
call_map_name (map_id, max_chars)
       map_id    : the ID of the map you want the player to name
        max_chars : the maximum number of characters for the name. This
          defaults to 10 if not set by you.

See the header for further instructions.

Script


Code: [Select]
#==============================================================================
#    Player-Named Maps
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#    Date: December 8, 2009
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#    This script allows you to call a scene that lets the player change the
#   name of the maps. It only really makes sense if you have another script
#   that shows the names of the maps.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#    Place this script in your editor, above Main and below the default scripts
#
#    To call the map naming scene, use this code in a call script:
#      call_map_name (map_id, max_chars)
#        map_id    : the ID of the map you want the player to name
#        max_chars : the maximum number of characters for the name. This
#          defaults to 10 if not set by you.
#
#    This script requires you to have a dummy actor who never appears in the
#   game and ought not be setup - it is his face graphic that will show up in
#   the map naming screen, so if you wanted to have the map represented by a
#   96x96 graphic you could import it as a face graphic and set it on the dummy
#   actor immediately prior to calling the map naming screen. Otherwise leave
#   it blank. To set the ID for that actor, go to line 45 and change the number
#   to the ID of that dummy actor. You may also determine whether you want the
#   database name of the map to initially show up while setting the name or
#   whether you just want it to be blank at line 48
#==============================================================================

#==============================================================================
# ** RPG::MapInfo
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new constant - MAMN_DUMMY_ACTOR
#    aliased method - name
#==============================================================================

class RPG::MapInfo
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * CONSTANT
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # Set this value to the ID of an actor to use as a dummy while naming maps
  MAMN_DUMMY_ACTOR = 9  
  # The following determines whether the naming scene starts by showing the
  #  database name or whether it starts blank
  MAMN_SHOW_CURRENT_NAME = true
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Name
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malg_jtswyr_namemps_7yu2 name
  def name (*args)
    real_name = malg_jtswyr_namemps_7yu2 (*args)
    return $game_system.ma_map_names[real_name] unless $game_system.nil? ||
                                      $game_system.ma_map_names[real_name].nil?
    return real_name
  end
end

#==============================================================================
# ** Game_System
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new public instance variable - ma_map_names, ma_map_name_id
#    aliased method - initialize
#==============================================================================

class Game_System
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_reader   :ma_map_names
  attr_accessor :ma_map_name_id
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialize
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias ma_jsswyr_intlz_mpnmes_9kb3 initialize
  def initialize (*args)
    @ma_map_names = {}                  # Initialize Map name hash
    @ma_map_name_id = 1
    ma_jsswyr_intlz_mpnmes_9kb3 (*args) # Run Original Method
  end
end

#==============================================================================
# ** Game_Interpreter
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new method - call_map_name
#==============================================================================

class Game_Interpreter
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Call Map Name
  #    map_id : ID of map to name
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def call_map_name (map_id, max_chars = 10)
    $game_system.ma_map_name_id = map_id
    $game_temp.name_max_char = max_chars
    $scene = Scene_MapName.new
  end
end

#==============================================================================
# ** Scene_MapName
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Subclass of Scene_Name
#  altered methods - start, return_scene
#==============================================================================

class Scene_MapName < Scene_Name
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Start Processing
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def start (*args)
    @map_id = $game_system.ma_map_name_id
    $game_temp.name_actor_id = RPG::MapInfo::MAMN_DUMMY_ACTOR
    $game_actors[$game_temp.name_actor_id].name = ""
    if RPG::MapInfo::MAMN_SHOW_CURRENT_NAME
      db_name = load_data ("Data/MapInfos.rvdata")[@map_id].name
      cnt_name = $game_system.ma_map_names[db_name]
      $game_actors[$game_temp.name_actor_id].name = cnt_name.nil? ? db_name : cnt_name
    end
    super (*args)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Return Scene
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def return_scene (*args)
    map_name = load_data ("Data/MapInfos.rvdata")[@map_id].name
    $game_system.ma_map_names[map_name] = @actor.name
    super (*args)
  end
end

Credit


  • modern algebra

Thanks

  • justSawyer, for the request

Support


Please post in this topic at rmrk.net for the swiftest response. Do not PM me.

Known Compatibility Issues

No currently known compatibility issues

Demo


No need for a demo. It looks and operates the same as the Input Hero Name scene, and to call it, all you need to do is follow the simple instructions


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
« Last Edit: February 11, 2010, 09:37:40 PM by Modern Algebra »

**
Rep: +0/-0Level 83
This is actually fairly useful, and can be used to do some fairly creative things in a game.  Thanks modern!

**
Rep: +0/-0Level 82
Sorry for making another request >.>"

but can you make an option to rename the maps without player inputs?

my idea is to make an iten that calls a custom event and let the player rename the map he was when he used the iten

btw, i need a way to put "blank" names on the maps so the player cant see any name in the menu till he puts his own map name

=====
if he's on map 1 and map 1 name is "Ahllaria 1-1" this name will appear in the menu... i don't want to show the name of the map till the player discover the name or rename the map himself

puting a "blank" name and a script call to change name without input, i can make the npcs tell the name of the city or map the player is at the moment and make the system memorize that he heard the name of the map

====

xD hope you do understand what i mean

**
Rep: +0/-0Level 73
Master Shinji, of the Soulmancy Discipline
Terribly sorry for the Necro-post, but as I was Perusing the script database I noticed this and thought,  "Now that VXA has been released this script would be exponentially more useful." Per-chance could you craft a VXA-friendly version? If you already have then I have not found it, and I'm sorry for not looking harder. Thanks, SDA
Mankind has ever shunned, even persecuted, that of which they have no understanding.



***
Rep:
Level 77
RMRK Junior

**
Rep: +0/-0Level 73
Master Shinji, of the Soulmancy Discipline
At first I couldn't comprehend why that would be a solution... then it hit me. Are you saying I should use a dummy actor to represent the Fort and then have the message code display the name of the map under "Display Name?" Or am I over-thinking it?
Mankind has ever shunned, even persecuted, that of which they have no understanding.



***
Rep:
Level 77
RMRK Junior
At first I couldn't comprehend why that would be a solution... then it hit me. Are you saying I should use a dummy actor to represent the Fort and then have the message code display the name of the map under "Display Name?" Or am I over-thinking it?

That's basically it. This VX script uses a dummy actor anyway. Dummy actors can be quite useful.