I found something interesting. It's hard to explain, but it's really important.
[/ICODE]
So if you base the selection condition at all regarding the user, it will pass the same results to every actor after. It doesn't seem to effect Troops. So for example, if I put this in random skill that all the actors can use, if the first actor that goes is Harold then it will disable to option to use the skill. This will also happen to all the other actors too despite the condition being true for them.
I commented out this line and everything seems to work fine now. Maybe I am just tired and I missed something while doing this, please let me know. If I am correct then there are MANY projects that use this plugin where most people are never going to notice this issue. I have been working on a project for over a year and it was just randomly when I was testing something out that it even happened to me. It was actually an enemy that was going first and with the <Custom Selection> it would do check if it had a weapon, and if not that it would punch. But within the punch skill I had a check to see rows and subtracting it from the target's row. I then happened to not be using a weapon randomly on the first actor and after all these events happened, I then noticed my punch skill was disabled.
***If someone has the time to just retest this as my brain is fried atm, please let me know your results. If it is true then it's a serious issue that most people won't find out till deployment and endless testing.
Code:
<Custom Select Condition>
if (user.name() !== 'Harold') {
condition = true;
} else {
condition = false;
}
</Custom Select Condition>
So if you base the selection condition at all regarding the user, it will pass the same results to every actor after. It doesn't seem to effect Troops. So for example, if I put this in random skill that all the actors can use, if the first actor that goes is Harold then it will disable to option to use the skill. This will also happen to all the other actors too despite the condition being true for them.
Code:
Game_BattlerBase.prototype.hasValidTargets = function(item) {
if ($gameTemp.isSelectionControlCached(item)) {
// return $gameTemp.getSelectionControlCache(item);
.....rest of the code
I commented out this line and everything seems to work fine now. Maybe I am just tired and I missed something while doing this, please let me know. If I am correct then there are MANY projects that use this plugin where most people are never going to notice this issue. I have been working on a project for over a year and it was just randomly when I was testing something out that it even happened to me. It was actually an enemy that was going first and with the <Custom Selection> it would do check if it had a weapon, and if not that it would punch. But within the punch skill I had a check to see rows and subtracting it from the target's row. I then happened to not be using a weapon randomly on the first actor and after all these events happened, I then noticed my punch skill was disabled.
***If someone has the time to just retest this as my brain is fried atm, please let me know your results. If it is true then it's a serious issue that most people won't find out till deployment and endless testing.