Neo Mode 7 Script by MGCaladtogel
#38
You have to paste your CMS below the map looping feature.

In your CMS, the following code :
Code:
class Scene_Title
  $map_infos = load_data("Data/MapInfos.rxdata")
  for key in $map_infos.keys
    $map_infos[key] = $map_infos[key].name
  end
end
creates a Hash object named "$map_infos" that stores the maps names (from the database) for their ids. As it is directly written in a class and not in a method, this code is executed when the game is launched (the scripts are read from the top to the bottom).
--> it becomes easy to retrieve a map's name by its id to display it in the menu.
"$map_infos[key]" is an instance of the class "RPG::MapInfo", and "$map_infos[key].name" calls the "def name [...]" method in that class.

If this script is above the map looping script, the names in that Hash are full names, including brackets.

But in the map looping script, the "def name [...]" method in the "RPG::MapInfo" class is rewritten, so that all brackets and their contents are removed :
Code:
class RPG::MapInfo
  # defines the map's name as the name without anything within brackets,
  # including brackets
  def name
    return @name.gsub(/\[.*\]/) {""}
  end
[...]
That's why you need to have this code before the creation of the Hash object, and so paste the CMS below the map looping script.
Some scripts :
Working on :
Reply


Messages In This Thread
Neo Mode 7 Script by MGCaladtogel - by MGC - 12-07-2008, 04:13 PM
RE: Neo Mode 7 Script by MGCaladtogel - by Habs11 - 12-06-2010, 06:21 AM
RE: Neo Mode 7 Script by MGCaladtogel - by MGC - 12-06-2010, 11:57 AM
RE: Neo Mode 7 Script by MGCaladtogel - by Habs11 - 12-07-2010, 01:53 AM
RE: Neo Mode 7 Script by MGCaladtogel - by MGC - 12-07-2010, 09:00 AM
RE: Neo Mode 7 Script by MGCaladtogel - by Habs11 - 12-08-2010, 04:16 AM
RE: Neo Mode 7 Script by MGCaladtogel - by MGC - 09-26-2011, 08:58 PM
RE: Neo Mode 7 Script by MGCaladtogel - by MGC - 09-27-2011, 04:04 PM
RE: Neo Mode 7 Script by MGCaladtogel - by MGC - 09-30-2011, 08:37 PM
RE: Neo Mode 7 Script by MGCaladtogel - by MGC - 03-08-2012, 08:34 PM
RE: Neo Mode 7 Script by MGCaladtogel - by MGC - 03-28-2012, 04:35 PM
RE: Neo Mode 7 Script by MGCaladtogel - by Taylor - 04-09-2012, 05:26 AM
RE: Neo Mode 7 Script by MGCaladtogel - by MGC - 05-09-2012, 07:19 AM
RE: Neo Mode 7 Script by MGCaladtogel - by Zohran - 08-04-2012, 03:59 PM
Neo Mode 7 Script by MGCaladtogel - by ozer - 09-12-2009, 04:08 PM
Neo Mode 7 Script by MGCaladtogel - by baddog - 03-07-2010, 06:20 PM
Neo Mode 7 Script by MGCaladtogel - by Ace - 03-07-2010, 06:21 PM
Neo Mode 7 Script by MGCaladtogel - by Villain - 03-09-2010, 05:23 PM
Neo Mode 7 Script by MGCaladtogel - by Ace - 03-10-2010, 07:58 AM
Neo Mode 7 Script by MGCaladtogel - by Villain - 03-10-2010, 08:31 AM
Neo Mode 7 Script by MGCaladtogel - by Villain - 03-10-2010, 09:46 AM
Neo Mode 7 Script by MGCaladtogel - by Villain - 03-17-2010, 09:13 PM
Neo Mode 7 Script by MGCaladtogel - by adrienk - 03-26-2010, 03:38 AM
Neo Mode 7 Script by MGCaladtogel - by PK8 - 03-26-2010, 04:28 AM
Neo Mode 7 Script by MGCaladtogel - by Villain - 03-26-2010, 03:46 PM
Neo Mode 7 Script by MGCaladtogel - by PK8 - 03-26-2010, 06:02 PM
Neo Mode 7 Script by MGCaladtogel - by Naridar - 03-29-2010, 04:48 PM
Neo Mode 7 Script by MGCaladtogel - by MGC - 03-29-2010, 07:12 PM
Neo Mode 7 Script by MGCaladtogel - by Naridar - 03-30-2010, 03:14 PM
Neo Mode 7 Script by MGCaladtogel - by MGC - 03-30-2010, 06:06 PM
Neo Mode 7 Script by MGCaladtogel - by Naridar - 03-31-2010, 08:44 PM
Neo Mode 7 Script by MGCaladtogel - by MGC - 06-18-2010, 06:49 AM
Neo Mode 7 Script by MGCaladtogel - by Habs11 - 06-28-2010, 10:12 PM
Neo Mode 7 Script by MGCaladtogel - by MGC - 06-29-2010, 07:20 PM
Neo Mode 7 Script by MGCaladtogel - by Habs11 - 06-29-2010, 09:33 PM
Neo Mode 7 Script by MGCaladtogel - by MGC - 06-30-2010, 07:33 PM
Neo Mode 7 Script by MGCaladtogel - by Habs11 - 06-30-2010, 10:55 PM
Neo Mode 7 Script by MGCaladtogel - by MGC - 07-01-2010, 06:51 AM
Neo Mode 7 Script by MGCaladtogel - by Habs11 - 07-03-2010, 03:00 AM
Neo Mode 7 Script by MGCaladtogel - by MGC - 07-06-2010, 08:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Script Commands Bug Fixes kyonides 2 865 02-27-2025, 07:24 AM
Last Post: kyonides
   The Steal and Peep Script DerVVulfman 12 2,233 02-19-2025, 07:20 AM
Last Post: Ace_V
   Text Scroll Script - Enhanced DerVVulfman 23 37,906 02-18-2021, 04:16 AM
Last Post: DerVVulfman
   Cursor Script Selwyn 7 17,059 09-28-2019, 02:13 PM
Last Post: DerVVulfman
   ACBS FIX SCRIPT #2: Advanced Cry Correction DerVVulfman 1 5,398 08-09-2019, 03:42 PM
Last Post: aeliath
   ACBS FIX SCRIPT #1: Victory Cries Patch DerVVulfman 1 5,574 08-08-2019, 02:53 PM
Last Post: aeliath
   Spritesheet Generator Conversion Script DerVVulfman 0 4,880 11-21-2018, 04:48 AM
Last Post: DerVVulfman
   Longer Script Calls LiTTleDRAgo 0 5,439 05-17-2017, 12:36 AM
Last Post: LiTTleDRAgo
   SLOLS: Snake Look-alike on Load Script Zeriab 3 12,330 05-14-2017, 06:25 PM
Last Post: LiTTleDRAgo
   Character Select Script Selwyn 3 11,797 03-07-2017, 04:14 AM
Last Post: JayRay



Users browsing this thread: 2 Guest(s)