MV Need help with Yanfly's Save Event Location

Hey everyone! I need some help regarding yanfly's save event location. Here's my issue:
  • The plugin is not saving an event's direction after it changed.
The event is a painting, the spritesheet has 4 variations and when the event turns in a direction, it changes the value of a variable and the variation of the image. It's a symmetry puzzle, so when variables A and B are the same, the paintings are facing the same direction, so they're equal.

Here's the event page:
Spoiler: Painting Event Page
1741971726777.png

1741971760927.png

1741971782518.png

1741971807623.png

1741971838023.png

The event itself works perfectly fine (even if it's a bit massive), however, it isn't saving the direction it's facing on the map.

I'm not really sure what the problem is honestly, since, there are other event's on the map that do save their own location, like moving chairs, that keep their location when entering and leaving maps, after the player has interacted with them.

Could the problem be the way my movement routes are setup?

I tried removing the Sprite Offset event tag to see if it could be that, but the problem remained. I also tried another plugin, Caz's Save Event location, but that creates a problem with my battle system (I'm using MOG's Chrono engine).

If anyone can help me with this, It would be greatly appreciated.
As far as I'm aware, the plugin literally only saves the location. Nothing else. Not the facing direction, not any changes made to the graphic used.

The way you can probably get around it is just having a parallel event that checks the variable and then turns your image in the right direction whenever the player enters, then erase.
did you try TSR_SaveEvent? as I think it has save direction in built.
it also works bit different than YEP_SaveEventLocation.

it might work with Mog's plugins too.
As far as I'm aware, the plugin literally only saves the location. Nothing else. Not the facing direction, not any changes made to the graphic used.

The way you can probably get around it is just having a parallel event that checks the variable and then turns your image in the right direction whenever the player enters, then erase.
But that's the thing, on yanfly's plugin description it says that it does save the event direction too.

did you try TSR_SaveEvent? as I think it has save direction in built.
it also works bit different than YEP_SaveEventLocation.

it might work with Mog's plugins too.

Thanks for the suggestion, I did try the plugin but it also gives me an error when I leave the room and try to come back after an event has changed positions:

1741987201043.png

1741987242413.png
But that's the thing, on yanfly's plugin description it says that it does save the event direction too.
Does it? I didn't dive too deep into the page, I just remembered that I also had this issue in 2 games now. It just seems like it doesn't ;_;
Does it? I didn't dive too deep into the page, I just remembered that I also had this issue in 2 games now. It just seems like it doesn't ;_;
Aw man, glad to know I'm not the only one with this issue, here it states that in addition to the event location, it also saves the direction the event is facing 😐

index.php
weird, where is the plugin placed? above spawn events or below?
as it should be below events and just above misc/utilities from
YEP PluginOrder.

as I categorize all plugin like that, does it happen still from there?
it's to bad I cannot help on that bit.

I don't get errors, but didn't test with moghunter included, but works with
the majority of yeps plugins.
I remember using NRP's Save Event Data plugin with Chrono Engine. The plugin file has English instructions
(Untested) I'm going to guess that this might be the issue. I commented out the original and added some changes. The function starts around line 233.

You also might want to edit the yanfly plugin directly instead of overwriting it with a new plugin (you may encounter issues with aliasing).


v1.06 is working with MV 1.6.3 - 1.6.2 should be similar. Please see below for updated post.
weird, where is the plugin placed? above spawn events or below?
as it should be below events and just above misc/utilities from
YEP PluginOrder.

as I categorize all plugin like that, does it happen still from there?
it's to bad I cannot help on that bit.

I don't get errors, but didn't test with moghunter included, but works with
the majority of yeps plugins.
The plugin is below everything.

I tried putting it where Yanfly's SaveEvent location should be, which is below event spawners and above utilities, still gives the same error.

(Untested) I'm going to guess that this might be the issue. I commented out the original and added some changes. The function starts around line 233.

You also might want to edit the yanfly plugin directly instead of overwriting it with a new plugin (you may encounter issues with aliasing).
JavaScript:
Game_Event.prototype.loadLocation = function() {
    if (!this.isLoadLocation()) return;
    var x = $gameSystem.getSavedEventX($gameMap.mapId(), this.eventId());
    var y = $gameSystem.getSavedEventY($gameMap.mapId(), this.eventId());
    this.setPosition(x, y);
    //var dir = $gameSystem.getSavedEventDir($gameMap.mapId(), this.eventId());
    //$gameTemp._loadLocationDirection = dir;
};

Yanfly.SEL.Game_Event_setupPageSettings = Game_Event.prototype.setupPageSettings;
Game_Event.prototype.setupPageSettings = function() {
    Yanfly.SEL.Game_Event_setupPageSettings.call(this);
    /*if ($gameTemp._loadLocationDirection) {
          this.setDirection($gameTemp._loadLocationDirection);
          $gameTemp._loadLocationDirection = undefined;
      }*/
    var dir = $gameSystem.getSavedEventDir($gameMap.mapId(), this.eventId());
    if (dir) this.setDirection(dir);
};
Thanks for the fix, I'll try it out ! Though I'm uncertain of where to place this fix, is it in the yanfly core engine script?
Thanks for the fix, I'll try it out ! Though I'm uncertain of where to place this fix, is it in the yanfly core engine script?
open YEP_SaveEventLocation and go to line 233 around like he said or search out
the function.

than remove/rule out the code of those 2 function and paste it inside the plugin
and save it.

but it isn't guaranteed it work like he said.
The plugin is below everything.

I tried putting it where Yanfly's SaveEvent location should be, which is below event spawners and above utilities, still gives the same error.


Thanks for the fix, I'll try it out ! Though I'm uncertain of where to place this fix, is it in the yanfly core engine script?
Upon further investigation, the original code actually works and my code does not. I think it has something to do with how it is loaded now looking at it further - the game system seems to have an issue with loading before the map is loaded. Yanfly moved it to a gameTemp variable instead to allow for it to load when changing maps during the game and not before the game starts.

I am using v1.06 of the Save Event Location.
Hey everyone, thanks for all the support, I decided to simply remake my painting events in a way that yanfly's plugin doesn't need to remember it's direction and it fixed it. I'll put how the event looks now here, in case anyone might need it.

I'm making it so, every direction the event is facing is tied to a variable going from 1 to 4, and self switches A to C.
  • No selfswitch means Variable = 1, mean the event is facing down.
  • Selfswitch A on means Variable = 2, means the event faces left
  • Selfswitch B on means Variable = 3, means the event faces right
  • Selfswitch C on means Variable = 4, means the event is facing up
I set up a pages for each of these combinations, and in each of them, has a conditional branch that checks if the Switch tied to the puzzle being complete is on, because, if so, the event will just display some text and end it's processing. If the switch isn't on, then the event will allow the player to interact with the painting to change the image, it then turns on and off the selfswitches and alters the variable value accordingly.

I also added a condition that checks if the player has ever interacted with the painting before, to change the dialogue.

Spoiler: Event check for direction
1742247649178.png

1742247671758.png

1742247688898.png

1742247705637.png

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-yanflys-save-event-location.176234/