Solarus-Games English Forum

Community => Your projects => Topic started by: CrookiNari on April 24, 2018, 11:27:48 AM

Title: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on April 24, 2018, 11:27:48 AM
Hello all,
My project is a full remake of the critically panned game Zelda's Adventure, released for the Phillips CD-i, in the style of A Link to the Past. I'm very new to the scene and could use some assistance with the programming, especially since a couple of my basic scripts aren't working properly and I can't figure out why.

At the moment I'm cycling through creating maps, sprites, fixing the general game design and writing the dialogue. I've made a bare-bones version of the starting area (Plain of Andor) and the first dungeon (Shrine of Earth). So anybody who can take a bit of the programming work off my hands would be greatly appreciated! :)
Title: Re: Zelda's Adventure: Solarus Edition
Post by: brlmnd on April 24, 2018, 03:38:11 PM
Hi CrookiNari :)

Welcome to the community!

Can't wait to see your game progress.

Hugs and love from us!
Title: Re: Zelda's Adventure: Solarus Edition
Post by: MetalZelda on April 24, 2018, 07:18:40 PM
QuoteZelda's Adventure, released for the Phillips CD-i

Oh snap, the best Zelda ever
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on April 25, 2018, 04:27:49 AM
I've created a repository in GitHub of everything I've made so far, but if I'm missing any files needed to make it playable then let me know! I'm currently moving onto the southern part of the map, the Forest of Ogbam. I've also started on a couple of the boss sprites, but I may end up needing some assistance with them too. Only the first three bosses have been started, and only Aviana is ready to go.

The link is in my signature but I'll put it here as well: https://github.com/CrookiNari/Zelda-s-Adventure
Title: Re: Zelda's Adventure: Solarus Edition
Post by: brlmnd on April 25, 2018, 10:00:54 AM
Impressive progress!

Congrats:)
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on April 25, 2018, 10:11:51 AM
Quote from: brlmnd on April 25, 2018, 10:00:54 AM
Impressive progress!

Congrats:)

Thank you! I've only been at it a month so far, but I reckon that's about a quarter of the overworld map that's been created. Still a lot of work to go, though.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on April 28, 2018, 10:47:48 AM
I've gotten to the point where I'm reasonably satisfied with the following boss sprites. Though I still think I need help with creating the in between animations as well as the remaining three bosses, which have been started but I'm not happy with them.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 03, 2018, 08:05:52 AM
I'm still looking for programmers who can help me out! My scripts keep not working right! :(
Title: Re: Zelda's Adventure: Solarus Edition
Post by: brlmnd on May 03, 2018, 08:58:05 AM
I have the same issue.

You can start mapping and make your quest. Later maybe someone on the forum will fix your bugs.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 03, 2018, 10:03:42 AM
Quote from: brlmnd on May 03, 2018, 08:58:05 AM
I have the same issue.

You can start mapping and make your quest. Later maybe someone on the forum will fix your bugs.

That's pretty much what I've been doing. There's quite a sizeable overworld so at least there's plenty to do on that front. I just wish that what is there actually had some stuff for the player to do. I'm pretty much just trying to scout for someone who will help out further down the line when it actually becomes important to implement some proper programming.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: llamazing on May 03, 2018, 02:30:01 PM
Quote from: CrookiNari on May 03, 2018, 08:05:52 AM
I'm still looking for programmers who can help me out! My scripts keep not working right! :(
I'm willing to help out. Indicate which scripts are not working and what you'd like them to do.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: Diarandor on May 03, 2018, 02:42:13 PM
As deviantart says, llamas are awesome! :P
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 04, 2018, 02:59:25 AM
Quote from: llamazing on May 03, 2018, 02:30:01 PM
Quote from: CrookiNari on May 03, 2018, 08:05:52 AM
I'm still looking for programmers who can help me out! My scripts keep not working right! :(
I'm willing to help out. Indicate which scripts are not working and what you'd like them to do.

