10-28-2012, 12:08 AM
KAirShip VX & VX Ace
v 1.0.2
by Kyonides alias Kyonides-Arkanthos
v 1.0.2
by Kyonides alias Kyonides-Arkanthos
Introduction
This simple script lets you make the player think they can take a look at a ship or airship rooms, gallery, etc. while riding them by just pressing a single button. No, the ship or airship won't move an inch while you're inside striving to open a hole on the women's bathroom wall. Do you need to go back to the map the ship or airship is currently located? No problem, go back to the main ship or airship map and press the same button to get automatically transferred to the original map.
The only downside would be that those mindless followers you nicknamed as Followers follow you everywhere like zombies but don't worry about that, they're not looking for "BRAINZ" to eat.
This script is not meant to let you use it while rowing on a pretty small boat.
Instructions
Setup your favorite button : VEHICLEBUTTON
Or define the Map ID and X and Y Coordinates for the ship or airship : VEHICLEMAPS
But leave the :none key and its corresponding value alone.
DOWNLOAD SCRIPTS
SCRIPT
VX ONLY Version
Code:
# KAirShip VX
# v 1.0.2 - 2012-10-27
# Scripter : Kyonides aka Kyonides-Arkanthos
# You are now able to take a look inside your ship or airship!
module VehicleMan
VEHICLEBUTTON = Input::F5
# 1 - Ship, 2 - Airship, :none - DO NOT TOUCH IT!
VEHICLEMAPS = {1 => [4,2,5], 2 => [3,7,6], :none => [0]}
@exceptions = [nil, 0]
def self.map_id() VEHICLEMAPS[@vehicle_type][0] end
def self.last_map_id() @last_map_id end
def self.last_map_id=(id) @last_map_id = id end
def self.vehicle() @vehicle end
def self.vehicle=(vehicle) @vehicle = vehicle end
def self.vehicle_type() @vehicle_type end
def self.vehicle_type=(vehicle) @vehicle_type = vehicle end
def self.player_xy() [@x, @y] end
def self.player_xy=(ary) @x, @y = ary end
def self.player_direction() @player_direction end
def self.player_direction=(int) @player_direction = int end
def self.not_allowed?() @exceptions.include?(@vehicle_type) end
def self.clear_all_data
@vehicle_type = :none
@player_direction = @last_map_id = @x = @y = nil
end
end
class Game_Player
def update_vehicle
return unless in_vehicle?
VehicleMan.vehicle = $game_map.vehicles[@vehicle_type]
if @vehicle_getting_on
if not moving?
@direction = VehicleMan.vehicle.direction
@move_speed = VehicleMan.vehicle.speed
@vehicle_getting_on = nil
@transparent = true
end
elsif @vehicle_getting_off
if not moving? and VehicleMan.vehicle.altitude == 0
@vehicle_getting_off = nil
@vehicle_type = -1
@transparent = nil
end
elsif !@inside_vehicle
inside_vehicle_map_transfer if Input.trigger?(VehicleMan::VEHICLEBUTTON)
VehicleMan.vehicle.sync_with_player
end
end
def update_nonmoving(last_moving)
return if $game_map.interpreter.running?
return if moving?
return if check_touch_event if last_moving
if !$game_message.visible and Input.trigger?(Input::C)
return if get_on_off_vehicle
return if check_action_event
elsif !$game_message.visible and Input.trigger?(VehicleMan::VEHICLEBUTTON)
return if !@transferring and back2map_transfer
end
update_encounter if last_moving
end
def inside_vehicle_map_transfer
return if @vehicle_type == 0
VehicleMan.vehicle_type = @vehicle_type
VehicleMan.last_map_id, @new_direction = $game_map.map_id, 2
VehicleMan.player_xy = [self.x, self.y]
VehicleMan.player_direction = VehicleMan.vehicle.direction
@new_map_id, @new_x, @new_y = VehicleMan::VEHICLEMAPS[@vehicle_type]
VehicleMan.vehicle.transparent = @inside_vehicle = @transferring = true
VehicleMan.vehicle.get_off
end
alias kyon_airnship_gm_perf_transfer perform_transfer
def perform_transfer
kyon_airnship_gm_perf_transfer
if @inside_vehicle
@vehicle_type, @move_speed, @direction = -1, 4, 2
@through = @transparent = nil
elsif !@inside_vehicle
@through = @vehicle_type == 2 # airship
VehicleMan.vehicle.transparent = nil
VehicleMan.vehicle = nil
end if VehicleMan.vehicle
end
def back2map_transfer
return if VehicleMan.not_allowed?
return if VehicleMan.map_id != $game_map.map_id
@vehicle_type, @new_map_id = VehicleMan.vehicle_type, VehicleMan.last_map_id
@new_direction = VehicleMan.player_direction
@move_speed = VehicleMan.vehicle.speed
@new_x, @new_y = VehicleMan.player_xy
VehicleMan.vehicle.get_on
@inside_vehicle = VehicleMan.clear_all_data
@transparent = @transferring = true
end
end
class Game_Vehicle
alias kyon_airnship_gm_veh_get_on get_on
def get_on
@altitude = MAX_ALTITUDE if VehicleMan.vehicle_type == 2 # airship
kyon_airnship_gm_veh_get_on
end
end
VX ACE Version
Code:
# KAirShip VX Ace
# v 1.0.2 - 2012-10-27
# Scripter : Kyonides aka Kyonides-Arkanthos
# You are now able to take a look inside your ship or airship!
module VehicleMan
VEHICLEBUTTON = :F5
VEHICLEMAPS = {:ship => [4,2,5], :airship => [3,7,6], :none => [0]}
@exceptions = [nil, :boat]
def self.map_id() VEHICLEMAPS[@vehicle_type][0] end
def self.last_map_id() @last_map_id end
def self.last_map_id=(id) @last_map_id = id end
def self.vehicle_type() @vehicle_type end
def self.vehicle_type=(vehicle) @vehicle_type = vehicle end
def self.player_xy() [@x, @y] end
def self.player_xy=(ary) @x, @y = ary end
def self.player_direction() @player_direction end
def self.player_direction=(int) @player_direction = int end
def self.not_allowed?() @exceptions.include?(@vehicle_type) end
def self.clear_all_data
@vehicle_type = :none
@player_direction = @last_map_id = @x = @y = nil
end
end
class Game_Player
def update_vehicle
return if @followers.gathering?
return unless vehicle
if @vehicle_getting_on
update_vehicle_get_on
elsif @vehicle_getting_off
update_vehicle_get_off
elsif !@inside_vehicle
inside_vehicle_map_transfer if Input.trigger?(VehicleMan::VEHICLEBUTTON)
vehicle.sync_with_player
end
end
def update_nonmoving(last_moving)
return if $game_map.interpreter.running?
if last_moving
$game_party.on_player_walk
return if check_touch_event
end
if movable? && Input.trigger?(:C)
return if get_on_off_vehicle
return if check_action_event
elsif movable? && Input.trigger?(VehicleMan::VEHICLEBUTTON)
return if !@transferring and back2map_transfer
end
update_encounter if last_moving
end
def inside_vehicle_map_transfer
return if @vehicle_type == :boat
VehicleMan.vehicle_type = @vehicle_type
VehicleMan.last_map_id = $game_map.map_id
VehicleMan.player_xy = [self.x, self.y]
VehicleMan.player_direction, @new_direction = vehicle.direction, 2
@new_map_id, @new_x, @new_y = VehicleMan::VEHICLEMAPS[@vehicle_type]
vehicle.transparent = @inside_vehicle = @transferring = true
vehicle.get_off
end
alias kyon_airnship_gm_perf_transfer perform_transfer
def perform_transfer
kyon_airnship_gm_perf_transfer
if @inside_vehicle
@vehicle_type, @move_speed, @direction = :walk, 4, 2
@through = @transparent = nil
elsif !@inside_vehicle
@through = @vehicle_type == :airship
vehicle.transparent = nil
end if vehicle
end
def back2map_transfer
return if VehicleMan.not_allowed?
return if VehicleMan.map_id != $game_map.map_id
@vehicle_type, @new_map_id = VehicleMan.vehicle_type, VehicleMan.last_map_id
@new_direction, @move_speed = VehicleMan.player_direction, vehicle.speed
@new_x, @new_y = VehicleMan.player_xy
vehicle.get_on
@inside_vehicle = VehicleMan.clear_all_data
@transparent = @transferring = true
end
end
class Game_Vehicle
alias kyon_airnship_gm_veh_get_on get_on
def get_on
@altitude = max_altitude if VehicleMan.vehicle_type == :airship
kyon_airnship_gm_veh_get_on
end
end
Compatibility
Designed for RPG Maker VX Ace only.
Term of Use and Conditions
Free for use but not meant for commercial projects. Due credit is not optional but a must.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE