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?
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.
#62
Development / Re: [QUESTION] Enabling a dynamic tile while an entity is being destroyed, not after
December 27, 2016, 08:25:21 PM
Disclaimer: I make no promises that my code is any good - use at your own risk
#63
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!
#64
Your projects / Re: Zelda: Book of Mudora
December 10, 2016, 05:59:50 PM
To address each of your bullet points:
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!
- 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 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!
#65
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 wright.matt.a@gmail.com?
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.
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 wright.matt.a@gmail.com?
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.
#66
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 https://dl.dropboxusercontent.com/u/77878808/zbom-1.1.zip
#67
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.
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.
#68
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?
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?
#69
Development / Re: Side scrolling game help - Not jumping
October 11, 2016, 01:09:29 AM
http://forum.solarus-games.org/index.php/topic,297.15.html
I updated the script on the original topic. Feel free to try it out and let me know if it works.
I updated the script on the original topic. Feel free to try it out and let me know if it works.
#70
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.
Please post any improvements or critiques!
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 = sol.game.exists("save1.dat")
local game = sol.game.load("save1.dat")
if not exists then
-- Initialize a new savegame.
game:set_max_life(1)
game:set_life(game:get_max_life())
game:set_starting_location("2")
end
game:start()
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
end
sol.timer.start(gravity * jump_height, function()
if self:is_command_pressed("right") or self:is_command_pressed("left") then
state = "walking"
else
state = "stopped"
end
end)
hero:set_animation(state)
end
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)
end
end
end
return true
end)
end
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
else
state = "ladder"
end
else
state = "stopped"
end
elseif command == "action" and not self:is_suspended() then
state = "action"
elseif command == "attack" and not self:is_suspended() then
state = "attack"
else
state = "stopped"
end
last_anim = hero:get_animation()
hero:set_animation(state)
end
function game:on_command_released(command)
state = last_anim
if state == nil then state = "stopped" end
game:get_map():get_hero():set_animation(state)
end
function game:on_game_over_started()
sol.menu.start(game:get_map(), game_over_menu)
end
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")
hero_dead_sprite:set_animation("hurt")
state = "dying"
sol.audio.stop_music()
hero:set_visible(false)
hero_dead_sprite:set_animation("dying")
hero_dead_sprite.on_animation_finished = function()
sol.timer.start(self, 500, function()
game:stop_game_over()
game:start()
end)
end
end
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
sol.timer.stop_all(self)
end
function game_over_menu:on_draw(dst_surface)
hero_dead_sprite:draw(dst_surface, hero_dead_x, hero_dead_y)
end
end
return game_manager
Please post any improvements or critiques!
#71
Development / Re: Is there a way to tell when the map is scrolling?
October 07, 2016, 03:52:23 AM
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.
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.
#72
Development / Is there a way to tell when the map is scrolling?
October 05, 2016, 03:25:21 PM
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 (https://github.com/solarus-games/solarus/issues/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.
#74
Your projects / Re: Zelda: Book of Mudora
October 05, 2016, 05:10:48 AM
Hey Stormfruit, please log any bugs at https://github.com/wrightmat/zbom/issues if you don't mind. Also if there's an error.log file generated, including any output from that is a big help. Thanks!
#75
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?
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?