Lord Vectra 414 Posted April 6, 2016 Thank you so much. I've been waiting for something like this when I found out that MV was different from VX Ace. Share this post Link to post Share on other sites
SirCumferance 28 Posted September 4, 2016 (edited) Thanks for this info, it really is useful. Now for my request How would one use JUST the weapon Attack parameter in a formula. I hunted and found 'weapons.at(0).params.at(0)' by my attempt to alter the numbers, add a.weapons.at(0).params.at(0) to it and such yielded nada.... help me out, again?Example: Guns do flat damage, so attacking with a pistol atk=25, I want it to deal 25 (plus variation) damage, not the total of the actors attack value. Ideally, I would compare this value to the defenders armor defense, so it is only blocked by armor, not all the defense thats been built up....cuz bullets EDIT: Got, used the paramBase to get the base attack, then just subtracted that from the Full Attack, giving me my result.... not pretty but it will work Edited September 11, 2016 by SirCumferance Share this post Link to post Share on other sites
Wickednick 0 Posted November 10, 2016 (edited) Awesome guide it has helped me with a lot of things, but i wondering how to have multiple formulas and get them to work? Like lets say I have a skill thats gets more powerful depending upon a variable. So as the variable increases the skills damage, hit rate, and critical become more powerful, as well as any other effects that I might want to add like a staff the increases my mana and boosts my fire resistance to fire depending on my level of a certain variable. I've been trying various combinations of formulas and while I can get them all to work individually, they wont work when I put them all in the formula box. Edited November 10, 2016 by Wickednick Share this post Link to post Share on other sites
projectbeta 0 Posted November 11, 2016 not sure if this is the right place for this question but I hope you can help. I was wanting to modify the damage formula to check armor type ie, cloth 1, leather 2, chain 3, or plate 4 and have a different cap on the armor the user or target could use. I tried to write a plugin for this but was having a hard time finding the part for the damage formula. I was wondering if I could use like Yanfly's battle engine to use <setup action> code</setup action> to load this defensive code before damage is calculated, or is there a better way about going about this? Once I can figure out this step I can then reverse it and do the user.mdf as well. if ((hasArmor(etypeID) === 1) && (user.def >= 100)) Math.round((user.def - 100) * .25 + 100); if ((hasArmor(etypeID) === 2) && (user.def >= 125)) Math.round((user.def - 125) * .5 + 125); if ((hasArmor(etypeID) ==== 3) && (user.def >= 150)) Math.round((user.def - 150) * .75 + 150); if ((hasArmor(etypeID) === 4) && (user.def >= 200)) Math.round((user.def - 200) * 1.1 + 200); Share this post Link to post Share on other sites
SirCumferance 28 Posted November 11, 2016 not sure if this is the right place for this question but I hope you can help. I was wanting to modify the damage formula to check armor type ie, cloth 1, leather 2, chain 3, or plate 4 and have a different cap on the armor the user or target could use. I tried to write a plugin for this but was having a hard time finding the part for the damage formula. I was wondering if I could use like Yanfly's battle engine to use <setup action> code</setup action> to load this defensive code before damage is calculated, or is there a better way about going about this? Once I can figure out this step I can then reverse it and do the user.mdf as well. if ((hasArmor(etypeID) === 1) && (user.def >= 100)) Math.round((user.def - 100) * .25 + 100); if ((hasArmor(etypeID) === 2) && (user.def >= 125)) Math.round((user.def - 125) * .5 + 125); if ((hasArmor(etypeID) ==== 3) && (user.def >= 150)) Math.round((user.def - 150) * .75 + 150); if ((hasArmor(etypeID) === 4) && (user.def >= 200)) Math.round((user.def - 200) * 1.1 + 200); I think you may have answered your own question, you could use the ID as a multiplier? I cannot code or anything, so forgive my amateurness. If you are wearing Armor ID 2, multiply it the Defense value by (Armor.ID*.25) or some such, so you only need to really do it the once.... Looking at it, it made more sense in my head, lol Share this post Link to post Share on other sites
Daniel Campos 0 Posted August 12, 2017 (edited) Hello Glasses! Hello everyone! First of all, great tutorial! I enjoyed a lot and only logged in because of it. I`m already using lots of things from it! So I need help with some formulas I`m messing with! I`m doing a game where skills should evolve according to the number of times the player uses them - practice. The more he uses them, after a threshold, the more the skills improve. Example: blessed hands heals 50 HP and costs 10 MP; but if you use it 15 times, it evolves to heal 75 HP and costing 21 MP. I`m trying to do so with the following damage formula and a common event running in parallel: v[10] +1; a.addstate(0010) if (v[10] >= 30) if (v[10]<70) change skill: {hero}, - blessed hands 1 change skill: {hero}, +blessed hands 2 The added state is just to give the skill user a cooldown on the skill - so the player may not spam heals or overpowered skills. The v[10]+1 is supposed to increase the value stored in the variable "blessed hands" by one (increment it). Should it be v[10]+=1, like in C language? I suspect yes since .js is very similar to C. I know it seems stupid, just clearing out some doubts. I`m not sure about the common event either: I can`t put to check if a specific hero has learned the skill already because the player can choose between 18 actors and then between 8 classes that which has its own skills... Another thing. I`m also creating a skill called "Precision attack", which is for the hunter... but I can`t seem to be doing it right: v[120]+1; a.addstate(0133); a.atk * 4 - b.def * 2 The a.add_state here is a state that increases hit and crit chance before the attack. However, I have expermented it and it always damages 0 no matter what. It seems not to be the first line of the formula since that with other skills this is not a problem - and since the normal atacck on the same circumstances does damage. The state adding ins`t doing it either, and I checked the enemy and actor`s atk and def to see if that was a problem, <i>nope</i>. The only thing that solves is taking the "a.add_state(0133);" part out, and that`s undesirable because of the skill feats it produces... So I wondered: how to put that increase in hit chance and crit chance in the formula? I tried replacing the "a.addstate(0133);" the following: a.sethit(a.hit+25); a.setcri(a.cri+50); Din`t work. So I tried this, considering another syntax: a.hit*1.25; a.cri*1.5; Meh. So I tought I had it with: a.cri(1.5); But nooo... Q_Q How do I do it? Ofc the increment to the variable has to be there and the damage too. Edit: discovered that the programming language in RPG Maker MV is case-sensitive. Eh. Also, to count the amount of times a skill is used, it is best to add a common event to do that for you. Edited August 30, 2017 by Daniel Campos Share this post Link to post Share on other sites
marcusB 2 Posted September 12, 2017 On 15/12/2015 at 11:54 AM, Glasses said: (!b.isStateAffected(10)) b.addState(10); 100 Would swapping these around work? !b.addState(15)) b.isStateAffected(15) ? 999999 : 0 would this work and if a enemy is resistant to the state would it fail to add the state? Share this post Link to post Share on other sites
Valestein 0 Posted November 28, 2018 Ok, so I was going to make a skill that poison the enemy if they are burned. ( burn id is 11, poison is 12) my code is this: if (b.isStateAffected(11)) {b.addState(12)} else {b.addState(11)} For some reason, the burn damage from all dot effects is 0 Only happen with yanfly's damage Core. Did i do something wrong? It work if i add it with the normal method, but if i use the if code all damage overtime becomes 0 Share this post Link to post Share on other sites
SoaringDreams 0 Posted November 18, 2019 Hi, I know its been awhile. Just figured i'd try here first after banging my head around for hours. So I have a healer skill going on. **Skill when State(84) is active boost potency by +50 so = a.isStateAffected(84) ? a.luk + 35 + 50 : a.luk + 35; I also have on the same skill that when State(82) is active it will give the target 10Mp, so. a.isStateAffected(82) ? b.gainMp(10) : a.luk + 35. What my issue is, im trying to have it so that these two lines can exist on the same skill and fire off when called. I now put it so that the two states will Remove each other ex: If player applies state 84 to self it will remove state 82 - and so on. But I cant seem to get the codes to function correctly, it seems that its always one or the other that ones properly or not at all here is a little break down. Skill - Bless base heal = a.luk + 35 When Prayer(State 84) is active + 50 to heal. When Bless Signet(State 82) is active target gains 10 mp. Share this post Link to post Share on other sites
supabro10 0 Posted March 14, 2021 Hello everyone! I'm working on a game where there is a set of moves that inflict recoil damage on user (recoil damage is damage to self after the execution of a skill/move). Does anyone happen to know a formula for recoil damage? Any help will be appreciated Share this post Link to post Share on other sites