MV - How to get Altimit movement plugin & Yanfly Event Chase plugins to work together without causing lagspikes?

● ARCHIVED · READ-ONLY
Started by DsProssh 9 posts View original ↗
  1. There's a compatability issue with the Altimit movement plugin (Altimit link) and the Yanfly Event Chase plugin (Yanfly Event Chase link) where if you're using both of them it makes so whenever a chase event starts, the game starts massively lagging, especially if multiple chases are happening.

    Looking through the Altimit discussion pages, it looks like other users have had this issue, and at least one person came up with a slapdash solution (forum link).

    I'm not proficient with reading or writing code, so I don't know how I would go about implementing the above solution (i.e. even if it's just something I need to copy+paste I don't know where I'm supposed to do so.), or if it even works.

    If someone who is adept at diagnosing these sorts of things could help with deciphering the above, or can offer a better solution, I would be much appreciative.


    Thank you AquaEcho for making Restart's solution clear to me. It turns out that's not quite what I'm looking for. If anyone knows how I can these two plugins to cooperate, or an alternative to Yanfly Event Chase that has similar functionality (setting to have events require line of sight, alert sound/balloons, etc.) without causing lag with the Altimit plugin, I think that's the solution I'm looking for. Thank you.
  2. I just use Restart's solution. You would copy and paste the big chunk of code in a new .js file and save it in your plugins folder, then add it to your project at the bottom of the plugin list. Then use the two smaller script calls in the event move routes as he said. If you're using Cross Engine you can use his this.tLoc(x,y) function
  3. AquaEcho said:
    I just use Restart's solution. You would copy and paste the big chunk of code in a new .js file and save it in your plugins folder, then add it to your project at the bottom of the plugin list. Then use the two smaller script calls in the event move routes as he said. If you're using Cross Engine you can use his this.tLoc(x,y) function
    Alright, reading that clarified things for me and I got it to work, thank yas! After looking back at that thread I realized it's clear that Restart was offering an alternative plugin. I misunderstood and thought they were offering a workaround that would make Altimit and Eventchase work together, so it looks like this isn't the kind of solution I was looking for after all. Thank you anyhow for the help though.
  4. DsProssh said:
    Alright, reading that clarified things for me and I got it to work, thank yas! After looking back at that thread I realized it's clear that Restart was offering an alternative plugin. I misunderstood and thought they were offering a workaround that would make Altimit and Eventchase work together, so it looks like this isn't the kind of solution I was looking for after all. Thank you anyhow for the help though.
    I Have the same issue. But I didn't understand if you solve the problem by using Restart small plugin or other completely different solution.
  5. You save the block of code in a .js file in a text editor and add it as a plugin file to your project. That will give you two new script calls: goTowardsPlayer, which makes the event go towards the player, and setSelf which sets its own self switch to the letter you indicate.

    Then you use the two script calls in event pages as he said
    1744553852399.png
    Code:
    if (this.distanceToPoint($gamePlayer.x,$gamePlayer.y)<5){this.setSelf('D',true)}

    1744553915359.png
    Code:
    if (this.distanceToPoint($gamePlayer.x,$gamePlayer.y)>5){this.setSelf('D',false)}else{this.goTowardsPlayer()}
  6. KayronDEV said:
    I Have the same issue. But I didn't understand if you solve the problem by using Restart small plugin or other completely different solution.
    Yeah so what I ended up doing was using Restart's plugin and changing some of the scripts a bit so it kinda emulates the Yanfly plugin, but I think what I came up with is pretty sloppy.
    1744585440821.png
    So I have the enemy event move at random and then have the following scripts after

    if (this.distanceToPoint($gamePlayer.x,$gamePlayer.y)<5){this.requestBalloon(11)};

    ^This script makes it so a balloon shows up over the enemy event when the player is near, replace the 11 with the number for whatever balloon you're using, I have it set to that number because I'm using a custom one I added.

    if (this.distanceToPoint($gamePlayer.x,$gamePlayer.y)<5){AudioManager.playSe({ name: "AlertSound", volume: 50, pitch: 100});}

    ^And similarly this one plays a sound when the player is near the enemy, replace "AlertSound" with whatever sound you're using and the numbers after volume and pitch can be what you want as well.


    if (this.distanceToPoint($gamePlayer.x,$gamePlayer.y)<5){this.step_toward(0);}

    ^This is just the script that's already been posted before that makes the enemy walk towards the player when they are near, I copy/pasted it like 20 times so that the enemy keeps following the player for a bit after the trigger without constantly having the balloon appear and the sound playing, and then after about a few seconds the enemy will go back to moving around randomly.

    Again, this is the sloppy workaround I did using Restart's plugin and wrestling with the scripts to get the enemy events to act similarly to the Yanfly Event Chase Plugin.
  7. DsProssh said:
    if (this.distanceToPoint($gamePlayer.x,$gamePlayer.y)<5){this.step_toward(0);}

    ^This is just the script that's already been posted before that makes the enemy walk towards the player when they are near, I copy/pasted it like 20 times so that the enemy keeps following the player for a bit after the trigger without constantly having the balloon appear and the sound playing, and then after about a few seconds the enemy will go back to moving around randomly.
    That's the whole point of the second page which you got rid of. The first page is its regular movement and the second page is the chase movement. You would put the alert/bubble on the first page then it would self switch to the second page and chase. The alert/bubble would only play once since it switches to the other page immediately after.

    Here is all your code compounded into one script call for the first page:
    Code:
    if (this.distanceToPoint($gamePlayer.x,$gamePlayer.y)<5){this.requestBalloon(11); AudioManager.playSe({ name: "AlertSound", volume: 50, pitch: 100}); this.setSelf('D',true)}
    "If this is less than five tiles away from the player's position, play balloon 11, Alert Sound SE and set its self switch D to ON."

    Then on the second page, with the self switch D checkbox checked
    Code:
    if (this.distanceToPoint($gamePlayer.x,$gamePlayer.y)>5){this.setSelf('D',false);}else{this.goTowardsPlayer()}
    If this is more than five tiles away from the player, turn off its self switch D, else go towards the player
  8. Ok, some questions. But first, let me show my screens:

    Screenshot 2025-04-13 234225.png

    I named Restart's plugin as "goTowardsPlayer". I don't know if this would cause some interference.

    Screenshot 2025-04-13 234309.png
    I also kept EventChasePlayer On.

    Screenshot 2025-04-13 233936.png
    So this is the first code on page one
    JavaScript:
    if (this.distanceToPoint($gamePlayer.x,$gamePlayer.y)<5){setSelf('d',true)}

    Screenshot 2025-04-14 000147.png
    And the second code on page two
    JavaScript:
    if (this.distanceToPoint($gamePlayer.x,$gamePlayer.y)>5){setSelf('d',false)}else{this.goTowardsPlayer()}

    So I did all of this and nothing happened. Am I supposed to use the Script Call lines from EventChaseplayer or this plugin would not work anymore in this scenario?

    I saw that DsProssh used Restart's code line to call the balloon like in this example here
    DsProssh said:
    if (this.distanceToPoint($gamePlayer.x,$gamePlayer.y)<5){this.requestBalloon(11)};
    So I have to put all that I want to happen on the movement route like this?
  9. Ok, there are a couple typos in Restart's code. He forgot to put this.setSelf and the 'D' has to be capitalized. I'll fix my post above too.

    Put this in the first page
    Code:
    if(this.distanceToPoint($gamePlayer.x,$gamePlayer.y)<5){this.setSelf('D',true)}
    and this on the second page
    Code:
    if(this.distanceToPoint($gamePlayer.x,$gamePlayer.y)>5){this.setSelf('D',false)}else{this.goTowardsPlayer()}