I had a thought (probably not a bright one, but still): when you're writing your evals, having to write separate conditional blocks for so many types of things can get pretty silly. Why would I want to write a lengthy if/switch block in my evals to find out if one of the items I have is magical. Not to mention, that if/switch would probably be massive depending on the size of my game.

I also saw someone post about checking the name of an enemy for if it contained "Dragon" to modify damage to it. What if the enemy's name was "Frostwyrm"? Why limit your creativity by creating conventions like this?

What if I could tag nearly any object in my game with a very simple notetag that could then be checked and/or manipulated via quick script commands on those objects?

At least that was the thought. So I wrote this.

Happy tagging!

Download NeMV - Tags

Tags post on RM Forums

Tags entry on MV Plugins

NeMV on Github


Introduction

This plugin allows actors, enemies, classes, skills, states, items, weapons, and armors to be tagged and those tags to be easily retrieved via script.

Usage

Add a tag to your actor, class, enemy, item, weapon, or armor as below. Multiple tags per entry can be separated by white-space or commas, and tags are case insensitive.

<Tags: Plant>

... or...

<TAGS: root, red, alchemy>

... or...

<tags: BOSS FIRERESIST EXTRAGOLD>


Once your tags are added, they can be accessed in almost any location via:

[Object].hasTag("plant")

This will return a boolean result indicating whether your object contains that tag or not.

Tags can also be added and removed programmatically by calling either:

[Object].addTag("spoiled")

... or...

[Object].removeTag("fresh")

Note: Removing a tag that does not exist will NOT throw an error.


A couple of utility methods have also been added to allow you to quickly scan the party for tags on items they either possess or have equipped, or tags on states they may have active.

NeMV.Tags.AnyPartyItemsHaveTag("magical")

... will return true if the party possesses any items tagged as "magical".

NeMV.Tags.AnyPartyStatesHaveTag("weapon")

... will return true if a party actor has a state tagged as "weapon".

Support

Compatibility with YEP - Item Core exists to a degree, but may require additional effort when checking specific items. It's always advisable to use...

DataManager.getBaseItem(item)

... if you are using YEP - Item Core.

Should this plugin not work for you for any reason, please notify me by creating a Github issue, emailing me at lance@nekoyoubi.com, or message me in any social convention you happen to see me in.

Thanks, and happy tagging!