Zelda's Adventure: Solarus Edition

Started by CrookiNari, April 24, 2018, 11:27:48 AM

Previous topic - Next topic
May 18, 2018, 01:18:14 PM #30 Last Edit: May 18, 2018, 01:55:35 PM by PhoenixII54
Ok, just got the latest commit, testing right now, and i can confirm dialogs now work (tested with waterfall sign)

But :
Error: Cannot find quest file 'maps/ae24.dat'
Fatal: Failed to load map data file 'maps/ae24.dat'


In map Forest of Ogbam/af26
Error: No such dialog: '' when interacting with any shop item, the left one having no sprite displayed

In map Forest of Ogbam/ag28 : western telestransporter is not set to map Forest of Ogbam/af28
In map Forest of Ogbam/ah29 : the witch has no interaction (yet)

(maybe not a bug) In map Plain of Andor/aj24 : the thirsty woman repeats the same dialog even after accepting her quest
Dying after entering/leaving indoors/under_ag32, sends back to 01. Shrine of Earth/ca07 with the following message :
Error: The savegame refers to a non-existing map: 'Forest of Ogbam/ag32'

In map Vision Henge/visionhenge6
Fatal: Missing previous surface for scrolling when trying to go south

and i think that's all for now unless i missed something.

PS : i slightly modified hud script to display current map in the console, to help debugging

Quote from: PhoenixII54 on May 18, 2018, 01:18:14 PM
Error: Cannot find quest file 'maps/ae24.dat'
Fatal: Failed to load map data file 'maps/ae24.dat'

This was an issue with the transporter in ae23. Fixed.

Quote from: PhoenixII54 on May 18, 2018, 01:18:14 PM
In map Forest of Ogbam/af26
Error: No such dialog: '' when interacting with left shop item, which has no sprite displayed
Like I said before, the merchant isn't really able to sell stuff yet since I'm yet to learn how shops work. As for the spriteless item, I'm not really sure how to make new items from scratch and how to assign a sprite to them. The item in question happens to be the level 2 shield, by the way.

Quote from: PhoenixII54 on May 18, 2018, 01:18:14 PM
In map Forest of Ogbam/ag28 : western telestransporter is not set to map Forest of Ogbam/af28
The actual problem with that one is that it was set to the destination icon rather than just scrolling over. Fixed.

Quote from: PhoenixII54 on May 18, 2018, 01:18:14 PM
In map Forest of Ogbam/ah29 : the witch has no interaction (yet)
That's intentional. The encounter with her is going to be complex, so I'm just leaving her aside for now.

Quote from: PhoenixII54 on May 18, 2018, 01:18:14 PM
(maybe not a bug) In map Plain of Andor/aj24 : the thirsty woman repeats the same dialog even after accepting her quest
Also intentional. There's a lady at aj22 who does the same thing. Both of them are intended to be minor sidequests, which haven't yet been implemented. I was more concerned with ensuring that the yes and no dialog worked properly since I struggled with it at first.

Quote from: PhoenixII54 on May 18, 2018, 01:18:14 PM
Dying after entering/leaving indoors/under_ag32, sends back to 01. Shrine of Earth/ca07 with the following message :
Error: The savegame refers to a non-existing map: 'Forest of Ogbam/ag32'
I find that odd, and don't really know what to do about it. Ideally, you'd start back at the centre of Vision Henge on loading game and death, unless saved inside a dungeon. The only reason that ca07 is where you end up is because it's chronologically first in all the maps.

Quote from: PhoenixII54 on May 18, 2018, 01:18:14 PM
In map Vision Henge/visionhenge6
Fatal: Missing previous surface for scrolling when trying to go south
Another mapping issue. Fixed.

This is really good stuff you're doing here. I super appreciate it!  ;D

May 18, 2018, 02:10:39 PM #32 Last Edit: May 18, 2018, 02:41:48 PM by PhoenixII54
UPDATE : in latest commit, tree stomp/cabin behind merchand of map Ogbam/af26 is partially traversable

on the other topic
QuoteOne thing I'm debating over is reshaping the river separating the Plain from the rest of the overworld. I did my best to try and replicate how it looked in the original game, but I'm not sure I like how it looks and can potentially interfere with moving between screens. So my thought is to simply make it nice and straight across with few curves whatsoever, but if it stays the way it is then it's no skin off my nose. Anybody who plays it, can you give me your thoughts on it?
Reference map: https://i.imgur.com/6seyD8Qr.jpg

one thing to be aware of is that you could fall in the deep water right after a transition if you make a diagonal near the map border (EDIT (2:36 PM french time): aaand, i just got stuck and drowned), so you whould avoiding it when possible, either by making it straight or by adding some obstacles
Anyway, it's general shape looks okay to me.

EDIT² Not related, but : i think the Octos are broken/not finished (commit 74fcf05805bf16facff805d5b6ec82ae43858062):

Error: In timer callback: enemies/octorok.lua:57: attempt to call method 'go' (a nil value)
stack traceback:
[C]: in function 'go'
enemies/octorok.lua:57: in function <enemies/octorok.lua:49>

Quote from: PhoenixII54 on May 18, 2018, 02:10:39 PM
in latest commit, tree stomp/cabin behind merchand of map Ogbam/af26 is partially traversable
Fixed.

