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

Messages - wizard_wizzle (aka ZeldaHistorian)

Your projects / Re: Zelda: Book of Mudora
December 27, 2016, 08:32:01 PM
Ezra, that behavior is at least partially intentional. These NPCs should become traversable when they get too close to the hero in order to prevent the hero from getting stuck between a character and a non-walkable tile (which happened in old versions). There should be no problem with talking to them though - if you're at a normal distance the "Speak" icon should appear. If this is not happening at all, do you get an error.txt file generated?
Disclaimer: I make no promises that my code is any good - use at your own risk :)
General discussion / Re: Rip the tiles from Graal Classic
December 10, 2016, 07:12:48 PM
Graal was originally a Zelda re-make, before they got a take down notice from Nintendo and changed the graphical style enough to comply. This was back when it was on PC long before iPhone (I actually didn't realize it was on iPhone!). I also don't think the graphics are that impressive, they just scaled them up from the original Zelda ones without increasing the quality much, but all additional resources for Solarus are useful!
Your projects / Re: Zelda: Book of Mudora
December 10, 2016, 05:59:50 PM
To address each of your bullet points:

  • Not really an issue - I'm okay with this behavior :)
  • Known issue because I didn't use a fixed width font, and honestly I'm not that concerned unless it effects readability on quest-necessary messages. If you do send screenshots I will fix them though.
  • If you can provide the specific maps (screenshots would work) then I can fix these too.
  • You should do things out of the goodness of your heart, not for thanks  :P It's fixed anyway!
  • Intended behavior for the dungeon. The dungeon is actually indoors and outdoors (for a few maps).
  • This should be fixed, thanks!
  • Also fixed!
  • The green potion should be on the table with a price of zero, not given automatically. Let me know if that wasn't the case.

All of those fixes (including the freeze after opening the chest that you mentioned) will be included in the next release. Thanks again for the reports!
Your projects / Re: Zelda: Book of Mudora
December 08, 2016, 03:31:46 AM
Hey Metalloman - thanks for playing and thanks for the reports!

For the blocking bug, there should have been an error.txt file generated in the game directory - could you please email that to me at

As for the other issues, I'll take a look at them when I get some free time. It probably won't be for a week or two due to some work stuff.
Your projects / Re: Zelda: Book of Mudora
November 28, 2016, 04:29:00 AM
Version 1.1 has been released, which includes fixes for the issues mentioned on this thread. Download is at
Your projects / Re: Zelda: Book of Mudora
November 24, 2016, 06:09:51 PM
Yeah kn8790, I actually use that controller myself :)

Ezka, I'm working on a new version that should fix most of the map tracking issues. Hopefully it will be released this weekend after the holiday.
Development / Equipment items as a class
October 13, 2016, 03:08:59 PM
I've been thinking about equipment items and if it would be possible to extend them to work more like a class in an RPG, so you could give custom stats and such to items. The ultimate extension would be to allow for a sort of crafting system where you could customize the item and it would be saved with the custom stats and sprite.

My thought is this should be possible by creating an item script for each type of item, say a sword or dagger or axe, then using variants to cover the different sprites. Then I'm wondering if it's possible to create a function in the item script that's called after item_create that passes and sets the stats and saves the item. The condition I see is that you'd still only be able to have one type of each item, or at least one variant, right?

Any other interesting ideas anyone has about extending the built in items? Or is this something that's better handled by ditching the built in items and using custom entities?

I updated the script on the original topic. Feel free to try it out and let me know if it works.
Development / Re: Side scrolling functionality
October 11, 2016, 01:08:36 AM
I realize this is kind of grave digging, and I apologize, but I decided to do some work and this script and wanted to post it in the original topic.

I generalized the script a bit and built it around a state engine for the hero. The animations used for the hero sprite are the same as the state names.

The gravity updating is not done via a timer rather than the map's on_update routine, as Diarandor had suggested in another topic. I also added a "multi jump" option to allow the player to press the jump key several times. It doesn't work the way I would like yet, but the basics are there. Finally, I added a ladder option that Christopho had suggested on another topic.

Code (lua) Select

local game_manager = {}
local game_over_menu = {}
local map_metatable = sol.main.get_metatable("map")

local gravity = 5       -- How often to update gravity in milliseconds (move the hero down one pixel this often). Default is every 10 ms.
local jump_height = 40  -- How high to make the hero go when he jumps (in pixels). Default is 40.
local multi_jump = 2    -- How many times to allow the character to jump. Default is 1, or enter 0 to disable jumping entirely.
local state             -- "stopped", "walking", "jumping", "ladder", "dying", "action", "attack"
local last_anim

