Some Questions regarding Parameters and Skills

Status
Not open for further replies.

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
However, the tests seem to indicate that even with high stats, the resistance is additive...  Or, it's so close to additive, that it won't really matter that much.  Now, keep in mind that I haven't done anything higher than 5%...  But, I can run those tests when I get back and see if I get the same level of variance with 10% or even 15%.
Simple test: 100% and 0%. If it's additive, you get 100. If it's multiplicative, you get 0. Which will definitely matter a lot.
 
Last edited by a moderator:

Tai_MT

Veteran
Veteran
Joined
May 1, 2013
Messages
5,472
Reaction score
4,859
First Language
English
Primarily Uses
RMMV
I'm not going to argue that it's additive or multiplicative because that would be silly and stupid since it is obviously multiplying (or it's taking into account other stats... since the box says not to add things like resistance or defense as the system calculates those for you, but with a defense of 1, this is unlikely).

I'm simply arguing that at four items of 5% resistance, there doesn't seem to be enough variance to really make it matter much in terms of combat.

Also, I continue to maintain that whomever made multiple resistances of the same type not "stack" and instead made them multiplicative needs to be punched in the face.  It's severely counter-intuitive to not just game designers but also players.  Who ever heard of designing a game in which you take 5% of the damage off of something...  Then 5% off of that new number...  Then 5% off of that new number...  Then another 5% off of that new number as a way to run "resistance"?  A sane human being would've went "they each resist 5%, add up all the 5's to make a 20% resist and go with that".  It shouldn't be "four items of 20% resistance to an Element be thrown into a convoluted formula to come up with 60% resistance instead of 80%".

Is there a way to change that, maybe?  I would definitely rather have mine stack instead of multiply against each other.  Makes more sense if they stack and players won't have to be told, in game, how resistances work in a way that breaks the fourth wall and introduces lots of Meta Gaming.

Not trying to be a jerk here...  But, seriously, the more I mess with these numbers and such, the more I want to punch the programmer who decided it was a "Good Idea" to do it this way.  It basically forces users of the program to either search out a way to fix it so that we're not multiplying percentages for four (or five!) items or to create really specific equipment that would cover a wide range of elements/states in order to make sure the player is getting exactly what it says on the tin without having to wonder if they are somehow being cheated  ("What?!  I have four items that grant me 100% Total resistance to Fire Attacks!  Why am I still taking damage from these fire spells!?").

EDIT:  Removed some useless confrontational text at the beginning that really didn't need to exist.
 
Last edited by a moderator:

Harmill

Veteran
Veteran
Joined
May 3, 2012
Messages
295
Reaction score
131
First Language
English
Primarily Uses
Tai_MT, I posted a link to my old thread in my second post - it's a thread of me asking how to make it additive. To save you time, this is the piece of code that makes resistances stack additively:

class Game_BattlerBase def element_rate(element_id) features_with_id(FEATURE_ELEMENT_RATE, element_id).inject(1.0) {|r, ft| r += ft.value - 1 } end def state_rate(state_id) features_with_id(FEATURE_STATE_RATE, state_id).inject(1.0) {|r, ft| r += ft.value - 1 } endend Just create a new script and paste this in.

I prefer additive stacking because it gives me freedom to design a LOT of different equipment possibilities. Putting 60% Fire resistance on a helmet, having 35% Fire Resistance on boots, and maybe 5% resist to all elements on an Accessory. I WANT to be able to give equipment combinations that make it possible to reach 100% Fire resist. It's MUCH more intuitive to me as a designer to make a 20% resist, 10% resist, and 5% resist stack additively and give the player 35% fire resistance instead of 80% * 90% * 95% = . 31.6% (round to whatever you want). Also, you won't notice much of a difference with such small numbers like 5% resistance. You truly see the difference once you try stacking a 40% Fire Resist Helmet with a 30% Fire Resist Armour. Additive gives you 70% Fire resist, multiplicative gives you 58% Fire resist.

Still, this shouldn't really be a debate about what's better - it's totally up to the designer. If you want additive stacking, you can use the above code. If you want multiplicative, you can stay with the default behaviour.
 

Tai_MT

Veteran
Veteran
Joined
May 1, 2013
Messages
5,472
Reaction score
4,859
First Language
English
Primarily Uses
RMMV
SWEET!  It works!

The only reason I was having the comments about which is better is because I have never once seen an RPG designed so that resistance was multiplicative like that.  Not once.  Everything I've ever seen gives you flat rates that add the percentages together so that a player understands what exactly is going on without having to refer them to a formula in game for why their 4 items of 25% resistance a piece doesn't quite provide that 100% protection that they thought it should.  Even if you didn't ever want the player to achieve 100% immunity to an element through equipment, you could still make the choice to only allow certain percentages on equipment.

I mean, what makes more sense...  having four pieces of equipment that give you the 58% resist through additive nature (so the players can see it and so the dev can see it), or having four pieces of equipment multiply against each other and somehow give you the 58% instead of the 70% you can see in game?

Here is the absolute only instance I could ever see the "multiplicative" being useful...  If you didn't want your players to know how much resistance was provided at all... ever...  Which, I guess could work if you wanted to never break the fourth wall and tell players how effective they were going to be in combat...  But, at that point, you're kind of gimping any sort of "strategic" combat a player might have as they'd notice three items of "Resist Moderate Fire" provide no more bonus than a single item of "Resist Moderate Fire", so they'd remove the other resist items and use something else (which would likely result in less specializations and more min/maxing).
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
Simple test: 100% and 0%. If it's additive, you get 100. If it's multiplicative, you get 0. Which will definitely matter a lot.
Are you sure about this, Hime?  Assuming these numbers represent resistances, I thought that in a case like this an Additive method would view the two objects as "No change in Resistance" and "Add 100% resistance", whereas a Multiplicative method would view the two objects as "Multiply chance to be affected by 1.00" and "Multiply chance to be affected by 0.00".  Meaning that both methods would result in full 100% resistance to the state.

Also, I continue to maintain that whomever made multiple resistances of the same type not "stack" and instead made them multiplicative needs to be punched in the face.  It's severely counter-intuitive to not just game designers but also players.  Who ever heard of designing a game in which you take 5% of the damage off of something...  Then 5% off of that new number...  Then 5% off of that new number...  Then another 5% off of that new number as a way to run "resistance"?  A sane human being would've went "they each resist 5%, add up all the 5's to make a 20% resist and go with that".  It shouldn't be "four items of 20% resistance to an Element be thrown into a convoluted formula to come up with 60% resistance instead of 80%".
I disagree completely.  You're entitled to your opinion and indeed you're correct that additive numbers are far easier to calculate.  However, I believe multiplicative numbers make for far better gameplay.

If I'm giving the player a piece of armor (for example) that provides 50% resistance to something, I'm doing so because I want them to be able to lower the chance they have to deal with that state or effect - not because I want them to easily be able to eliminate it by wearing two of the same thing.  If I wanted to make it easy to completely nullify something, I'll go with 100%.

Similarly, multiplicative stacking rewards specialization on the upside.  Equipping three pieces of equipment that increase your HP by 20% will increase it by 73% (1.2 * 1.2 * 1.2 - 1), allowing, for example, the player to build a really tanky character and a glass cannon character at their discretion.

As a more extreme example, imagine having an effect for some equipment that reduced damage taken by 25%.  Would you really want a player able to additively stack four of these?

The only reason I was having the comments about which is better is because I have never once seen an RPG designed so that resistance was multiplicative like that.  Not once.  Everything I've ever seen gives you flat rates that add the percentages together so that a player understands what exactly is going on without having to refer them to a formula in game for why their 4 items of 25% resistance a piece doesn't quite provide that 100% protection that they thought it should.  Even if you didn't ever want the player to achieve 100% immunity to an element through equipment, you could still make the choice to only allow certain percentages on equipment.
I've seen stats act multiplicatively in lots of RPGs and other games (League of Legends and Tales of Symphonia being the first two out of many that come to mind).

Resistances are sometimes handled multiplicatively (like in LoL, where % damage reduction is calculated after Armor/MR, which is in itself a % reduction), but more often they go an entirely different route that's more similar to RPG Maker XP, where resistances are based on a "rating" (such as A-F or Weak-Absorb) and then a fixed % is added or reduced from the damage, with armors/traits that provide resistances simply changing the character's rating against an element by a notch or two rather than performing a reduction after the rating is applied.  The mid-generation Final Fantasies are probably the most notable example of this kind of system.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
Assuming these numbers represent resistances, I thought that
That is the basic reason the people in this topic have problems:
There is NO RESISTANCE...


The numbers are rates, as in "Damage rate", and NOT resistances - that is the reason why every number defaults to 100% (100% of base damage taken = no change), and why lower numbers reduce the damage (95% of base damage is taken) while higher numbers increase damage (110% of base damage taken).


And that is why Tsukihime's proposition proves it 0% => 0% of base damage taken => absolutely no damage.
 

Marston

Veteran
Veteran
Joined
Dec 9, 2013
Messages
195
Reaction score
40
First Language
German
Primarily Uses
On the elemental topic, how exactly is damage calculated if skills have more then one element? 0% if the target is immune against one element? 200% (or whatever you choose) if it is weak against one element? A middle ground of these two?

At least if you wear two weapons it seems the engine prefers it like this: Weakness first > Normal damage second > Immunity last (and only if the enemy is immun against all elements it seems). Is there a basic rule for this?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
You'll need a script to set a skill to more than one element - it is simply impossible to assign multiple elements to a skill in the editor or in default. And if you use a script (such scripts already exist), then it depends on the script how that is handled.


If you use weapons with multiple attack elements and a skill that uses "normal attack" as an element, then I think only the latest element assigment is used and all previous assigments ignored. That is because all features from all sources (equipment, class, etc) are added to the actor and not used independently.


(but I haven't checked the code how multiple attack element features are handled)
 

Marston

Veteran
Veteran
Joined
Dec 9, 2013
Messages
195
Reaction score
40
First Language
German
Primarily Uses
Huh, I worked to long with the older engines, were skills could have more then one element.

But it's still possible with 2 weapons. Just an example from my own game:

A class can equip 2 weapons. One has no element, the other has a wind element. If I fight an enemy with physical resistance, this one takes normal damage. If I fight one with wind resistance, this one takes normal damage. If I fight one with wind weakness, this one takes increased damage. So from that I would gather

Weakness > Normal damage > Resistance/Immunity
 

Tai_MT

Veteran
Veteran
Joined
May 1, 2013
Messages
5,472
Reaction score
4,859
First Language
English
Primarily Uses
RMMV
Ah, how I wish my quote button worked.

First of all, I wouldn't ever want to assign something as "Negate all Damage".  Second of all, making you 100% resistant to a single element is simply specializing.  If it takes you 4 pieces of equipment to become 100% Immune to Fire attacks...  Well... all the other elements can still hit you and cause damage.  Also, I do have armor that completely (or almost completely) negate certain types of damage.  It provides a lot of variety in play where there are enough elements that absolute immunity to one of them doesn't really make you any more powerful than you were if you'd spread resistance around.  Also, a good dev would see how to balance out some of these immunities.  As in, you wouldn't design areas that are "This place has nothing but fire monsters in it...  This place has nothing but water monsters in it...  Etc."  Immunity should never be "Easy Mode" for any part of the game.  Immunity should simply be a choice the player can make if they don't want to have to deal with a particular type of damage.

As for your question about Equipment that negates a particular type of damage and the player being able to stack it...  Yes, I would want that.  Why?  Because I'm sitting atop something like 16 total Elements (which even include some physical types of hits and damage).  Immunity to one is not immunity to all.  Nor do I ever plan on having just one type of monster in one area to only deal one kind of damage.  Likewise, I'd be stacking elements on the same monsters.  A monster with teeth, a tail, and claws would be able to deal Slashing, Bashing, and Piercing damage all on the same monster.  Immunity to Piercing doesn't provide immunity to Slashing or Bashing.  In fact, most armor that provides Piercing protection in my game also makes Bashing or Slashing damage hit harder.  Some of the Piercing resistant armor even causes magic spells to hit harder.  You need to have trade-offs and specializations to account for players who want to perhaps make themselves immune to a particular kind of damage.

The two major problems with the multiplicative resistances is that you'd have to explain to a player how they work so when they equip two items with the same resistance, they wouldn't feel cheated (or like you don't know how to do math) and that it's harder to design balance around multiplicative formulas than if the rates were simply additive.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
That is the basic reason the people in this topic have problems:

There is NO RESISTANCE...

The numbers are rates, as in "Damage rate", and NOT resistances - that is the reason why every number defaults to 100% (100% of base damage taken = no change), and why lower numbers reduce the damage (95% of base damage is taken) while higher numbers increase damage (110% of base damage taken).

And that is why Tsukihime's proposition proves it 0% => 0% of base damage taken => absolutely no damage.
You're misunderstanding my post.

The reason I said "Assuming these are resistances" was to make sure he didn't mean something like Attack State, which would use an entirely different type of multiplicative stacking.  I'm aware of how Damage/State Rates work, with 100% being the default.  But "resistances" is a nice shorthand, I think.

I believe my point still stands: Assuming these are resistances/damage rates OR state rates, I feel that 100% and 0% would stack together to make 0%, whether it's additive or multiplicative, with 50% and 50% being the more effective test.

On the elemental topic, how exactly is damage calculated if skills have more then one element? 0% if the target is immune against one element? 200% (or whatever you choose) if it is weak against one element? A middle ground of these two?

At least if you wear two weapons it seems the engine prefers it like this: Weakness first > Normal damage second > Immunity last (and only if the enemy is immun against all elements it seems). Is there a basic rule for this?
There is a method in Game_Battler that looks like this:

#--------------------------------------------------------------------------# * Get Maximum Elemental Adjustment Amount# elements : An array of attribute IDs# Returns the most effective adjustment of all elemental alignments.#--------------------------------------------------------------------------def elements_max_rate(elements)elements.inject([0.0]) {|r, i| r.push(element_rate(i)) }.maxendTherefore, like you noticed with "weakness > normal > immunity", it should be taking the highest number from all valid % adjustments.

First of all, I wouldn't ever want to assign something as "Negate all Damage".  Second of all, making you 100% resistant to a single element is simply specializing.  If it takes you 4 pieces of equipment to become 100% Immune to Fire attacks...  Well... all the other elements can still hit you and cause damage.  Also, I do have armor that completely (or almost completely) negate certain types of damage.  It provides a lot of variety in play...

...

As for your question about Equipment that negates a particular type of damage and the player being able to stack it...  Yes, I would want that.  Why?  Because I'm sitting atop something like 16 total Elements (which even include some physical types of hits and damage).  Immunity to one is not immunity to all.

...

The two major problems with the multiplicative resistances is that you'd have to explain to a player how they work so when they equip two items with the same resistance, they wouldn't feel cheated (or like you don't know how to do math) and that it's harder to design balance around multiplicative formulas than if the rates were simply additive.
I agree with you about the Elemental Resistances (and about how lots of elements makes for good variety), but I mostly wasn't referring to elemental resistances when I was giving the examples.  Things like Berserk or Poison might represent a significant weakness for a character, and being able to completely negate that weakness by stacking a few items that happen to have 50% (or whatever) resistance to the state doesn't sit right with me - which is why I'm happy they're using multiplicatives.  (And my question referred to items that would negate 25% of all damage, not to one element.)

I don't see how either of your "major problems" are really problems at all.  Saying that an item "halves fire damage" or "halves the frequency that you're poisioned" should make it very clear to the player and shouldn't make them feel cheated when they stack two and get poisoned a quarter of the time that they normally would.  I get that you're thinking of wording like "50% resistance to fire", which might imply it could stack to 100, but even then, most gamers have seen multiplicative stacking in other games, like League of Legends.

And balance?  I think it's actually more forgiving with multiplicative stacking.  You don't have to be quite as wary, as the designer, about players "breaking" your balance with a clever combination of two items.  Diminishing returns don't hit as hard as you're imagining, either - A 100 HP character gains 100 "effective health" against an element with their first -50% resistance item with multiplicative stacking, and 200 "effective health" with the second -50% resistance item.  (In additive stacking, the first one gives you 100 and the second one gives you infinity - I don't see this as being good for easy balancing.)

Anyway, not saying your way or my way is necessarily better; there are definitely advantages to additive.  But when you assert things like "whoever came up with multiplicative stacking needs a punch in the face", it seems clear that you're missing some of the wisdom behind the default game design.
 

Tai_MT

Veteran
Veteran
Joined
May 1, 2013
Messages
5,472
Reaction score
4,859
First Language
English
Primarily Uses
RMMV
Here's my problem with the multiplicative way status effects work.  You can already determine a set rate for that state to take hold.  Let me use my Tier 1 Dagger as an example:

It has a 20% chance to apply Level 1 Poison to an enemy.  If I have a piece of armor that has 50% resistance to all Poisons, then that 20% should drop to 10%.  Okay, now lets say I have 4 pieces of armor that would add up to a total resistance of 50%... (For the sake of argument 10%, 10%, 10%, 20%)  But the way they stack is multiplicative instead of additive.  Instead of a 10% chance of resisting poison, it's now now only 9%.  Why wouldn't I just want it to be easier and go "these equipment values stack additively, then multiply it by the actual rate the state will be inflicted to determine how often it happens."?

And really, why wouldn't a dev throw in a bunch of different states to begin with if they're trying to make players diversify their equipment and make choices?  My equipment says things like, "10% resistance to Minor Poison" and "40% resistance to Fatal Poison".  Covering one form of poison doesn't necessarily cover all of them.

Also...  Multiplicative Stacking in LoL is the reason why Tier 1 and Tier 2 runes are absolutely worthless and anyone who plays the game tells you to avoid them like the plague and save for the better ones.  The formula that uses them makes them give you minimal or close to non-existent stat gains anyway.  You're better off waiting until you have access to Tier 3, saving all your points, and then getting the much larger boosts which will actually make a difference.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
I don't like the multiplicative bonuses either.


Say you start off with 10% and now you want to up it to 20%.


What do you do? You take a 10% rate, and then you add a 200% rate.


Now you want to up it to 30%?


Well I guess there are ways to do it, but I would just introduce a new script already.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
Here's my problem with the multiplicative way status effects work.  You can already determine a set rate for that state to take hold.  Let me use my Tier 1 Dagger as an example:

It has a 20% chance to apply Level 1 Poison to an enemy.  If I have a piece of armor that has 50% resistance to all Poisons, then that 20% should drop to 10%.  Okay, now lets say I have 4 pieces of armor that would add up to a total resistance of 50%... (For the sake of argument 10%, 10%, 10%, 20%)  But the way they stack is multiplicative instead of additive.  Instead of a 10% chance of resisting poison, it's now now only 9%.  Why wouldn't I just want it to be easier and go "these equipment values stack additively, then multiply it by the actual rate the state will be inflicted to determine how often it happens."?
Yeah, that's actually a good example that I don't have a good counter to.  It's a place where additive stacking definitely works in a friendlier way.  There's no good way to make a multiplicative stacking system that would get you to a straight 20 -> 10 reduction when you consider all the different combinations of bonuses that could add up to 50%.

My instinct is that additive probably works better overall for small numbers, whereas for big, gameplay-changing effects like 50% per item, multiplicative stacking makes more gameplay sense.

And really, why wouldn't a dev throw in a bunch of different states to begin with if they're trying to make players diversify their equipment and make choices?  My equipment says things like, "10% resistance to Minor Poison" and "40% resistance to Fatal Poison".  Covering one form of poison doesn't necessarily cover all of them.
Just curious, but why get that specific?  Is poison so common in your game in general that an equip that gave you, say, 40% resistance to all poisons would be too powerful?  I'd feel kind of shafted as a player (in most games, at least) if my Antidote Amulet afforded me no protection against "certain types" of poisons.

( P.S. - Stupid, stupid runes!!! :D )
 
Last edited by a moderator:

Tai_MT

Veteran
Veteran
Joined
May 1, 2013
Messages
5,472
Reaction score
4,859
First Language
English
Primarily Uses
RMMV
Well, when you get into larger numbers like "Poison takes hold 90% of the time you use this" and start throwing in the multiplicative numbers...  Even what should be a 50% reduction to 45% chance of being hit with poison turns into a 52% chance of being hit with that poison.  That's a pretty large difference.  You went from "I could be poisoned less than half of the time" to "I can now be poisoned more than half of the time".  The higher the percentages, the larger the gap between what would be an additive solution and what would be a multiplicative solution.  It's just a lot easier to simply have it additive instead of trying to do all these mental gymnastics with an equation that only exists in order to keep devs and players from stacking resists based on simple logic.  As I said, I could see the multiplicative thing working...  But, you would have to inform the player somewhere in the game about how it works...  Or, you'd have to actually hide all the values so that they can't figure out how it works at all.

Also, I would never have a 50% resist item...  I think even 25% is a bit excessive (though maybe for the end game uber equipment it would be a good reward).  Most of my percentages are 2%, 3%, 5%, 10%, 15%.  Some of the more rare equipment currently has a whopping 20% on it (which you could push to a complete 100% resist if you had the right weapon equipped, but that would take gimping your character a bit).  A lot of the way I've designed my own system involves "trade offs" for equipment.  Maybe that Leather Armor only gives you 5 points of defense...  But, maybe it's got a 20% resistance to Slashing attacks as well as 20% resistance to Lightning.  At that point, the player has to make a choice.  Is the flat stat gain better on a new piece of equipment than the percentage based resistance to two particular types of damage?  What if there isn't any other armor that character can equip that would make them resistant to Slashing Attacks except this one enchanted piece of gear?  I like the "trade off" system so that every single piece of equipment is "thought out" by the player.  Maybe players will equip everything and see how it works in battle.  Likewise, the 100% immunity through clever thinking should also be a gameplay choice that is valid with its own drawbacks.

As for your question about the specific poisons...  Early on the game, you really only have to worry about a single type of poison ever being applied to you (Pretty much every single state in my game has Four Levels for equipment and an undisclosed amount of others for character skills...  Monsters will always use the 4 Level Equipment versions to make it less confusing for players and much easier on me as a dev when designing items).  Some of the earliest items will give you only the specific resistance to a specific state (because they are all different states.  For example, a snakes venom is different from the poisonous sting of a scorpion.) in order to make you decide which is the bigger threat to you.  Is the Level 2 Poison a bigger threat to you because it deals much more damage than the Level 1 variant...  Or is the Level 1 variant worse because more monsters have it and you don't run across the Level 2 variant as much?  To ease you a bit, yes I have planned that some accessories and other equipment will resist "all poisons" and even some that will resist "all poisons up to Level X".  The other reason I did this is because I want players to actually spend the money they accumulate.  Buying an Antidote cures all poisons regardless of how powerful they are.  Plus, it means poisons can also be "stacked" onto a player.  I do have states that won't stack regardless of level of them (Level 4 Blind doesn't stack with anything below it, etcetera).  But, players who stack poisons on enemies might be pleasantly surprised...  And players who have poisons stacked on them might be pleasantly horrified.  It's about making the players make choices, making combat interesting, and making players spend money on items as well as actually use those items instead of just holding onto them until they need them.  Choices and Builds.  I want the player as engaged in combat and stat management as they are in the story.
 

jonthefox

Veteran
Veteran
Joined
Jan 3, 2015
Messages
1,433
Reaction score
594
Primarily Uses
Hi, I found this old topic because making state resistance additive is exactly what I want in my project, but have not been able to achieve.  I tried the script mentioned above but it does not seem to be working for me.  My test case has an actor with 50% chance to stun on hit, and an enemy with 50% state rate for stun (so he should never be stunned), but he is still stunned once in a while so I can only assume that things are still multiplicative and it's rendering a 25% chance. 

This is the code I'm using:

Class Game_BattlerBase

   def state_rate(state_id)

       features_with_id(FEATURE_STATE_RATE, state_id).inject(1.0) {|r, ft| r += ft.value - 1 }

    end

end
 
Last edited by a moderator:

Murd

Apprentice
Member
Joined
Jan 28, 2015
Messages
112
Reaction score
7
First Language
Thai
Primarily Uses
class Game_BattlerBase def element_rate(element_id) features_with_id(FEATURE_ELEMENT_RATE, element_id).inject(1.0) {|r, ft| r += ft.value - 1 } end def state_rate(state_id) features_with_id(FEATURE_STATE_RATE, state_id).inject(1.0) {|r, ft| r += ft.value - 1 } endend
I have a question regarding the above script which makes both elemental and state rate will become additive. So normally, elemental and state rate is set at 100% (neutral) and below 100 means damage reduced or chance reduced while over 100 means more damage/ higher chance.

If I use the script, how can I set player or enemy's weakness to an element or a state in database?
 

jonthefox

Veteran
Veteran
Joined
Jan 3, 2015
Messages
1,433
Reaction score
594
Primarily Uses
That's what I'm trying to figure out as well; currently I'm thinking that what I'll have to do is write a custom formula that checks against state rates.  otherwise would be great if someone had a simpler solution...
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
jonthefox, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.


Please start your own thread. If you need to, post a link back to this one.


Murd, please start your own thread as well. Otherwise we're going to have three conversations going on at once here.


Closing
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top