My attempts at implementing a save system and branched dialogs from NPCs have fallen over, despite what I thought was following Christopho's tutorials to the letter. In the former, the game would crash if the save function was in the .lua script. In the latter, it did work at first until I moved my maps around, so one NPC I put in as a test doesn't bring up responses to Yes or No dialog, and the other one part of the actual game gets stuck on one response. If you make answer= No., then she will always say her "No" dialog, even if Yes is picked, and vice versa.

I got rid of the save function just so I could keep play testing while I drew the maps. I'll give you the NPC dialog scripts.

NPC 1:
function lady:on_interaction()

game:start_dialog("sample_text", function(answer)
  if answer == 3 then -- Yes.
  game:start_dialog("sample_text2")
  else
  game:start_dialog("sample_text3")
  end
end)
end


NPC 2:
function hungrylady:on_interaction()

game:start_dialog("hungrylady.dialog1", function(answer)
  if answer == 6 then -- No.
  game:start_dialog("hungrylady.no")
  else
  game:start_dialog("hungrylady.yes")
  end
end)


I have a lot of stuff I want to eventually implement in this game to really make it feel Zelda-like, so if these simple little things don't even work then it's not a good sign.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: Max on May 04, 2018, 04:36:44 AM
What's the text of the NPCs? If you aren't using the right syntax within your dialogs, the choices don't work with their ALTTP dialog script. For example, here's a sample dialog:

_npcs.sample_guy.1

Did you like your dinner?
$? Yes
$? No

_npcs.sample_guy.2

I'm glad it was tasty... NOW PREPARE TO DIE!
I poisoned it!!

_npcs.sample_guy.3

Oh no, was it because it was POISONED!?


So your map script would have:

Code (Lua) Select


function sample_guy:on_interaction()

game:start_dialog("_npcs.sample_guy.1", function (answer)

if answer == 2 then
game:start_dialog("_npcs.sample_guy.2")

else

game:start_dialog("_npcs.s.sample_guy.3")

end)

end



Don't copy/paste that without checking for typos, I typed this on mobile and autocorrect is zealous.


I don't think you would ever have something like if answer == 6 because the answer is relative to the choice's line in the box, not in the whole text string. So it'll always be 1-4.



It looks like you're using the whole pause system from the Solarus team's games, which I don't understand fully, so I can't help there : /
Title: Re: Zelda's Adventure: Solarus Edition
Post by: llamazing on May 04, 2018, 05:08:23 AM
Quote from: Max on May 04, 2018, 04:36:44 AM
I don't think you would ever have something like if answer == 6 because the answer is relative to the choice's line in the box, not in the whole text string. So it'll always be 1-4.
Max is correct in that the only way answer == 6 would work is if you modified the dialog script to display at least 6 lines of text. The dialog script currently in your github repo is set to display 4 lines.

I don't see any other problems with the code excerpts you posted on the forum. I'm not going to be able to help you without seeing your map script, dialogs.dat, and probably whatever script is giving you problems when saving.

I downloaded your quest from github but there aren't any maps so it must not be the latest.

Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 04, 2018, 05:16:16 AM
My first test NPC's dialog goes:

Oh, hello Princess! Didn't see you there!
Are you having a nice day?
  $? Yes
  $? No

Yes is "That's good!"
No is "Oh, pity."

The strange thing is, when I first did it, it worked fine. After moving the map into a different folder, it stopped working. There's nothing else wrong with the script, it doesn't throw out any errors or anything, it just doesn't give the proper response.

I'll address the second NPC when I get the first one working.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 04, 2018, 05:17:06 AM
Quote from: llamazing on May 04, 2018, 05:08:23 AM
I don't see any other problems with the code excerpts you posted on the forum. I'm not going to be able to help you without seeing your map script, dialogs.dat, and probably whatever script is giving you problems when saving.

I downloaded your quest from github but there aren't any maps so it must not be the latest.

Really? My bad, I'll put them in.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: Max on May 04, 2018, 06:05:39 AM
Quote from: CrookiNari on May 04, 2018, 05:16:16 AM
The strange thing is, when I first did it, it worked fine. After moving the map into a different folder, it stopped working. There's nothing else wrong with the script, it doesn't throw out any errors or anything, it just doesn't give the proper response.

