Tutorial – Mana Conversion State

The Mana Conversion state is a state that gives battlers a special effect as long as the state is active.

When the battler performs an attack and successfully damages a target, a proportion of the damage will be converted to MP that the attacker will receive.

So for example, if you attacked a slime for 100 damage, and 20% of the damage is converted to MP, then you will receive 20 MP from that attack!

To create your own mana conversion state, simply install the State Damage Modifiers plugin and then note-tag your states with

  var mpGain = Math.floor(d * 0.2);
  return d;

This note-tag tells the game that the state’s effect should only be applied when the battler performs an attack.
Let’s look at what the formula is doing:

   var mpGain = Math.floor(d * 0.2);

Here, we take `d`, which represents the “damage value”, and multiply it by 0.2. This is basically taking 20% of the damage.
We take the “floor” of it because otherwise it will be a decimal value. You should always round your values if your game only works with whole numbers.


This means the “attacker” will gain the specified amount of MP. It is recommended to use this method for gaining MP because the game will automatically display the MP gain popup as well.

   return d;

Finally, we return the original damage value since we haven’t changed it and the plugin requires you to return a damage value.

If successful, you should be able to damage the target AND restore MP at the same time.

You may also like...

10 Responses

  1. If you are going for finest contents like me, only visit this
    web page all the time because it presents
    feature contents, thanks

  2. gabapentin veilig online bestellen in Nederland neurontin kopen zonder
    recept in Eindhoven
    Betrouwbare online apotheek voor gabapentin zonder voorschrift gabapentin kopen in Rotterdam zonder
    gabapentin prijs in België
    gabapentin verkrijgbaar zonder recept
    aankoop gabapentin mylan in Nederland Beste plek om gabapentin zonder recept
    te vinden
    Snelle verzending van gabapentin zonder voorschrift gabapentin: Veelgestelde
    vragen over gebruik
    gabapentin vrij verkrijgbaar in Guadeloupe bestel gabapentin in Brussel
    prijs van gabapentin in Marokko Beste plek om gabapentin online te kopen in Nederland
    neurontin kopen in Amsterdam betrouwbaar gabapentin bestellen in België online
    is het mogelijk om neurontin zonder voorschrift te krijgen gabapentin kopen in Antwerpen zonder recept
    neurontin tegen betaalbare prijs gabapentin bestellen: Snelle levering in Nederland
    gabapentin online aankoop in Spanje
    gabapentin zonder voorschrift te koop
    geen voorschrift nodig voor neurontin Bestel neurontin online zonder recept
    Online apotheek voor neurontin in Tilburg Beste prijzen voor neurontin in Nederland
    neurontin prijs online neurontin: effectieve behandeling zonder recept nodig.

    gabapentin zonder voorschrift direct beschikbaar
    neurontin bestellen zonder voorschrift: veilig en snel
    prijs van gabapentin in Antwerpen Koop gabapentin online en vermijd lange wachttijden
    gabapentin met of zonder medisch voorschrift
    waar gabapentin te vinden is in Nederland gabapentin kopen in Duitsland
    Doe een aankoop van gabapentin in Nederland neurontin te koop: gemakkelijk verkrijgbaar in Nederland.

    Goedkope gabapentin zonder recept verkrijgbaar Bestel neurontin online
    en bespaar tijd en moeite.
    neurontin online bestellen zonder recept in België
    gabapentin zonder recept verkrijgbaar in Amsterdam gabapentin bestellen zonder recept:
    snel en discreet
    gabapentin kopen in Rotterdam zonder gedoe
    neurontin kopen in België zonder problemen neurontin online bestellen zonder doktersadvies
    neurontin te koop in Nederland zonder recept kopen neurontin in Duitsland
    gabapentin beschikbaarheid in Nederland Bestel gabapentin online in Amersfoort – geen recept nodig!

  3. maree says:

    It is a very interesting article to follow. It’s amazing and very useful.

  4. manoma says:

    can you do a MV version of Attack Element Modifiers? I really wanted that plugin (would made my life much easier). Sorry if it is the wrong place to ask.

    • manoma says:

      oh, i found out that victor did one, sry for that.

    • Anonymous says:

      but still would apreciate if you did, your look more easy to use

      • Hime says:

        I will look at how it might be implemented.

        • manoma says:

          thanks, i managed managed to use yanfly battle manager to do it in a rather complicated way, i used the normal skill and changed its formula and its element, then i applied its damage again, but if you manage to make that more easy i would be grateful. I’ll post the commands i did to see if it helps you somehow (this have a for loop because i did a text file for the notetags, so it will check where the skill 60 is in the actor skills to change its values) :

          if $gameVariables.value(6)
          eval: UID = user.actorId(); count = $gameActors.actor(UID).skills().length; for (i = 0;i<count;i++) { if ($gameActors.actor(UID).skills()[i].id === 60){us = i; element = $gameActors.actor(UID).skills()[i].damage.elementId; $gameActors.actor(UID).skills()[i].damage.elementId = 9; formula = $gameActors.actor(UID).skills()[i].damage.formula; $gameActors.actor(UID).skills()[i].damage.formula = “(a.mat * 4 – b.mdf * 2)”;}}
          action effect: target
          death break
          eval: $gameActors.actor(UID).skills()[us].damage.elementId = element; $gameActors.actor(UID).skills()[us].damage.formula = formula;

  5. Solis says:

    Is this compatible with Yanfly?

Leave a Reply

Your email address will not be published. Required fields are marked *