Status
Not open for further replies.

Diguito

Villager
Member
Joined
Jul 20, 2014
Messages
20
Reaction score
6
First Language
Portuguese
Primarily Uses
RMMV
Hi everyone,


Not a bug, but disrupts gameplay!
This is actually something that happened to me when I used to work with RPG Ace. That time I was helped by another rpg community who made a few lines of code to "fix" (change) parameters of the game.



UPDATE: A friend helped me in the comments and refreshed my memory about the Anti Lag script for RPG Ace (Here I found Victor's, very similar to what I need: link )


I like creating puzzle games that not necessarily uses RPG features like battles or equipments. So my focus is always on the map and how things work (move) on it.


So what I want for the Plugin?
All events tagged with <update> (Just an example of how it could work) should be working even if it's out of the screen. By default, RPG Maker only start an event content or custom route when it's on screen (or very close). This may be intencional, because avoids to much work for the hardware and process to deal with.



It's the same idea as Ace's Anti-Lag script! https://victorenginescripts.wordpress.com/rpg-maker-vx-ace/anti-lag/


Why this will help me?
In one of my puzzles, guards have custom route set and should start their movement as early as possible so all guards can cover places of the map in the right timing. Otherwise the level gets to easy or to hard to be acomplished because depends on where the player have passed or is standing.



In another example, objects that have synchronized movements end up getting misaligned and disrupting a gameplay or even preventing the continuity of the game.
fd4a06af92.jpg



Obs.: When using big maps, the screen will "reveals" the nearest rocks movements while the farthest remain frozen. Setting all the rocks to be always updating could solve the problem!


Is it possible?


This seems to be something very useful and I didn't found anything for MV yet. That makes me think that maybe is kinda complex to do it, but I'll let you scripters tell me that! :x


Can someone help me?


Thankss!
 
 
Last edited by a moderator:

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
16,246
Reaction score
9,018
First Language
English
Primarily Uses
RMMV
I've moved this thread to Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,332
Reaction score
8,756
First Language
German
Primarily Uses
RMMV
I suggest you modify that request to work in the same way as the solution used by Ace' anti-lag-scripts, because otherwise it will cause too much lag in games.


The key here is that the makers (Ace same as MV) have a "operation distance" to decide when to move an event and when not (it's actually a bit larger than the screen, but not full map). If you change that number to a larger one (or eliminate the filter completely), then everything will affect the lag.


The better anti-lag scripts in Ace not only gave that number a custom value, but also added a filter to allow events to be excepted from that filter.


Using that, you would place those notetags on the boulder events, making them always move without making every decorative event on the entire map doing the same.


That solution is a bit more complex than simply changing the execution range to the entire map, but better in the long run.
 

Diguito

Villager
Member
Joined
Jul 20, 2014
Messages
20
Reaction score
6
First Language
Portuguese
Primarily Uses
RMMV
I suggest you modify that request to work in the same way as the solution used by Ace' anti-lag-scripts, because otherwise it will cause too much lag in games.


The key here is that the makers (Ace same as MV) have a "operation distance" to decide when to move an event and when not (it's actually a bit larger than the screen, but not full map). If you change that number to a larger one (or eliminate the filter completely), then everything will affect the lag.


The better anti-lag scripts in Ace not only gave that number a custom value, but also added a filter to allow events to be excepted from that filter.


Using that, you would place those notetags on the boulder events, making them always move without making every decorative event on the entire map doing the same.


That solution is a bit more complex than simply changing the execution range to the entire map, but better in the long run.



Oh I see..so you saying that I should request a look alike script used by Ace to correct the lag problems? This is actually a very smart idea!


Thanks for your support!
 

Diguito

Villager
Member
Joined
Jul 20, 2014
Messages
20
Reaction score
6
First Language
Portuguese
Primarily Uses
RMMV
I've moved this thread to Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.

Sorry! I really thought I was on the right place. I'll pay more attention next time! :')
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,332
Reaction score
8,756
First Language
German
Primarily Uses
RMMV
@Diguito, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


Also, you don't need to quote an entire post to answer - do that only if you want to reply to specific points.


In the normal cases, the @username convention like I used above is better.


As for your questions - the anti-lag scripts where just a reference, you should not copy them to MV because MV has some places where it works differently on purpose (has to do with enabling web functionality). The better way would be to work from the other side - request a script that allows tagged events to be always executed (to excempt them from the stop filter) as that would be a lot easier and has less chance of causing problems with the game loop.
 

Diguito

Villager
Member
Joined
Jul 20, 2014
Messages
20
Reaction score
6
First Language
Portuguese
Primarily Uses
RMMV
@Andar Oh sh**! New here ':)  


Got it! And done!


Thank you!
 

Harken_W

Veteran
Veteran
Joined
Oct 13, 2015
Messages
80
Reaction score
23
First Language
English
Primarily Uses
N/A
Yanfly has just released a new plugin.


Move route core.


"These are some notetags you can utilize for your events.


Event Notetags:


<Always Update Movement>



– Most events don’t update unless they’re close to the screen. But any event with this notetag will always be updating regardless of whether they are close to the screen or not."


If this is useful to you.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,169
Reaction score
15,542
First Language
English
Primarily Uses
RMMV
Try this.  I haven't tested it, so if you get an error, please grab a screenshot of the console log (F8 when the error occurs, and go to the Console tab):


Save it as a new file in your plugins folder.  Extension needs to be .js but the file name doesn't matter.  Then add it to your plugin manager.

Code:
//============================================================================
// OffScreen Movement
// by Shaz
// Last Update: 2017.01.22
//============================================================================

/*:
 * @plugindesc Allows events to be flagged to continue moving when out of range
 * @author Shaz
 *
 * @help This plugin has no plugin commands
 * 
 * Put <UpdateOffscreen> into an event's note box (beside the name box) to
 * make it update its position even when it's out of the anti-lag range
 *
 */
 
(function() {
  var _Game_Event_isNearThePlayer = Game_Event.prototype.isNearThePlayer;
  Game_Event.prototype.isNearThePlayer = function() {
    if (this.event().meta.UpdateOffscreen) {
      return true;
    } else {
      return _Game_Event_isNearThePlayer.call(this);
    }
  };
  
  Game_Event.prototype.isNearTheScreen = function() {
    if (this.event().meta.UpdateOffscreen) {
      return true;
    } else {
      return Game_CharacterBase.prototype.isNearTheScreen.call(this);
    }
  };
})();
 
Last edited by a moderator:

Diguito

Villager
Member
Joined
Jul 20, 2014
Messages
20
Reaction score
6
First Language
Portuguese
Primarily Uses
RMMV

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,169
Reaction score
15,542
First Language
English
Primarily Uses
RMMV
I've made a small fix to the script.  Give it a go now, if you're still interested in trying it as a solution.
 

Diguito

Villager
Member
Joined
Jul 20, 2014
Messages
20
Reaction score
6
First Language
Portuguese
Primarily Uses
RMMV
@Shaz It's perfect now! Working! Thank you 
 

Sharm

Pixel Tile Artist
Veteran
Joined
Nov 15, 2012
Messages
12,806
Reaction score
11,044
First Language
English
Primarily Uses
N/A
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Nightmare... Dreamt I posted a GFX resource post. With a work in progress glove icon that tinted to different colors. In the wrong forum. And I was in such a panic. I saw people writing posts in response, those "..." you see in discord and such. So I frantically tried to report my post as wrong forum, editing to say it's the wrong forum and that I "accidentally" posted it too early... Very odd dream to be honest...
The youngest photo of you is also the oldest photo of you.
People need to stop submitting their game to every single game jam without even reading the jam rules (╯°□°)╯︵ ┻━┻
Mom tested positive for COVID thanks to a single stupid coworker of hers not taking sh*t serious.
I'll prolly won't be on here for a while as we deal with this.
So before I inevitably start a new project to reorganize myself (I will make sure to save important info dw), I will make an external list of what I want in the final database.

Forum statistics

Threads
117,200
Messages
1,105,427
Members
153,341
Latest member
Gaelzzz
Top