One thing I noticed looking at your github is that your maps seem to be organized really different from mine. In my "data" folder, I have a "maps" folder (also "enemies", "entities", "fonts", etc...), and every map is in there. It seems like yours are in folders scattered throughout your "data" folder? I don't know how the engine reads maps, but I'm pretty sure when I specify a map in code, the engine assumes they're in a folder called "maps", because I don't think I usually specify that.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 04, 2018, 06:56:52 AM
Quote from: Max on May 04, 2018, 06:05:39 AM
One thing I noticed looking at your github is that your maps seem to be organized really different from mine. In my "data" folder, I have a "maps" folder (also "enemies", "entities", "fonts", etc...), and every map is in there. It seems like yours are in folders scattered throughout your "data" folder? I don't know how the engine reads maps, but I'm pretty sure when I specify a map in code, the engine assumes they're in a folder called "maps", because I don't think I usually specify that.

Ah yeah, I guess I can understand the confusion. I left out some of the generic or empty folders under the assumption that anyone trying it out would have the ALttP resource pack and used that to fill in the gaps. I should probably organise it better.

In my actual folder, my maps are in subfolders under "maps". That's what it is. Welp, I'd better get fixing.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 04, 2018, 10:06:39 AM
Ok, so I've fixed it to where it should be playable. Just two things:
- The first two folders, Shrine of Earth and Plain of Andor are duplicates of folders found under "maps", and I'm gradually in the process of deleting them so you can ignore them.
- Solarus usually has two folders named "enemies" and "entities". They're not present in my GitHub because they're empty, but this shouldn't stop the game from functioning.

Hope that helps folks!
Title: Re: Zelda's Adventure: Solarus Edition
Post by: llamazing on May 04, 2018, 01:24:32 PM
Ok, I was able to download the update from GitHub and get it working now.

First of all, you were missing an end statement at line 25 of visionhenge5.lua.

I was also getting errors about missing sounds, so I copied over the sounds from the ALTTP pack to fix it.

Then finally, your real problem is that when you edit the lady NPC entity you have the action "Show a dialog: sample_text" selected. What you want is the "call the map script" option selected instead. Otherwise it does not use the on_interaction() part of your script.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 04, 2018, 01:32:16 PM
Quote from: llamazing on May 04, 2018, 01:24:32 PM
First of all, you were missing an end statement at line 25 of visionhenge5.lua.

I was also getting errors about missing sounds, so I copied over the sounds from the ALTTP pack to fix it.

Then finally, your real problem is that when you edit the lady NPC entity you have the action "Show a dialog: sample_text" selected. What you want is the "call the map script" option selected instead. Otherwise it does not use the on_interaction() part of your script.

I thought that might have been an issue. It was giving me error messages but I wasn't sure what to do. Fixed that.

Whoops, must have overlooked that too. Fixed now.

Ok, what's the syntax look like for that? Like I said, I thought I followed the tutorial exactly but I must have misunderstood something somewhere.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: llamazing on May 04, 2018, 02:34:51 PM
Quote from: CrookiNari on May 04, 2018, 01:32:16 PMOk, what's the syntax look like for that? Like I said, I thought I followed the tutorial exactly but I must have misunderstood something somewhere.
Syntax for the last one? In the Solarus Quest Editor open the map and double-click on the lady entity and an edit dialog will open. Then select the correct radio button under "action".
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 04, 2018, 03:00:45 PM
Oh wow! It worked! I even managed to get the lady at AJ22 to work properly.

Thanks guys!

