Adjustments to Galv’s Superman Ability V.1.5

Hi guys,

I want my main hero to send out a parrot on the map for exploring. Due to lack of solutions on how to properly event this without bugs, I plan on going with Galv’s Superman Ability V.1.5 for this. There's also a Demo for this script to check out.

The script allows me to have a flying character or at least it transforms my hero into something superman-like that's able to fly across the map. It's almost what I want.

I need a few adjustments to this script.
  • When the character starts flying, on the field from where the transformation is started, there should remain a copy of the original hero, waiting for the parrot to come back. The copy of the hero should maintain the correct facing. The original script just transforms the player. Which is fine, as long as a copy of the hero remains on its place so it looks like they had just send out a parrot to explore stuff.
  • Per default, the script allows flying heros (e.g. parrot) to land anywhere they want. This should be prohibited. The parrot should only be allowed to land if it hovers over the main-hero-copy and click ENTER. With this, I want to simulate how the parrot lands on the hero's shoulder again.
Sounds complicated, but I hope you understand what I want to achieve.

If you have any questions, feel free to ask.
Have you tried creating any event with a blank first page that changes to the second page after a switch is turned on? Of course, you'd also need to initially place it in an empty space on the map for the mean time and then place it on the same coordinates as the hero's.
Have you tried creating any event with a blank first page that changes to the second page after a switch is turned on? Of course, you'd also need to initially place it in an empty space on the map for the mean time and then place it on the same coordinates as the hero's.
Yes, I tried that but it refuses to work correctly. As soon as I create an event that requests the same key input at the same time as the script in parallel process, the script itself doesn't work properly. That said, I'm sure I need the adjustment directly in the script.

1690147561267.png
It's almost what I want.
Try this. I used Yanfly's Spawn Event script to make the effect
Spoiler: Stationary place holder
Ruby:
#------------------------------------------------------------------------------#
#  Galv's Superman Ability
#------------------------------------------------------------------------------#
#  For: RPGMAKER VX ACE
#  Version 1.5
#------------------------------------------------------------------------------#
#  2023-07-23 - Version 1.5a - added Bird option
#------------------------------------------------------------------------------#
#  Instructions
#    Requires a blank event on the map listed below with the name <bird>
#    Requires Yanfly's Spawn Events script above Galv Superman

module Galv_Superman
#------------------------------------------------------------------------------#
#  SCRIPT SETUP OPTIONS
#------------------------------------------------------------------------------#
  BIRD_MAP = 2 # Map that the event cloned will be located
  EVENT_ID = 1 # Event ID on map used to clone the actor
end

if $imported["YEA-SpawnEvent"]

class Game_Player < Game_Character
  attr_accessor :landing
  attr_accessor :stop_move
 
  alias :r2_spawn_fly_event_takeoff :force_takeoff
  def force_takeoff
    $game_map.spawn_bird_event
    r2_spawn_fly_event_takeoff
  end
 
  def blocking_event?
    $game_map.events_xy($game_player.x, $game_player.y).each do |event|
      return true if event.name.include?("<bird>")
    end
    return false
  end
 
  alias :r2_bird_land_delete_event  :land
  def land
    r2_bird_land_delete_event
    if $game_player.altitude <= 0
      $game_map.clear_superman
      @stop_move = false
    end
  end
 
  def move_by_input
    return if @stop_move == true
    galv_superman_player_move_by_input
    if Input.trigger?(Galv_Superman::BUTTON) && !@taking_off && !@landing
      return if !$game_switches[Galv_Superman::ENABLE_SWITCH]
      return if !$game_player.can_fly? || !$game_player.normal_walk? || $game_map.interpreter.running?
      if @in_air
        return if !$game_map.airship_land_ok?($game_player.x, $game_player.y) || !blocking_event?
        if blocking_event?
          @stop_move = true
        end
        force_land
      else
        force_takeoff
      end
    end
  end

  def check_action_event
    return false if in_airship?
    check_event_trigger_here([0])
    check_event_trigger_fly_here([0,1]) if @in_air
    return true if $game_map.setup_starting_event
    check_event_trigger_there([0,1,2])
    $game_map.setup_starting_event
  end

  def check_event_trigger_fly_here(triggers)
    start_map_event(@x, @y, triggers, true)
  end
end

class Game_Map

  def spawn_bird_event
    map_id = Galv_Superman::BIRD_MAP
    map = load_data(sprintf("Data/Map%03d.rvdata2", map_id))
    event = generated_event(map, Galv_Superman::EVENT_ID)
    key_id = (@events.keys.max || 0) + 1
    event = clone_event(event, key_id)
    @events[key_id] = Game_Event.new(@map_id, event)
    @events[key_id].moveto($game_player.x, $game_player.y)
    @events[key_id].set_graphic($game_player.character_name, $game_player.character_index)
    @events[key_id].set_direction($game_player.direction)
    @event_var = key_id
    SceneManager.scene.spriteset.refresh_characters
  end
  def clear_superman
    num = @event_var
    @events[num].erase
    @events[num].clear_starting_flag
    @events[num].clear_page_settings
    @events[num].refresh
  end
end

class Game_Event < Game_Character
  def name
    return @event.name
  end
end

end

Spoiler: Superman addon - follower support
This works with the normal superman script, not the follower one. Because the followers are hidden when flying.
Ruby:
#------------------------------------------------------------------------------#
#  Galv's Superman Ability
#------------------------------------------------------------------------------#
#  For: RPGMAKER VX ACE
#  Version 1.5
#------------------------------------------------------------------------------#
#  2023-07-23 - Version 1.5a - added Bird option
#------------------------------------------------------------------------------#
#  Instructions
#    Requires a blank event on the map listed below with the name <bird>
#    Requires Yanfly's Spawn Events script above Galv Superman

module Galv_Superman
#------------------------------------------------------------------------------#
#  SCRIPT SETUP OPTIONS
#------------------------------------------------------------------------------#
  BIRD_MAP = 2 # Map that the event cloned will be located
  EVENT_ID = 1 # Event ID on map used to clone the actor
end

if $imported["YEA-SpawnEvent"]

class Game_Player < Game_Character
  attr_accessor :landing
  attr_accessor :stop_move
 
  alias :r2_spawn_fly_event_takeoff :force_takeoff
  def force_takeoff
    $game_map.spawn_bird_event
    @followers_shown = false
    @followers_shown = true if $data_system.opt_followers && $game_party.members.count > 1
    $game_player.followers.visible = false if @followers_shown
    r2_spawn_fly_event_takeoff
  end
 
  def blocking_event?
    $game_map.events_xy($game_player.x, $game_player.y).each do |event|
      return true if event.name.include?("<bird>")
    end
    return false
  end
 
  alias :r2_bird_land_delete_event  :land
  def land
    r2_bird_land_delete_event
    if $game_player.altitude <= 0
      $game_player.followers.visible = @followers_shown if @followers_shown
      $game_player.followers.refresh if @followers_shown
      $game_map.clear_superman
      @stop_move = false
    end
  end
 
  def move_by_input
    return if @stop_move == true
    galv_superman_player_move_by_input
    $game_player.followers.gather if @followers_shown && @in_air
    if Input.trigger?(Galv_Superman::BUTTON) && !@taking_off && !@landing
      return if !$game_switches[Galv_Superman::ENABLE_SWITCH]
      return if !$game_player.can_fly? || !$game_player.normal_walk? || $game_map.interpreter.running?
      if @in_air
        return if !$game_map.airship_land_ok?($game_player.x, $game_player.y) || !blocking_event?
        if blocking_event?
          @stop_move = true
        end
        force_land
      else
        force_takeoff
      end
    end
  end

  def check_action_event
    return false if in_airship?
    check_event_trigger_here([0])
    check_event_trigger_fly_here([0,1]) if @in_air
    return true if $game_map.setup_starting_event
    check_event_trigger_there([0,1,2])
    $game_map.setup_starting_event
  end

  def check_event_trigger_fly_here(triggers)
    start_map_event(@x, @y, triggers, true)
  end
end

class Game_Map

  def spawn_bird_event
    map_id = Galv_Superman::BIRD_MAP
    map = load_data(sprintf("Data/Map%03d.rvdata2", map_id))
    event = generated_event(map, Galv_Superman::EVENT_ID)
    key_id = (@events.keys.max || 0) + 1
    event = clone_event(event, key_id)
    @events[key_id] = Game_Event.new(@map_id, event)
    @events[key_id].moveto($game_player.x, $game_player.y)
    @events[key_id].set_graphic($game_player.character_name, $game_player.character_index)
    @events[key_id].set_direction($game_player.direction)
    @event_var = key_id
    SceneManager.scene.spriteset.refresh_characters
  end
  def clear_superman
    num = @event_var
    @events[num].erase
    @events[num].clear_starting_flag
    @events[num].clear_page_settings
    @events[num].refresh
  end
end

class Game_Event < Game_Character
  def name
    return @event.name
  end
end

end
Or you can simply use my custom script Falkoner ACE.
It will replicate all of the features you requested here but it will only let you use your pet bird if the map's notebox includes a very specific notetag.
I'm sure Kyonides will update his script, You can interact with events with my option.
since Galv's superman works like a normal character. You just have to be in front of the event not on top of it for same as character event, and you can be on top of events that are below character.

*Update.
Code above updated to allow interacting with event when flying.
Can interact with below character and same as character events.
@Roninator2 Hi Ronni. I don't have an idea on how to actually use your script, it spawns me errors and I cannot fix them, unfortunately.

1690383545310.png
I don't have an idea on how to actually use your script, it spawns me errors and I cannot fix them, unfortunately.
I used Yanfly Spawn events script, so you need to add it in. Then make an event on a map with the name <bird>
Then in my script change the settings to what map and event number it is.
It does not need to be on the same map as the one you are using the parrot in.
I used Yanfly Spawn events script, so you need to add it in.
I did previously. Getting the error anyway on play test.
I did previously. Getting the error anyway on play test.
Edited my response above.
The order should be yanfly spawn
galv superman
my scirpt
in the test project I have it works fine.
Of course your using a new game and not a saved game right?

Script updated to stop player movement.
Added a variable to save the event id to control deleting the created event.

Script updated again. Took out global variable and set instance variable.
Here is the test project that works. It's Galv's demo with the added scripts, just talk to the guy above you and press A.

Original thread: https://forums.rpgmakerweb.com/threads/adjustments-to-galvs-superman-ability-v-1-5.159634/