vnpasob.blogg.se

Rpg maker mv damage formula
Rpg maker mv damage formula










rpg maker mv damage formula

Scenario: One character’s favourite food is peanut butter sandwiches but another character is allergic to peanuts. The other feature is the ors they act like you’d expect but be careful when using and because it has a bit more to it. I have omitted the spaces on both sides of = because when we’re space conscious they are wasted characters. (b.id=1 or b.id=3 or b.id=4) ? 500 : 0Ī couple of things I would like to draw your attention to. So the solution I offer just checks the ids again. There are some quite creative solutions to this problem but for the sake of this tutorial I want to keep is simple.

rpg maker mv damage formula

Scenario: Half your party are demi-humans or robots and require different healing items than the rest of your party. I personally find having a lot of examples to work from quite helpful so this next section is going to be a problem and solution section and hopefully one of them will be close enough to what you hope to achieve that you can adapt it. Right so that concludes the explanation section of this tutorial. The last thing two things I want to say before moving on are firstly that for more complicated situations you are probably better going the if statement route and the last thing is that while the formula box is pretty powerful you need to be aware that it is capped at a certain length (let’s be grateful that we use a & b and not attacker & defender) and if there is an error in your formula the skill will just miss repeatedly rather than crash the game.

#Rpg maker mv damage formula code

It still has the conditional, it is still checking if the item is being used on Eric but the rest of the code you could say has been condensed. The other version achieves the same result but might be a little less clear if you are not overly familiar with ruby. So what this means is when the character id equals 1, heal 500HP otherwise heal 100HP. Were we not restricted to a single line then we could have written it like this: If you’re confused about the presence of the semi-colons then let me quickly explain that they are like a way of inserting a new line. If you’ve done any programming before you will recognise this as a standard if statement. Now let’s look at the rest of those lines.

rpg maker mv damage formula

So essentially we are checking that the person who the item is being used on is first in the database (Eric by default). Please note that this example is about an item which should be usable on party members only and therefore b is always going to be an actor (party member in English). They both check a conditional statement, namely:įor the formula box in general a refers to the attacker or user and b refers to the defender or recipient, who may or may not be the same.Īny way what we are checking is that the recipient’s id is equal to 1. Let us first look at exactly what they are doing. That formula box alone has tremendous potential. RPG Maker Ace once again proves just how versatile it is because this feature can be implemented in a single input box. So earlier today in rpgmaker’s irc chat the conversation moved to the scripts someone desired for their game which included:įavorite foods – i can specify each actor’s favorite food and when the item is used on them, they heal extra hp or somethingĪnyhow I pretty quickly realised a script was not needed to implement this feature.












Rpg maker mv damage formula