- Add 3 TP damage Types (TP damage, TP recover and TP drain) to skills and items through the use of Notetags.
- Provide MP Notetags too so that damage types can be combined.
- Add various visual effects to Battle popups such as Critical hit and Elemental response popups.
- Popups can be drawn from an alternate damage sprite sheet provided by this plugin.
- Text strings can also be used as popups.
TP Notetags:
Code:
* =============================================================================
* == Notetags ===================================================================
* =============================================================================
* As said above, the Plugin provide Notetags that can add new TP damage
* types to your items and skills. For each of these TP damage types,
* 4 different Notetags can be use to set the TP damage value. All Notetags
* are explained bellow:
*
* Skills and Items Notetags
* =========================
*
* <TP DAMAGE: x> Set the TP damage to constant x.
*
* <TP DAMAGE: x%> Set the TP damage to x% of target current TP.
*
* <TP DAMAGE FORMULA> Set the TP damage to the damage formula in
* the skill/item database*
*
* <TP DAMAGE EVAL> Set the TP damage to your custom Java Script
* code formula. Use the variable 'TPvalue' to return
* code TP damage to be dealt by the skill or item.
* </TP DAMAGE EVAL>
*
* Exemple: <TP DAMAGE EVAL>
* TPvalue = Math.round(25 * (user.luk / target.luk));
* </TP DAMAGE EVAL>
*
*
* <TP RECOVER: x> Set the TP recover to constant x.
*
* <TP RECOVER: x%> Set the TP recover to x% of target current TP.
*
* <TP RECOVER FORMULA> Set the TP recover to the damage formula in
* the skill/item database*
*
* <TP RECOVER EVAL> Set the TP recover to your custom Java Script
* code formula. Use the variable 'TPvalue' to return
* code TP recover to be dealt by the skill or item.
* </TP RECOVER EVAL>
*
* Exemple: <TP RECOVER EVAL>
* TPvalue = Math.round(10 + 0.1 * user.level);
* </TP RECOVER EVAL>
*
*
* <TP DRAIN: x> Set the TP drain to constant x.
*
* <TP DRAIN: x%> Set the TP drain to x% of target current TP.
*
* <TP DRAIN FORMULA> Set the TP drain to the damage formula in
* the skill/item database*
*
* <TP DRAIN EVAL> Set the TP drain to your custom Java Script
* code formula. Use the variable 'TPvalue' to return
* code TP drain to be dealt by the skill or item.
* </TP DRAIN EVAL>
*
* Exemple: <TP DRAIN EVAL>
* TPvalue = 20;
* if (user.tp <= 20) TPvalue * 2;
* </TP DRAIN EVAL>
*
* *You can put the TP Notetags in items/skills notebox without damage
* type to make them affect only TP. You can still use the database
* formula for <TP DAMAGE/RECOVER/DRAIN FORMULA> Notetags by selecting
* HP DAMAGE type (or any other), enter your formula and put the damage
* type back to NONE. The Notetags will then be able to use the formula.
*
* *The TP DAMAGE, RECOVER and DRAIN damage types are user friendly.
* Hence, they are made to receive absolute values. For that matter,
* the use of Lunatic formulas that return floating or negative
* values might render unexpected results.
*
*
The Plugin also provide the same Notetags for MP. The main reason for this is to give the option to combine MP damage to TP and/or HP damage at the same time. The MP Notetags works the same way than those above and are all listed bellow.
Code:
* <MP DAMAGE: x> <MP RECOVER: x> <MP DRAIN: x>
*
* <MP DAMAGE: x%> <MP RECOVER: x%> <MP DRAIN: x%>
*
* <MP DAMAGE FORMULA> <MP RECOVER FORMULA> <MP DRAIN FORMULA>
*
* <MP DAMAGE EVAL> <MP RECOVER EVAL> <MP DRAIN EVAL>
* code code code
* code code code
* </MP DAMAGE EVAL> </MP RECOVER EVAL> </MP DRAIN EVAL>
*
* *Use the variable 'MPvalue' in the MP Eval Notetags.
*
*
The Notetags above offer many possibilities for creating mulitple effects skills and items.
Code:
* By combining Default database HP damage type with TP and MP Notetags
* provided by this Plugin, you can create skill or item that affect
* HP, MP and TP in different manners.
*
* Exemple: Database damage type: HP DAMAGE
* Notetag 1: <MP drain: 10%>
* Notetag 2: <TP recover formula>
*
* In the above exemple, the skill will damage target HP according to
* the skill Damage Formula in the database. It will also recover TP
* by the same amount while draining 10% of target MP. This means 4
* damage sprites will pop out: 3 on the target (-HP, +TP, -MP) and
* one the user (+MP).
*
* -Notes on combining
*
* -If you combine 2 or more of the same Notetags, only the
* last one in the skill/item notebox will be taken into
* account.
*
* -If you combine 2 or more Notetags that affects the same
* stat (Ex: <TP damage> with <TP drain>), effects will
* accumulate most of the time, but some combinations might
* be conflicting. Only one popup will be shown with the
* value defined by the last Notetag of the skill notebox.
*
* -If you combine Default database Damage Type with Notetags
* that affects the same stat, only one popup will be shown
* with the value defined by the Default database entry, but
* both effect will accumulate.
*
* Exemple: Default database: MP DAMAGE
* Notetags: <MP damage: 20>
*
* In this exemple, the skill will do MP damage
* equal to the value defined by the database
* Damage Formula + 20, but popup will only show
* the Damage formula value.
*
* -If you put a DRAIN effect Notetag in a skill or item that
* target the user itself, popup will only show the healing
* effect, but the actual stat will remain the same.
* (Ex: Draining 10 TP means 10 TP lost and 10 TP gain, hence
* no change occurs).
*
Code:
* ========================================================================
* == New Popups Visual Features ================================================
* ========================================================================
* When using the alternate 'TSR_Damage' sprite sheet. A variety of visual
* features will be automaticaly added to the Battle Scene.
*
* Bellow is a short explanation for each of them.
*
* -MP/TP 'operators' and 'letters'
* Damage popups have been extensively in use since the dawn of RPGs and
* it is a nearly 3 decades well-established convention that white digits
* are HP damage and green digits are healing. This is less true for MP
* and TP popups wich vary a lot depending on specific game mechanics. It
* is not always very intuitive to know if a different colored popup is
* representing MP or TP, damage or recovery. Hence the 'operators' and
* 'letters': this feature show a '+' or '-' operator in front of the
* damage digits to give visual information on wether it is a loss or a
* gain, while the 'letters' will show 'MP' or 'TP' following the digits
* depending on wich stat is affected.
*
* Exemple: a 25 TP damage will be show as '-25TP'
*
*
* -Elemental effects
* This feature generate a popup bellow the damage digits to indicate
* the element rate response of the target to the skill/item. These
* popups are mutually exclusives, meaning that only one can appear
* following the action. They are based on the final damage value after
* element rate have been applied.
*
* -If value after element rate calculation is lower than the base
* value, a 'RESIST' popup will be shown.
*
* -If value after element rate calculation is higher than the base
* value, a 'WEAK' popup will be shown.
*
* -If value after element rate calculation is equal to 0 while the
* base value was > 0, the 'IMMUNE' popup will be shown.*
*
* *If value is already equal to 0 before element calculation,
* the 'IMMUNE' popup won't appear. This is to diffenciate
* an attack that is too weak to damage the target from an
* attack that can't do damage out of elemetal resistance.
*
*
* -Attack States 'NO EFFECT'
* The Plugin also do a check for States Resist and show a 'NO EFFECT'
* popup accordingly. This popup will be shown if the attack contains
* at least one Attack State for wich the target have either the
* corresponding State Resist Trait or a State Rate equal to 0%.
*
* *Note that actually the Plugin only checks if the attack has
* an 'Attack State' Trait. It won't show the popup if it has
* an 'Add State' Trait. This will be adressed in following
* versions of the Plugin.
*
*
* -Critical Hit popup
* When the action result in a Critical Hit, the Plugin will show a
* 'CRITICAL HIT' popup bellow the damage digits along with a flash
* screen effect and a SE. These will be customizable in further
* versions, but for now, it is just Plug & Play.
*
* *For simplicity, the Critical Hit popup disable 'Element
* Effect' and States 'NO EFFECT' popups when it is shown.
*
*
* -Overkill popup
* This will pop out an 'OVERKILL' sprite when the target is killed
* by an amount equal or greater to the target maxHP ratio defined
* in the corresponding Plugin parameter. It is shown alongside the
* Critical Hit popup if both conditions are met.
*
Here's a few screen shots of those popups in action. Of course, it looks much better when animated, but my computer's a bit old and screen recording is too laggy, so you'll have to see it for yourself.





