Ok, I have been thinking- for a lot of strategy games, knowing your opponents weaknesses and strengths is an important part of the experience. However there are no add-ons that would aid this in a way that is convenient for SRPG gameplay.
So I have a suggestion for a plugin- when the user is using a weapon or skill, a symbol will appear on enemy units that will designate whether they would take more or less damage than usual. These symbols will also appear when moving when the user's basic attack will do more or less than the base damage.
MV - SRPG Engine MV - Plugins for creating Tactical Battle System
● ARCHIVED · READ-ONLY
-
-
i have a question, is posible get the actor ID on a variable like already have the event ID? every time when is a diferent map, the charaters change of event ID soo is very dificult use it
-
is there a way that can talk to the enemy to become an ally?
-
Do you mean convert actorId to eventId? There is $gameSystem.ActorToEvent(actorId) which spits out the eventId of the actor (or zero if the actor doesn't exist)i have a question, is posible get the actor ID on a variable like already have the event ID? every time when is a diferent map, the charaters change of event ID soo is very dificult use it
Ok, I have been thinking- for a lot of strategy games, knowing your opponents weaknesses and strengths is an important part of the experience. However there are no add-ons that would aid this in a way that is convenient for SRPG gameplay.
So I have a suggestion for a plugin- when the user is using a weapon or skill, a symbol will appear on enemy units that will designate whether they would take more or less damage than usual. These symbols will also appear when moving when the user's basic attack will do more or less than the base damage.Code:var _effectiveDamage = Window_SrpgPrediction.prototype.drawSrpgBattleDamage; Window_SrpgPrediction.prototype.drawSrpgBattleDamage = function(damage, x, y) { _effectiveDamage.call(this, damage, x, y); if($gameSystem.EventToUnit($gameTemp.targetEvent().eventId())[1].elementRate($gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1].currentAction().item().damage.elementId) > 1) { this.drawTextEx("\\I[33]", x + 140, y, 100); } };
I made a small code for you. It will show icon 33 if enemy has an elementRate of more than 1 (aka weak) for the user's action. If you use yanfly element core to add extra elements then you'll have to add some extra code in. You can just copy the same code and make a "not very effective" message appear too.
You can put this in its own plugin or just slap it on the bottom of srpg_core.js/random plugin -
Seeing as how I am using Element core, how would it differ?Do you mean convert actorId to eventId? There is $gameSystem.ActorToEvent(actorId) which spits out the eventId of the actor (or zero if the actor doesn't exist)
Code:var _effectiveDamage = Window_SrpgPrediction.prototype.drawSrpgBattleDamage; Window_SrpgPrediction.prototype.drawSrpgBattleDamage = function(damage, x, y) { _effectiveDamage.call(this, damage, x, y); if($gameSystem.EventToUnit($gameTemp.targetEvent().eventId())[1].elementRate($gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1].currentAction().item().damage.elementId) > 1) { this.drawTextEx("\\I[33]", x + 140, y, 100); } };
I made a small code for you. It will show icon 33 if enemy has an elementRate of more than 1 (aka weak) for the user's action. If you use yanfly element core to add extra elements then you'll have to add some extra code in. You can just copy the same code and make a "not very effective" message appear too.
You can put this in its own plugin or just slap it on the bottom of srpg_core.js/random plugin
Edit: while this is good for now, I was suggesting a plug-in so the player could evaluate multiple enemies on the map simultaneously, which is something that cannot be done through just the prediction window. -
Seeing as how I am using Element core, how would it differ?
Edit: while this is good for now, I was suggesting a plug-in so the player could evaluate multiple enemies on the map simultaneously, which is something that cannot be done through just the prediction window.Code:I updated my code to be compatible with element core (lucky I use this script too haha)var _effectiveDamage = Window_SrpgPrediction.prototype.drawSrpgBattleDamage; Window_SrpgPrediction.prototype.drawSrpgBattleDamage = function (damage, x, y) { _effectiveDamage.call(this, damage, x, y); if (Imported.YEP_ElementCore) { if ($gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1].currentAction().calcElementRate($gameSystem.EventToUnit($gameTemp.targetEvent().eventId())[1]) > 1) { this.drawTextEx("\\I[33]", x + 140, y, 100); } } else { if ($gameSystem.EventToUnit($gameTemp.targetEvent().eventId())[1].elementRate($gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1].currentAction().item().damage.elementId) > 1) { this.drawTextEx("\\I[33]", x + 140, y, 100); } } };
Yanfly Element core has multiple elements and 'element modifier rules' so we need to use Yanfly's functions to calculate element rate
Otherwise the default way to calculate element damage is "what element does this skill have in the game database and what is the element rate of the target".
As for showing multiple enemies on the map simultaneously, that is a harder task. But after a whole day I managed to do it!
I made it into a proper plugin