I'll post updates when the Forest of Ogbam is mapped and I want to try implementing more complex things, though I may need to play around in the Scripts Forum.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 17, 2018, 02:52:10 PM
Hello all! I've completed the basic mapping for the southern part of Tolemac, including an entrance to the first dungeon (although in its current state you aren't able to explore it all the way through). So now my priority is to go back through the maps and pretty them up a bit with decorative tiles, bushes, stones and enemies in order to create a more dynamic experience. I also need to continue work on Zelda's sprites as she currently swings her sword the wrong way and doesn't have proper pushing, pulling or lifting animations. If you'd like to experience it for yourself, check out my GitHub:
https://github.com/CrookiNari/Zelda-s-Adventure
One 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
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 18, 2018, 11:17:23 AM
So, here's my current to-do list:
- Create overworld+dungeon maps
- Implement all basic enemies
- Communicate with sprite artist about boss movements
- Make maps more dynamic with bushes, pots, weeds, enemies, stones etc.
- Write dialogue script
- Implement and test all items
- Work out what to do with mini-bosses
- Recruit quest designer to help with minor heart piece quests and mini games
- Recruit programmer to help with complex functions like chest generation and door puzzles
- Flesh out NPCs to enable better interactions and major trading sequence
- Recruit musician to remix title theme
- Complete hero sprite sheets
- Add NPC sprites

If you think you can help out with any of the above, do get in contact with me and we can chat about it.

I'm appreciating the feedback I'm getting so far!
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on May 18, 2018, 11:31:07 AM
Hello, i am playtesting your demo.
Some remark : the github repo is not recognized as a valid quest by the editor, had to manually make a "data" folder for it to work.

Anyway, here are the errors i found so far :
Error: No such dialog: 'sign.river source'
Error: No such dialog: 'moblin_inn.lady'
Error: No such dialog: 'moblin_inn.traveler'
Error: No such dialog: 'moblin_inn.patron'
Error: No such dialog: 'moblin_inn.innkeeper'
Error: No such dialog: 'sign.moblin inn'
Error: No such dialog: 'sign.forest of ogbam'

(to be edited)
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 18, 2018, 11:45:50 AM
Quote from: PhoenixII54 on May 18, 2018, 11:31:07 AM
Hello, i am playtesting your demo.
Some remark : the github repo is not recognized as a valid quest by the editor, had to manually make a "data" folder for it to work.
Hmm, I haven't had people say that yet, but I'll keep it in mind for when I next update it.

Quote from: PhoenixII54 on May 18, 2018, 11:31:07 AM

  • most NPC/signs refer to dialogs that do not exist (yet) and trigger errors (by the way, you should never use spaces in dialog ids)
The comment about spaces is noted, but can you give examples of what you mean? I know that the forest merchant can't really sell stuff yet but I thought that the NPCs I'd implemented so far spoke like they should.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on May 18, 2018, 11:57:45 AM
see my post above, i will update it with new errors ;)
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 18, 2018, 12:22:36 PM
Quote from: PhoenixII54 on May 18, 2018, 11:31:07 AM

  • NPC/signs that refer to dialogs that do not exist (yet) and trigger errors (by the way, you should never use spaces in dialog ids)
Error: No such dialog: 'sign.river source'
Error: No such dialog: 'moblin_inn.lady'
Error: No such dialog: 'moblin_inn.traveler'
Error: No such dialog: 'moblin_inn.patron'
Error: No such dialog: 'moblin_inn.innkeeper'
Error: No such dialog: 'sign.moblin inn'
Error: No such dialog: 'sign.forest of ogbam'

  • the exit teletansporter of map 01. Shrine of Earth/ca07 is inaccessible

