Tag Manager

● ARCHIVED · READ-ONLY
Started by Tsukihime 17 posts View original ↗
  1. This tag manager is very powerful when it comes to designing your database since you can classify objects anyway you want. It allows you to assign "tags" to objects.

    A tag is simply a single alphanumeric (A to Z, 0 to 9, some symbols) string with no spaces. Examples of tags include "sword" or "carrot" or "1000eyes". Any concept that you can imagine can be reduced to a set of tags that are used to describe the idea:

    You can use tags to describe an actor's gender ("male", "female")

    You can use tags to describe the rarity of an equip ("common", "rare")

    You can use tags to describe an actor's race ("human", "vampire", ... )

    Once tags have been assigned, you can then assign "tag conditions", which are conditions that must be met in order for an item to be usable. For example, a "collar" might only be equippable by dogs, so you would include a condition that requires an actor to be a "dog" in order to equip it.

    tagManager1.jpg

    Download

    Get it at Hime Works

    Usage

    We start with some basics concepts.

    A "tag object" is any ob ject that supports tags. The following objects support tags

    Actors

    Classes

    Skills

    Items

    Weapons

    Armors

    Enemies

    States

    Maps

    An actor's tags is the collection of all tags that are assigned to the actor, her current class, and any equips or states.

    Tagging objects

    Assign tags to tag objects using the note-tag

    <tag: x><tag: x y>For strings x, y. You may have multiple tags in a single note-tag by separating them with a spacetagManager2.jpg

    Tag Conditions

    You can require items or skills to have an effect on the target only when the target has the required tags. Similarly, you can require weapons or armors to be equippable only when all tag conditions are met.

    Specify a tag condition using the note-tag

    <tag_cond: x><tag_cond: x y>For strings x, y.All conditions are specified using three basic boolean operators: AND, OR, NOT.

    For example,

    "a AND b" means an actor must have both tags to meet the condition.

    "a OR b" means an actor must have at least one of the tags to meet the condition.

    "NOT a" means an actor must not have the tag to meet the condition.

    This script does not support parentheses matching, so you will have to use DeMorgan's laws to convert them into simpler statements that is recognized by the tag manager.

    a AND (b OR c) = (a AND) b or (a AND c)NOT (a AND = (NOT a) or (NOT This might be tricky at first if you are not familiar with boolean logic but it is not difficult to understand with practice.tagManager3.jpg

    Map Conditions

    These are the same as tag conditions, except you use them to compare with the current map. Note-tag an object with

    <map_cond: x><map_cond: x y>For some strings x, yYou will tag the map as usual with

    <tag: x>Map conditions are used when you require something to be true about the current map. For example, you might have items that are only usable on "world maps", and this is easily accomplished by adding a map condition for the item and tagging your maps appropriately.Accessing tags

    Sometimes you would like to explicitly check whether tags exist in your events or other scripts.

    You can do this by accessing the `tags` property that is exposed by all Tag Objects.

    For example, to access the first actor's tags, you would say

    Code:
    $game_actors[1].tags
    This will return all of the tags that are currently assigned to actor 1.
  2. Taking the tag cloud idea and putting it into Ace. Impressive. I can see this making for some cool and complicated systems. Good work.
  3. Yes the tag clouds are a pretty nice concept. I really like how you could just click on a tag and then it displays all relevant posts. And only those posts.

    A tag and a feature are very similar, except a tag is just a word whereas a feature is like a code that gives you nice bonuses. And rainbow slime.

    Naturally, features can also check for tags and consequently only apply to objects with those tags......and I think when you combine the two together, and possibly with effects, you can get a lot of stuff. Well, my main motivations for introducing the tag system was

    1: allow users to create their own tags without having to write code

    2: allow users to specify their own conditions without having to write code

    3: and most importantly save everyone time from having to write code just for the sake of saying "this guy is male". Haven't seen a script that allows you to say "this guy is human" though.
  4. i do made script that allow me to say "this guy is human/elf/dwarf/etc" :D . but i use it for my personal use. i guess i will switch to this instead :D .
  5. The script has been updated.I have merged a bunch of plugins together.

    All concepts you can possibly imagine can be reduced to a set of tags and tag conditions.

    A string means nothing on its own; you give it meaning and context.

    Tag conditions can be added to items, skills, and equips.

    Items and skills can only be used on a target when the tag conditions have been met.

    Equips can only be equipped when the tag conditions have been met.

    Add tag conditions with the note-tag

    <tag_cond: x><tag_cond: x y>For strings x and y

    Map objects are supported by the tag manager.

    Tag them as usual with

    <tag: x><tag: x y>To specify a map condition, note-tag your objects with

    <map_cond: x><map_cond: x y>There are two types of conditions: conjunctive and disjunctive.

    <tag_cond: a b>Is the same as saying "condition A and condition B" - both must be met 
    Code:
    <tag_cond: a><tag_cond: b>Is the same as saying "condition A or condition B" - at least one of them must be met
     And of course negation

    <tag_cond: !a>Is the same as saying "NOT condition a" - must not be "a"This script does not support parentheses matching, so you will have to use DeMorgan's laws to break them into simpler statements that is recognized by the tag manager.

    Practice your boolean logic and De Morgan's laws

    a AND b

    a OR b

    NOT a

    NOT (a AND B) <=> (NOT a) OR (NOT B)

    NOT (a OR B) <=> (NOT a) AND (NOT B)

    a AND (b OR c) <=> (a AND B) OR (a AND c)
  6. Would be nice if there was a condition branch scriptlet that checked if x or variable containing the id of an item/actor/class was equal to the specified tag:

    For example ,such a scriptlet could be used for a starving man event that can only accept items tagged with "food".
  7. Can you provide an example of how you would set it up I am not sure what you mean.
  8. Tsukihime said:
    Can you provide an example of how you would set it up I am not sure what you mean.
    Like:

    Conditional Branch: Script: is_tag.item/weapon/skill/whatever[id] = "tag"?
  9. Bump
  10. Sorry saw the post on phone so couldn't test it, and then forgot about it.

    That is already supported, since the tags are publicly available.

    Use the script call

    obj.tags.include?("your tag")For some valid database object.

    eg:

    $game_party.leader.weapons[0].tags.include?("holy")Will check whether the party leader's first weapon has the "holy" tag.
  11. Tsukihime said:
    Sorry saw the post on phone so couldn't test it, and then forgot about it.

    That is already supported, since the tags are publicly available.

    Use the script call

    obj.tags.include?("your tag")For some valid database object.

    eg:

    $game_party.leader.weapons[0].tags.include?("holy")Will check whether the party leader's first weapon has the "holy" tag.
    Oh, thanks!
  12. Hello! Trying to make the most out of this script. I think I can see many possibilities on how to make it useful. One question though... can this be used in the damage formula?

    Not sure if worded right but for example...

    if b.tags.include("human"); 99999; else; 100; end
  13. Can this plugin work without issues in RPG Maker MV? I had thought I read that this functionality was part of the base program now, but I can't find anything that says so now...I may just be crazy ;P
  14. @Golden Fish Entertainment
    this is a script for Ace, not a plugin - check which area of the forum it is posted in.

    And yes, MV now has the meta function to check for notetags (it is described in its help file), but that function didn't exist on Ace...
  15. Sorry..."script", not "plugin"

    I remembered that Hime had made the script available for VXAce, but I didn't know if it had been standardized for MV...figured this would be the most likely place to get a response :/

    As always, I appreciate your patience with my poor post placement, and I thank you for the help! :D
  16. Just a late-coming note for anyone who may experience the problem I just hunted down.

    If your .tags.include?("someTag") seems to be returning false negatives - not finding tags you're sure are there - it seems that this script is case-sensitive and wants only lower-case characters. Thus, a script to find .tags.include?("someTag") is in fact looking for exactly "sometag", and will not find an item tagged using any capital letters.
  17. Looks like you could just remove all instances of .downcase to get case-sensitive tags.