Tuesday, January 22, 2013

Doors

Not sure whose bright idea it was to store doors this way, but doors and step-on-to-execute events are stored on each map without a source x,y.  It pokes through the map from top to bottom looking for tiles of a certain type, and when it finds them, it pairs them iteratively with the door definitions defined for a map.  For example, 128, the waterfall map, has four such trigger tiles.  From the top of the map down, the first two are the door tiles to the map to the right, 129, so these are the first two defined for the map. The other two are the dialogue boxes that pop up while you walk through to get the sword.

0201 has bugs with how it detects and matches these together.  Working on fixing this.  Map 248 is an example of where it's way off - I'm counting double for multiple map pieces with door tiles placed on top of each other - this is part of the problem.

Edit: it looks like some maps (like 248) are also flagged with a second "special" event (like the map walk-on event that I already process) that is throwing off the count.  These are being processed now and most of the counts are looking okay, but I still don't know what the fuck this event is or how/when it's processed. Map 265 one has one that triggers the event where the girl joins you (Event 188), but this is a multi-room map, and I'm not sure yet how they make it only execute for entering through the one doorway.

4 comments:

Unknown said...

Seems that here the Rewritable part will take some time for to allow a simple editor with doors. Good luck to you...

Mop said...

I almost want to rewrite their door stuff so each one just has a source x,y and it's not looking at the collision table to find them. It would be so much more intuitive to edit them this way. The way it is now, there's almost no good way to say "place a door at x,y" - you have to edit the fucking map piece to have a door tile where you want it.

Unknown said...

Yes. Should be so x,y,z with z being the transition type :).

Should take some time to customize it so well for editor i guess.

Mop said...

Well, when I say doors, actually, I'm referring to triggers, which may be associated with an event or a door. I'm not sure if wiping the table of doors is a good idea yet, but it's something to think about too.