Using Text String




Code:
* =====================================================================
* == Using text string popups =================================================
* =====================================================================
* All popups have a On/Off boolean parameter that allow turning the
* popup into text string. If so, you get to write the text the popup
* will actually show in another parameter text box.
*
*
* DAMAGE and RECOVERY popups
* ==========================
* When turned into string, these popups will show the damage and
* recovery values as text string. In their respective text box
* parameter, you can write anything you wish to appear before or
* after the keyword 'value'.
*
* Exemple: if you have writed '-valueHP' and the resulting
* damage is 1205, the popup will show '- 1205 HP'.
*
* Each popup types (HP, MP or TP) have a separated text box for
* damage text string and recovery text string.
*
* Exemple: writing '-valueMP' into the MP damage text box and
* '+valueMp' into the MP recovery text box will show
* a minus sign '-' before damage values and a plus
* sign '+' when healing MP.
*
* Note that the keyword 'value' MUST be present in the text box.
* Otherwise, popups won't appears. But you can also just write
* 'value' alone and popups will only show the value.
*
* EFFECT popups
* =============
* These popups are used to display additionnal info such as
* elemental weakness and critical hits. They do not show values,
* so there's no keywords for these popups. If you turn them into
* text string, just write what you want to appear in their
* corresponding text box.
*
* Exemple: Default Plugin text for critical hits is 'CRITICAL'.
* Replace that by 'Potatoe' and this is what's going
* to appears whenever an attack result in a critical.
*
*
* String Popups Colors
* ====================
* Each string popups have an assigned default Plugin text color.
* Changing the text color of a string popup is rather simple since
* all you have to do is entering text color escape codes '\C[x]' in
* the popup text box parameter.
*
* TSR_TextColorAddOn.js
* =====================
* Only problem is, battle popups are sprite based. They're not
* windows. Therefore, the drawTextEx functions wich reads the
* escaped codes can't be used... Unless you have my other Plugin
* TSR_TextColorAddOn, wich brings the drawTextEx at the Bitmap
* class level.
*
* Having TSR_TextColorAddOn installed above this Plugin will allow
* you, not only to use the default text color codes (0 to 31) for
* your battle popups, but also import and use your own custom colors,
* change the text outline color, add text color gradients,
* and more...
*
Code:
* =========================================================================
* == Terms of usage ===========================================================
* =========================================================================
* Free to use in any RPG Maker MV projects, including commercials projects.
*
* Credit is required for using this Plugin.
* For crediting, use 'TSR' along with one of
* the following terms:
* 'The Northern Frog' or 'A frog from the north'
*
* Do not change the Header or the Terms of usage.
*
* Editing of the script is allowed, but it won't relieve from crediting
* obligations. Remember that changing the name of functions and variables,
* or even manually retyping the entire script, doesn't make you the author
* of the Plugin.
*
* DO NOT REDISTRIBUTE!
* If you want to share it, share the link to my itchi.io account:
* https://the-northern-frog.itch.io/
*
* ALTERNATE SPRITE SHEET
* The TSR_Damage damage sprite sheet is free to download on my itchi.io
* account. Editing it to your liking is permited and no credit is asked
* for using it, but it shouldn't be used in games that don't use this
* plugin, nor in a game not made with RPG Maker MV.
*
* This plugin was made for free use among the RMMV game dev community.
* Hence, it is free and will remain free.
*
*
Download
TSR_Popups.js v1.1.4
TSR_Popups.js v1.1.4
I hope some peoples will find it useful.
Regards, TSR
Attachments
-
527.3 KB Views: 324
Last edited:







