Hi !
Maybe there are some plugins corresponding to that (I didn't find anything bu searching), but I will ask.
My project turn on with the SRPG Gear MV plugin to create a SRPG. I want to have a specific mecanic in my project : the weapon triangle.
If you don't know it, it's a gameplay mecanic present in most Fire Emblem games.
Depending of the character and the enemy weapon, you will have advantage or disavantage during the fight.
In the FE games, the weapon triangle is :
swords>axes>spears>swords.
Sometimes, this triangle apply also to magic skills.
The bonuses / penalties of the weapon triangle are +/- hit, +/- eva and +/- dammages.
I think it's possible to use the "+/- dammage" with the RPG Maker MV base mecanic of elements (create a axe / sword / spear element, weakness and resistance to it).
But it is possible to apply the hit and eva bonus/penalty ?
Base RPG Maker MV don't allow ennemies to wear weapons. How can I have those bonus/penalty system depending of witch weapon the actor has ?
Also, it is possible to apply this system using a skill (magic for exemple) ?
MV - weapon triangle for SRPG Gear MV
● ARCHIVED · READ-ONLY
-
-
As far as adding advantages and disadvantages to skills, I agree that elements would probably work. How do you want player advantages and disadvantages to change? Does each actor or enemy have a static element or weapon type, or do you want these to be swappable? For enemies, you could create multiple types of each enemy in the database that natively have different attributes (ex. 2 versions of "Bandit," one with a sword and one with an axe). For actors, have you tried to add skills, advantages, and disadvantages to classes or states, and attach those to individual weapons? I haven't worked with MV for a while.
Concerning the evasion question, you could try using conditional statements in your damage formula to check if a target has an attribute (a status or another attribute common to all actors who use a damage type, like sword damage or wind damage), and alter the hit rate of a skill there. Could get complex, though, and I'm not much of a programmer. -
In the early game, most actor and ennemies are one weapon lock, so it would be static. But some of them can swap weapon (essentially mages, because there are 5 magic elements in my game, and most of the actor mages has access to 3 of them by equip tomes)As far as adding advantages and disadvantages to skills, I agree that elements would probably work. How do you want player advantages and disadvantages to change? Does each actor or enemy have a static element or weapon type, or do you want these to be swappable?
I didn't try it yet, and I don't know how to do that. But do you think it will work with the YEP_passive_state plugin ?For actors, have you tried to add skills, advantages, and disadvantages to classes or states, and attach those to individual weapons?
I almost needed to create a state for all elements and weapon to do my "weapon exp" system using the YEP_battle-core and action_sequences. I can try to add the weakness / resistance to those pre-existing states you think ? I don't think it would "break" my weapon exp system if I had this. But I think it would be more problematic with the mages whitch can have differents spells with different elements at the same time.
I see what you mean, but I'm not really at ease with JS to do complex dammage formulae. It's something to explore I guess.Concerning the evasion question, you could try using conditional statements in your damage formula to check if a target has an attribute (a status or another attribute common to all actors who use a damage type, like sword damage or wind damage), and alter the hit rate of a skill there.
Maybe something like : (I will take exemple of wield a sword)
dmg = a.atk - b.def.
if ennemy have axe state : hit+10% and eva +10%
else if ennemy have spear state : hit -10% and eva -10%.
Or maybe in the state notetag ?
I have the idea, but I'm not able to translate that in JS -
Here's a really good explanation of some fancy stuff you can do with damage formulas, and it's made for MV specifically. It should be possible to do what you want with evade and states and some of these tips.
https://forums.rpgmakerweb.com/index.php?threads/damage-formulas-101.81905/
Damage formulae can be daunting, but there is a lot of support out there on the forums, and often you can find someone who's already implemented something similar to what you're aiming for, and learn from that. I've done SO much damage testing to get mine to work right, haha.
It sounds like using states as containers for different attributes would work well in your project--I'm trying to figure out some things for my own game in MZ, actually. Not sure about whether active or passive states would work better, though. That's what I'm trying to learn now, too! -
Thank you for the link, I will give it a try !
I think states can work well to check the weapon of the ennemy / actor.
But I know that with the YEP_passive_state, if you add a passive state to a skill, it's allways active (I think it could be disabled using switches, I must try).
I think it would have many conflicts whith dammage elements because, if my mage has learnt fire, thunder and wind spells, the elemental weakness / resistance will be broken because the passive_state is allways running, even if you don't use that skill...
Maybe there is something to do with the dammage formula to use the "+/- dammage" thing instead of elemental weakness / resistance ? I don't know.
it's my mis-understanding of how the YEP_passive_state plugin works that make the thing more complex I guess.
Okay.
So I tryed to do with formulae. Maybe it's a synthax error, but my attacks didn't do any dammage.
Here is the formula I used for the "attack (sword)" :
if (b.isStateAffected(25)) { a.addState(49) b.addState(50); (a.atk + 2) - b.def } else { if (b.isStateAffected(24)) { a.addState(50) b.addState(49); a.atk + 2 - (b.def + 2) } else { a.atk - b.def } }
Here :
State 25 = the axe state
State 24 = the spear state
State 49 = the state that grant the +10% hit and +10% eva bonus
State 50 = the state that grant the -10% hit and -10% eva penalty -
just use the any states plugin. look here, in the battler status window the state icons are displayed for easier debugging. Axe VS Staff
-
Is it compatible with MV ?just use the any states plugin. look here, in the battler status window the state icons are displayed for easier debugging. Axe VS Staff
View attachment 320875
On your screen it's a game made on RPG Maker VX -
You do realize that image shows a VX project, right? If it uses the plugin you mentioned, that's actually a script and is incompatible with MV.just use the any states plugin. look here, in the battler status window the state icons are displayed for easier debugging. Axe VS Staff
View attachment 320875 -
when playtesting he should put state icons to see if the states are actually there. the SRPG has a prediction window too.
it's a developer technique for debugging and trouble shooting. why are you focusing on the image as a VX game and not on the technique. -
Okay.
So I tryed to do with formulae. Maybe it's a synthax error, but my attacks didn't do any dammage.
Here is the formula I used for the "attack (sword)" :
if (b.isStateAffected(25)) { a.addState(49) b.addState(50); (a.atk + 2) - b.def } else { if (b.isStateAffected(24)) { a.addState(50) b.addState(49); a.atk + 2 - (b.def + 2) } else { a.atk - b.def } }
Here :
State 25 = the axe state
State 24 = the spear state
State 49 = the state that grant the +10% hit and +10% eva bonus
State 50 = the state that grant the -10% hit and -10% eva penalty
The fact is that my dammage formula don't work at all.
Even if the states may apply and use a plugin to show them, the battler deals 0 dammage lmao.
So there is something in the formula that don't work -
Because you didn't really speak clearly enough. Combined with an image from the wrong RM, it's easy to pass over the point you're trying to make. Doubly so since it doesn't seem like you got the right name for whatever plugin you were talking about.why are you focusing on the image as a VX game and not on the technique.
-
Mmh. I tryed something else :
For my attack (sword) skill :
Code:b.isStateAffected(24) ? a.addState(199); b.addState(198); (a.atk - 2) - b.def : b.isStateAffected(25) ? a.addState(198); b.addState(199); (a.atk + 2) - b.def : a.atk - b.def
here :
state 24 = spear
state 25 = axe
state 198 = advantage (give to the user hit +10% / eva +10%)
state 199 = disadvantage (give to the user hit -10% / eva -10%)
So, in my mind the formula is :
-> If ennemy wield a lance = give user "disavantage" state / give ennemy "advantage" state / user deal atk-2 - ennemy def dammage
-> If ennemy wield an axe = give user "advantage" state / give ennemy "disadvantage" state / user deals atk+2 - ennemy def dammages
->else deals atk - ennemy def dammage
The states (sword / spear / axe for "checking") are correctly applied (I use thoses states in a common event using the YEP_ActionSequence for another thing and it works) but the dammage returns to 0 :/
Maybe because of a synthax error in the dammage formula ?
Maybe it doesn't like to use the formula "if -> formula 1 else if -> formula 2 else formula 3" ?
Can someone find a way to fix that and help me ?
I am a beginner in coding bruuuh -
You can't try to do evasion/hit changes in the damage formula.
By definition, the damage formula is evaluated when the target has already been hit and is receiving damage.
Why are you trying to do it there at all? One of your posts back in October mentioned using the correct method of passive states attached to the weapons - why aren't you doing that?
There's no reason any coding should be needed for this entire setup.I am a beginner in coding bruuuh
For actors, the weapons have a passive state. For enemies, you can put the Traits directly on the enemy in the database (or give them a passive state if there's some reason you really need to).
For damage, you use elements. I don't see any reason to be trying to do complex damage formulae or use any code. -
Well, yeah I think I will use the element trait for damage. It could be simple.You can't try to do evasion/hit changes in the damage formula.
By definition, the damage formula is evaluated when the target has already been hit and is receiving damage.
Why are you trying to do it there at all? One of your posts back in October mentioned using the correct method of passive states attached to the weapons - why aren't you doing that?
There's no reason any coding should be needed for this entire setup.
For actors, the weapons have a passive state. For enemies, you can put the Traits directly on the enemy in the database (or give them a passive state if there's some reason you really need to).
For damage, you use elements. I don't see any reason to be trying to do complex damage formulae or use any code.
The fact is I don't see how I can apply the hit/eva advantage / penalty based on "whitch weapon the enemy has".
I have spear / sword / axe passives states on both weapon and enemies. But I don't know hom to "check" thoses states ans apply the hit/eva state on both user and target.
Ex : if enemy has sword
-> if the player has a spear, how apply the hit/eva advantage state on player and the penalty on foe ?
-> as the contrary, if player has axe, how can I apply the bonus state on enemy and the penalty one on player ?
-> and finaly, how can I apply nothing if the player has another weapon type (dagger / bow / another sword because sword x sword = no triangle...)
and moreover, how can the player has "feedback" that the states are applied ?
SRPG Gear has predictive windows for the battle. -
I guess I misunderstood that those are not global changes to the parameters - e.g. that axes are less accurate - but that they're a part of the triangle, that axes are less accurate against spears.The fact is I don't see how I can apply the hit/eva advantage / penalty based on "whitch weapon the enemy has".
I'm not positive that makes sense to me, but yes you'd need code for it. So you'd use a plugin. There are several that allow you to modify the hit formula, such as Yanfly's Hit Accuracy and Victor Engine Hit Formula. -
Oh... I didn't even thought about the hit formula itself...
Boomy made a plugin, working with Yanfly Hit Accuracy, that allow to set a hit formula for each skill individually. I already use it for some magic skills that has a particular calculation.
I just have to find how can I check the state the player or the enemy has... -
The Victor Engine plugin has notetags to work with each skill, but if you're already using another extension, that's fine.Boomy made a plugin, working with Yanfly Hit Accuracy, that allow to set a hit formula for each skill individually.
The same way you already have been in your examples above - isStateAffected()I just have to find how can I check the state the player or the enemy has... -
I tested with Boomy's plugin using that formula (for spear, but it's the same for sword and axen just the state check whitch is different) :The Victor Engine plugin has notetags to work with each skill, but if you're already using another extension, that's fine.
The same way you already have been in your examples above - isStateAffected()
JavaScript:if(target.isStateAffected(24)) { (user.hit - 0.1) - (target.eva + 0.1) } else { if(target.isStateAffected(25)) { (user.hit + 0.1) - (target.eva - 0.1) } else { user.hit - target.eva } }
And it works !
The hit/eva thing is applied.
spear x spear (neutral) before
spear x spear (neutral) after
spear x axe (disavantage) before
spear x axe (disavantage) after
spear x sword (advantage) before
spear x sword (advantage) after
Now I just to find a way to apply it with magic skills.
for ennemies It should be easy, they will always use one element and be affected by only one passive state, but with actors :/
Actors can have multiple element skills. Soo they will be affected in the same time by fire / wind / lightning. It will be a mess to check one element in particular
EDIT : I also used the dammage formula for the +2 / -2 dmg flat. And It works too, I'm happy.
Time to do the same thing with the elements bruh