Disc Changer
Version: 1.05
Introduction
This script allows you to change discs where each disc can contain 999 maps.
The transitions between each disc works seamlessly just like a normal transfer.
Demo
http://www.mediafire.com/?mymituktnto
Script
Installation
Paste the script just above main.
IF you have the SDK then you are done.
If you do NOT have the SDK:
Find Game_Map in the script editor.
Go to the setup method to around line 50 (assuming the default script)
It should look like this:
Change the second line so the end result is this:
You have now installed the script.
Instructions
To create a disc you must create a subfolder in the Data folder called Disc1 for disc 1, Disc2 for disc 2 and so on. In general Disc#. (You should be perfectly able to do Disc14 and so on.)
Then put the maps you want in that subfolder.
When you have done this you can use the instructions in the script header for changing the disc. (The script call is the event command on the third page, bottom-right)
Note that disc 0 is special in that it uses the maps directly in the data folder and not Disc0. These are the maps you can see in the editor.
You could have a project for each disc. That way it's easier to change the maps on each disc any time you want. Just copy paste the changes into the main project when you have made the changes. You can also just copy the other .rxdata files from the main project into the disc project for making sure the rest of the database and scripts are the same in each project.
Version 1.05:
You can now call the change_disc method with a string instead of a number of the disc. In this case the folder with the given name will be used.
Q&A's
None so far
Compatibility
This is probably not compatible with scripts that reads MapInfos.rxdata and displays the names of each map.
You must alter those scripts so it reads the MapInfos.rxdata for the corresponding disc.
You can try to find the place with load_data("Data/MapInfos.rxdata") and change it to
this:
Credits and Thanks
Thanks goes to Legend of Harpine for which this was originally designed.
Credits goes to Zeriab for writing the script.
Special thanks goes to Kain Nobel
I would like to thank everyone using their time to try and use my system.
I would like to thank everyone reading this topic.
Thanks.
Terms and Conditions
Author's Notes
I would be delighted if you report any bug, errors or issues you find.
In fact I would be delighted if you took the time and replied even if you have nothing to report.
Suggestions are more than welcome
And finally: ENJOY!
- Zeriab
Version: 1.05
Introduction
This script allows you to change discs where each disc can contain 999 maps.
The transitions between each disc works seamlessly just like a normal transfer.
Demo
http://www.mediafire.com/?mymituktnto
Script
Ruby:
#==============================================================================
# ** Disc Changer script (Designed for Legend of Harpine)
#------------------------------------------------------------------------------
# Zeriab
# 1.05
# 2008-09-20
#------------------------------------------------------------------------------
# Allows you to change the disc, where each disc can contain 999 maps
#==============================================================================
<span style="color:#000080; font-style:italic;">=begin
<span style="color:#000080; font-style:italic;">INSTRUCTIONS
<span style="color:#000080; font-style:italic;">------------
<span style="color:#000080; font-style:italic;">If you do not have the SDK then you have to change Game_Map
<span style="color:#000080; font-style:italic;">In the Game_Map setup method change the load_data line to this: (Line 50)
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;"> # Load map from file and set @map
<span style="color:#000080; font-style:italic;"> @map = load_data(sprintf("Data/%sMap%03d.rxdata", $game_system.disc, @map_id))
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;">After you have done this the below will work.
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;">This script enables the change_disc command. Use script calls to change the disc.
<span style="color:#000080; font-style:italic;">For disc 1 create a subfolder in your data folder called 'disc1' and place the
<span style="color:#000080; font-style:italic;">map files for disc 1 in there.
<span style="color:#000080; font-style:italic;">For disc 2 you should create a subfolder called 'disc2' and place the map files
<span style="color:#000080; font-style:italic;">for disc 2 in there. And so on for each of your discs.
<span style="color:#000080; font-style:italic;">The syntax is:
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;"> change_disc(number, id = nil, x = nil, y = nil, direction = nil)
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;">The nil numbers mean that those arguments are optional. When you don't use them
<span style="color:#000080; font-style:italic;">then they are set to whatever the current map_id, x, y and direction are at the
<span style="color:#000080; font-style:italic;">moment.
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;">If you want to change to disc 2 then you can put this in a script call:
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;"> change_disc(2)
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;">You will then be transfered to disc 2 with the same map id and coordinates as
<span style="color:#000080; font-style:italic;">what the player currently has.
<span style="color:#000080; font-style:italic;">If you want to be more precise and say you want to change to disc 2 on the map
<span style="color:#000080; font-style:italic;">with id 10 and the player must be placed at the tile with x = 6 and y = 13 then
<span style="color:#000080; font-style:italic;">you should put this in a call script:
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;"> change_disc(2, 10, 6, 13)
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;">Note that when you start the game the maps directly in the data folder is used.
<span style="color:#000080; font-style:italic;">You can back to them by changing to disc number 0.
<span style="color:#000080; font-style:italic;">Basically, disc number 0 is the maps directly in the data folder and not in any
<span style="color:#000080; font-style:italic;">of the sub folders.
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;">The final argument is the direction. By default the player retains the current
<span style="color:#000080; font-style:italic;">direction. You can put 6 different values as direction:
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;">0, 10 : No change
<span style="color:#000080; font-style:italic;">2 : Turn Down
<span style="color:#000080; font-style:italic;">4 : Turn Left
<span style="color:#000080; font-style:italic;">6 : Turn Right
<span style="color:#000080; font-style:italic;">8 : Turn Up
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;">If you for example want to transfer the player to disc 1, map 43 at x = 30 and
<span style="color:#000080; font-style:italic;">y = 4 with the player looking down you should put this in a call script:
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;"> change_disc(1, 43, 30, 4, 2)
<span style="color:#000080; font-style:italic;">
<span style="color:#000080; font-style:italic;">*hugs*
<span style="color:#000080; font-style:italic;"> - Zeriab
<span style="color:#000080; font-style:italic;">=end
class Game_System
attr_writer :disc
def disc
@disc ||= ''
@disc
end
end
class Game_Temp
attr_accessor :disc_changing
end
class Game_Map
attr_writer :map_id
if Module.constants.include?('SDK')
def setup_load
# Load map from file and set @map
@map = load_data(sprintf("Data/%sMap%03d.rxdata", $game_system.disc, @map_id))
end
end
end
def change_disc(number, id = nil, x = nil, y = nil, direction = nil)
# Change disc
if number.is_a?(Integer)
$game_system.disc = "disc#{number}/"
else
disc = number.to_s
disc += '/' unless disc[-1] == 47
$game_system.disc = disc
end
# Process arguments
map_id = id.is_a?(Integer) ? id : $game_map.map_id
x = $game_player.x unless x.is_a?(Integer)
y = $game_player.y unless y.is_a?(Integer)
direction = $game_player.direction unless direction.is_a?(Integer)
# Set transferring player flag
$game_temp.player_transferring = true
# Set transferring player flag
$game_temp.disc_changing = true
# Set player move destination
$game_temp.player_new_map_id = map_id
$game_temp.player_new_x = x
$game_temp.player_new_y = y
$game_temp.player_new_direction = direction
# Change the current map id in case the new and old are identical.
$game_map.map_id = 0
end
Installation
Paste the script just above main.
IF you have the SDK then you are done.
If you do NOT have the SDK:
Find Game_Map in the script editor.
Go to the setup method to around line 50 (assuming the default script)
It should look like this:
Ruby:
# Load map from file and set @map
@map = load_data(sprintf("Data/Map%03d.rxdata", @map_id))
Change the second line so the end result is this:
Ruby:
# Load map from file and set @map
@map = load_data(sprintf("Data/%sMap%03d.rxdata", $game_system.disc, @map_id))
You have now installed the script.
Instructions
To create a disc you must create a subfolder in the Data folder called Disc1 for disc 1, Disc2 for disc 2 and so on. In general Disc#. (You should be perfectly able to do Disc14 and so on.)
Then put the maps you want in that subfolder.
When you have done this you can use the instructions in the script header for changing the disc. (The script call is the event command on the third page, bottom-right)
Note that disc 0 is special in that it uses the maps directly in the data folder and not Disc0. These are the maps you can see in the editor.
You could have a project for each disc. That way it's easier to change the maps on each disc any time you want. Just copy paste the changes into the main project when you have made the changes. You can also just copy the other .rxdata files from the main project into the disc project for making sure the rest of the database and scripts are the same in each project.
Version 1.05:
You can now call the change_disc method with a string instead of a number of the disc. In this case the folder with the given name will be used.
Q&A's
None so far
Compatibility
This is probably not compatible with scripts that reads MapInfos.rxdata and displays the names of each map.
You must alter those scripts so it reads the MapInfos.rxdata for the corresponding disc.
You can try to find the place with load_data("Data/MapInfos.rxdata") and change it to
this:
Ruby:
load_data(sprintf("Data/%sMapInfos.rxdata", $game_system.disc))
Credits and Thanks
Thanks goes to Legend of Harpine for which this was originally designed.
Credits goes to Zeriab for writing the script.
Special thanks goes to Kain Nobel
I would like to thank everyone using their time to try and use my system.
I would like to thank everyone reading this topic.
Thanks.
Terms and Conditions
Copyright (C) 2008 Zeriab
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version with an additional restriction for commercial projects:
Credits must be given to Zeriab.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser Public License for more details.
For the full license see
The GNU General Public License: http://www.gnu.org/licenses/gpl.txt
The GNU Lesser General Public License: http://www.gnu.org/licenses/lgpl.txt
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version with an additional restriction for commercial projects:
Credits must be given to Zeriab.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser Public License for more details.
For the full license see
The GNU General Public License: http://www.gnu.org/licenses/gpl.txt
The GNU Lesser General Public License: http://www.gnu.org/licenses/lgpl.txt
Author's Notes
I would be delighted if you report any bug, errors or issues you find.
In fact I would be delighted if you took the time and replied even if you have nothing to report.
Suggestions are more than welcome
And finally: ENJOY!
- Zeriab