MV YEP_FootstepSounds, changing default sound overrides ALL other sounds

So for a while I've been using a footstep common event to play sounds, because I originally thought I would need to reserve my terrain tags for another plugin. However, the common event solution requires me to constantly flip switches with events at certain places/co-ordinates or region script calls. Hence was clunky.

I realised I wasn't actually using my previous terrain tags anywhere near as much as I expected when I first started, so I decided all the footstep faff would be better offloaded to a plugin. As I already have it lying around, I decided to implement YEP_FootstepSounds. It works fine for the most part... except one massive thing:

So, Yanfly's help file states:
<Region x Footstep Sound: filename>
- Replace 'x' with the region tag ID (from 1 to 255). If 0 is used, it
will become the default footstep sound.
As a map note-tag. There are also way to override terrain tags per tileset. This, I thought, was great, because I could easily then, say, make desert maps use sand footsteps as default, and get around the limited number of terrain tags as well (I still do need 1-2 for other purposes like minimap and floor damage).

Problem is... when you use this notetag and specify a new "region 0", it appears to take priority over EVERY sound effect from Terrain Tags, forever. They become useless.

I have tried shuffling around some of the code for it acquiring sound~ from what I can tell, when it processes the notetag, it stores the sound effect, and then, because it's stored a sound, it skips the step for looking at terrain tags, but if I remove that check or shuffle the order it does processing, it either crashes or does nothing, so I'm clearly missing something.

tl;dr: Want to be able to replace default footstep sound on maps, whilst still having terrain tags (and actual regions) override this.
I do have a footstep sound that can handle that, I can send it by DM as it isn't
a public plugin yet.

it takes regions and tags, it does work however, a little bit different.
you may find it useful.

you can play around if you like, I can make adjustments if required.
as I may release it someday.
Ideally I just want to get this one issue fixed, as it's otherwise perfect for my needs as is. I generally can't use many regions for footsteps, due to their use in other scripts. Though thanks for the offer.
But in the code if first checks if region id > 0, then checks if terrain tag > 0 and only after that plays the default (or region 0) sound. I quickly tested it and it seemed to work for me just like that. Even when setting a region 0 notetag the terrain tag took priority.
But in the code if first checks if region id > 0, then checks if terrain tag > 0 and only after that plays the default (or region 0) sound. I quickly tested it and it seemed to work for me just like that. Even when setting a region 0 notetag the terrain tag took priority.
Something really wacky must be going on then in the interaction with other plugins. It's like it's only seeing the new Region 0 painted over the top of everything.

Well, not to worry in any case, since I still use my footsteps common event for things like refocusing the camera, adding to time, and handling HUD fadeout, I decided to re-jig things so that damaging floors are handled by the common event rather than the built in damage floor function (since I needed a check for 'using a step limited floor damage prevention power' anyways, it was probably needed).

As a result, I have even more terrain tags free now, and have enough to cover all the steps I need, so I'll request to close the topic. But thanks for the responses, everyone.

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.

Original thread: https://forums.rpgmakerweb.com/threads/yep_footstepsounds-changing-default-sound-overrides-all-other-sounds.183537/