function game_manager:start_game()
  local exists ="save1.dat")
  local game ="save1.dat")
  if not exists then
    -- Initialize a new savegame.
  function game:on_started()
    sol.timer.start(gravity, function()
      if self:get_map() ~= nil then
        -- Gravity: move entities down one pixel on every update if there's no collision.
        --   (like with the ground or a platform) and hero not jumping or on a ladder.
        local hero = self:get_hero()
        local x, y, l = hero:get_position()
        if state ~= "jumping" and self:get_map():get_ground(hero:get_position()) ~= "ladder" then
          if not hero:test_obstacles(0, 1) then hero:set_position(x, (y + 1), l) end
        elseif state == "jumping" then
          for i = 1, jump_height do
            if not hero:test_obstacles(0, -1) then hero:set_position(x, (y - 1), l) end
          sol.timer.start(gravity * jump_height, function()
            if self:is_command_pressed("right") or self:is_command_pressed("left") then
              state = "walking"
              state = "stopped"
        for entity in self:get_map():get_entities("g_") do
          local gx, gy, gl = entity:get_position()
          if not entity:test_obstacles(0, 1) then
            entity:set_position(gx, (gy + 1), gl)
      return true
  function game:on_command_pressed(command)
    local hero = game:get_map():get_hero()
    local multi_jump_temp = multi_jump
    if command == "up" then
      if not self:is_suspended() and not jumping and multi_jump_temp > 0 then
        if game:get_map():get_ground(hero:get_position()) ~= "ladder" then
          -- Override default behavior and make the hero jump up!
          state = "jumping"
          multi_jump_temp = multi_jump_temp - 1
          state = "ladder"
        state = "stopped"
    elseif command == "action" and not self:is_suspended() then
      state = "action"
    elseif command == "attack" and not self:is_suspended() then
      state = "attack"
      state = "stopped"
    last_anim = hero:get_animation()
  function game:on_command_released(command)
    state = last_anim
    if state == nil then state = "stopped" end
  function game:on_game_over_started(), game_over_menu)
  function game_over_menu:on_started()
    local hero = game:get_hero()
    local map = game:get_map()
    local camera_x, camera_y = map:get_camera():get_position()
    local hero_x, hero_y = hero:get_position()
    hero_dead_x = hero_x - camera_x
    hero_dead_y = hero_y - camera_y

    hero_dead_sprite = sol.sprite.create("hero/tunic1")
    state = "dying"
    hero_dead_sprite.on_animation_finished = function()
      sol.timer.start(self, 500, function()
  function game_over_menu:on_finished()
    local hero = game:get_hero()
    if hero ~= nil then hero:set_visible(hero_was_visible) end
    music = nil
    hero_dead_sprite = nil
    fade_sprite = nil
  function game_over_menu:on_draw(dst_surface)
    hero_dead_sprite:draw(dst_surface, hero_dead_x, hero_dead_y)

return game_manager

Please post any improvements or critiques!
Christopho, I guess I mis-spoke. The lights actually scroll with the map, when they really should stay stationary. Unfortunately my video capture software is acting up at the moment, so I can't get a video.

MetalZelda, that worked perfectly! I used that trick to disable drawing of the lights for about a half second while the map scrolls and it looks pretty good.
I'd like a script to detect when the map is undergoing a scrolling transition - is that possible? This may be related to Solarus issue #989 (, but my screen overlay for map tone scrolls with the map when the hero hits the teletransporter. This is not the desired behavior since all of the lights that I've drawn on the surface move when they should stay stationary. My contingency plan is to disable drawing of those lights at the moment of screen scrolling, but I can't figure out if that's possible.
Your projects / Re: Zelda: Book of Mudora
October 05, 2016, 02:33:57 PM
Which fairy fountain?
Your projects / Re: Zelda: Book of Mudora
October 05, 2016, 05:10:48 AM
Hey Stormfruit, please log any bugs at if you don't mind. Also if there's an error.log file generated, including any output from that is a big help. Thanks!
Your projects / Re: Zelda: Book of Mudora
October 03, 2016, 05:39:34 PM
I can take a look at his dialogs. How much alchemy stone do you have currently?

Isan (Kasuto's page) is part of the trade sequence - he's near the end and the thought bubble shouldn't be there if you can't trade with him yet. What trade item do you have currently?