As shown above, if the enemy is weak a green square appears, if they are strong a cyan square appears. The script is highly customisable. If you don't like the yellow 'flash' then change the plugin parameter in srpg_aoe -
This is exactly What I meant.Code:I updated my code to be compatible with element core (lucky I use this script too haha)
var _effectiveDamage = Window_SrpgPrediction.prototype.drawSrpgBattleDamage; Window_SrpgPrediction.prototype.drawSrpgBattleDamage = function (damage, x, y) { _effectiveDamage.call(this, damage, x, y); if (Imported.YEP_ElementCore) { if ($gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1].currentAction().calcElementRate($gameSystem.EventToUnit($gameTemp.targetEvent().eventId())[1]) > 1) { this.drawTextEx("\\I[33]", x + 140, y, 100); } } else { if ($gameSystem.EventToUnit($gameTemp.targetEvent().eventId())[1].elementRate($gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1].currentAction().item().damage.elementId) > 1) { this.drawTextEx("\\I[33]", x + 140, y, 100); } } };
Yanfly Element core has multiple elements and 'element modifier rules' so we need to use Yanfly's functions to calculate element rate
Otherwise the default way to calculate element damage is "what element does this skill have in the game database and what is the element rate of the target".
As for showing multiple enemies on the map simultaneously, that is a harder task. But after a whole day I managed to do it!
I made it into a proper plugin

