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.

Messages - wrightmat

Pages: [1] 2 3 ... 17
Development / Re: NPC routines
« on: December 06, 2017, 02:51:28 pm »
Thanks for the thoughts so far!

llamazing, that's one approach, but basically I'm trying to avoid outlining the per-step movement of every NPC. I'm also trying to move the bulk of the code out of the NPC script and have it handled by an outside routine. Basically as I start applying movement to ten or twenty NPCs in a town, I don't want to spend weeks outlining the movement. It also would be nice to have some randomness in their routines, which is why I'm relying on the "waypoint" approach.

Satoh, I'm certain I didn't explain myself well! I like the syntax that I presented for local routine - it's simple and is capable of outlining an NPC's entire day in one line of code - as long as it can be parsed down the line correctly. In my example, the time between 8 and 10 would be spend pathfinding (with some random movement toward the location thrown in, mostly because of Solarus's current limitations in the pathfinding movement) from the "to_shop" entity to the "to_home" entity.
My problem arises with how to translate this into something that can execute routines at a set time for potentially tens of NPCs. My initial thought was to "register" each NPC's routine when they're created on the map, then have a function that re-arranges this routine in order to place each NPC/waypoint into an hour table. Mostly I'm not sure how to define these tables without having potentially 24 of them...

Development / NPC routines
« on: December 06, 2017, 04:41:41 am »
Hey all,

I've been thinking recently about how to create more interesting NPC routines in Lua without it being too complicated. Right now I'm on the idea of passing routines as a table from the NPC script to another scripts that parses it and stores it to be executed on the regular. I'm a little fuzzy on the details though, so I thought I'd throw my thoughts here!

Code: Lua
  1. local routine = { [08]="to_shop", [10]="to_house", [13]="to_mill" }
  2. function entity:on_created()
  3.   self:set_routine(self, routine)
  4. end
Here is where I thought about encoding the routine as a nested table - with time (hours) in brackets and waypoint entity in quotes. Then I can parse that table out to get the individual parts of the routine.

Code: Lua
  1.   for k,v in pairs(routine) do
  2.     game:add_routine(k, npc:get_name(), v)
  3.   end

I think my next step would be to create a new table, or several tables, organized by hour so the game easily parse the correct table at the correct time (the add_routine routine I'm playing around with up there). If this table contains the entity name and waypoint entity name, then the movement should be able to be created pretty easily.

My main issue right now is the structure/format of the routine tables organized by time. I'm not an expert on Lua tables and I'm not sure how to make this without a bunch of if/then statements which would be best to avoid.

Anyway, I'd love to hear thoughts on the idea, and especially the execution thereof!

Bugs & Feature requests / Re: Solarus like Rpg Maker 2003
« on: November 23, 2017, 12:33:32 am »
That's a pretty awesome solution! Great work Christopho!

Bugs & Feature requests / Re: Solarus like Rpg Maker 2003
« on: November 22, 2017, 02:55:59 pm »
That's interesting Diarandor, I hadn't heard that. Would these be global Lua variables, or even part of the GLOBAL table? Aren't those generally frowned upon in Lua scripting except in particular cases?

Bugs & Feature requests / Re: Solarus like Rpg Maker 2003
« on: November 21, 2017, 08:06:41 pm »
Don't mean to pile on, but I totally agree Diarandor!

If you want to use RPG Maker, then use that solution. But Solarus is not RPG Maker and does not strive to be. In fact, I would advocate that Solarus should go the opposite direction - that too many things are hard-coded and should be developed as pure Lua solutions (which Christopho and others are already working on).

Now one solution could be to develop these scripts and then have them as templates available in the editor. Want to add a basic menu? Click a button and it adds the code in automatically, with plenty of comments so the game developer knows what to change to get the desired result. Same with basic item types, character scripts, etc. I think this could present an interesting balance and keep the power of the editor/engine while making it more user friendly.

General discussion / Re: PC Gamer article
« on: September 25, 2017, 09:05:03 pm »
Clearly most people didn't actually read the article, which is really frustrating, but also totally normal on the internet. No one involved in the Solarus engine is actually concerned with DMCA because of the smart way Christopho separated the engine, games, and resources. Me, on the other hand - a little worried, lol

General discussion / PC Gamer article
« on: September 18, 2017, 07:49:53 pm »
PC Gamer did an awesome little article on our own Christopho and his excellent engine, Solarus! If you haven't seen it, I highly recommend the read!  :D

Great to see good work recognized, and we all know that Christopho has done some great work with Solarus!

Your projects / Re: Zelda: Book of Mudora
« on: August 16, 2017, 03:59:49 am »
Maximini, please log any further bugs as issues on the github page at Thanks!

Your projects / Re: Zelda: Book of Mudora
« on: August 09, 2017, 12:55:09 am »
The Gaira quest doesn't seem to be triggering.
Any more specifics? What were you doing where you expected it to trigger? Any errors?

The other error has been corrected recently, but it was done after 1.3 was released. I'll try to put up a 1.3.1 bug fix release soon.

Your projects / Re: Zelda: Book of Mudora
« on: August 05, 2017, 12:01:20 am »
So in other words everything works except for the actual overlay that makes it look like night? What version of BoM are you playing?

Your projects / Re: Zelda: Book of Mudora
« on: August 02, 2017, 04:10:34 am »
Hmm... Interesting. All of the bed use the same script to change the time of day - have you had issues at any of the other beds?

As for the error, it's actually legitimate (although unrelated to this) and I've added that dialog in :)

For dungeon 4, I'm almost certain that it's possible to push that block against a wall or other surface to re-align it so it will work for the puzzle.

Your projects / Re: Zelda: Book of Mudora
« on: July 28, 2017, 04:22:03 am »
Hi Maximini, I'm sorry to hear that. Do you have any more information so I can try and track down the bug? An error.txt file would be best. Also, have you tried to close the game and re-open your save?

Your projects / Re: Zelda: Book of Mudora
« on: July 07, 2017, 04:42:18 am »
I'm not sure where the error.txt file would be on a Mac. Probably in the same directory as the quest? Wherever that is?
Honestly the quest system is pretty new, so there could definitely be some bugs. If you can find your save file and and error.txt file, I'm sure I can do some fixes. As for the Master Ore, the upgraded sword is the object of the quest, so it should be complete.

There is no walkthrough currently. Honestly I'm not super motivated to make one, but if someone in the community would like to take it on, I'd be happy to provide input :) There is some limited info on the game's website at

I believe both of the things you seek are in the Lost Woods in the east (not really marked on the map, but shrouded in clouds).

Bugs & Feature requests / Re: Ability to edit save games?
« on: July 05, 2017, 01:41:51 am »
Yes, save files are stored as plain text. If you're on Windows they can be found in c:\Users\<username\.solarus\<game>\save<number>.dat. So with Book of Mudora, if you need to edit the first save file, it would be \.solarus\zbom\save1.dat

You'll need to know what exact variable to edit, and at least in my case I didn't name them with descriptive names, so if you need more details feel free to PM me.

Your projects / Re: Zelda: Book of Mudora
« on: July 05, 2017, 01:37:52 am »
Thank you - glad you're enjoying it!

For the bottle side quest, was there an error.txt file generated? Also, could you send me your save file? This shouldn't have an effect on the game in general - if you were able to get the bottle, that's the only purpose this side quest serves.

As far as the trading sequence - there is more than one forest :) PM me if you want the spoiler version.

Concerning the Lakebed Lair temple, you should be able to get to the boss and beat the temple still, right? If that's the case then do so, and if you re-enter the dungeon an NPC will give you the extra key.

Pages: [1] 2 3 ... 17