While closed, the door event should have the <type: object> notetag, a non-tile graphic and the priority 'Same as characters' and the 'through' option NOT selected. To open the door and make it passable, a switch or other condition should activate a second event page, where the door event has the priority 'Below characters', the through option checked and no graphics image, 'type: object' events passability also depends on whether they have an image.
You could also change the 'type: object' to anything that isn't 'object' to make it passable via scriptcommand, for example: $gameMap.event(XX)._srpgEventType = '';
Thanks for the tip about the door event, I tried it and indeed it works. There are a couple of drawbacks though:
1. From a purely aesthetic standpoint, not using a "door open" sprite when the door is actually open makes the scene look kind of ugly
2. Functionally, if I use
<type : object>, then the door cannot be interacted with while in Battle Mode, unless I set up some kind of external event processing
Besides this, I noticed another anomaly that was probably there from the beginning and I just didn't notice due to the movement range of the battlers, but when the door is passable (either because it has no type or has the type
<type : playerEvent> or does not have a sprite associated) together with the door a whole section of wall adjacent to it becomes passable too. The whole wall is solid when the door is
<type : object>. Any ideas as to why?
Moving on to the script command suggestion, I was not able to make it work. I thought I could place the script command in the "closed" page of the door event in order to clear the object tag when the door was open (to be clear, this would be before the SRPG plugin gets called), but to no avail. I replaced XX with both this.eventId() and the actual database index and I also tried to change it with the method setType (i.e.
$gameMap.event(this.eventId()).setType('')), to no avail.
Am I misunderstanding something basic here or is implementing a standard door in SRPG battle mode way less straightforward than it seems?