As shown above, if the enemy is weak a green square appears, if they are strong a cyan square appears. The script is highly customisable. If you don't like the yellow 'flash' then change the plugin parameter in srpg_aoe
Also, You should make note to have it bellow both SRPG_ShowPath and SRPG_AuraSkill, as I found it to crash if I moved the wrong way when it was above them.
Also, do you plan on fixing the incompatibility with specialRange when used with AOE? -
Hmm, I tested it out and specialRange seems to work out of the box. I assumed specialRange wouldn't work because its not referenced in AoE.js but I guess it doesn't matter because specialRange doesn't actually affect AoE.
A nice bonus (or perhaps not) is that it works with yanfly's element amplification; meaning if a unit has 50% element rate to fire (aka takes half damage from fire) but the user has 300% fire elemental amplification, the resulting damage will actually be at 150% damage (so it will show the enemy being 'weak' despite not actually being weak). You could probably circumvent this by changing the javascript eval to incorporate elemental amplification or you could leave it in to show the player that their fire attacks do super effective damage on almost everything. -
Well, I found it throws an error when you have a weapon/ skill that does AOE damage and uses a special range like that of Rook/Line.Hmm, I tested it out and specialRange seems to work out of the box. I assumed specialRange wouldn't work because its not referenced in AoE.js but I guess it doesn't matter because specialRange doesn't actually affect AoE.
A nice bonus (or perhaps not) is that it works with yanfly's element amplification; meaning if a unit has 50% element rate to fire (aka takes half damage from fire) but the user has 300% fire elemental amplification, the resulting damage will actually be at 150% damage (so it will show the enemy being 'weak' despite not actually being weak). You could probably circumvent this by changing the javascript eval to incorporate elemental amplification or you could leave it in to show the player that their fire attacks do super effective damage on almost everything. -
If you can find what condition caused this problem, I can try to repeat and solve it.i have a glitch on advance interaction when i try to make and open a door the selection window won't close and i can't select units
EDIT:
also how does level on enemies work does it change their stats or just a display/ threat level?
The enemy level is just a display. -
Oh yeah, could you give an example on how to take the element amplification out?A nice bonus (or perhaps not) is that it works with yanfly's element amplification; meaning if a unit has 50% element rate to fire (aka takes half damage from fire) but the user has 300% fire elemental amplification, the resulting damage will actually be at 150% damage (so it will show the enemy being 'weak' despite not actually being weak). You could probably circumvent this by changing the javascript eval to incorporate elemental amplification or you could leave it in to show the player that their fire attacks do super effective damage on almost everything.
-
What error are you getting? is it an error regarding currentAction.item (line 73)? If so I fixed that bug (delete plugin and reinstall as it also changes the plugin parameters)Well, I found it throws an error when you have a weapon/ skill that does AOE damage and uses a special range like that of Rook/Line.
The bug i was referring to was to is demonstrated above. Notice the bat on the left isn't blue because its not in the "target range", it is in the AoE range (this also happens to any aoe attacks that apply damage outside the srpgRange zone so it's not just a problem of specialRange). I'll try to fix it. I have the script way on the bottom after everything (though it only changes one function so it shouldn't break anything)
Hmm, I looked at Yanfly's code and how amplifcation rate is calculated is actually pretty complicatedOh yeah, could you give an example on how to take the element amplification out?
The main issue is if a skill has multiple elements.
I'm going to assume if you use rule 4 for element damage calculation (element Rates are averaged for multi-element attacks) then you want to change the plugin parameter (condition) to the following:
Code:var amplifyRate = 0; var elements = actor.currentAction().getItemElements(); while (elements.length > 0) { var elementId = elements.shift(); amplifyRate += actor.elementAmplifyRate(elementId); } effectiveAmplifyRate = amplifyRate / Math.max(1, actor.currentAction().getItemElements().length); (actor.currentAction().calcElementRate(enemy) - effectiveAmplifyRate > 1)
I'll briefly explain how it works
1. It grabs actor's skill elements
2. For each element, it checks if there is amplifcation on the element
3. It then divides the 'total amplifcation' by the number of elements. This assumes rule 4 of yanfly's element_core
4. It then calculates the enemy's element rate to the current attack (this is a function that yanfly provides)
5. We then remove the 'amplify' value from the element rate and see if its above or below 1
Edit:
I added aoe compatibility. Note the second bat looks 'green' because srpg_aoe target tiles are yellow and zone_customisation tiles are cyan so blending the two results in green. You can fix this by changing the opacity setting defined in srpg_aoe.js (Sprite_SrpgAoE.prototype.updateAnimation)

-
it only works when the map has only one type of actor unit the softlock glitch happens when it has more than one.If you can find what condition caused this problem, I can try to repeat and solve it.
2 or more than units:
1 unit:
what i did on the event:
-
I can't repeat this bug. As far as I can tell, you set the event type as both unitEvent and object, which doesn't make sense, but I don't think this will cause the bug.it only works when the map has only one type of actor unit the softlock glitch happens when it has more than one.
2 or more than units:
View attachment 201381
1 unit:
View attachment 201382
View attachment 201383
what i did on the event:
View attachment 201380 -
Instead of erase event try this script call: $gameMap[this._eventId] = null;it only works when the map has only one type of actor unit the softlock glitch happens when it has more than one.
2 or more than units:
View attachment 201381
1 unit:
View attachment 201382
View attachment 201383
what i did on the event:
View attachment 201380
I had a few instances where using eraseEvent caused some glitches though I forgot where and how -
nope it didn't workInstead of erase event try this script call: $gameMap[this._eventId] = null;
I had a few instances where using eraseEvent caused some glitches though I forgot where and how -
OK I am not sure what's happening, but whenever I try to use your Zone customization plug-in I keep getting this sort of error:
-
I fixed that error, try out the new version (it checks if the event is a null event or not more)OK I am not sure what's happening, but whenever I try to use your Zone customization plug-in I keep getting this sort of error:
View attachment 201621 -
//Deleted
-
Its fixed now, I think.I fixed that error, try out the new version (it checks if the event is a null event or not more)