Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - PeterB

Your scripts / Magic Mirror (ALTTP) warp script
February 21, 2021, 08:10:27 AM
Hi Guys,

Just thought I would share my script for my Magic Mirror item.

It allows you to transport between maps as in ALTTP.

Hopefully it should be self explanatory but if not please let me know.


-- Allows you to travel from Dark world maps to Light world maps
-- Maps need to have the same name or you need to work out how to
-- change to new map. My maps have the same world layout so you can
-- go to the same place/co-ordinates. The map id's however are slightly
-- different, i.e. dark_world/castle versus light_world/castle. Hence the
-- string.sub 11 characters to remove dark_world and add light_world
-- back in the teleport statement.

local item = ...
local game = item:get_game()
function item:on_started()

function item:on_using()
  local hero = game:get_hero()
  local map = item:get_map()
  local map_id = map:get_id()
  if map:get_world() == "dark_world" then -- go from dark_world back to light_world
    new_map = string.sub(map_id, 11)
    -- Teleport."warp")
    hero:teleport("light_world" .. new_map .. "", "_same", "fade") -- takes you to same position on light_world map

Development / Help with name display code
January 04, 2020, 09:20:50 PM
Hey guys,

I am after some help with my savegames.lua. I am trying to get the players name from the save1.dat file (or 2 or 3) and print it on the game select screen.

I can't see what I am doing wrong with drawing it on the screen, so am after some help please.

Here is the relevant section of code, and I have attached the savegames.lua file.

Thanks in advance.


local function read_savegames()

  for i = 1, 3 do
    local file_name = get_savegame_file_name(i)
    local surface = sol.surface.create(272, 16)
    surface:set_xy(24, 8 + i * 48)
    savegames_surfaces[i] = surface

player_name_text = sol.text_surface.create{
      font = "alttp",
      font_size = 11,

    if not then
      games[i] = nil
  local name = "- " .. sol.language.get_string("savegames_menu.empty") .. " -"
      -- Existing file.
    local game = game_manager:create(file_name)
    games[i] = game

-- Player name get and display
player_name_text:draw(surface, 90, 16 + i * 48)

    -- Hearts.
    draw_hearts(game, surface)
Hi, does anyone know how to use the update tileset script?

I tried putting the script in the ../data/scripts folder and calling it from the game_manager script but i am getting the below error.

Any ideas, as i can't find any documentation on how to use it?

Error: In on_started: scripts/update_maps_to_rearranged_outside_tilesets.lua:26: attempt to concatenate global 'file_path' (a nil value)
stack traceback:
[C]: in function '__concat'
scripts/update_maps_to_rearranged_outside_tilesets.lua:26: in function 'get_pattern_mapping'
scripts/update_maps_to_rearranged_outside_tilesets.lua:107: in main chunk
[C]: in function 'require'
scripts/game_manager.lua:10: in main chunk
[C]: in function 'require'
scripts/menus/savegames.lua:4: in main chunk
[C]: in function 'require'
main.lua:20: in function <main.lua:9>
Game art & music / ALTTP font
August 01, 2019, 11:13:51 PM

In case anyone wants the arrows for the signs in the Link to the past font, here is one i have just done.

It uses " for the up arrow, # for the down arrow and [] for the left and right arrows.

Hi does anyone know which lava tiles go behind the mini volcanoes?

The first image is the original, and the second my attempt, using the tiles in the third image.

Or is there some sort of tile that goes over the top to mask the bits around the edges???

I keep looking through the tile set but can't seem to replicate the original!!!
Development / Quest document - updated pdf
April 20, 2019, 09:33:17 AM
Hi Guys,

Has anyone got an updated pdf of the latest quest document that they could share?


Hey guys,

I am having trying to run my quest in Ubuntu.

I think it may be an issue with GL and the new Shaders?

I have reinstalled all the packages as i thought it may be a SDL2 issue and have reinstalled Solarus and the Editor but with no joy.

The Editor works fine, i just can't run any games from either Solarus or the Editor???

This is what I am getting in the console when trying to run my quest in the Editor.

Info: Solarus 1.6.0
Info: Opening quest '/home/dad/Desktop/My Zelda Quest Draft'
Info: Joypad support enabled: true
Info: SDL: 2.0.8
Fatal: Cannot create the renderer: Could not create GL context: BadValue (integer parameter out of range for operation)