GOLDENGUY'S PROFILE

Search

Vehicle/map transfer issues (VX)

Hey guys, thought I'd throw some help out there if anyone else has had these issues.

Basically, I wanted to make where I could use a ship. Fine enough? Thing is, this ship starts off in town, meaning I have at least two maps where the ship can be accessed. I was presented with a couple of problems:

  • If I boarded in town and got off on the world map, it would play the town music
  • It would always set the player walk speed to "normal" which was fine on the world map, but definitely not in town!
  • I ended up having to do a few more fixes too because once I boarded a vehicle and changed maps, it would swap the music.

Here's the coding fixes/changes I did:

  #--------------------------------------------------------------------------
# * Get Off Vehicle
# Assumes that the player is currently riding in a vehicle.
#--------------------------------------------------------------------------
def get_off_vehicle
if in_airship? # Airship
return unless airship_land_ok?(@x, @y) # Can't land?
else # Boat/ship
front_x = $game_map.x_with_direction(@x, @direction)
front_y = $game_map.y_with_direction(@y, @direction)
return unless can_walk?(front_x, front_y) # Can't touch land?
end
$game_map.vehicles[@vehicle_type].get_off # Get off processing
if in_airship? # Airship
@direction = 2 # Face down
else # Boat/ship
force_move_forward # Move one step forward
@transparent = false # Remove transparency
end
@vehicle_getting_off = true # Start getting off operation
@map = $game_map.map_id
if @map == 1
@move_speed = 4 # Return move speed
end
@through = false # Passage OFF
$game_map.vehicle_exit_bgm
make_encounter_count # Initialize encounter
end

In there I made it so that it would ONLY change the move speed to "normal if on the world map, otherwise it would make no change, since I have my game set to slower walk on the world map and faster walk everywhere else. The $game_map.vehicle_exit_bgm is another fix I also had to implement. This class is in Game_Player

  #--------------------------------------
# * Change music when exiting vehicle
#--------------------------------------
def vehicle_exit_bgm
@map.bgm.play if @map.autoplay_bgm
@map.bgs.play if @map.autoplay_bgs
end

I basically used this extra class so that I could force the autoplay of the current map's BGM when getting off the vehicle. This gets added to Game_Map

  #--------------------------------------------------------------------------
# * Automatically Switch BGM and BGS (not in vehicle)
#--------------------------------------------------------------------------
def autoplay
if $game_player.in_vehicle?
else
@map.bgm.play if @map.autoplay_bgm
@map.bgs.play if @map.autoplay_bgs
end
end

I changed the usual autoplay class so that it will only change music when you change maps IF you are not in a vehicle. This class is in Game_Map.


This pretty much embodies some of the more major changes I've made to the scripting and will probably keep in every game I make, outside of the variables solution.

I have solved RMVX variables!

I'm not sure yet if anyone's cracked this case yet, but if you've been having the following problems in RMVX:

  • Extracting number of items OR any actor's statistics
  • Multiplying a variable (e.g. 137 times 14) only to end up with your operand as the answer

I have your solution. Again, I could be late to the scene and be the 47th person to do this, but I'm just posting this if this is anything new. Either way, someone on the EB team really dropped the ball here. If I'm indeed somehow the first to this fix, maybe they could give me a free code since I'm still in trial.. not really counting on that though lol.

Copy and paste over the entire Control Variables section under Game Interpreter:

#--------------------------------------------------------------------------
# * Control Variables
#--------------------------------------------------------------------------
def command_122
value = 0
case @params[3] # Operand
when 0 # Constant
value = @params[4]
when 1 # Variable
value = $game_variables[@params[4]]
when 2 # Random
value = @params[4] + rand(@params[5] - @params[4] + 1)
when 3 # Item
value = $game_party.item_number($data_items[@params[4]])
# changed stuff from here...
when 4 # Actor
actor = $game_party.members[@params[4] - 1]
if actor != nil
case @params[5]
when 0 # Level
value = actor.level
when 1 # Experience
value = actor.exp
when 2 # HP
value = actor.hp
when 3 # MP
value = actor.mp
when 4 # Maximum HP
value = actor.maxhp
when 5 # Maximum MP
value = actor.maxmp
when 6 # Attack
value = actor.atk
when 7 # Defense
value = actor.def
when 8 # Spirit
value = actor.spi
when 9 # Agility
value = actor.agi
end
end
# ...to here
when 5 # Enemy
enemy = $game_troop.members[@params[4]]
if enemy != nil
case @params[5]
when 0 # HP
value = enemy.hp
when 1 # MP
value = enemy.mp
when 2 # Maximum HP
value = enemy.maxhp
when 3 # Maximum MP
value = enemy.maxmp
when 4 # Attack
value = enemy.atk
when 5 # Defense
value = enemy.def
when 6 # Spirit
value = enemy.spi
when 7 # Agility
value = enemy.agi
end
end
when 6 # Character
character = get_character(@params[4])
if character != nil
case @params[5]
when 0 # x-coordinate
value = character.x
when 1 # y-coordinate
value = character.y
when 2 # direction
value = character.direction
when 3 # screen x-coordinate
value = character.screen_x
when 4 # screen y-coordinate
value = character.screen_y
end
end
when 7 # Other
case @params[4]
when 0 # map ID
value = $game_map.map_id
when 1 # number of party members
value = $game_party.members.size
when 2 # gold
value = $game_party.gold
when 3 # steps
value = $game_party.steps
when 4 # play time
value = Graphics.frame_count / Graphics.frame_rate
when 5 # timer
value = $game_system.timer / Graphics.frame_rate
when 6 # save count
value = $game_system.save_count
end
end
for i in @params[0] .. @params[1] # Batch control
case @params[2] # Operation
when 0 # Set
$game_variables[i] = value
when 1 # Add
$game_variables[i] += value
when 2 # Sub
$game_variables[i] -= value
when 3 # Mul
$game_variables[i] *= value
when 4 # Div
$game_variables[i] /= value if value != 0
when 5 # Mod
$game_variables[i] %= value if value != 0
end
if $game_variables[i] > 99999999 # Maximum limit check
$game_variables[i] = 99999999
end
if $game_variables[i] < -99999999 # Minimum limit check
$game_variables[i] = -99999999
end
end
$game_map.need_refresh = true
return true
end

The Staff of Cyrenia

The Staff of Cyrenia

A view of the Guild.. all books are readable for some info on how this or that works.

Inside the characters' home, which they appear to split the rent on, since it's the nicest house in town.

A minor offshoot in the dungeon, keep an eye out for possible hidden treasures.

PAGE LINK: http://www.rpgmaker.net/games/845/

BASIC DESCRIPTION: You play as the main character (Kelan) and his longtime friends (Elaire and Otto). They're all essentially slightly more motivated townsfolk with a fair amount of training in combat and some research in magic. For now I'll just say you're doing missions as commissioned by the hunter's guild in town.

The only playable areas in the demo are the town, a small portion of the overworld, and one dungeon. I can get through the demo myself in about 15-20 minutes, probably 20-30 for anyone else depending on if they decide to do some research in the "library" of books in the guild, and taking into account only I know where everything is.. dungeon is pretty simple though, very straightforward like a first one typically should be.

So far I'm pretty much just using the RMVX RTP for maps, I may do some other dabbling/implementation though eventually.

There's no real backstory to speak of in the start of the game, you just move along and do stuff. I'm making higher intentions on revealing things as you progress through the game, especially in character development.. and perhaps even moreso when doing optional missions.

My overworld map so far is pretty ordinary if that, so apologies in advance. I took some effort to try and make most of the maps pretty detailed/enjoyable though as well.

The furthest progress that can be made in the demo is accepting the second mission.

Been a long time.. howdy

It's been about a year since I last really dabbled in RPG Maker.. I'm not sure how many people from way back in the day are around these parts but either way it'd be cool to see new/old faces!

I've gone by Goldenguy on GameFAQs since 2001 and at RMDB when it existed.

Short and sweet bit:

- I'm 24 in less than a month.
- I work in RPG2K/3 (mainly due to working full time, not having the real desire to learning all the scripting in RMXP and such, and being far more familiar with 2k/3)
- My games tend not to have the most elaborate storylines but I try what I can to back them with likable characters and developed areas.

I probably won't frequent this place religiously but I'd say you can expect to see me around.

Cheers!
Pages: 1