The Shrine of Earth error is very probably some mapping error I can fix, and since I'll be going over that folder again eventually I'll probably fix it then. As for the dialog, I know they work on my computer so it's most likely a case of me forgetting to update the Language folder on my GitHub. This has now been fixed.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on May 18, 2018, 01:18:14 PM
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
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 18, 2018, 02:05:29 PM
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
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on May 18, 2018, 02:10:39 PM
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>
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 20, 2018, 01:48:54 AM
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.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: Max on May 20, 2018, 02:58:13 AM
Hey, just a question, what was the problem with your octorocks/what did you do to fix them? I've had a similar problem.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 20, 2018, 03:05:08 AM
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.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on May 22, 2018, 10:23:08 AM
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
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 22, 2018, 11:17:51 AM
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.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 25, 2018, 04:56:15 AM
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
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on May 25, 2018, 11:20:45 AM
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.

Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 25, 2018, 11:31:32 AM
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.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: Max on May 26, 2018, 04:44:04 PM
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()
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on May 28, 2018, 01:52:52 PM
I'm not entirely sure I understand what you're saying there.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on May 28, 2018, 02:27:34 PM
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
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on June 03, 2018, 01:37:56 PM
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.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on June 03, 2018, 03:24:56 PM
Your problem is that :
1. you are trying to call a reference of movement, but it doesn't exist anymore (when the on_started function finishes, everything defined with local in it is destroyed -or restored to it's previous value if it was already declared outside)
2. you are redeclaring the start() function, which works, because lua allows it, but in your case, would just anihilate it's normal behavior, and as such,  never trigger the movement to actually start.

To fix it, you must place your movement:start inside the on_started function, and remove the function keyword (as well as the associated end keyword)
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on June 13, 2018, 01:15:38 PM
Ok, I've done that and now there's a new problem.
local map = ...
local game = map:get_game()

function map:on_started(movement:start(traveller_2))
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 traveller_2:on_interaction()
game:start_dialog ("plains_traveller")

end

function map:on_opening_transition_finished()

end

The error this time is:
Error: Failed to load script 'maps/Plain of Andor/ag20': [string "maps/Plain of Andor/ag20.lua"]:14: ')' expected near ':'
It feels like every time I try to fix a problem, a new one pops up in its place. :\
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on June 13, 2018, 01:35:21 PM
Aww, i think there are some basic Lua notions you need to understand :

1. when you define functions using
Code ( lua) Select
function <id>, the content of the parenthesis is the declaration of variable(s) that you want to be passed on call
so doing
Code ( lua) Select
function map:on_started(movement:start(traveller_2))
is not correct and is likely to generate odd behaviour if not triggering an error.

2. in line :
Code ( lua) Select
  movement:set_path{4,4,4,4,4,0,0,0,0,0}
you forgot the parenthesis around the list content, since you wnt to call the set_path function. (which may be why you got the error message in the first place)

3. finally, your movement will never be started since your function call is misplaced (see 1.).

That's all for now, try fixing your script from all points above, and let me know if it is OK.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on June 13, 2018, 01:44:38 PM
Actually, I rather feel inclined to just leave it for now, if now remove it completely in the future. I'm still totally new to programming as a whole and Lua more specifically, so if I keep failing I'll just end up frustrated and likely to abandon the project entirely. Every time I try to program something, even if I apparently follow instructions to the letter it just refuses to work for some reason or another.

I'll just carry on with designing the rest of the game. That at least I'm able to do.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: Max on June 13, 2018, 05:25:03 PM
You've done more of a typo than a failure.

Code (Lua) Select

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)
  movement:start(traveller_2)
end


If you understand Phoenixll54's commenents, the parentheses are just for something else, that's all. Once you've done some more practice, you'll understand the notation and won't make many more of these mistakes. You'll move onto bigger and harder to fix mistakes, like me, haha.


If you really don't want to do much coding though, maybe take that into consideration when you're designing what kind of game you want to make. If you're going to limit yourself to basic gameplay like walking and using the sword (I don't know if you'll have items if you aren't going to program), think about how you can make that interesting.

One approach is games like Firewatch, where because of a really interesting, intimate, and human story, the game is fun to play even though all you do is walk around, really. The beautiful art helps too. There are lots of ways to create and interesting game where you wouldn't have to program as much as a typical Zelda game, but you won't have anything like a typical Zelda game at the end. If you don't want to spend a long, possibly frustrating time teaching yourself to code, then you'll have to accept the limits of what you can do, and try to use those to your advantage to still create an interesting game.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on June 14, 2018, 10:46:15 AM
Your addition brings forth this new error repeated:
Error: Illegal direction 2 for sprite 'npc/traveller_2' in animation 'walking'
For context, I want a guy to walk back and forth along a river bank and speak when spoken to. Did I put in the wrong direction numbers?
And I'm not going to forgo programming all together, I was just a little frustrated. I know that the game I want to make won't be easy, but I do want it to be made nonetheless. If it doesn't feel like a Zelda game, then it totally defeats the purpose for its existence. At the very least, I am able to take care of most of the rest of the game design.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on June 14, 2018, 11:22:25 AM
Self-quote from before, since it is an already known issue :

