You didn't say you had something that makes a land vehicle. Yet I'm pretty sure it's different from what I made. I know of no scripts that make a land vehicle like I did. But if it works for you then great, however I based the other two scripts I made for the swapping actors and the vehicle battle based on my land vehicle script.
I'm also confused, do you want the actor party to fight in battle or the vehicle? I thought it was the vehicle. This is what I did. The land vehicle script I posted simply because it can stand on it's own.
My land vehicle script does require an actor that is used as a vehicle so yes that is the same. However I have not provided the other parts of my scripts yet as I was waiting for confirmation / answers before posting.
This is also what my script does, but I do not believe just adding the original actors back would work as they would likely start at level one and battles as the vehicle would not let the actors gain experience.
Good point, I didn't consider this. If the OP wants that then I can add it in to clear the states inflicted in battle.
That's an option I thought of but didn't include it as the OP said to only have the original party gain exp.
So since you never really answered my question here is the other scripts.
You must use my
land vehicle script for it to work. Each is based off the previous (in a way).
Spoiler: Party Swap
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Party Swap for Vehicle ║ Version: 1.00 ║
# ║ Author: Roninator2 ║ ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function: ║ Date Created ║
# ║ Save the party in order to swap ╠════════════════════╣
# ║ for a land vehicle for the party ║ 21 Jul 2023 ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Instructions: ║
# ║ Change the values below for the vehicle actor ║
# ║ ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Terms of use: ║
# ║ Free for all uses in RPG Maker - Except Nudity ║
# ╚══════════════════════════════════════════════════════════╝
#==============================================================================
# ** Edit Settings
#==============================================================================
module R2_LAND_VEHICLE
VEHICLE_ACTOR = 11 # Actor that is used as the land vehicle
LEADER_LEVEL = true # If true will make the vehicle actor the
# same level as the party leader
end
#==============================================================================
# ** End of Editable code
#==============================================================================
#==============================================================================
# ** Game_Party
#==============================================================================
class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :vehicle_party # Land Vehicle Party saved
end # Game_Party
#==============================================================================
# ** Game_Player
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Board Vehicle
# Assumes that the player is not currently in a vehicle.
#--------------------------------------------------------------------------
def get_on_vehicle
front_x = $game_map.round_x_with_direction(@x, @direction)
front_y = $game_map.round_y_with_direction(@y, @direction)
@vehicle_type = :boat if $game_map.boat.pos?(front_x, front_y)
@vehicle_type = :ship if $game_map.ship.pos?(front_x, front_y)
@vehicle_type = :airship if $game_map.airship.pos?(@x, @y)
@vehicle_type = :land if $game_map.land.pos?(@x, @y)
if vehicle
@vehicle_getting_on = true
force_move_forward unless in_airship? or in_land?
@followers.gather
end
if in_land?
$game_party.vehicle_party = $game_party.members
$game_party.members.each do |actor|
$game_party.remove_actor(actor.id)
end
$game_party.add_actor(R2_LAND_VEHICLE::VEHICLE_ACTOR)
if R2_LAND_VEHICLE::LEADER_LEVEL
lvl = $game_party.vehicle_party[0].level.to_i
$game_party.members[0].change_level(lvl, false)
end
end
@vehicle_getting_on
end
#--------------------------------------------------------------------------
# * Get Off Vehicle
# Assumes that the player is currently riding in a vehicle.
#--------------------------------------------------------------------------
def get_off_vehicle
if vehicle.land_ok?(@x, @y, @direction)
set_direction(2) if in_airship?
@followers.synchronize(@x, @y, @direction)
if in_land?
$game_party.remove_actor(R2_LAND_VEHICLE::VEHICLE_ACTOR)
$game_party.vehicle_party.each do |actor|
$game_party.add_actor(actor.id)
end
$game_party.vehicle_party = nil
end
vehicle.get_off
unless in_airship? || in_land?
force_move_forward
@transparent = false
end
@vehicle_getting_off = true
@move_speed = 4
@through = false
make_encounter_count
@followers.gather
end
@vehicle_getting_off
end
end # Game_Player
Spoiler: Vehicle Battle
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Vehicle Battles ║ Version: 1.00 ║
# ║ Author: Roninator2 ║ ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function: ║ Date Created ║
# ║ ╠════════════════════╣
# ║ Do battles in Land Vehicle ║ 21 Jul 2023 ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Instructions: ║
# ║ Change the values below for the vehicle actor ║
# ║ ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Terms of use: ║
# ║ Free for all uses in RPG Maker - Except Nudity ║
# ╚══════════════════════════════════════════════════════════╝
#==============================================================================
# ** BattleManager
#==============================================================================
module BattleManager
#--------------------------------------------------------------------------
# * EXP Acquisition and Level Up Display
#--------------------------------------------------------------------------
def self.gain_exp
if $game_player.in_land?
$game_party.vehicle_party.each do |actor|
actor.gain_vehicle_exp($game_troop.exp_total)
end
else
$game_party.all_members.each do |actor|
actor.gain_exp($game_troop.exp_total)
end
end
wait_for_message
end
end # BattleManager
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Get EXP (Account for Experience Rate)
#--------------------------------------------------------------------------
def gain_vehicle_exp(exp)
change_exp(self.exp + (exp * vehicle_exp_rate).to_i, false)
end
#--------------------------------------------------------------------------
# * Calculate Final EXP Rate
#--------------------------------------------------------------------------
def vehicle_exp_rate
exr * (vehicle_battle_member? ? 1 : reserve_members_exp_rate)
end
#--------------------------------------------------------------------------
# * Determine Battle Members
#--------------------------------------------------------------------------
def vehicle_battle_member?
$game_party.vehicle_members.include?(self)
end
end # Game_Actor
#==============================================================================
# ** Game_Party
#==============================================================================
class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# * Get All Members
#--------------------------------------------------------------------------
def driving_members
@vehicle_party.collect {|act| $game_actors[act.id] }
end
#--------------------------------------------------------------------------
# * Get Battle Members
#--------------------------------------------------------------------------
def vehicle_members
driving_members[0, max_battle_members].select {|actor| actor.exist? }
end
end # Game_Party
@Roninator2 "I'm also confused, do you want the actor party to fight in battle or the vehicle?"
The vehicle fights, and only the vehicle, but this vehicle must be an actor and only it will appear in battle. This system I'm requesting is like in Phantasy Star IV. Look:
▶ YouTube video
"Good point, I didn't consider this. If the OP wants that then I can add it in to clear the states inflicted in battle.". Do as you wish, but In my game, the vehicle is immune to ALL states ailments, and by default, you can give an actor immunity to state changes. So I just take the actor representing the vehicle and give it immunities.
And about these scripts, they will really be only for land vehicles? Because I'm using all three types of vehicles (boat, ship and airship) and I wanna fight inside all of then, so will be 3 actors-vehicles. I'm so sorry if I dont said this before, but as I said in other posts, I'm a sucker with words and I'm have trouble in giving details, especially in English, so, sorry for any possible inconvenience, you are putting effort in helping me but I'll wasn't put efforting in explaining what I want, but I'll improve myself, sorry.