Modification of Normal Priority

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
523
Reaction score
227
First Language
English
Primarily Uses
RMVXA
Hello! I'm very hesitant to post this, as my past few requests have had no luck. I've probably been asking for too much in each, but I digress.

Several bugs in my game are caused by the way that normal priority currently works. In a normal VX Ace game, a player and a normal priority event will almost always be on different tiles. However, my project is using multiple tactics to subvert the grid, including parallax mapping, custom event placements, custom event and player hitboxes, and a custom interactionbox (the box that determines where the player is interacting with events), so there are many cases where the player and a Normal Priority event may be on the same tile. This means that in these cases, the event cannot be activated, as normal priority specifically requires that the event and the player be on different tiles.

My request is for the code defining normal priority to be modified so that the player can activate the event not only from adjacent tiles, but also from the same one.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,839
Reaction score
6,819
First Language
Indonesian
Primarily Uses
RMVXA
Probably, try this.
Code:
class Game_Player
  def check_event_trigger_here(triggers)
    start_map_event(@x, @y, triggers, false)
    start_map_event(@x, @y, triggers, true)
  end
end
 

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
523
Reaction score
227
First Language
English
Primarily Uses
RMVXA
That doesn't seem to be working for me. I've tried both inserting it into Game_Player, and using it as it's own script, in varying spots. I'm using multiple scripts; could one be aliasing that method already, making this ineffective?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,839
Reaction score
6,819
First Language
Indonesian
Primarily Uses
RMVXA
In that case, you might as well as listing the script you're using. Additionally, you can try my script in the blank project and see if it works.
 

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
523
Reaction score
227
First Language
English
Primarily Uses
RMVXA
Hmm, I've checked every script I'm using for "check_event_trigger_here", and none of them are using it. However, the likely culprit is GaryCXJk's Free Movement, as it does have a section regarding event triggers.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,272
Reaction score
1,297
First Language
Spanish
Primarily Uses
RMVXA
make everything default, but change the Z order of the sprites, thus layering things on top of others without changing priority?
maybe the problem is not the problem... have you tried going around it?
 

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
523
Reaction score
227
First Language
English
Primarily Uses
RMVXA
I have no idea what you're suggesting, sorry! :D This is about triggering normal priority events on the same tile, not their graphics.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,272
Reaction score
1,297
First Language
Spanish
Primarily Uses
RMVXA
that's what I want to understand: how is normal priority causing trouble?
usually if you stand in the same tile as an event, you trigger them with an action not by contact.

if you have to use different priorities to affect the layering, just shift the layering to another process and work with normal priorities as they are.
 

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
523
Reaction score
227
First Language
English
Primarily Uses
RMVXA
That's just the thing. I can't trigger the event with the action button, BECAUSE I'm on the same tile as it. Normal priority seems to have a restriction where the player and triggering event must be on different tiles. Currently, I cannot activate the event at all when on the same tile without setting it to below priority- and then the player has to be on the same tile! I need both at the same time, unfortunately.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,004
First Language
Tagalog
Primarily Uses
RMVXA
@gstv - Action button trigger for "normal priority" events is checked only for events in front of the player. This is because normally, normal priority events and the player cannot be on the same tile, but the OP have a system in place that allows such behavior.

The OPs problem is that he wants it to trigger for normal priority events even if they are on the same tile as the player. He needs it to be on normal priority.

As much as its its possible to make a workaround for the display, that might be more troublesome to do and might lead to other problems..

@OP - Have you tried Theo's script on a new project just to determine if its really a compatibility issue which makes it not work? In case it is indeed a compatibility issue, can you try putting it as the last script and see if that makes it work without causing other problems.
 
Last edited:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,004
First Language
Tagalog
Primarily Uses
RMVXA
Have you tried Theo's script on a new project just to determine if its really a compatibility issue which makes it not work? In case it is indeed a compatibility issue, can you try putting it as the last script and see if that makes it work without causing other problems.
 

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
523
Reaction score
227
First Language
English
Primarily Uses
RMVXA
Okay, I found the script causing the issue! It's Tsukihime's Event Trigger Labels. When I remove that script, the events are obviously broken, but I am still able to use TheoAllen's snippet to activate them up close. So now, this is a question of compatibility.

I did try it on a blank project and have now confirmed that Tsukihime's script is the problem, and not GaryCXJk's script. Putting the script as the last one works only until I add Hime's script; after that it breaks once more.
 
Last edited:

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,272
Reaction score
1,297
First Language
Spanish
Primarily Uses
RMVXA
Code:
  def start_map_event(x, y, triggers, normal)
    return if $game_map.interpreter.running?
    $game_map.events_xy(x, y).each do |event|
      if event.trigger_in?(triggers) && event.normal_priority? == normal
        event.start
      end
    end
  end


event.start is the line you need ran.
event.trigger_in?() and event.normal_priority? must validate for that to happen.
I believe the thing to look into, here, is that event.normal_priority? check. Theo's solution should force that to validate. If it doesn't, then something else must be interfering that.
 

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
523
Reaction score
227
First Language
English
Primarily Uses
RMVXA
So you're saying there's another script interfering? I only have four scripts in the blank project- just enough to make the event function without crashing, not even function correctly: Cidiomar's Full Input Keyboard, Tsukihime's Event Trigger Labels, GaryCXJk's Free Movement, and TheoAllen's little snippet from above. When I remove Tsukihime's script, I'm able to activate the event as I want; however, I still need it for my project.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,272
Reaction score
1,297
First Language
Spanish
Primarily Uses
RMVXA
the only link I could find, is in Tsukihime's script, line 222, check_action_event.
it overrides the default and calls for check_event_trigger_here, which itself would not be overwritten by Theo's solution

you should probably find and unify all calls that lead up to event.start.

EDIT:
scratch that.
make it line 183, update_nonmoving.
that's what ultimately diverts to check_action_event and event.start
it requires a thorough backtracking, and I'm tired right now... the solution is somewhere between that, and event.start.
 
Last edited:

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
523
Reaction score
227
First Language
English
Primarily Uses
RMVXA
I think now would be a good time to mention that I have no idea how to possibly do that. :)
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,272
Reaction score
1,297
First Language
Spanish
Primarily Uses
RMVXA
wow, I lost track of this

I just underwent a brain dump after a while of not working, so I might be able to figure it out.

EDIT: what exactly are you using Hime's script for? it really only manages the keyboard, when it comes to interacting with events.... it doesn't really affect events themselves.
 
Last edited:

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
523
Reaction score
227
First Language
English
Primarily Uses
RMVXA
Ah sorry, I didn't see your edit. I'm using Tsukihime's script so that my events can be triggered differently by different button presses. It's not strictly necessary, but the event won't function right without it. The issue I'm having happens regardless of me using it, though.
 

Latest Threads

Latest Posts

Latest Profile Posts

Hey everyone, we know that the edit bar is missing. We're working on it. You can talk about it in the announcement here: https://forums.rpgmakerweb.com/index.php?threads/forum-errors-missing-edit-bar-etc.132715/
So, explain why we can no longer use BBC code or smilies in our posts? This sparks much sadness...
Are we now stuck with WYSIWYG ? I cannot revert back my posts to good old raw text ?
I'm wondering if I may be putting too many things into one map. A story, within a story, within a story . . . it's fun, but I can't shake the feeling that it may be better to scrap some of it, and use it for another map. I'm not sure what to do.

Forum statistics

Threads
107,789
Messages
1,032,209
Members
139,939
Latest member
Mineformer
Top