Quote from: PhoenixII54 on May 25, 2018, 11:20:45 AM
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.

Precision : Sprite directions counting always starts from 0, by convention. and reference to : right (0), up (1), left(2) and down (3).

Yes, programming can be difficult, especially for beginners, but by training and not fearing to make mistakes, you will make constant progress as long as you take the time to understand why a particular mistake has been done.

Anyway, hope it helps you fixing this error ;)
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on June 14, 2018, 11:37:51 AM
I was using the documentation which gave me different instructions, so yours make more sense. Nevertheless, there's still a problem:
Error: Illegal direction 1 for sprite 'npc/traveller_2' in animation 'walking'
Direction 1 is up, correct? I don't know why that would matter since I didn't tell it to move up, and the sprite is capable of displaying all four directions. But the weird thing is, rather than disappearing completely like I normally see happen, he vanishes for about a second and then reappears a few pixels away facing the right and can be spoken to.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on June 14, 2018, 01:11:31 PM
Now this is strange, did you add all four directions in your "walking" anmation set?
If yes, then did you set sprite data to each direction? i suppose that you did, but i wanted to have confirmation

PS : Now that i think, did you create the "walking" set at all ?Again, I suppose that you did, but I wanted to have confirmation
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on June 14, 2018, 01:26:03 PM
Holy hell how did I not even make a walking animation I feel so dumb
He still doesn't move like he should, kinda sliding upwards a bit before stopping, but there's no error messages this time.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on June 14, 2018, 01:50:31 PM
Well, at least you got some progress, and that is the most important thing.  :D

your next step is to make your animation loop, and it is fairly simple : right before starting it, just call movement:set_loop(<boolean value>).
Result will be a continuous movement, which will either do a full back-and-forth movement like you intend, or your npc will just go out of the screen forever -or at least until you leave the map or quit the game.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on June 14, 2018, 01:52:18 PM
I've seen the term boolean quite a bit but don't understand what it means.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on June 14, 2018, 02:05:25 PM
To be simple, "Boolean"  refers to a binary variable which can mean true (value=1) or false (value=0)

For more information, don't hesitate to use your preferred search engine. it won't bite, and will expand your culture 8)

PS :
to understand the importance of boolean concept, remember that the whole modern conputing concept is based of the Boole algebra
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on June 14, 2018, 02:13:48 PM
Oh, ok. It doesn't appear to be making any difference to the code now, though.
local map = ...
local game = map:get_game()

function map:on_started()
local movement = sol.movement.create("path")
  movement:set_path{2,2,2,2,2,0,0,0,0,0}
  movement:set_speed(20)
  movement:set_loop(true)
  movement:start(traveller2)

end

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

end

function map:on_opening_transition_finished()

end
Title: Re: Zelda's Adventure: Solarus Edition
Post by: Max on June 14, 2018, 02:29:12 PM
Quote from: CrookiNari on June 14, 2018, 01:26:03 PM
Holy hell how did I not even make a walking animation I feel so dumb
He still doesn't move like he should, kinda sliding upwards a bit before stopping, but there's no error messages this time.

I don't see any issues with your most recent code, so I'm guessing that sliding up a bit is caused by your walking and stopped animation sets having different origins. Origin is a value you set for every direction of a sprite, and for something simple like an NPC, I think the best practice is to set the origin's x value to half the sprite's width (right in the middle) and the y value to 3 px above the bottom of the sprite (generally, height - 3). I'm guessing that might be the problem because I've done that kind of mistake plenty of times.

In general, NPC sprites need a "stopped" and a "walking" animation, you can get away with just stopped if you know they'll never move. I'm pretty sure the engine wants those exact names if it's applying a movement to an NPC entity.

It's also important to make sure in a case like this where the NPC entity is a person, to have the option in the NPC's settings set to "someone", so the engine knows to apply special rules for how people move- for example, automatically calling the "walking" animation when they move, and making them face toward you when the hero speaks to them.


Finally, when you post code on the forums, it's helpful for us helping you if you do the first tag as "["code=Lua"]", with no quotation marks. For one thing, this adds line numbers, which are important for error messages.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on June 14, 2018, 02:33:00 PM
i think the final problem in your script is that you didn't add the parenthesis around the path data table, and as a consequence the movement:set_path function is not called, resulting in the movement path to not be set at all (note : each path direction is numbered from 0 (east) to 7 (south-east), using the trigonometric rotation (or if you prefer the anti-clockwise rotation))

PS : as max said, using [code= lua]  at start of your code is helpful indeed
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on June 14, 2018, 03:13:14 PM
Nope, the origin is exactly the same on all of them and the guy is set to be a "somebody". And I tried using that path direction setting, it just resulted in the illegal direction error.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: PhoenixII54 on June 14, 2018, 04:21:26 PM
i tried using your script on my own test map, and it worked perfectly*. The only warning for you is that the movement will stop if your NPC reaches an obstacle. And i have to correct myself : the parenthesis are actually optionnal for a function call with a raw table data for only argument.

*using an already fully configured sprite (ALTTP Zelda)

PS, that means something is likely wrong on your sprite data, and of course your path is wrong : for a back-and-forth movement, you should use opposite directions, (0+4,1+5, 2+6 or 3+7).
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on June 15, 2018, 12:36:03 AM
 Ok, I've finally got it working :) So I can put this issue to bed.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on June 24, 2018, 08:40:30 AM
This is my current to-do list, in no particular order. Obviously as I continue to progress through the mapping and whatnot I'll find more things that will need to be addressed.

To do list:
1.   Finish writing game dialog
2.   Finish Zelda's sprites
3.   Add title screen
4.   Finish mapping overworld and dungeons
5.   Make it so you can't exit Vision Henge without the sword and shield
6.   Find places to hide heart pieces
7.   Implement inventory screen
8.   Implement saving
9.   Program bosses
10.   Fix behaviour of Tektites, Leevers, Peahats and Geldman (this entry may expand as future problems arise)
11.   Shrine of Earth
a.   Cc07- make chest spawn
b.   Same goes for rooms containing Taros
c.   Implement boss
d.   Implement entry dialog
e.   Implement dark rooms
12.   Chest spawning in Vision Henge centre east and ad24
13.   Enable quests for hungry and thirsty ladies
14.   Witch encounter to generate enemies
15.   Proper implementation of shop items in Ogbam Forest and Inn


That's all I've got to say for now. I'll update my GitHub a little later, but I feel like updates aren't going to be as frequent as before.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: Shade Aurion on September 02, 2018, 04:03:15 AM
I love that this project exists and I truly hope you complete it. I'm doing something similar in remaking Zelda 2 so I know the struggle of translating 2d to top down (and making a github was a really damn good idea, wtf is wrong with me) but if I can offer any support in future i'll be sure to let you know <3"

I REALLY wanna play this haha
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on September 02, 2018, 04:09:05 AM
QuoteI love that this project exists and I truly hope you complete it. I'm doing something similar in remaking Zelda 2 so I know the struggle of translating 2d to top down (and making a github was a really damn good idea, wtf is wrong with me) but if I can offer any support in future i'll be sure to let you know <3"

I REALLY wanna play this haha
Hello there! I'm glad to hear that! I'm not actively working on it at the moment as my attention has been drawn towards other non-game related projects but I do intend to complete it at some point. Zelda's Adventure was a damn good idea that suffered at the hands of poor game developers and console limitations, so translating it into a real Zelda-like game is the most merciful thing anybody could do. Hell, I know that if I wasn't the one working on this project I myself would want to play this game.