Quote from: PhoenixII54 on May 18, 2018, 02:10:39 PM
on the other topic
QuoteOne thing I'm debating over is reshaping the river separating the Plain from the rest of the overworld. I did my best to try and replicate how it looked in the original game, but I'm not sure I like how it looks and can potentially interfere with moving between screens. So my thought is to simply make it nice and straight across with few curves whatsoever, but if it stays the way it is then it's no skin off my nose. Anybody who plays it, can you give me your thoughts on it?
Reference map: https://i.imgur.com/6seyD8Qr.jpg

one thing to be aware of is that you could fall in the deep water right after a transition if you make a diagonal near the map border (EDIT (2:36 PM french time): aaand, i just got stuck and drowned), so you whould avoiding it when possible, either by making it straight or by adding some obstacles
Could you provide examples of where it's particularly hazardous? I could probably put in some rocks or something to block it off.

Quote from: PhoenixII54 on May 18, 2018, 02:10:39 PM
Not related, but : i think the Octos are broken/not finished (commit 74fcf05805bf16facff805d5b6ec82ae43858062):

Error: In timer callback: enemies/octorok.lua:57: attempt to call method 'go' (a nil value)
stack traceback:
[C]: in function 'go'
enemies/octorok.lua:57: in function <enemies/octorok.lua:49>

Fixed.

Hey, just a question, what was the problem with your octorocks/what did you do to fix them? I've had a similar problem.

I think the problem was that they weren't actually shooting rocks, which was because I'd copied the LUA file from another Solarus project, and as a result the script couldn't find the location of the rocks. So I redirected it. If that's not the issue then I'm not entirely sure what I did, but I can post my script if you need it.

QuoteCould you provide examples of where it's particularly hazardous? I could probably put in some rocks or something to block it off
in maps Plain of Andor/af21 and Plain of Andor/ae21, Plain of Andor/ah21, : the border between shallow and deep water (especially the swallow side), is the best example of it (just walk north there and you'll be continuously be drown until game over)
Plain of Andor/ah20, same idea with the right side of the river

All right, I've amended those maps so hopefully the drowning issue won't occur. I've also put in a bunch of enemies around the Plain so I'm currently testing balance.

Hello all,
I've got an issue with trying to create a walking NPC. There's a guy in AG20 I want to simply walk back and forth by the river, but so far all I've gotten is this error message repeated over and over:
Error: Illegal direction 2 for sprite 'npc/traveller 2' in animation 'walking'
Here is the code:
local map = ...
local game = map:get_game()

function map:on_started()

end

local movement = sol.movement.create("path")
  movement:set_path{4,4,4,4,4,0,0,0,0,0}
  movement:set_speed(20)

movement:start(traveller2)
end

function traveller2:on_interaction()
game:start_dialog ("plains_traveller")

end

function map:on_opening_transition_finished()

end

May 25, 2018, 11:20:45 AM #39 Last Edit: May 25, 2018, 11:24:23 AM by PhoenixII54
The problem is that the engine expects NPC to have 4 sprite directions, and i suppose you only put 2 in your animation. To fix this, you must duplicate some of its directions to have all 4 required, in case you want to add more to the path.

Another thing to precise is that your movement might not loop as you scripted it.Use movement:set_loop() to define whever you want it to loop or not.

Also, you can use timers to enhance your moves, like, walk to point A, wait, turn left, wait, go to point B, wait, etc. I suppose it is not in your priorities yet, but it will definetely add live to your NPC.


It certainly isn't high on my priorities list, but I was watching the Movements tutorial last night and got frustrated that I couldn't get it to work myself. I'll probably have to address it at a later date.

I noticed something else in your code- the movement creation isn't inside any function, and it looks like you have an extra "end" after the code that has to do with the movement. I'd put the movement stuff in map:on_started()


He's talking about this snippet of code:

Code ( lua) Select
local movement = sol.movement.create("path")
  movement:set_path{4,4,4,4,4,0,0,0,0,0}
  movement:set_speed(20)

movement:start(traveller2)
end


Either this a copy-paste error, or you did forget the function decleration, but in any case, if i executed it, i would get this error message (not in this exact format, but whatever) :
Error : unexpected symbol "end" at line 13:1

Sorry I've been quiet the last couple of days, I've been finishing the other maps and toying with boss scripts in the first dungeon. This is the script for AG20 as at writing:
local map = ...
local game = map:get_game()

-- Event called at initialization time, as soon as this map becomes is loaded.
function map:on_started()
local movement = sol.movement.create("path")
  movement:set_path{4,4,4,4,4,0,0,0,0,0}
  movement:set_speed(20)
end

function movement:start(traveller_2)

end
  -- You can initialize the movement and sprites of various
  -- map entities here.

function traveller_2:on_interaction()
game:start_dialog ("plains_traveller")

end

-- Event called after the opening transition effect of the map,
-- that is, when the player takes control of the hero.
function map:on_opening_transition_finished()

end

The error I get is: Error: In maps/Plain of Andor/ag20: [string "maps/Plain of Andor/ag20.lua"]:20: attempt to index global 'movement' (a nil value)
Any thoughts?

I haven't quite updated my GitHub yet, but I'll do so probably tomorrow or soon enough. Soon I'll need to properly work on boss movements and puzzle mechanics. I think I don't want to move into mapping the rest of the game until I have more of the scripting stuff worked out.