设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 136|回复: 0

[转载发布] [Joe Pro] Custom Tags

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-7-31 14:18:53 | 显示全部楼层 |阅读模式
    [url=http://s1371.photobucket.com/user/Joe_Programmer/media/NameTag_zpsf9aa66bf.png.html][/url]​

    class Custom Tags(version 1.0)

      defInitialize:
           You are no longer have to be pinned to the norm. You can now create and access as many tags as you can fit. they can be anything from 

           gender to age to weight to a favorite food or person, the choice is yours. For easy access you can even set those tags to $game_variables

           and really make your game yours.

      end

      defFeatures:


    • Create and access custom tags for actors.
    • Create and access custom tags for weapons.
    • Create and access custom tags for armors.
    • Create and access custom tags for items.
      end

      defHow to use:
           Use this tag in any of the noteboxes listed above. tag_name can be any word you want but it must contain all words. tag_value can

           be anything from words to numbers and even symbols, just incase you want to use ♂ and ♀ for you gender tags if you do gender tags.

           More detailed infromation can be found at the top of the script in the "How To Use" section.

      end

      defScript:

    Spoiler#################################################################################↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓##↓                                                                            ↓##↓                         Custom Tags: Version 0.1                           ↓##↓                                                                            ↓##↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕##↑                                                                            ↑##↑                            Written By: Joe Pro                             ↑##↑                        Last Edited:  July 31, 2014                         ↑##↑                                                                            ↑##↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑##################################################################################◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙ ** Disclaimer                                                              ◙##◙••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••◙##◙                                                                            ◙##◙ This script is not for commercial, if you wish to use this script in a     ◙##◙ game please PM me. All credit is to be given to me as the author of this   ◙##◙ script.                                                                    ◙##◙                                                                            ◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙ ** How To Use                                                              ◙##◙••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••◙##◙                                                                            ◙##◙ * Use the example below in an any notebox to create a tag.                 ◙##◙                                                                            ◙##◙    tag: "Tag_Description", "Tag_Info"                                      ◙##◙                                                                            ◙##◙                                                                            ◙##◙ * You can check the value of $game_party.battle_members[0] tags            ◙##◙   by using the following method.                                           ◙##◙                                                                            ◙##◙   tag?("Tag_Description")                                                  ◙##◙                                                                            ◙##◙ * You can check the value of $game_actors[x], $game_party.members[x]       ◙##◙   or $game_party.battle_members[x] tags by using the following method.     ◙##◙                                                                            ◙##◙   actor_tag?(actor, "Tag_Description")                                     ◙##◙                                                                            ◙##◙ * You can check the value of $data_actors[x], $data_weapons[x],            ◙##◙   $data_armors[x], $data_items[x], $data_enemies[x] tags by using the      ◙##◙   following method.                                                        ◙##◙      data_types are as follows;                                            ◙##◙         0 = Actors                                                         ◙##◙         1 = Weapons                                                        ◙##◙         2 = Armors                                                         ◙##◙         3 = Items                                                          ◙##◙         4 = Enemies                                                        ◙##◙                                                                            ◙##◙   data_tag?(data_type, ID, "Tag_Description")                              ◙##◙                                                                            ◙##◙ * You can change the value of $game_party.battle_members[0] tags by        ◙##◙   using the following method, you can also assign the new value to         ◙##◙   $game_variables.                                                         ◙##◙                                                                            ◙##◙   change_tag(handler, new_value)                                           ◙##◙                                                                            ◙##◙ * You can change the value of $game_actors[x], $game_party.members[x]      ◙##◙   or $game_party.battle_members[x] tags by using the following method,     ◙##◙   you can also assign the new value to $game_variables.                    ◙##◙                                                                            ◙##◙   change_actor_tag(actor, handler, new_value)                              ◙##◙                                                                            ◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##◙ ** Updates / Version Notes                                                 ◙##◙••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••◙##◙                                                                            ◙##◙   v0.1                                                                     ◙##◙ ~◄◙◙◙◙►~                                                                   ◙##◙ * This script allows create as many and whatever tags for characters       ◙##◙   weapons, armors, items and enemies as you want to. Gender, Race,         ◙##◙   Height, Weight, ID.. These are just a few examples. Actors tags are      ◙##◙   saved and can be changed through out the game.                           ◙##◙                                                                            ◙##◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙##################################################################################↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓##↓                                                                            ↓##↕                          Custom Tags: Version 0.1                          ↕##↑                                                                            ↑##↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑##################################################################################==============================================================================# ** RPG::Actor < RPG::BaseItem#------------------------------------------------------------------------------#  The Data Class for actors.#==============================================================================class RPG::Actor < RPG::BaseItem  #--------------------------------------------------------------------------  # * Get All Weapon's Tags  #--------------------------------------------------------------------------  def tags    return self.note.scan(/tag:\s*(\w*)\S*\s*(\S*)/im)  end  end#==============================================================================# ** RPG::Weapon < RPG::EquipItem#------------------------------------------------------------------------------#  The Data Class for weapons.#==============================================================================class RPG::Weapon < RPG::EquipItem  #--------------------------------------------------------------------------  # * Get All Weapon's Tags  #--------------------------------------------------------------------------  def tags    return self.note.scan(/tag:\s*(\w*)\S*\s*(\S*)/im)  end    #--------------------------------------------------------------------------  # * Return Weapon's Tag Value by Index  #--------------------------------------------------------------------------  def tag?(handler)    tags.each { |tag|      return tag[1] if tag[0] == handler    }  end  end#==============================================================================# ** RPG::Armor < RPG::EquipItem#------------------------------------------------------------------------------#  The Data Class for Armors.#==============================================================================class RPG::Armor < RPG::EquipItem  #--------------------------------------------------------------------------  # * Get All Armor's Tags  #--------------------------------------------------------------------------  def tags    return self.note.scan(/tag:\s*(\w*)\S*\s*(\S*)/im)  end    #--------------------------------------------------------------------------  # * Return Weapon's Tag Value by Index  #--------------------------------------------------------------------------  def tag?(handler)    tags.each { |tag|      return tag[1] if tag[0] == handler    }  end  end#==============================================================================# ** RPG::Item < RPG::UsableItem#------------------------------------------------------------------------------#  The Data Class for Items.#==============================================================================class RPG::Item < RPG::UsableItem  #--------------------------------------------------------------------------  # * Get All Item's Tags  #--------------------------------------------------------------------------  def tags    return self.note.scan(/tag:\s*(\w*)\S*\s*(\S*)/im)  end    #--------------------------------------------------------------------------  # * Return Weapon's Tag Value by Index  #--------------------------------------------------------------------------  def tag?(handler)    tags.each { |tag|      return tag[1] if tag[0] == handler    }  end  end#==============================================================================# ** RPG::Enemy < RPG::BaseItem#------------------------------------------------------------------------------#  The Data Class for Enemies.#==============================================================================class RPG::Enemy < RPG::BaseItem  #--------------------------------------------------------------------------  # * Get All Enemy Tags  #--------------------------------------------------------------------------  def tags    return self.note.scan(/tag:\s*(\w*)\S*\s*(\S*)/im)  end    #--------------------------------------------------------------------------  # * Return Weapon's Tag Value by Index  #--------------------------------------------------------------------------  def tag?(handler)    tags.each { |tag|      return tag[1] if tag[0] == handler    }  end  end#==============================================================================# ** Game_Actor#------------------------------------------------------------------------------#  This class handles actors. It is used within the Game_Actors class# ($game_actors) and is also referenced from the Game_Party class ($game_party).#==============================================================================class Game_Actor < Game_Battler  #--------------------------------------------------------------------------  # * Public Instance Variables  #--------------------------------------------------------------------------  attr_accessor :tags                                              # timers  #--------------------------------------------------------------------------  # * Aliasing Method: Object Initialization  #--------------------------------------------------------------------------  alias :gai1321654654 :initialize      #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize(*args)    gai1321654654(*args)    set_tags  end  #--------------------------------------------------------------------------  # * Set Weapon's Tags  #--------------------------------------------------------------------------  def set_tags    @tags = {}    actor.tags.size.times { |i|      @tags[actor.tags[0]] = actor.tags[1]    }    @tags  end    #--------------------------------------------------------------------------  # * Return Actor Variable's Value by Index  #--------------------------------------------------------------------------  def tag?(handler)    return @tags[handler]  end    #--------------------------------------------------------------------------  # * Change Tag Value  #--------------------------------------------------------------------------  def change_tag(handler, new_value)    @tags[handler] = new_value  end  end#==============================================================================# ** Game_Interpreter#------------------------------------------------------------------------------#  An interpreter for executing event commands. This class is used within the# Game_Map, Game_Troop, and Game_Event classes.#==============================================================================class Game_Interpreter  #--------------------------------------------------------------------------  # * Returns Data's Tag Value by Index and ID  #    0 = Acotrs  #    1 = Weapons  #    2 = Armors  #    3 = Items  #    4 = Enemies  #--------------------------------------------------------------------------  def data_tag?(type, id, handler)    case type    when 0       return $data_actors[id].tag?(handler)    when 1       return $data_weapons[id].tag?(handler)    when 2       return $data_armors[id].tag?(handler)    when 3       return $data_items[id].tag?(handler)    when 4       return $data_enemies[id].tag?(handler)    end  end    #--------------------------------------------------------------------------  # * Returns Leader's Saved Tag Value by Index  #--------------------------------------------------------------------------  def tag?(handler)    return $game_party.battle_members[0].tags[handler]  end    #--------------------------------------------------------------------------  # * Returns Actors's Saved Tag Value by Index  #--------------------------------------------------------------------------  def actor_tag?(actor, handler)    return actor.tags[handler]  end    #--------------------------------------------------------------------------  # * Changes Leader's Saved Tag Value by Index  #--------------------------------------------------------------------------  def change_tag(handler, new_value)    $game_party.battle_members[0].tags[handler] = new_value  end    #--------------------------------------------------------------------------  # * Changes Actor's Saved Tag Value by Index  #--------------------------------------------------------------------------  def change_tag(actor, handler, new_value)    actor.tags[handler] = new_value  end  end




      end

      defCredit, Licence & Commercial Usage:
           This script is free to use for non-commercial use. If you want to obtain a license to use this script in a commercial game(contests included)

           please PM me. Credit is to be give to myself, JoePro.

      end

    end



    本贴来自国际rpgmaker官方论坛作者:JoePro处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/joe-pro-custom-tags.30688/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 19:08 , Processed in 0.134915 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表