• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Alternative title screen with a gameswitch

yonicstudios

Game Developer
54
Posts
8
Years
  • Let's say that I have two versions of a title screen. One of them will be loaded by default, and whenever a game switch is on, the other is loaded instead.

    But as far as I know, there is no way to get the switches list of the savefile from the game title or the load menu. Is there a way to access the switches and variables from a savefile without loading the save?
     
    Last edited:

    Telemetius

    Tele*
    267
    Posts
    9
    Years
  • I had to switch tileset for the same map before. I'm not sure if this is what you were looking for but I used this piece of code that i put above Main and below Complier:

    Code:
    #===============================================================================
    # ** Game_Map
    #===============================================================================
    
    class Game_Map
      #-----------------------------------------------------------------------------
      # * Public Instance Variables
      #-----------------------------------------------------------------------------
      attr_accessor :change_tileset
      #-----------------------------------------------------------------------------
      # * Alias Listings
      #-----------------------------------------------------------------------------
      alias_method  :changetileset_gmmap_setup, :setup
      #-----------------------------------------------------------------------------
      # * Setup
      #-----------------------------------------------------------------------------
      def setup(map_id)
        @new_tileset = false
        changetileset_gmmap_setup(map_id)
      end
      #-----------------------------------------------------------------------------
      # * Change Tileset
      #----------------------------------------------------------------------------- 
      def tileset=(new_tileset)
        tileset = $data_tilesets[new_tileset]
        @tileset_name = tileset.tileset_name
        @autotile_names = tileset.autotile_names
        @panorama_name = tileset.panorama_name
        @panorama_hue = tileset.panorama_hue
        @fog_name = tileset.fog_name
        @fog_hue = tileset.fog_hue
        @fog_opacity = tileset.fog_opacity
        @fog_blend_type = tileset.fog_blend_type
        @fog_zoom = tileset.fog_zoom
        @fog_sx = tileset.fog_sx
        @fog_sy = tileset.fog_sy
        @battleback_name = tileset.battleback_name
        @passages = tileset.passages
        @priorities = tileset.priorities
        @terrain_tags = tileset.terrain_tags
        @change_tileset = true
      end
    end
    
    #===============================================================================
    # ** Spriteset_Map
    #===============================================================================
    
    class Spriteset_Map
      #-----------------------------------------------------------------------------
      # * Alias Listings
      #-----------------------------------------------------------------------------
      alias_method :changetileset_ssmap_update, :update
      #-----------------------------------------------------------------------------
      # * Update
      #----------------------------------------------------------------------------- 
      def update
        if $game_map.change_tileset
          @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
          @tilemap.priorities = $game_map.priorities
          for i in 0..6
            autotile = $game_map.autotile_names[i]
            @tilemap.autotiles[i] = RPG::Cache.autotile(autotile)
          end
          $game_map.change_tileset = false
        end
        changetileset_ssmap_update
      end
    end

    Call with this script: $game_map.tileset = AB
     
    Back
    Top