If you have any assistance you'd want to offer, I'm always open! And if you do want to play what's there so far, you can download the files from the GitHub and open them in Solarus.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: Shade Aurion on September 02, 2018, 10:45:52 AM
Quote from: CrookiNari on September 02, 2018, 04:09:05 AM
QuoteI love that this project exists and I truly hope you complete it. I'm doing something similar in remaking Zelda 2 so I know the struggle of translating 2d to top down (and making a github was a really damn good idea, wtf is wrong with me) but if I can offer any support in future i'll be sure to let you know <3"

I REALLY wanna play this haha
Hello there! I'm glad to hear that! I'm not actively working on it at the moment as my attention has been drawn towards other non-game related projects but I do intend to complete it at some point. Zelda's Adventure was a damn good idea that suffered at the hands of poor game developers and console limitations, so translating it into a real Zelda-like game is the most merciful thing anybody could do. Hell, I know that if I wasn't the one working on this project I myself would want to play this game.

If you have any assistance you'd want to offer, I'm always open! And if you do want to play what's there so far, you can download the files from the GitHub and open them in Solarus.

Lol this is exactly how I feel about my project. Sadly for the most part i'm a mapper before anything else. Mediocre at best at everything else but once i'm back into my own project in a few weeks I might have some time I could put towards collaborating with you on your project. I'll be adding my project on Github like you did as its just a really good idea so coders and the Solarus staff have easy access when you're asking for help on things. Both our projects are fairly ambitious but not impossible. But like you i'm a multi-tasker and various projects go on hiatus here and there. That's the way it goes I guess.

Still when we've finished our projects and have a shred of credibility some of the more seasoned content creators may feel more inclined to team up and collaborate together. That's how shit gets done. I mean it's not like we could charge anyone for any of these projects so its just made with love and the only expectation is for other to enjoy it <3

I would avoid advertising it though outside of these forums til its at least at v1.0 lest you get DMCA'd. At least that way it sees a release =)
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on September 02, 2018, 02:52:54 PM
lol like I would be promoting this thing widely what with Nintendo bringing down the banhammer on whatever it can lately, even though it didn't originally make Zelda's Adventure.
I know that there are probably some maps I've made that could look better in case you want something in particular to look at, especially ones with cliffs and stuff. It would also be good to know whether the way maps look is reasonably natural looking, as I tried to spread out rock and grass tiles randomly but equally.
And perhaps I could lend my assistance to you as well. Don't know what I could be useful with but I may as well since you've offered to help me. Maybe if there's some spritework you need done I could do that.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on July 21, 2020, 11:54:08 AM
Hello again! It's been a while but I've still been working on this...very slowly and periodically. I'm looking for people who can help me out on the project, whether you prefer to be paid or a volunteer. I'll put you in the credits either way.

What I need:
- people who know how to use GitHub and can teach me how to make it more than simply online storage
- mappers to look at what I've made so far and see whether any improvements need to be made to how the tiles and objects are arranged
- pixel artists to improve my custom sprites
- programmers to implement scripts that make it more like a game (like adding functioning puzzles and menus)
- quest/dungeon designers to add more stuff to do, like sidequests and such. This would mainly involve brainstorming with me on this.
- a musician who can arrange the main theme in the ALTTP soundfont and implement custom music (I can provide all these assets)

I've currently mapped out about a quarter of the overworld, created templates for all the dungeons and written the dialogue up to Wimbich Village (just after the first dungeon). So there's still a long way to go, and I recognise I'm not going to get there without help. So if you can contribute to any of the above roles, please let me know!
Title: Re: Zelda's Adventure: Solarus Edition
Post by: Cluedrew on November 13, 2020, 01:04:28 AM
I can help with the scripting. A bit directly but also I'm working on a library (Lua Nova on GitLab) that might let you do some of the puzzles easier.
Title: Re: Zelda's Adventure: Solarus Edition
Post by: CrookiNari on November 13, 2020, 01:44:07 AM
That'd be pretty cool. I'll send you a message on Discord.