Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

___________________________________________________________

The "Script" command is on the third page of event commands if I remember correctly, at the very bottom right.

The command is probably like this:
Code:
$game_map.replace_tileset(tileset_id)
Replace "tileset_id" with the ID of the tileset.
For example, if you wanted to change it to grasslands it would be:
Code:
$game_map.replace_tileset(1)

I hope that helps. ^_^
 
Wow... a double post in 3 mintes... just in case you don't know, you're not allowed to double post unless no one has replied in 3 days to your thread.

Use:
$game_map.replace_tileset(x)
where x is the tileset #

geez, you should read the page you got it from...
i found it afte 20 sec of reading XD
 
Right-click on the "Main" entry at the very bottom of the scripts database (the column on the left side) and click "Insert". You'll get a new entry where you can copy/paste your script :)
 
Paste this in a new, empty script that you should create before 'Main':

Code:
class Game_Map
# ---------------
attr_accessor :new_tileset
[...]
def setup(map_id)
  @new_tileset = false
   [...]
end
[...]
def replace_tileset(new_tiles) # New Method
  tileset = $data_tilesets[new_tiles]
  @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
  $game_map.new_tileset = true
end

After that, in your script browser, find the 'Spriteset_Map' script and click it. Search for 'def update', and right after it, paste this:

Code:
 if $game_map.new_tileset == true
    @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
    @tilemap.priorities = $game_map.priorities
    for i in 0..6
      autotile_name = $game_map.autotile_names[i]
      @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
    end
    $game_map.new_tileset = false
  end

Don't delete anything that was already there. :)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top