MV Battle Sheet Changing with YED_SideviewBattler

Hello! I recently started work on the sideview battlesheets for my game.
I found that the default 3 frames look clunky and aren't fast enough when executing things like sword slashes.
So I went on the hunt and found the YED_SideviewBattler plugin, which seems to be my best bet for doing what I need. It gives you a lot more freedom to use whatever kind of sprite sheet you want. WHICH IS AWESOME. Unfortunately, to take advantage of the plugin, you seemingly need to put this notetag on your actor:

<Sideview Battler: FILENAME>
Enable custom sideview battler for actor/enemy with battler set FILENAME.

Which forces you to designate ONE spritesheet per actor.

Otherwise none of the settings or other note tags from this plugin seem to do anything.

The issue here is: Every time you change weapons in my game, the actor's SV Battler sprite sheet changes to reflect the new weapon. (yes, im crazy enough to make a separate sprite sheet for EVERY weapon.)
This does not work, however, when this plugin is enabled, because it forces the game to only recognize the spritesheet assigned by the above notetag.

So if anyone has any idea how to fix this, the help would be MUCH appreciated. If this requires a plugin to work-around, please let me know and we can go from there!

This youtube video is the only link i know of to the plugin XD

I can NORMALLY work my way through issues like this, but alas, I am an artist, not a coder lol.

I don't think there is a way to make notetags conditional if the plugin is not specifically designed to do that...

Like I posted in the other thread, not a direct solution but... how dependent are you on using YED? If Lib's battlemotion is an option (requires a bit of spritesheet manipulation), I would suggest to use that. It supports:

-more frames per motion
-choice of ping-pong, loop, one-way
-set framerate individually for each motion
-option to chain one motion with another
-additional motions beyond the standard set of 18
PLUS it just makes use of the normal SV_actors reference, so you can switch out spritesheets using standard event commands.

It may take some getting used to since it uses color codes to set the type of loop, framerate, and motion chaining.
I don't think there is a way to make notetags conditional if the plugin is not specifically designed to do that...

Like I posted in the other thread, not a direct solution but... how dependent are you on using YED? If Lib's battlemotion is an option (requires a bit of spritesheet manipulation), I would suggest to use that. It supports:

-more frames per motion
-choice of ping-pong, loop, one-way
-set framerate individually for each motion
-option to chain one motion with another
-additional motions beyond the standard set of 18
PLUS it just makes use of the normal SV_actors reference, so you can switch out spritesheets using standard event commands.

It may take some getting used to since it uses color codes to set the type of loop, framerate, and motion chaining.
I'm not dead set in using YED at all. But I took a look at what I could find of LIB'S and it was super confusing. I could also only find stuff that was translated as best as someone could do that didn't help either.

I'd be down to try it, but boy howdy I feel like it's gonna be a really steep learning curve.
well there's a SUPER clunky way around this. it's the same way I transform a single actor (it was the only way I could do it actually). basically you'd have to make fake actors with the different spritesheets attached and then with a state, change the actor into the one you need the spritesheet for. you'd need to edit the plugin for this as well to get it to read different actors data when the state goes off. I guess in your case, somehow you could attach a state to weapons passively if possible, dunno.

this is fine for me because I only have 3 actors and they each only change into one other form. I could see this being super clunky for you though unfortunately, depending on how many weapons and actors you have. but I don't know any other way to do it with YED.

as for Lib, depending on what plugins you use, it might not even work. I tried it a while back it didn't work for me at all. maybe you'll have better luck trying to see if it does what you need.
well there's a SUPER clunky way around this. it's the same way I transform a single actor (it was the only way I could do it actually). basically you'd have to make fake actors with the different spritesheets attached and then with a state, change the actor into the one you need the spritesheet for. you'd need to edit the plugin for this as well to get it to read different actors data when the state goes off. I guess in your case, somehow you could attach a state to weapons passively if possible, dunno.

this is fine for me because I only have 3 actors and they each only change into one other form. I could see this being super clunky for you though unfortunately, depending on how many weapons and actors you have. but I don't know any other way to do it with YED.

as for Lib, depending on what plugins you use, it might not even work. I tried it a while back it didn't work for me at all. maybe you'll have better luck trying to see if it does what you need.
Oooffff, yeah that would be really really clunky for me. I've got about 16 weapons each for 6 characters. That would be quite the undertaking.

I've managed to get my whole system mostly working. This little hurdle is all that's left.
I'd be down to try it, but boy howdy I feel like it's gonna be a really steep learning curve.
Yes it's kind of hard for the linguistically challenged among us. Perhaps I should ask Lib for permission and ask if I can make a thread on this, as it's a super waste that this plugin goes unnoticed. The gist:

