BigKevSexyMan
Member
First Person RPG
Version: 1.0
By: BigKevSexyMan
Introduction
Every play games like Sword of Vermillion and Shining in the Darkness? All the dungeons and world map was completely in first person. Now, your game can have that simulated 3d smell to it. And on RMXP that smells good.
Features
http://img.photobucket.com/albums/v603/ ... nshot1.png[/img]
How the map looks to the editor.
http://img.photobucket.com/albums/v603/ ... nshot2.png[/img]
Typical first person view.
http://img.photobucket.com/albums/v603/ ... nshot3.png[/img]
A battle right on the map.
http://img.photobucket.com/albums/v603/ ... nshot4.png[/img]
An event on the map.
Demo
No demo, currently. I'm sick of the file service I use where if no one downloads it, then it'll get deleted.
Found one, Box.net. http://www.box.net/public/lquf58l879
Script
You'll also have to download my Free Picture Movement script located here.
I got a great suggestion from AceJP to use Squall's minimap script. You can get it here.
Instructions
First, copy and paste the necessary scripts directly above Main. Then, download the graphics pack located here. Upload all the pictures and tilesets to their right places. Now, go to your database and into the tilesets tab. Set the tilesets up and click the terrain button. The terrains should go like this 01234567. There should never be anything in the zero slot of the tileset.
If you do not wish to use the graphics I included(I know you won't) then I'd better tell you about the dimensions. Tilesets need only be one row big, bringing them to 256x32 pixels big. The pictures that the player sees are called pop-ups. All pop-ups need to fit within a 320x440. Backgrounds are 1280x480. How you add those classes will take a tiny bit of scripting, but I tried my best to simplify it as much as possible for you. It's all explained in the comments, and it right at the top of the script.
Finally, to activate the script you have to use an auto-start event. Using the call script command copy in the following code:
To turn off all you have to do is change true to false.
Credits and Thanks
Credit's to me and WaroftheMagi.com for being there for me.
Author's Notes
Templates of the correct tilesets and pop-ups are included in the graphics pack. If you have any questions then email me at BigKevSexyMan@gmail.com .
Version: 1.0
By: BigKevSexyMan
Introduction
Every play games like Sword of Vermillion and Shining in the Darkness? All the dungeons and world map was completely in first person. Now, your game can have that simulated 3d smell to it. And on RMXP that smells good.
Features
- On/Off capabilities
- First person view
- On map battles
- Easy designer interface
http://img.photobucket.com/albums/v603/ ... nshot1.png[/img]
How the map looks to the editor.
http://img.photobucket.com/albums/v603/ ... nshot2.png[/img]
Typical first person view.
http://img.photobucket.com/albums/v603/ ... nshot3.png[/img]
A battle right on the map.
http://img.photobucket.com/albums/v603/ ... nshot4.png[/img]
An event on the map.
Demo
No demo, currently. I'm sick of the file service I use where if no one downloads it, then it'll get deleted.
Found one, Box.net. http://www.box.net/public/lquf58l879
Script
Code:
# ----------------------------------------------------------------
# Script Name: First Person RPG
# Created by: BigKevSexyMan
# Finished by: 7/28/06
# Updated by: 8/2/06
# ----------------------------------------------------------------
class First_Person
attr_accessor :transition
attr_accessor :moving
attr_accessor :updating
# Picture Positions
# 12 13 14 15 16 17 18
# 7 8 9 10 11
# 4 5 6
# 1 2 3
# P
# These are the number and rough placement of the images that will be used.
# There are a total of eighteen. This is the placement of the images from the forwards perspective.
def designer_modifications_tiles
# This method is meant to establish what bitmaps will be used for all the images.
# This method should be the ONLY thing you should modify.
# First we cycle through all the images
for i in 1...55
case $game_map.tileset_name # Next, we check to see what tileset is being used.
when "FPRPG_Caves" # By tileset I mean the image file in your import folder being used.
# The corresponding background to the tileset.
@background.bitmap = RPG::Cache.picture("backgroundCaves")
@transition = "backgroundCaves"
case $game_map.terrain_tag(@positionX[i], @positionY[i])
# Next, we establish the terrain of slots one through eighteen.
# Terrain establishes what specific bitmap to use.
# You can only use up to 7 terrains on a tileset.
when 1 # Terrain Tag 1
@image[i].bitmap = RPG::Cache.picture("CaveWall")
@graphic[i] = "CaveWall"
when 2 # Terrain Tag 2
@image[i].bitmap = RPG::Cache.picture("Rock")
@graphic[i] = "Rock"
when 3 # Terrain Tag 3
@image[i].bitmap = RPG::Cache.picture("Mushrooms")
@graphic[i] = "Mushrooms"
when 4 # Terrain Tag 4
@image[i].bitmap = RPG::Cache.picture("CaveEnt")
@graphic[i] = "CaveEnt"
else
@image[i].bitmap = nil
@graphic[i] = nil
end
when "FPRPG_Forest"
@background.bitmap = RPG::Cache.picture("backgroundForest")
@transition = "backgroundForest"
case $game_map.terrain_tag(@positionX[i], @positionY[i])
when 1 # Terrain Tag 1
@image[i].bitmap = RPG::Cache.picture("Tree")
@graphic[i] = "Tree"
when 2 # Terrain Tag 2
@image[i].bitmap = RPG::Cache.picture("Grass")
@graphic[i] = "Grass"
when 3 # Terrain Tag 3
@image[i].bitmap = RPG::Cache.picture("DeadTree")
@graphic[i] = "DeadTree"
when 4 # Terrain Tag 4
@image[i].bitmap = RPG::Cache.picture("Flowers")
@graphic[i] = "Flowers"
when 5 # Terrain Tag 5
@image[i].bitmap = RPG::Cache.picture("CaveEnt")
@graphic[i] = "CaveEnt"
when 6 # Terrain Tag 6
@image[i].bitmap = RPG::Cache.picture("CaveWall")
@graphic[i] = "CaveWall"
else
@image[i].bitmap = nil
@graphic[i] = nil
end
end
end
end
def designer_modifications_events
# Now we determine if there are any events that you want to show up.
for i in 1...55
@events[i].bitmap = nil
@event_graphic[i] = nil
for k in 1...$game_map.events.size+1
if $game_map.events[k] != nil
# Checking to see if those events are in any of the designated slots
if $game_map.events[k].x == @event_positionX[i]
if $game_map.events[k].y == @event_positionY[i]
# Checking the name of each event. These can be reused from map to map,
# but be sure not to put two "Treasure1"s on the same map or bugs will occur.
case $game_map.events[k].event.name
# Switch based events are kinda tricky to do.
# Just remember that we cannot see the actual map.
# Simply have the event facing down for the normal, and
# change the events direction when something has happened.
# 2 = down, 4 = left, 6 = right, 8 = up
# Keep in mind that you must use the $fprpg.refesh line using the call script
# command every time you change an events graphic
when "Treasure1"
if $game_map.events[k].direction == 8
@events[i].bitmap = RPG::Cache.picture("ChestOpen")
@event_graphic[i] = "ChestOpen"
elsif $game_map.events[k].direction == 2
@events[i].bitmap = RPG::Cache.picture("ChestClosed")
@event_graphic[i] = "ChestClosed"
end
when "Treasure2"
if $game_map.events[k].direction == 8
@events[i].bitmap = RPG::Cache.picture("ChestOpen")
@event_graphic[i] = "ChestOpen"
elsif $game_map.events[k].direction == 2
@events[i].bitmap = RPG::Cache.picture("ChestClosed")
@event_graphic[i] = "ChestClosed"
end
when "Treasure3"
if $game_map.events[k].direction == 8
@events[i].bitmap = RPG::Cache.picture("ChestOpen")
@event_graphic[i] = "ChestOpen"
elsif $game_map.events[k].direction == 2
@events[i].bitmap = RPG::Cache.picture("ChestClosed")
@event_graphic[i] = "ChestClosed"
end
# Non-changing events aren't as tough to set up.
when "Sage"
@events[i].bitmap = RPG::Cache.picture("Sage")
@event_graphic[i] = "Sage"
else
@events[i].bitmap = nil
@event_graphic[i] = nil
end
@event_picture_id[k] = i
end
end
end
end
end
end
def initialize # Declaring all the images being used.
@background = Sprite.new
@background.z = 50
@event_picture_id = []
@graphic = []
@image = []
for i in 1...55
@image[i] = Sprite.new
end
@event_graphic = []
@events = []
for i in 1...55
@events[i] = Sprite.new
end
refresh
refresh_events
end
def image_positions(direction, start)
case direction
when "up"
@positionX[start] = $game_player.x - 1
@positionX[start+1] = $game_player.x
@positionX[start+2] = $game_player.x + 1
@positionX[start+3] = $game_player.x - 1
@positionX[start+4] = $game_player.x
@positionX[start+5] = $game_player.x + 1
@positionX[start+6] = $game_player.x - 2
@positionX[start+7] = $game_player.x - 1
@positionX[start+8] = $game_player.x
@positionX[start+9] = $game_player.x + 1
@positionX[start+10] = $game_player.x + 2
@positionX[start+11] = $game_player.x - 3
@positionX[start+12] = $game_player.x - 2
@positionX[start+13] = $game_player.x - 1
@positionX[start+14] = $game_player.x
@positionX[start+15] = $game_player.x + 1
@positionX[start+16] = $game_player.x + 2
@positionX[start+17] = $game_player.x + 3
@q = 1
for i in start...start+18
@positionY[i] = $game_player.y - @q
if i == start+2 or i == start+5 or i == start+10
@q += 1
end
end
when "down"
@positionX[start] = $game_player.x + 1
@positionX[start+1] = $game_player.x
@positionX[start+2] = $game_player.x - 1
@positionX[start+3] = $game_player.x + 1
@positionX[start+4] = $game_player.x
@positionX[start+5] = $game_player.x - 1
@positionX[start+6] = $game_player.x + 2
@positionX[start+7] = $game_player.x + 1
@positionX[start+8] = $game_player.x
@positionX[start+9] = $game_player.x - 1
@positionX[start+10] = $game_player.x - 2
@positionX[start+11] = $game_player.x + 3
@positionX[start+12] = $game_player.x + 2
@positionX[start+13] = $game_player.x + 1
@positionX[start+14] = $game_player.x
@positionX[start+15] = $game_player.x - 1
@positionX[start+16] = $game_player.x - 2
@positionX[start+17] = $game_player.x - 3
@q = 1
for i in start...start+18
@positionY[i] = $game_player.y + @q
if i == start+2 or i == start+5 or i == start+10
@q += 1
end
end
when "left"
@positionY[start] = $game_player.y + 1
@positionY[start+1] = $game_player.y
@positionY[start+2] = $game_player.y - 1
@positionY[start+3] = $game_player.y + 1
@positionY[start+4] = $game_player.y
@positionY[start+5] = $game_player.y - 1
@positionY[start+6] = $game_player.y + 2
@positionY[start+7] = $game_player.y + 1
@positionY[start+8] = $game_player.y
@positionY[start+9] = $game_player.y - 1
@positionY[start+10] = $game_player.y - 2
@positionY[start+11] = $game_player.y + 3
@positionY[start+12] = $game_player.y + 2
@positionY[start+13] = $game_player.y + 1
@positionY[start+14] = $game_player.y
@positionY[start+15] = $game_player.y - 1
@positionY[start+16] = $game_player.y - 2
@positionY[start+17] = $game_player.y - 3
@q = 1
for i in start...start+18
@positionX[i] = $game_player.x - @q
if i == start+2 or i == start+5 or i == start+10
@q += 1
end
end
when "right"
@positionY[start] = $game_player.y - 1
@positionY[start+1] = $game_player.y
@positionY[start+2] = $game_player.y + 1
@positionY[start+3] = $game_player.y - 1
@positionY[start+4] = $game_player.y
@positionY[start+5] = $game_player.y + 1
@positionY[start+6] = $game_player.y - 2
@positionY[start+7] = $game_player.y - 1
@positionY[start+8] = $game_player.y
@positionY[start+9] = $game_player.y + 1
@positionY[start+10] = $game_player.y + 2
@positionY[start+11] = $game_player.y - 3
@positionY[start+12] = $game_player.y - 2
@positionY[start+13] = $game_player.y - 1
@positionY[start+14] = $game_player.y
@positionY[start+15] = $game_player.y + 1
@positionY[start+16] = $game_player.y + 2
@positionY[start+17] = $game_player.y + 3
@q = 1
for i in start...start+18
@positionX[i] = $game_player.x + @q
if i == start+2 or i == start+5 or i == start+10
@q += 1
end
end
end
end
def event_positions(direction, start)
case direction
when "up"
@event_positionX[start] = $game_player.x - 1
@event_positionX[start+1] = $game_player.x
@event_positionX[start+2] = $game_player.x + 1
@event_positionX[start+3] = $game_player.x - 1
@event_positionX[start+4] = $game_player.x
@event_positionX[start+5] = $game_player.x + 1
@event_positionX[start+6] = $game_player.x - 2
@event_positionX[start+7] = $game_player.x - 1
@event_positionX[start+8] = $game_player.x
@event_positionX[start+9] = $game_player.x + 1
@event_positionX[start+10] = $game_player.x + 2
@event_positionX[start+11] = $game_player.x - 3
@event_positionX[start+12] = $game_player.x - 2
@event_positionX[start+13] = $game_player.x - 1
@event_positionX[start+14] = $game_player.x
@event_positionX[start+15] = $game_player.x + 1
@event_positionX[start+16] = $game_player.x + 2
@event_positionX[start+17] = $game_player.x + 3
@q = 1
for i in start...start+18
@event_positionY[i] = $game_player.y - @q
if i == start+2 or i == start+5 or i == start+10
@q += 1
end
end
when "down"
@event_positionX[start] = $game_player.x + 1
@event_positionX[start+1] = $game_player.x
@event_positionX[start+2] = $game_player.x - 1
@event_positionX[start+3] = $game_player.x + 1
@event_positionX[start+4] = $game_player.x
@event_positionX[start+5] = $game_player.x - 1
@event_positionX[start+6] = $game_player.x + 2
@event_positionX[start+7] = $game_player.x + 1
@event_positionX[start+8] = $game_player.x
@event_positionX[start+9] = $game_player.x - 1
@event_positionX[start+10] = $game_player.x - 2
@event_positionX[start+11] = $game_player.x + 3
@event_positionX[start+12] = $game_player.x + 2
@event_positionX[start+13] = $game_player.x + 1
@event_positionX[start+14] = $game_player.x
@event_positionX[start+15] = $game_player.x - 1
@event_positionX[start+16] = $game_player.x - 2
@event_positionX[start+17] = $game_player.x - 3
@q = 1
for i in start...start+18
@event_positionY[i] = $game_player.y + @q
if i == start+2 or i == start+5 or i == start+10
@q += 1
end
end
when "left"
@event_positionY[start] = $game_player.y + 1
@event_positionY[start+1] = $game_player.y
@event_positionY[start+2] = $game_player.y - 1
@event_positionY[start+3] = $game_player.y + 1
@event_positionY[start+4] = $game_player.y
@event_positionY[start+5] = $game_player.y - 1
@event_positionY[start+6] = $game_player.y + 2
@event_positionY[start+7] = $game_player.y + 1
@event_positionY[start+8] = $game_player.y
@event_positionY[start+9] = $game_player.y - 1
@event_positionY[start+10] = $game_player.y - 2
@event_positionY[start+11] = $game_player.y + 3
@event_positionY[start+12] = $game_player.y + 2
@event_positionY[start+13] = $game_player.y + 1
@event_positionY[start+14] = $game_player.y
@event_positionY[start+15] = $game_player.y - 1
@event_positionY[start+16] = $game_player.y - 2
@event_positionY[start+17] = $game_player.y - 3
@q = 1
for i in start...start+18
@event_positionX[i] = $game_player.x - @q
if i == start+2 or i == start+5 or i == start+10
@q += 1
end
end
when "right"
@event_positionY[start] = $game_player.y - 1
@event_positionY[start+1] = $game_player.y
@event_positionY[start+2] = $game_player.y + 1
@event_positionY[start+3] = $game_player.y - 1
@event_positionY[start+4] = $game_player.y
@event_positionY[start+5] = $game_player.y + 1
@event_positionY[start+6] = $game_player.y - 2
@event_positionY[start+7] = $game_player.y - 1
@event_positionY[start+8] = $game_player.y
@event_positionY[start+9] = $game_player.y + 1
@event_positionY[start+10] = $game_player.y + 2
@event_positionY[start+11] = $game_player.y - 3
@event_positionY[start+12] = $game_player.y - 2
@event_positionY[start+13] = $game_player.y - 1
@event_positionY[start+14] = $game_player.y
@event_positionY[start+15] = $game_player.y + 1
@event_positionY[start+16] = $game_player.y + 2
@event_positionY[start+17] = $game_player.y + 3
@q = 1
for i in start...start+18
@event_positionX[i] = $game_player.x + @q
if i == start+2 or i == start+5 or i == start+10
@q += 1
end
end
end
end
# The refresh method is used when the update method is finished and when the script first starts.
# The refresh method basically checks and rechecks to make sure that the right slots are filled
# in with the right images.
def refresh
# First, we must see where the character is facing.
@positionX = []
@positionY = []
case $game_player.direction
when 2 #down
# After that is done we find the x and y coor. of all the slots being used relevant to the
# player's position and direction.
image_positions("down", 1)
image_positions("right", 19)
image_positions("left", 37)
when 4 #left
image_positions("left", 1)
image_positions("down", 19)
image_positions("up", 37)
when 6 #right
image_positions("right", 1)
image_positions("up", 19)
image_positions("down", 37)
when 8 #up
image_positions("up", 1)
image_positions("left", 19)
image_positions("right", 37)
end
designer_modifications_tiles # Calling the method that the game designer modifies.
# This is the last piece of the refresh method.
# Here is where we make sure every image has the right x and y coor.,
# and the right zoom
@q = -160
for i in 1...4
@image[i].x = @q
@image[i].y = 0
@image[i].z = 54
@image[i].zoom_x = 1
@image[i].zoom_y = 1
@image[i+18].x = @q - 960
@image[i+18].y = 0
@image[i+18].z = 54
@image[i+18].zoom_x = 1
@image[i+18].zoom_y = 1
@image[i+36].x = @q + 960
@image[i+36].y = 0
@image[i+36].z = 54
@image[i+36].zoom_x = 1
@image[i+36].zoom_y = 1
@q += 320
end
@q = -40
for i in 4...7
@image[i].x = @q
@image[i].y = 20
@image[i].z = 53
@image[i].zoom_x = 0.75
@image[i].zoom_y = 0.75
@image[i+18].x = @q - 720
@image[i+18].y = 20
@image[i+18].z = 53
@image[i+18].zoom_x = 0.75
@image[i+18].zoom_y = 0.75
@image[i+36].x = @q + 720
@image[i+36].y = 20
@image[i+36].z = 53
@image[i+36].zoom_x = 0.75
@image[i+36].zoom_y = 0.75
@q += 240
end
@q = -80
for i in 7...12
@image[i].x = @q
@image[i].y = 40
@image[i].z = 52
@image[i].zoom_x = 0.5
@image[i].zoom_y = 0.5
@image[i+18].x = @q - 800
@image[i+18].y = 40
@image[i+18].z = 52
@image[i+18].zoom_x = 0.5
@image[i+18].zoom_y = 0.5
@image[i+36].x = @q + 800
@image[i+36].y = 40
@image[i+36].z = 52
@image[i+36].zoom_x = 0.5
@image[i+36].zoom_y = 0.5
@q += 160
end
@q = 40
for i in 12...19
@image[i].x = @q
@image[i].y = 60
@image[i].z = 51
@image[i].zoom_x = 0.25
@image[i].zoom_y = 0.25
@image[i+18].x = @q - 640
@image[i+18].y = 60
@image[i+18].z = 51
@image[i+18].zoom_x = 0.25
@image[i+18].zoom_y = 0.25
@image[i+36].x = @q + 640
@image[i+36].y = 60
@image[i+36].z = 51
@image[i+36].zoom_x = 0.25
@image[i+36].zoom_y = 0.25
@q += 80
end
end
def refresh_events
@event_positionX = []
@event_positionY = []
case $game_player.direction
when 2 #down
event_positions("down", 1)
event_positions("right", 19)
event_positions("left", 37)
when 4 #left
event_positions("left", 1)
event_positions("down", 19)
event_positions("up", 37)
when 6 #right
event_positions("right", 1)
event_positions("up", 19)
event_positions("down", 37)
when 8 #up
event_positions("up", 1)
event_positions("left", 19)
event_positions("right", 37)
end
designer_modifications_events
@q = -160
for i in 1...4
@events[i].x = @q
@events[i].y = 0
@events[i].z = 53
@events[i].zoom_x = 1
@events[i].zoom_y = 1
@events[i+18].x = @q - 960
@events[i+18].y = 0
@events[i+18].z = 53
@events[i+18].zoom_x = 1
@events[i+18].zoom_y = 1
@events[i+36].x = @q + 960
@events[i+36].y = 0
@events[i+36].z = 53
@events[i+36].zoom_x = 1
@events[i+36].zoom_y = 1
@q += 320
end
@q = -40
for i in 4...7
@events[i].x = @q
@events[i].y = 20
@events[i].z = 52
@events[i].zoom_x = 0.75
@events[i].zoom_y = 0.75
@events[i+18].x = @q - 720
@events[i+18].y = 20
@events[i+18].z = 52
@events[i+18].zoom_x = 0.75
@events[i+18].zoom_y = 0.75
@events[i+36].x = @q + 720
@events[i+36].y = 20
@events[i+36].z = 52
@events[i+36].zoom_x = 0.75
@events[i+36].zoom_y = 0.75
@q += 240
end
@q = -80
for i in 7...12
@events[i].x = @q
@events[i].y = 40
@events[i].z = 51
@events[i].zoom_x = 0.5
@events[i].zoom_y = 0.5
@events[i+18].x = @q - 800
@events[i+18].y = 40
@events[i+18].z = 51
@events[i+18].zoom_x = 0.5
@events[i+18].zoom_y = 0.5
@events[i+36].x = @q + 800
@events[i+36].y = 40
@events[i+36].z = 51
@events[i+36].zoom_x = 0.5
@events[i+36].zoom_y = 0.5
@q += 160
end
@q = 40
for i in 12...19
@events[i].x = @q
@events[i].y = 60
@events[i].z = 50
@events[i].zoom_x = 0.25
@events[i].zoom_y = 0.25
@events[i+18].x = @q - 640
@events[i+18].y = 60
@events[i+18].z = 50
@events[i+18].zoom_x = 0.25
@events[i+18].zoom_y = 0.25
@events[i+36].x = @q + 640
@events[i+36].y = 60
@events[i+36].z = 50
@events[i+36].zoom_x = 0.25
@events[i+36].zoom_y = 0.25
@q += 80
end
end
def update(type = "") # The update method is used when it's time to move those images around.
# This is the moment where we move all the images using my Free Picture Movement Script,
# but first we have to establish where the player is facing.
case type # type is a string describing the type of movement the player is doing.
when "forward"
# All the images under the "forward" case will move towards you, or seem like it.
# This is done by moving the pictures x, y, zoom_x, and zoom_y using the FPM script.
@q = -160
@r = -360
for i in 1...4
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @r, 12)
$fpm.movement_y(@image[i], @graphic[i], i, 0, -20, 12)
$fpm.movement_zoom_x(@image[i], @graphic[i], i, 1, 1.25, 12)
$fpm.movement_zoom_y(@image[i], @graphic[i], i, 1, 1.25, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @r, 12)
$fpm.movement_y(@events[i], @event_graphic[i], i+54, 0, -20, 12)
$fpm.movement_zoom_x(@events[i], @event_graphic[i], i+54, 1, 1.25, 12)
$fpm.movement_zoom_y(@events[i], @event_graphic[i], i+54, 1, 1.25, 12)
end
@q += 320
@r += 480
end
@q = -40
@r = -160
for i in 4...7
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @r, 12)
$fpm.movement_y(@image[i], @graphic[i], i, 20, 0, 12)
$fpm.movement_zoom_x(@image[i], @graphic[i], i, 0.75, 1, 12)
$fpm.movement_zoom_y(@image[i], @graphic[i], i, 0.75, 1, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @r, 12)
$fpm.movement_y(@events[i], @event_graphic[i], i+54, 20, 0, 12)
$fpm.movement_zoom_x(@events[i], @event_graphic[i], i+54, 0.75, 1, 12)
$fpm.movement_zoom_y(@events[i], @event_graphic[i], i+54, 0.75, 1, 12)
end
@q += 240
@r += 320
end
@q = -80
@r = -280
for i in 7...12
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @r, 12)
$fpm.movement_y(@image[i], @graphic[i], i, 40, 20, 12)
$fpm.movement_zoom_x(@image[i], @graphic[i], i, 0.5, 0.75, 12)
$fpm.movement_zoom_y(@image[i], @graphic[i], i, 0.5, 0.75, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @r, 12)
$fpm.movement_y(@events[i], @event_graphic[i], i+54, 40, 20, 12)
$fpm.movement_zoom_x(@events[i], @event_graphic[i], i+54, 0.5, 0.75, 12)
$fpm.movement_zoom_y(@events[i], @event_graphic[i], i+54, 0.5, 0.75, 12)
end
@q += 160
@r += 240
end
@q = 40
@r = -240
for i in 12...19
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @r, 12)
$fpm.movement_y(@image[i], @graphic[i], i, 60, 40, 12)
$fpm.movement_zoom_x(@image[i], @graphic[i], i, 0.25, 0.5, 12)
$fpm.movement_zoom_y(@image[i], @graphic[i], i, 0.25, 0.5, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @r, 12)
$fpm.movement_y(@events[i], @event_graphic[i], i+54, 60, 40, 12)
$fpm.movement_zoom_x(@events[i], @event_graphic[i], i+54, 0.25, 0.5, 12)
$fpm.movement_zoom_y(@events[i], @event_graphic[i], i+54, 0.25, 0.5, 12)
end
@q += 80
@r += 160
end
when "back"
# All the images under the "back" case will move away from you, or seem like it.
@q = -160
@r = -40
for i in 1...4
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @r, 12)
$fpm.movement_y(@image[i], @graphic[i], i, 0, 20, 12)
$fpm.movement_zoom_x(@image[i], @graphic[i], i, 1, 0.75, 12)
$fpm.movement_zoom_y(@image[i], @graphic[i], i, 1, 0.75, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @r, 12)
$fpm.movement_y(@events[i], @event_graphic[i], i+54, 0, 20, 12)
$fpm.movement_zoom_x(@events[i], @event_graphic[i], i+54, 1, 0.75, 12)
$fpm.movement_zoom_y(@events[i], @event_graphic[i], i+54, 1, 0.75, 12)
end
@q += 320
@r += 240
end
@q = -40
@r = 80
for i in 4...7
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @r, 12)
$fpm.movement_y(@image[i], @graphic[i], i, 20, 40, 12)
$fpm.movement_zoom_x(@image[i], @graphic[i], i, 0.75, 0.5, 12)
$fpm.movement_zoom_y(@image[i], @graphic[i], i, 0.75, 0.5, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @r, 12)
$fpm.movement_y(@events[i], @event_graphic[i], i+54, 20, 40, 12)
$fpm.movement_zoom_x(@events[i], @event_graphic[i], i+54, 0.75, 0.5, 12)
$fpm.movement_zoom_y(@events[i], @event_graphic[i], i+54, 0.75, 0.5, 12)
end
@q += 240
@r += 160
end
@q = -80
@r = 120
for i in 7...12
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @r, 12)
$fpm.movement_y(@image[i], @graphic[i], i, 40, 60, 12)
$fpm.movement_zoom_x(@image[i], @graphic[i], i, 0.5, 0.25, 12)
$fpm.movement_zoom_y(@image[i], @graphic[i], i, 0.5, 0.25, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @r, 12)
$fpm.movement_y(@events[i], @event_graphic[i], i+54, 40, 60, 12)
$fpm.movement_zoom_x(@events[i], @event_graphic[i], i+54, 0.5, 0.25, 12)
$fpm.movement_zoom_y(@events[i], @event_graphic[i], i+54, 0.5, 0.25, 12)
end
@q += 160
@r += 80
end
@q = 40
@r = 208
for i in 12...19
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @r, 12)
$fpm.movement_y(@image[i], @graphic[i], i, 60, 70, 12)
$fpm.movement_zoom_x(@image[i], @graphic[i], i, 0.25, 0.1, 12)
$fpm.movement_zoom_y(@image[i], @graphic[i], i, 0.25, 0.1, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @r, 12)
$fpm.movement_y(@events[i], @event_graphic[i], i+54, 60, 70, 12)
$fpm.movement_zoom_x(@events[i], @event_graphic[i], i+54, 0.25, 0.1, 12)
$fpm.movement_zoom_y(@events[i], @event_graphic[i], i+54, 0.25, 0.1, 12)
end
@q += 80
@r += 32
end
when "left"
$fpm.movement_x(@background, @transition, 0, -640, 0, 12)
# All the images under the "left" case will simply move to the right,
# since you will be turning left.
@q = -160
for i in 1...4
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @q+640, 12)
end
if @graphic[i+18] != nil
$fpm.movement_x(@image[i+18], @graphic[i+18], i+18, @q-640, @q, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @q+640, 12)
end
if @event_graphic[i+18] != nil
$fpm.movement_x(@events[i+18], @event_graphic[i+18], i+72, @q-640, @q, 12)
end
@q += 320
end
@q = -40
for i in 4...7
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @q+720, 12)
end
if @graphic[i+18] != nil
$fpm.movement_x(@image[i+18], @graphic[i+18], i+18, @q-720, @q, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @q+720, 12)
end
if @event_graphic[i+18] != nil
$fpm.movement_x(@events[i+18], @event_graphic[i+18], i+72, @q-720, @q, 12)
end
@q += 240
end
@q = -80
for i in 7...12
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @q+800, 12)
end
if @graphic[i+18] != nil
$fpm.movement_x(@image[i+18], @graphic[i+18], i+18, @q-800, @q, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @q+800, 12)
end
if @event_graphic[i+18] != nil
$fpm.movement_x(@events[i+18], @event_graphic[i+18], i+72, @q-800, @q, 12)
end
@q += 160
end
@q = 40
for i in 12...19
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @q+640, 12)
end
if @graphic[i+18] != nil
$fpm.movement_x(@image[i+18], @graphic[i+18], i+18, @q-640, @q, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @q+640, 12)
end
if @event_graphic[i+18] != nil
$fpm.movement_x(@events[i+18], @event_graphic[i+18], i+72, @q-640, @q, 12)
end
@q += 80
end
when "right"
# All the images under the "right" case will simply move to the left,
# since you will be turning right.
$fpm.movement_x(@background, @transition, 0, 0, -640, 12)
@q = -160
for i in 1...4
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @q-640, 12)
end
if @graphic[i+36] != nil
$fpm.movement_x(@image[i+36], @graphic[i+36], i+36, @q+640, @q, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @q-640, 12)
end
if @event_graphic[i+36] != nil
$fpm.movement_x(@events[i+36], @event_graphic[i+36], i+90, @q+640, @q, 12)
end
@q += 320
end
@q = -40
for i in 4...7
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @q-720, 12)
end
if @graphic[i+36] != nil
$fpm.movement_x(@image[i+36], @graphic[i+36], i+36, @q+720, @q, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @q-720, 12)
end
if @event_graphic[i+36] != nil
$fpm.movement_x(@events[i+36], @event_graphic[i+36], i+90, @q+720, @q, 12)
end
@q += 240
end
@q = -80
for i in 7...12
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @q-800, 12)
end
if @graphic[i+36] != nil
$fpm.movement_x(@image[i+36], @graphic[i+36], i+36, @q+800, @q, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @q-800, 12)
end
if @event_graphic[i+36] != nil
$fpm.movement_x(@events[i+36], @event_graphic[i+36], i+90, @q+800, @q, 12)
end
@q += 160
end
@q = 40
for i in 12...19
if @graphic[i] != nil
$fpm.movement_x(@image[i], @graphic[i], i, @q, @q-640, 12)
end
if @graphic[i+36] != nil
$fpm.movement_x(@image[i+36], @graphic[i+36], i+36, @q+640, @q, 12)
end
if @event_graphic[i] != nil
$fpm.movement_x(@events[i], @event_graphic[i], i+54, @q, @q-640, 12)
end
if @event_graphic[i+36] != nil
$fpm.movement_x(@events[i+36], @event_graphic[i+36], i+90, @q+640, @q, 12)
end
@q += 80
end
end
# For further expainations on how the $fpm methods work, consult the
# Free Picture movement script.
end
def find_old_coor(id)
@id = @event_picture_id[id]
for i in 1...19
if $game_map.events[id].x == @event_positionX[i]
if $game_map.events[id].y == @event_positionY[i]
@old_x = @events[@id].x
@old_y = @events[@id].y
@old_zoom = @events[@id].zoom_x
@old_z = @events[@id].z
end
end
end
end
def update_events(id)
@id = @event_picture_id[id]
for i in 1...19
if $game_map.events[id].x == @event_positionX[i]
if $game_map.events[id].y == @event_positionY[i]
@events[@id].bitmap = nil
@new_x = @events[i].x
@new_y = @events[i].y
@new_zoom = @events[i].zoom_x
@new_z = @events[@id].z
if @event_graphic[@id] != nil
$fpm.movement_x(@events[i], @event_graphic[@id], i+54, @old_x, @new_x, 12)
$fpm.movement_y(@events[i], @event_graphic[@id], i+54, @old_y, @new_y, 12)
$fpm.movement_z(@events[i], @event_graphic[@id], i+54, @old_z, @new_z, 12)
$fpm.movement_zoom_x(@events[i], @event_graphic[@id], i+54, @old_zoom, @new_zoom, 12)
$fpm.movement_zoom_y(@events[i], @event_graphic[@id], i+54, @old_zoom, @new_zoom, 12)
end
end
end
end
@updating = 1
end
def dispose
for i in 1...55
@image[i].dispose
end
for i in 1...55
@events[i].dispose
end
end
end
class Game_Player < Game_Character
alias bksm_fprpg_gameplayer_update update
def update
if $FPRPG_Active == true
# The @moving variable is just there to act as sort of a grace period,
# so you don't turn to fast, or move before the transition is done.
if @moving != nil and @moving >= 13
# When @moving reaches 13 it triggers the refresh method and resets itself back to nil
@moving = nil
$fprpg.refresh
$fprpg.refresh_events
end
if @moving != nil and @moving >= 1
@moving += 1
end
if @moving == nil and @updating == nil
unless moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
case Input.dir4
when 2
# move_backwards isn't part of the original coding for RMXP.
# the original is move_backward. I did this so I wouldn't mess up
# any call methods used by RMXP
move_backwards
@moving = 1
when 4
turn_left_90
@moving = 1
$fprpg.update("left") # "left" refers to the type string mentioned earlier
when 6
turn_right_90
@moving = 1
$fprpg.update("right") # So does "right"
when 8
# The same that was said about move_backwards can be said about move_forwards
move_forwards
@moving = 1
end
end
end
last_real_x = @real_x
last_real_y = @real_y
super
if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
$game_map.scroll_down(@real_y - last_real_y)
end
if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
$game_map.scroll_left(last_real_x - @real_x)
end
if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
$game_map.scroll_right(@real_x - last_real_x)
end
if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
$game_map.scroll_up(last_real_y - @real_y)
end
unless moving?
if @moving == 13
result = check_event_trigger_here([1,2])
if result == false
unless $DEBUG and Input.press?(Input::CTRL)
if @encounter_count > 0
@encounter_count -= 1
end
end
end
end
if Input.trigger?(Input::C)
check_event_trigger_here([0])
check_event_trigger_there([0,1,2])
end
end
else
bksm_fprpg_gameplayer_update
end
end
end
class Game_Character
alias bksm_fprpg_movedown move_down
alias bksm_fprpg_moveup move_up
alias bksm_fprpg_moveleft move_left
alias bksm_fprpg_moveright move_right
def move_random
case rand(4)
when 0
move_down(false)
when 1
move_left(false)
when 2
move_right(false)
when 3
move_up(false)
end
end
def move_forwards
case @direction
when 2
move_down(false, "forward")
when 4
move_left(false, "forward")
when 6
move_right(false, "forward")
when 8
move_up(false, "forward")
end
end
def move_backwards
last_direction_fix = @direction_fix
@direction_fix = true
case @direction
when 2
move_up(false, "back")
when 4
move_right(false, "back")
when 6
move_left(false, "back")
when 8
move_down(false, "back")
end
@direction_fix = last_direction_fix
end
# The below methods are modified so that the eighteen images will
# only update and move if you can move in the forward direction.
def move_down(turn_enabled = true, type = "")
if $FPRPG_Active == true
if turn_enabled
turn_down
end
if passable?(@x, @y, 2)
$fprpg.update(type)
if @id != 0 and $fprpg.updating == nil and $fprpg.moving == nil
$fprpg.find_old_coor(@id)
end
turn_down
@y += 1
if @id != 0 and $fprpg.updating == nil and $fprpg.moving == nil
$fprpg.update_events(@id)
end
increase_steps
else
check_event_trigger_touch(@x, @y+1)
end
else
bksm_fprpg_movedown
end
end
def move_left(turn_enabled = true, type = "")
if $FPRPG_Active == true
if turn_enabled
turn_left
end
if passable?(@x, @y, 4)
$fprpg.update(type)
if @id != 0 and $fprpg.updating == nil and $fprpg.moving == nil
$fprpg.find_old_coor(@id)
end
turn_left
@x -= 1
if @id != 0 and $fprpg.updating == nil and $fprpg.moving == nil
$fprpg.update_events(@id)
end
increase_steps
else
check_event_trigger_touch(@x-1, @y)
end
else
bksm_fprpg_moveleft
end
end
def move_right(turn_enabled = true, type = "")
if $FPRPG_Active == true
if turn_enabled
turn_right
end
if passable?(@x, @y, 6)
$fprpg.update(type)
if @id != 0 and $fprpg.updating == nil and $fprpg.moving == nil
$fprpg.find_old_coor(@id)
end
turn_right
@x += 1
if @id != 0 and $fprpg.updating == nil and $fprpg.moving == nil
$fprpg.update_events(@id)
end
increase_steps
else
check_event_trigger_touch(@x+1, @y)
end
else
bksm_fprpg_moveright
end
end
def move_up(turn_enabled = true, type = "")
if $FPRPG_Active == true
if turn_enabled
turn_up
end
if passable?(@x, @y, 8)
$fprpg.update(type)
if @id != 0 and $fprpg.updating == nil and $fprpg.moving == nil
$fprpg.find_old_coor(@id)
end
turn_up
@y -= 1
if @id != 0 and $fprpg.updating == nil and $fprpg.moving == nil
$fprpg.update_events(@id)
end
increase_steps
else
check_event_trigger_touch(@x, @y-1)
end
else
bksm_fprpg_moveup
end
end
end
class Scene_Map
alias bksm_fprpg_main main
alias bksm_fprpg_update update
alias bksm_fprpg_transfer transfer_player
def main
bksm_fprpg_main
if $FPRPG_Active == true
if $fprpg != nil
$fprpg.dispose
end
$fprpg = First_Person.new
end
end
def update
if $FPRPG_Active == true
if @transition_counter != nil
@transition_counter += 1
if @transition_counter == 8
$fpm.movement_opacity(@transition, $fprpg.transition, 19, 255, 0, 8)
@transition_counter == nil
end
end
if $fprpg.updating != nil and $fprpg.updating >= 13
# When @moving reaches 13 it triggers the refresh method and resets itself back to nil
$fprpg.updating = nil
$fprpg.refresh_events
end
if $fprpg.updating != nil and $fprpg.updating >= 1
$fprpg.updating += 1
end
end
bksm_fprpg_update
end
def transfer_player
if $FPRPG_Active == true
@transition = Sprite.new
@transition.bitmap = RPG::Cache.picture($fprpg.transition)
@transition.z = 55
@transition.opacity = 0
@transition.tone = Tone.new(-255,-255, -255, 0)
$fpm.movement_opacity(@transition, $fprpg.transition, 19, 0, 255, 8)
@transition_counter = 1
end
bksm_fprpg_transfer
end
end
class Game_Event < Game_Character
attr_reader :event
end
class Spriteset_Battle
alias bksm_fprpg_initialize initialize
def initialize
bksm_fprpg_initialize
if $FPRPG_Active == true
@viewport1.z = 60
@battleback_sprite.dispose
@battleback_sprite = Sprite.new
@battleback_sprite.z = 0
end
end
end
class Scene_Save < Scene_File
alias bksm_fprpg_writesavedata write_save_data
def write_save_data(file)
bksm_fprpg_writesavedata(file)
Marshal.dump($FPRPG_Active, file)
end
end
class Scene_Load < Scene_File
alias bksm_fprpg_readsavedata read_save_data
def read_save_data(file)
bksm_fprpg_readsavedata(file)
$FPRPG_Active = Marshal.load(file)
if $FPRPG_Active == true
$fprpg = First_Person.new
end
end
end
You'll also have to download my Free Picture Movement script located here.
I got a great suggestion from AceJP to use Squall's minimap script. You can get it here.
Instructions
First, copy and paste the necessary scripts directly above Main. Then, download the graphics pack located here. Upload all the pictures and tilesets to their right places. Now, go to your database and into the tilesets tab. Set the tilesets up and click the terrain button. The terrains should go like this 01234567. There should never be anything in the zero slot of the tileset.
If you do not wish to use the graphics I included(I know you won't) then I'd better tell you about the dimensions. Tilesets need only be one row big, bringing them to 256x32 pixels big. The pictures that the player sees are called pop-ups. All pop-ups need to fit within a 320x440. Backgrounds are 1280x480. How you add those classes will take a tiny bit of scripting, but I tried my best to simplify it as much as possible for you. It's all explained in the comments, and it right at the top of the script.
Finally, to activate the script you have to use an auto-start event. Using the call script command copy in the following code:
Code:
$FPRPG_Active = true
$scene = Scene_Map.new
To turn off all you have to do is change true to false.
Credits and Thanks
Credit's to me and WaroftheMagi.com for being there for me.
Author's Notes
Templates of the correct tilesets and pop-ups are included in the graphics pack. If you have any questions then email me at BigKevSexyMan@gmail.com .