MV (SOLVED)YEP_AnimatedSVEnemies mouse cursor anchor

I'm in quite a particular pickle here regarding use of the Y-Anchor functionality of Yanfly's Animated SV Enemies plugin.
To be able to properly place my animated enemies in the Battle Scene so they can reach this low on the screen I have the default Y-Anchor for enemy sprites set at 0.2 (down from 1.0).

This is easy to work around when it comes to fairly much anything through Action Sequences but one thing that I'm kind of stuck with is that if I want to select enemies with the mouse I their "hitbox" is floating a massive chunk above them nowhere near the actual final location of the sprite.

Does someone know if it would be possible to shift this "hitbox" which is apparently tied to the Sprite Anchor, so I could somehow move it along with the visual location of the sprite?

Spoiler: Actor Selection "zone"
1740471414067.png
Spoiler: Enemy Selection "zone"
1740471548896.png
1740471571455.png
how big is the froglike on a picture?
is it fitting or space left on the side?

personally, I would turn it off, mainly because I use arrow to select
the enemy, and if the mouse is over one of them, arrows wont work
and unable to select any enemy unless the mouse is outside of it.
how big is the froglike on a picture?
is it fitting or space left on the side?

personally, I would turn it off, mainly because I use arrow to select
the enemy, and if the mouse is over one of them, arrows wont work
and unable to select any enemy unless the mouse is outside of it.
Well they are animated so they're on a sheet just like the Actor (this is actually still missing the ailment afflicted frames lol)

Perhaps you're right... The mouse hovering keyboard lock thing could be a little off-putting to the player and is another decent reason to not really use it, though I was somewhat enjoying the idea of the game being playable entirely by Mouse alone. Since I thought of that however there's another core mechanic to the game play that kind of forces the keyboard anyway so perhaps it's only for the best.
frog.png
if you want the mouse fully, than it doesn't detect it nice.
but if you using a custom mouse cursor (by plugin or other author)
turn it off and see if the same thing happens.

if it does not, than there is an issue with the custom cursor one.
if you want the mouse fully, than it doesn't detect it nice.
but if you using a custom mouse cursor (by plugin or other author)
turn it off and see if the same thing happens.

if it does not, than there is an issue with the custom cursor one.
Well there is a very clear reason why it's not working: i manually changed the enemy sprite Y anchor as a visual solution because it was otherwise not possible to get them beneath even 40% of the screen south.

My question was if someone with coding savvy could see an "immediate" workaround somehow.

Since making this post though I did decide to dig in YEP_BattleEngineCore code myself for a minute and compared to other plugind I successfully adjusted myself this one seems like spiralling caverns of cobwebs....

But, know knows! Heh... I made this post hoping to get lucky somehow and it does seem unlikely at this point but yeah perhaps someone is intrigued enough by it ;v;
if its custom offset by notetag of the said enemy, then it could also be
an mouse offset to those enemies.

but there should be something that detect sprite, no matter the offset though.
to busy to dig into the code to make an attempt.

so I hope someone can help you out, but I think mouse over could be disabled,
as one you click on it, it should also activate it on enemy select.
if its custom offset by notetag of the said enemy, then it could also be
an mouse offset to those enemies.

but there should be something that detect sprite, no matter the offset though.
to busy to dig into the code to make an attempt.

so I hope someone can help you out, but I think mouse over could be disabled,
as one you click on it, it should also activate it on enemy select.
Yeah I couldn't blame anyone for not even trying if i'm very honest it seems very complicated, I slightly doubt it even could be resolved but I have little to no knowledge of these things I've just been lucky many times with other problems where people here already sprung a solution