A spritesheet for three frames will look like this. If you want four frames, just add an additional column for each motion:
testactor8.png

The color codes are:
255,255,x: yellow means ping-pong loop (1-2-3-2-1...) of all non-blank frames
0,255,x: green means one-way loop (e.g. 1-2-3-1-2...)
255,0,x: red means one-way (e.g. 1-2-3 hold)

the x (blue part of RG😎 will set the number of frames between each... err... frame. So if you have 255,0,5 it's a one-way motion with a 5 frame wait in between frames.
As @zerobeat032 said, you would have to have different actors with the different sheets. I'm not sure how he's pulling it off with states, but I would use waynee95's On Equip Eval.

(I'm using that in my project, but because I'm not using expanded spritesheets I'm just using it to change the sheet filenames)

If the plugin that @werzaque suggests uses the standard filename reference instead of a static notetag, that would be a much easier approach. Then you can simply use the equip evals to change sheets.
@werzaque I'm definitely willing to give it A shot. I'll probably need to take a bit of time to even try to wrap my head around it. Again, I'm an artist first and foremost so more in depth systems can be like hitting my head against a wall lol.

@ATT_Turan right now I'm just using a utility common event to change the sheet upon closing the menu. So the libs plugin could really work.


So I'm definitely keeping these options open.

Does anyone know if archaeia is still active? Since I found the plug-in I'm usingon their YouTubeI've been gone from the forum for a long time. I'm wondering if maybe they'd be willing to modify the sideview plugin or at least let me have someone else modify it? Though I'd probably need yami's permission as well. I'd be willing to do a commission for it.

I feel like realistically that would be the -easiest-solution. But if they aren't still around or don't allow notifications then I'll HAVE to find something else (such as libs thingy)
Standard usage terms for resources includes permission for you to edit for personal use.

If they're not included in the plugin, you'd have to check wherever you downloaded it from.
Yes it's kind of hard for the linguistically challenged among us. Perhaps I should ask Lib for permission and ask if I can make a thread on this, as it's a super waste that this plugin goes unnoticed. The gist:

A spritesheet for three frames will look like this. If you want four frames, just add an additional column for each motion:
View attachment 277397
The color codes are:
255,255,x: yellow means ping-pong loop (1-2-3-2-1...) of all non-blank frames
0,255,x: green means one-way loop (e.g. 1-2-3-1-2...)
255,0,x: red means one-way (e.g. 1-2-3 hold)

the x (blue part of RG😎 will set the number of frames between each... err... frame. So if you have 255,0,5 it's a one-way motion with a 5 frame wait in between frames.
I think if I can't manage to get the plugin I'm using updated I'll have to go this route. There's so little info on this plugin that I can find. Do you have a decent amount of experience using it? If so would you mind me picking your brain in a DM about it in the event that I have to go that route?
I use YED às well as Wayne's on equip eval plugin. I have sprite sheet change by using an equip eval to modify user.getSideviewBattler().filename. I did it by naming each sprite with a number corresponding to weapon type and then changing the sprite name based on equipped weapon type. I've also done the same thing for class change (I made a custom plugin for that) using the same principle
I use YED às well as Wayne's on equip eval plugin. I have sprite sheet change by using an equip eval to modify user.getSideviewBattler().filename. I did it by naming each sprite with a number corresponding to weapon type and then changing the sprite name based on equipped weapon type. I've also done the same thing for class change (I made a custom plugin for that) using the same principle
Ohhhh, it sounds like you managed to work around the problem I'm having. I will definitely have to dig into that!

You're using the custom sideview sheets AND the <Sideview Battler: FILENAME> notetag and it's still working that way using the method you posted?
Yes. I'm at work so can't access my project but I have a system where changing equipment changes the actors sprite sheet by editing the filename. I have variable sprite sizes and frames but each actor has the same set size and frames
Yes. I'm at work so can't access my project but I have a system where changing equipment changes the actors sprite sheet by editing the filename. I have variable sprite sizes and frames but each actor has the same set size and frames
That's amazing. Whenever you're free I'd love to get a bit of help setting that up if you're down to help! From what you're saying this definitely sounds like what I need.
This is something which I've also been looking for so that people can use my resources for visual weapons and my battlers with MV.
So with YED and Wayne's on equip eval plugin it should work. Nice! Finally I'll be able to direct people towards a solution for this.

(yes, im crazy enough to make a separate sprite sheet for EVERY weapon.)
I can fully relate to your craziness, but it really helps the visual appeal of battles!
This is something which I've also been looking for so that people can use my resources for visual weapons and my battlers with MV.
So with YED and Wayne's on equip eval plugin it should work. Nice! Finally I'll be able to direct people towards a solution for this.


I can fully relate to your craziness, but it really helps the visual appeal of battles!
THE KING HAS ARRRIVED LOL

Holder's Battlers* was genuinely the whole reason I went down this road in the first place! It inspired me to not just use the basic sprite style way back when lol. I'm glad my thread could help you of all people.

And right? I spent a lot of time designing the weapons, I would hate to have to resort to using a less visually appealing battle sprite system.

I'm excited to see what I can do with boomy's solution!
I need these lil guys to look awesome in motion!


1695434616229.png
I'm so pleased to hear that.
I personally see weapons as a great way to even tell the environmental story and location aesthetic.

Yeah, fingers crossed this is the solution we and others have been seeking.

EDIT: had a search and this may be what's being referred to:
WAY_CustomOnEquipEval
Run code when an actor equips or unequips an item.
Download: https://raw.githubusercontent.com/waynee95/mv-plugins/master/dist/WAY_CustomOnEquipEval.js

But may need more as to what to actually do when it's run, essentially display the two weapon sheets above and below the actor sheet.
My solution:
Edit customOnEquipEval.js

Edit the var evalCode function
You can outright replace everything if you don't intend to use evalCodes at all besides changing spritesheets. I use the following code:

var evalCode = function evalCode(user, item, type) {
if(item) {
if(item.wtypeId) {
user.getSideviewBattler().filename = user.getSideviewBattler().filename.replace(/[0-9]/g, '') + item.wtypeId;
}
}
}

This changes the user's spritesheet to its name (stripping all numbers) then adding the wtypeId on the end. So for example, if wtypeId 1 is sword, then harold1.png would contain the sword spritesheet.
If you have spritesheets with custom frames (as in different frames for a sword vs spear spritesheet) then you have to change the user._sideviewBattler object. You could do this by:
user.getSideviewBattler().motions.abnormal.index = 3;
user.getSideviewBattler().motions.abnormal.frames = 12;
user.getSideviewBattler().motions.abnormal.speed = 6;

Changing abnormal to whatever motion style (like idle / swing / spell / whatever custom ones you define).

You can also access these parameters using user._sideviewBattler (vs the getSideviewBattler() function)

In my project, I store frame data as actor notetags and call them (using user.meta.sword) to change sprite data accordingly.
My solution:
Edit customOnEquipEval.js

Edit the var evalCode function
You can outright replace everything if you don't intend to use evalCodes at all besides changing spritesheets. I use the following code:

var evalCode = function evalCode(user, item, type) {
if(item) {
if(item.wtypeId) {
user.getSideviewBattler().filename = user.getSideviewBattler().filename.replace(/[0-9]/g, '') + item.wtypeId;
}
}
}

This changes the user's spritesheet to its name (stripping all numbers) then adding the wtypeId on the end. So for example, if wtypeId 1 is sword, then harold1.png would contain the sword spritesheet.
If you have spritesheets with custom frames (as in different frames for a sword vs spear spritesheet) then you have to change the user._sideviewBattler object. You could do this by:
user.getSideviewBattler().motions.abnormal.index = 3;
user.getSideviewBattler().motions.abnormal.frames = 12;
user.getSideviewBattler().motions.abnormal.speed = 6;

Changing abnormal to whatever motion style (like idle / swing / spell / whatever custom ones you define).

You can also access these parameters using user._sideviewBattler (vs the getSideviewBattler() function)

In my project, I store frame data as actor notetags and call them (using user.meta.sword) to change sprite data accordingly.
Okay I think for the most part I understand the basics up until we get to this:

If you have spritesheets with custom frames (as in different frames for a sword vs spear spritesheet) then you have to change the user._sideviewBattler object.


But before I try to tackle that part, it looks like, say, if I have 20 different swords in the game, each with their own sprite sheet. I'll need to make 20 weapon types, so sword 1, sword 2 and so on and so forth. That way each sword has it's own type that way this can grab that particular sprite sheet. Is that correct or am I misunderstanding entirely?

Basically: explain it like I'm 5 lol.
If you have like 20 different swords then yes your need to make 20 different sprite sheets of Harold, each different sprite sheet having a different sword.

And then you'll have to edit the code and instead of using wtypeId to identify which sprite sheet corresponds to which weapon you'll need to use id (weapon id) since that's unique to each weapon.

In your case the ideal solution would be custom weapon sprite sheet but that means every unique actor would have the same attack animation which I presume is not what you're looking for

Original thread: https://forums.rpgmakerweb.com/threads/battle-sheet-changing-with-yed_sideviewbattler.161372/