catwizard69

Villager
Member
Joined
Jul 27, 2018
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMMV
I'm using Yanfly's action sequences as well as Yanfly's animated enemies. I'm trying to get the enemy Sprite to take priority over the actor when it attacks, since it looks weird when the enemy sprite goes under the actor when it goes to attack. Does anyone know of a command for that action sequences I can toggle which has priority?
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
655
Reaction score
205
First Language
English
Using YEP Battle Engine Core?

Look under the 5th topic: "Sideview"

Under there is an option regarding Priority.
 

catwizard69

Villager
Member
Joined
Jul 27, 2018
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMMV
Using YEP Battle Engine Core?

Look under the 5th topic: "Sideview"

Under there is an option regarding Priority.
Yes, I am, but I am looking for a way to change that depending on who's attacking who.
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
655
Reaction score
205
First Language
English
Did you try the different priority options?
 

catwizard69

Villager
Member
Joined
Jul 27, 2018
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMMV
I did, and all options seem to only give one side priority at all times.
 

Nectar

Bees love me.
Veteran
Joined
Jul 7, 2017
Messages
256
Reaction score
46
First Language
English
Primarily Uses
RMMV

Nectar

Bees love me.
Veteran
Joined
Jul 7, 2017
Messages
256
Reaction score
46
First Language
English
Primarily Uses
RMMV

Nectar

Bees love me.
Veteran
Joined
Jul 7, 2017
Messages
256
Reaction score
46
First Language
English
Primarily Uses
RMMV

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
655
Reaction score
205
First Language
English
Maybe you need to request a plugin.
 

Nectar

Bees love me.
Veteran
Joined
Jul 7, 2017
Messages
256
Reaction score
46
First Language
English
Primarily Uses
RMMV
No idea how to change it manually in an action sequence but if you want always attacker on top of everything.

Code:
Spriteset_Battle.prototype.battleFieldDepthCompare = function(a, b) {
var priority = BattleManager.getSpritePriority();
if (a._battler && b._battler) {
if (!$gameSwitches.value(1)) {
if (a._battler.isActor() && b._battler.isEnemy()) return 1;
if (a._battler.isEnemy() && b._battler.isActor()) return -1;
} else {
if (a._battler.isActor() && b._battler.isEnemy()) return -1;
if (a._battler.isEnemy() && b._battler.isActor()) return 1;
}
}
if (a.z < b.z) return -1;
if (a.z > b.z) return 1;
if (a.y < b.y) return -1;
if (a.y > b.y) return 1;
return 0;
};
and run a check at beginning of every skill for the switch.

if user.isEnemy()
CHANGE SWITCH 1: on
else
CHANGE SWITCH 1: off
end

Put it below battle engine core.
Battle engine core also without said plugin lets you choose between actors or enemy on top or normal which is only based off position, I think it defaults to actors on top, so try switching to 0 first and see if that is better in side view sprite priority.

Found it, credit @glaphen
 

Garund

Warper
Member
Joined
Jul 15, 2020
Messages
4
Reaction score
2
First Language
French
Primarily Uses
RMMV
Hi,

i didn't succeed to make your plugin to work. I failed creating the plugin or my commands are not right. When you run the check at beginning of every skill, is there anything else to write in the notetag before ?
'if user.isEnemy()
CHANGE SWITCH 1: on
else
CHANGE SWITCH 1: off
end '

Anyway, I found another interesting way to resolve this - and I'm so happy that I want to share :D.

1. In the Battle Engine Core plugin - change "Side Sprite Priority" to 0.
But the problem is : if ennemies and actors have the same Y, wich happens when one move to the other, then ennemies have priority and appear on the top.
2. In the notetag of your skills, add this to movement command : 'offset y+1'
So when the user of the skill will arrive in front of the target, the sprite will be 1 pixel lower, and so it will appear above the target. The only inconvenient is that it's not totally clean cause the sprite will move a bit - but just 1 pixel so it's pratically invisible.

Example :
NOTETAG SKILL n°1 ("Basic Attack")
<target action>
...
move user: targets, front, 20, offset y +1
...
</target action>

I hope it will be usefull.

Bye
 

Nectar

Bees love me.
Veteran
Joined
Jul 7, 2017
Messages
256
Reaction score
46
First Language
English
Primarily Uses
RMMV
Hi,

i didn't succeed to make your plugin to work. I failed creating the plugin or my commands are not right. When you run the check at beginning of every skill, is there anything else to write in the notetag before ?
'if user.isEnemy()
CHANGE SWITCH 1: on
else
CHANGE SWITCH 1: off
end '

Anyway, I found another interesting way to resolve this - and I'm so happy that I want to share :D.

1. In the Battle Engine Core plugin - change "Side Sprite Priority" to 0.
But the problem is : if ennemies and actors have the same Y, wich happens when one move to the other, then ennemies have priority and appear on the top.
2. In the notetag of your skills, add this to movement command : 'offset y+1'
So when the user of the skill will arrive in front of the target, the sprite will be 1 pixel lower, and so it will appear above the target. The only inconvenient is that it's not totally clean cause the sprite will move a bit - but just 1 pixel so it's pratically invisible.

Example :
NOTETAG SKILL n°1 ("Basic Attack")
<target action>
...
move user: targets, front, 20, offset y +1
...
</target action>

I hope it will be usefull.

Bye
I believe that note tag is supposed to be at the very beginning, inside your action sequence.

But that second fix apparently fixes the job :D
 

Latest Threads

Latest Posts

Latest Profile Posts

hmmm. an art of mine was removed from reddit, for a reason not even listed.
Going to try my luck with Rust programming language. C++ is just way too gosh darn frustrating.

Forum statistics

Threads
121,887
Messages
1,144,917
Members
160,140
Latest member
LagusaDumDum
Top