This one seems bigger than I initially hoped
reading the code, there is a parameter to set default X and Y anchor.
also there is a notetag for them (not sure if they target the same.

moreover on checking, the "isMouseOverEnemy" check the sprite width/height.
so it's hard to tell what's conflicting or an oversight in the plugin somehow.

but I cannot really help there.

my guess, try mouse over disabled, and see if clicking works as intended,
as once clicked on the enemy, it select it is well, if you truly want mouse over,
than someone with more knowledge can take a peak on it.
Bump (changed the post quite a bit after reanalyzing the problem trying to fix it)
Bump T_T
Is the cursor added using YEP_BattleSelectCursor?
Is the cursor added using YEP_BattleSelectCursor?
Well I am using that plugin, but it is unrelated.

My problem is with the actual Mouse Cursor on the PC when selecting Enemies in battle. Normally you would be able to click on center of the enemy sprite to select them, but because I have changed the Y Anchor of the enemies (With YEP_AnimatedSideviewEnemies) the sprites have moved down but the area that can be clicked with the mouse is still hovering far above the final location of the sprite.
Well, maybe you can try to modify the function that checks mouse over in YEP_BattleEngineCore.js.
JavaScript:
Window_BattleEnemy.prototype.isMouseOverEnemy = function(enemy) {
    if (!enemy) return false;
    if (!enemy.isSpriteVisible()) return false;
    if ($gameTemp._disableMouseOverSelect) return false;
    var x = TouchInput._mouseOverX;
    var y = TouchInput._mouseOverY;
    var rect = new Rectangle();
    rect.width = enemy.spriteWidth();
    rect.height = enemy.spriteHeight();
    rect.x = enemy.spritePosX() - rect.width / 2;
    rect.y = enemy.spritePosY() - rect.height;
    return (x >= rect.x && y >= rect.y && x < rect.x + rect.width &&
      y < rect.y + rect.height);
};

Change to this. So the game doesn't check its position, but uses its bounds.
JavaScript:
Window_BattleEnemy.prototype.isMouseOverEnemy = function(enemy) {
    if (!enemy) return false;
    if (!enemy.isSpriteVisible()) return false;
    if ($gameTemp._disableMouseOverSelect) return false;
    var x = TouchInput._mouseOverX;
    var y = TouchInput._mouseOverY;
    var rect = enemy.battler().getBounds();
    return (x >= rect.x && y >= rect.y && x < rect.x + rect.width &&
      y < rect.y + rect.height);
};

Or save it as an individual plugin.
Change to this. So the game doesn't check its position, but uses its bounds.
didn't come up to this bit, hope it works, as I save it, but also with a
condition to see if it's installed to make sure 🙂

I didn't know getBounds() was a function (as I don't mess with battle scene =) )
It is from PIXI.js, and it also works if the sprite is transformed.
Not sure if the OP uses zoom, but I think it is safe to assume they do.
Maybe that is one of the reason why mouseover area is misplaced.
Maybe that is one of the reason why mouseover area is misplaced.
he uses Y offset down, so the original placement isn't there as rectangle,
so instead of value of 1, it goes down to 0.2, but the mouseOver that I see
check the sprite width/height, but the rectangle is probably still on the same
spot.

like events are o 48x48, but when offset, it moves down, up, left, right,
so when you click on it, it does nothing because the image is moved.

that happens here exactly as well, as I use an offset, I might need to check
somehow for this one too in my mouseHover plugin to check it, so I can get
an idea how to get it fixed 😀 (hopefully).
It is from PIXI.js, and it also works if the sprite is transformed.
Not sure if the OP uses zoom, but I think it is safe to assume they do.
Maybe that is one of the reason why mouseover area is misplaced.
It is like ShadowDragon said, it's not just the mouseover function (as I initially thought it was) it's the entire built-in Mouse functionality of MV that's affected.

Through use of the YEP_AnimatedSVEnemies i have changed the Y-Anchor of the sprites from 1.0 to 0.2; so that they make be placed much lower on the screen than my project was allowing. (which was only just under half of the screen vertically weirdly enough)


As a result the sprites locations are only visually lowered, with the game still functioning as if the enemy location is at the original y1.0 location, and thus using the mouse to click enemy targets has to be what's equivalent to 80% of the allocated sprite sheet size above of where it's visually represented.. ._.

It's really complicated to explain properly I feel the problem itself isn't really as complicated but I'm quite sure nothing in the code of YEP_AnimatedSVEnemies is intended to interact with mouse functionality at all so that does lead it to be a bit of a difficult issue i'm afraid.

(And to add before I forget: I'm not using any zoom/battle camera related functionality.)
I know what you mean. MV's editor will assume your menu is at the bottom so you can't move them too low.
However changing anchor is not a good idea because you need to fix things. I think you need to change their Y positions using a plugin or script at the beginning of the battle.
I know what you mean. MV's editor will assume your menu is at the bottom so you can't move them too low.
However changing anchor is not a good idea because you need to fix things. I think you need to change their Y positions using a plugin or script at the beginning of the battle.
Ah yes... I should have known better than to stick to the first solution I could figure out all by myself haha, now I have some "unfixing" to do but shouldn't be too much of a problem.

I really can't thank you enough for all of your help, it's really saved me in many ways! ToT
I quickly found a plugin that does what you mentioned and it works perfectly.

(And I believe I can even use this plugin to align the sprite pixels on the battle platform as well which had been an immensely uncomfortable task before as well... heh)
1741221941850.png

1741221755085.png
This thread is closed due to being marked solved. Report the next one so we can find it easily! If you need this one reopened, report it to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/solved-yep_animatedsvenemies-mouse-cursor-anchor.175799/