How do I add a specific amount of bonus damage depending on element?

shiny_mudkip7

Villager
Member
Joined
Aug 8, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
*warning: I have basically no coding knowledge


Hello,


I had an idea to create a battle system that's kind of a combination of Paper Mario (1 or 2) and standard RPG formats with type effectiveness and such.  I will not bother you with the convoluted details, but essentially I used a motley combination scripts to achieve the battle system I wanted.  This system deals with small, definite numbers and not percentages; for example if executed properly, Spell of Flames does 2 damage every time.  To accomplish this, I simply typed "2" into the formula box, which worked nicely.


However, I wanted to add a bonus damage effect of +1 to attacks that have a type advantage against their opponents, or -1 for resistance.  For example, Spell of Flames would do 3 damage against an opponent of the "Earth" element, and 1 damage to an opponent of the "Water" element.  RPG Maker VX Ace allows for percentage damage modifiers against opponents, but nothing for definable, exact numbers.  Because it has no way to tag certain enemies with specific elements, I downloaded Hime's "Task Manager" (although I'd rather try to find a workaround for this, since I can't use it for commercial games).  This allowed me to tag enemies with: <Tag_Cond: Element> (where Element is the element of the monster- water, air, etc.).  I then went into the damage formula and quickly googled an article to learn the mechanics of the damage formula box.  Thinking I had apparently learned sufficient scripting in 30 minutes, I then typed in:


if b.has_tag?(Earth); 3; else; 2; end


I planned to expand to cover resistance later. (something akin to if b.has_tag?(Earth); 3; else; if b.has_tag?(Water); 1; else; 2; end)


(has_tag is specified in Hime's script as the keyword when used in formulas)


Hypothetically, it should have done one more damage when the affected type was tagged with the Earth tag.  But to my dismay, while the "else" statement seemed to be working effectively, when the enemy DID have the specified tag, it merely said "Null," doing NO damage. 


It is also worth noting that I have already set variance to 0 and critical to No.


So, essentially, I need to find some way to add an exact amount of bonus damage when a condition is met, and a way to tag that condition in the enemies.


Could someone please help me figure this out?  I have been trying in vain for days to crack this but no matter how many scripts I look at or how much "Coding" I try, I can not figure it out.  It's so ironic that it seems so simple but I can NOT figure it out >.<


If you gave me a simple solution to this, you would be my FAVORITE PERSON.


Thanks so much!!!


Link to Hime's script explanation: http://himeworks.com/2013/03/tag-manager/


Link to Hime's tag script: http://himeworks.com/redirect.php?type=script&name=Tag_Manager


I see no reason why there should be compatibility issues with such a simple script, but just in case, my scripts are (warning, there are a lot):


Yanfly Battle


Yanfly Visual Battlers


Berk Hand Seals


V. M. of D.T.'s Basic Enemy HP Bars Lite v 1.1c


Galv Timed Button Attacks


Yanfly Element Absorb


Hime Tag Manager (Would rather not use if possible)


THANKS AGAIN IN ADVANCE!!! (Even if just for having the patience to read through my overly loquacious rambles)


In case you are curious about the mechanics of my battle system (Which is essentially a collage of 1000 other people's work)


There are two attack types: Physical and Magical


Your physical attacks are determined by your species and are given upon level up.  They may only take TP, and can only be the element of your species (Human-None, Werewolf- Earth, Kitsune- Fire, Merperson- Water, Harpy: Air).  You start out as human, and can change to a new species ONCE, all of which have lairs/side-quests conspicuously "hidden" in the first/second towns.  These use a Paper-Mario esque action command system where you have to press the button at the correct time, capacitated by Galv's Timed Button Attacks.


Spells (Magical attacks) use Berk's Hand Seals script to make the player enter certain button combinations in a limited timeframe (example: left left left A down left ENTER in 120 frames).  They are obtained through storyline and use MP, covering every element.


When attacked with its own element, an enemy simply absorbs the damage as health gained back.


The use of Yanfly Battle and Yanfly Visual Battlers is fairly self explanatory.


As of now, all of the mechanics function except for element bonuses.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top