Search the Community
Showing results for tags 'damage formula'.
Found 11 results
-
Arbitrary Damage Cap Using Damage Formulas
BlueVapor1234 posted a topic in Editor Support and Discussion
Im using MV and all, and I was going through to redo the formulas on the spells in one of my games, of course I found a formula that worked wonders (Base Power * a.mat - b.mdf), but it came with the problem of the most powerful spells doing 90000 to 200000 damage. I was wondering if it would be possible to edit the formula to restrict the damage to less than or equal to some damage cap, like 9999 or something. It would be very appreciated if someone could help me out on this. 👍 -
So I'm using Rpg Maker XP, and I've been playing with the damage formula, and I have a few ideas and want to know what you guys think. This is mostly me trying to figure out what to do about physical defense. This is a game where you put points into the stats you want per level. I know it depends on game type but I'm asking for, in most scenarios, which of these would you think you would favor most? If you have any additional ideas to add to what I have, Im open to hear them. 1) Direct damage reduction: Basically defense is subtracted from the damage and there is your final damage which is the default formula of ((power + atk )* rate) - pdef Note: "rate" takes in your other stats depending on what % of that stat is taken which you specify via database. 2) Damage Resistance: Turns PDEF into a % of physical damage is reduced. So same as above except instead of subtracting it as an integer, it is multiplied as a %. (power + atk) * rate * pdef 3) Ratio-Based (User.atk + rate) / p,def * power This one takes the ratio of your atk and stats vs the target's defense. 4) Ratio-based+ (rate / user.atk) * (user.atk + power) / pdef Similar to above but this makes it so your stat has to match the weapon or you'll be punished (so you can't run a 1000 atk dagger with 20 STR). Tho a debuff in, for example, STR in a str-based skill would increase the damage so idk anymore. Open to ideas about how to fix that issue. 5) Temporary HP If your pdef is 70, for example, you have 70 temporary HP at the beginning of battle (AKA HP shield or whatever you want to call it). Once it depletes, it's gone until the end of battle. 6) Armor Health As armor health depletes, so does the amount of damage it reduces. This one isn't exactly a stand-alone idea as it can be mixed with the others, but thought I'd put it out there.
- 24 replies
-
- 1
-
-
- damage formula
- xp
-
(and 4 more)
Tagged with:
-
Hiya. When one uses a damage formula that has something like "a.add_state" or "b.remove_state" in it, that state's messages are not displayed in the battle log during battle. I absolutely need those messages to display, so I am requesting a script. If you were to inflict Poison through a skill using the Features box in that skill's page, it would show the message you put for it. Say, "Harold was poisoned!" However, if you apply a state through the damage formula box, you get no such messages. I need a script to fix that. There are four state messages that should be showing: "Message when an actor fell in the state" "Message when an enemy fell in the state" "Message when the state remains" "Message when the state removes" I'm sure a lot of people would really appreciate the flexibility of this. Solving this would allow you to display messages in the battle log whenever you wanted, including in "if, elseif, else" scenarios. And lots of other things. Thanks a ton for any support here.
-
Hiya. My damage formula isn't working. Calling my damage formulas works, and my states are properly set. I even added icons to see if the states change, but the states don't change. damage_formula: if b.state?(313); b.remove_state(313); b.addState(312) elseif b.state?(312); b.remove_state(312); b.addState(311) elseif b.state?(311); b.remove_state(311); b.addState(310) elseif b.state?(310); b.remove_state(310); b.addState(309) elseif b.state?(309); b.remove_state(309); b.addState(308) elseif b.state?(308); b.remove_state(308); b.addState(307) elseif b.state?(307); b.remove_state(307); b.addState(306) elseif b.state?(306); b.remove_state(306); b.addState(305) elseif b.state?(305); b.remove_state(305); b.addState(304) elseif b.state?(304); b.remove_state(304); b.addState(303) elseif b.state?(303); b.remove_state(303); b.addState(302) elseif b.state?(302); b.remove_state(302); b.addState(301) end The idea is: If enemy is in state "ATK +6", remove state "ATK +6" and add state "ATK +5". Else if enemy is in state "ATK +5", remove state "ATK +5" and add state "ATK +4". Else if enemy is in state "ATK +4", remove state "ATK +4" and add state "ATK +3". Etc. But the states just aren't changing. Thanks a bunch for any support.
-
Apologies if this is in the wrong forum! So I'm trying to make unique skills as my game goes along rather than the typical ones it gives you automatically, and I'm running into some hangups. I know it's possible to make them happen, but the damage formula isn't totally clear to me. I know it can run on if/then statements and calculations, but I need a bit of help explaining those. I've gone through a few notable threads and they've been helpful, but not totally clear. Here are some examples of specific skills I'd like to implement, but don't know how to work the damage formula. "Absolution" -- If target has less than 40% HP, instantly kill them; otherwise, deal medium holy damage. Any skill that can target both enemies and allies -- for instance, "deal damage to all enemies and heal all allies", or "lower defense of all enemies and raise defense of all allies" "Rune of Dispersion" -- all damage is dispersed among enemies for 3 turns (see Bravely Default's Black Mage Skill "Damage Dispersion" except applied to enemies) There are others yet to be determined, but just getting a good grasp on how to make more complex and unique damage formulas would really help. I'd like to be able to work it from scratch. Thank you for any help at all! And feel free to move this if it's in the wrong place.
-
"ALL the Guns" Damage based on items in inventory
KayakoChan posted a topic in Theory and Development
So this was an idea initially posted by IrateResearcher Well, after playing around with the damage formula and variables, I accidentally stumbled upon a way that could get that done, So I decided to make the skill! Demo link It's fully set up using eventing, no scripts at all so it should work in any project (That uses a battle system allowing events). Though it's definitely not plug and play unless you. Use the default database Have the only character using the skill be Actor 6 So yes. Just decided to put it out if you were wondering how to make it yourself. The skill is composed of two skills and a common event. Skill one is the skill you actually see, it does nothing but: Serve as the "visual" skill with the description and energy costs. Call a common event (Optional)Apply a 1 turn duration state on the enemy to prevent the "Attack had no effect on x" message. Then we have the common event, this one is a bit more complicated. I'll try to break down what it does. In the screenshot below you'll see how it's set up for three of the 6 guns (In the demo it's set up for all 6) (Optional)Play the gun cocking sound. Set the Variable storing the number of items to 0 to prevent the skill getting more powerful every time you use it. Set the Variable storing total damage to 0 to prevent the skill getting more powerful every time you use it. <Label-TestFlint> Tells the event where the start of the "test" sequence is. Checks whether or not the player has any "Flintlock" in their inventory If they do: -Add 1 point to the variable storing the number of items -Remove one "flintlock" from the inventory. -Return to <Label-TestFlint>to see if they have more than one If they don't: -(optional)Return as many "flintlock" to the player's inventory as were removed. (Not doing this would result in the item being consumed. -Tells the game that the "flintlock" is worth 16 damage per item. -Multiplies this value by the number of items counted. -Adds this value to the variable storing the total damage for the skill. -Sets the variable of counted items to 0 so it can go and count the next type. So, let's say the player has 6 "flintlock" in their inventory Each "flintlock" is worth 16 points of damage. 16 x 6 = 96 damage. After doing this calculation the script then does the same for the "Musket" and the "Dragoon", putting all their values together. As you see, the only things that changed between item types are the items, and the name of the labels. So, let's scroll to the bottom here. (optional)The event waits 20 frames (a little less than half a second) (Optional)Another guncock sound is played. The script tells Actor 6 (Kayako) to use the skill "GunVolley" on a random target. (Note: it IS possible to pick a defined target, but since this skill targets all enemies it's unnecessary) So, we had the hardest part behind us... we head over to the second skill it calls. This one does the actual damage. This skill is: NOT directly selectable Called by the common event above Contains the following damage calculation: a.atk * 2 + a.agi * 3 + v[5] - b.def * 2 Which does the following Take the skill user's Attack power Mutiplies this value by 2 Take the user's agility Multiplies this value by 3 Adds the value of Variable 5 (Which is the variable storing the total damage of all items combined) Divides this by the defense of the opponent (times 2) So let's say, Actor 6 has an Attack power of 120 An agility of 98 and the attack power of all Counted items in her bag combined is 2400 The enemy has a Defense of 130 The damage done should be the following: (120 x 2=)240 + (98 x 3=)294 + 2400(=2934) - (130 x 2=)260 = 2674 (240 + 294 + 4400 - 260 = 2674) Yes, you read that right. 2674 whopping damage. The opponent's defense doesn't have much to say to that. Obviously the skill might need some balancing, (To be honest, I am not sure if this is even how damage calculations in RPGmaker go) or the items should be harder to acquire. But you definitely notice that! So yes, that's all there is to this skill, if you want to use something like this yourself, go ahead, no need to credit anyone.. Perhaps let me know, leave a like if you enjoyed it. Kukuku. (If you use this skill directly without modifications you might want to thank IrateResearcher for the idea. But yes! Happy fun times!- 4 replies
-
- 4
-
-
- damage formula
- variables
-
(and 2 more)
Tagged with:
-
Variables in damage formula in skills and items
Intocabille posted a topic in Editor Support and Discussion
Hello, first of all, sorry if it was posted somewhere, or if this is wrong place to post this. For quite a while I used $game_variables[x] in the damage formulas in the skills and items. But I just went through the scripts, for some reason, and noticed in the documentation that the damage formula has parser that takes in variables of a, b and v. Where a denotes the user, b the target and of course, v the variables. I went through several topics that deal with damage formula and what all can be done with it, plus several scripting topics and it was nowhere mentioned so I thought I could mention it so... instead of $game_variables[345] you can also use v[345] so from formula like a.atk - b.def + $game_variables[345] you get a.atk - b.def + v[345] Just... might be useful to someone. Sorry if it is bad place. -
Hello, Shadow here! I am a VX veteran, and got my formulas working there. In short, what I want to do, is to be able to run a multiline formula like this: base = PlayerAttack - EnemyDefense bonus = rand() * ((PlayerAttack + PlayerLevel) / 8.0) + (PlayerAttack / 2.0) damage = base * bonus damage = damage.to_i Now, is it possible to make a script that can be run via the damage formula box in the database to do this? How? Further on, I also want enemies to have levels that can be used in the formulas. What I would like to do, is to make it possible to add a tag like this: <level: 5> to an enemy, to set the level and then use it in the calculation. How would I script this? Regards, TheTrueShadow
-
Hey guys. Is there any way to check the number of states the target has... but only include specific states? If that question doesn't make complete sense I will explain in more detail below. Example: Let's say my game includes 20 states numbered 1(death) - 20. So as I stated above I want to count how many state's are currently on the enemy. But I only want it to count if the states are numbered 2-7. So if the enemy has states: 2, 5, 7, 15, 17. It would only count States 2, 5, 7 making it return 3. In the damage bar I know I need to use something along the lines of: v[x] = b.states.size That works to count every state applied without discretion, but is there a way to only take the size from a select set/array of state numbers without resorting to an event of several if statements. Thanks in advance to anyone who may have an answer/solution/any insight on this matter. ~ Dinhbat
- 3 replies
-
- script call
- damage formula
-
(and 1 more)
Tagged with:
-
I am using Yanfly's Lunatic Damage and am having some issue with my Lunatic Damage formula: I have a skill that sets Variable[45] to a value 0-6. Then In a common event, I force action to the skill that does the actual damage which is tagged with <custom damage: dinhbat> Initial Skill that gets Variable: (setting the variable works, and returns the correct value) Common Event Called: (state removal works as intended) Forced Action Skill: Regardless of the value of Variable[45], the damage remains the same. Any ideas on what I am doing wrong here? ~ Dinhbat
-
Dual Wield Issues [Issue Updated.. It was more complex than I thought]
dinhbat3 posted a topic in Programming
Hey guys. I ran into a few issues with my dual wield functionality and balancing as I was testing out some other issues. There are 2 main issues I am having. 1. Dual Wield works but unequipped attack does not.. or V/V [solved Thanks to Shad3Light] 2. Weakened off hand Thanks in advance for the help! Hopefully the solution to this can help others with their dual wield balancing as well =D ~ Dinhbat- 8 replies
-
- script support
- script edit
-
(and 3 more)
Tagged with: