📄 localization.lua
字号:
DM_MENU_APPLYFILTERTOMANUALCYCLING = "循环所有类别";
DM_MENU_APPLYFILTERTOAUTOCYCLING = "循环选中类别";
DM_MENU_GENERAL = "一般选项";
DM_MENU_GROUPDPSMODE = "全局DPS模式";
DM_MENU_CLEARBANNED = "解除所有禁止单位";
DM_MENU_CONSTANTVISUALUPDATE = "状态条连续更新";
DM_MENU_CLEARWHENJOINPARTY = "加入队伍时清除";
-- Misc
DM_CLASS = "职业"; -- The word for player class, like Druid or Warrior.
DM_TOOLTIP = "\n空闲时间 = %.1fs\n关系 = %s";
DM_YOU = "你"
DM_CRITSTR = "重击";
DM_UNKNOWNENTITY = "未知单位";
DM_SYNCSPELLNAME = "[Sync]";
DM_DMG_MELEE = "[近战攻击]";
DM_DMG_FALLING = "[摔伤]";
DM_DMG_LAVA = "[岩浆]";
DM_DMG_DAMAGESHIELD = "[伤害反弹]";
DM_DMG_DEATH = "[死亡]";
DM_DMG_COMBAT = "[脱离战斗]";
DamageMeters_RPSmoveStrings =
{
r = "石头",
p = "布",
s = "剪刀"
};
-------------------------------------------------------------------------------
--[[ This system based on the one in Gello's Recap, which itself was based on the one in Telo's MobHealth.
- source and dest = 0 means the player
TODO: These are all special cases in English because they contain apostrophes.
Julie's Dagger
Rammstein's Lightning Bolts
Night Dragon's Breath
]]--
--[[
This table defines types of messages that DM parses and how to parse them.
The index of the table is a human-readable name, which by convention is
normally the name of the string variable (as defined in GlobalStrings.lua) that
is being parsed. Every type of message that is parsed for the "Damage Done",
"Healing Done", "Damage Taken", and "Healing Taken" quantities must be defined in this
table.
The key to the system is the "pattern" member. This is usually (there are some
special cases) a string defined in GlobalStrings.lua. An example is COMBATHITSELFOTHER =
"You hit %s for %d.". When DM loads up it goes through this list and converts all the
patterns into "regular expression" search strings. So, for example, the above becomes
"You hit (.+) for (%d+)%."
When a match is found there will be an array of "elements" for
each unknown in the pattern. In the above pattern, elements[1] will be the string name
of who was hit, and elements[2] will be how much damage was done. Each msgInfo has fields
in which you specify which elements mean what. So, in the msgInfo for this example we set
"dest=1" and "amount=2".
The fields of each entry are defined as follows:
- source: The index of the element that specifies the source of the amount. The source is the
person doing damage or doing the healing in the case of "Damage done" and "healing done" messages,
but it is the the person being hit in the case of "damage received" messages. When source=0, it
means the player (us) is the source.
- dest: The name of the entity being effected. Again, dest=0 means the player.
- amount: The index of the element that contains the quantity of damage/healing done.
- spell: This is the index of the element which references the spell that is doing the damage/healing.
Alternately, if it is a string that spell will be used explicitly. Spell=0 or nil defaults to regular
melee damage.
- damageType: Also known as "school", this is the index of the element which specifies the type of
damage done, ie. "physical", "fire", "frost", etc.
- crit: This is one of three defined values: DM_HIT, DM_CRT, DM_DOT. Set this to specify whether
the message represents a spell that hit normally, critically hit, or was a non-crittable spell.
(Damage Over Time spells, DOTs, cannot crit, hence the name.)
- pattern: This is the pattern, usually a string from GlobalStrings.lua.
- custom: If this is set to true, the pattern will not be transformed when DM is loaded. Use
this for custom patterns.
]]--
DamageMeters_msgInfo = {
-- CHAT_MSG_COMBAT_SELF_HITS
_COMBATHITSELFOTHER =
{ source=0, dest=1, amount=2, spell=0, damageType=0, crit=DM_HIT, pattern="COMBATHITSELFOTHER" }, -- You hit (.+) for (%d+)
_COMBATHITCRITSELFOTHER =
{ source=0, dest=1, amount=2, spell=0, damageType=0, crit=DM_CRT, pattern="COMBATHITCRITSELFOTHER" }, -- You crit (.+) for (%d+)
_VSENVIRONMENTALDAMAGE_FALLING_SELF =
{ source=0, dest=0, amount=1, spell=DM_DMG_FALLING, damageType=0, crit=DM_DOT, pattern="VSENVIRONMENTALDAMAGE_FALLING_SELF" }, -- You fall and lose (%d+) health
_VSENVIRONMENTALDAMAGE_LAVA_SELF =
{ source=0, dest=0, amount=1, spell=DM_DMG_LAVA, damageType=0, crit=DM_DOT, pattern="VSENVIRONMENTALDAMAGE_LAVA_SELF" }, -- You lose %d health for swimming in lava.
-- CHAT_MSG_SPELL_SELF_DAMAGE
_SPELLLOGSCHOOLSELFOTHER =
{ source=0, dest=2, amount=3, spell=1, damageType=4, crit=DM_HIT, pattern="SPELLLOGSCHOOLSELFOTHER" }, -- Your (.+) hits (.+) for (%d+) (.+)%.
_SPELLLOGCRITSCHOOLSELFOTHER =
{ source=0, dest=2, amount=3, spell=1, damageType=4, crit=DM_CRT, pattern="SPELLLOGCRITSCHOOLSELFOTHER" }, -- "Your %s crits %s for %d %s damage.";
_SPELLLOGSELFOTHER =
{ source=0, dest=2, amount=3, spell=1, damageType=0, crit=DM_HIT, pattern="SPELLLOGSELFOTHER" }, -- Your (.+) hits (.+) for (%d+)
_SPELLLOGCRITSELFOTHER =
{ source=0, dest=2, amount=3, spell=1, damageType=0, crit=DM_CRT, pattern="SPELLLOGCRITSELFOTHER" }, -- Your (.+) crits (.+) for (%d+)
-- "CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE" or event == "CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE"
-- No such message.
--_PERIODICAURADAMAGEABSORBEDSELFOTHER =
-- { source=0, dest=1, amount=2, spell=4, damageType=3, crit=DM_DOT, pattern="PERIODICAURADAMAGEABSORBEDSELFOTHER" }, -- = "%s suffers %d %s damage from your %s (%d absorbed)."
_PERIODICAURADAMAGESELFOTHER =
{ source=0, dest=2, amount=3, spell=1, damageType=3, crit=DM_DOT, pattern="PERIODICAURADAMAGESELFOTHER" }, -- (.+) suffers (%d+) (.+) damage from your (.+).
-- No such message.
--_PERIODICAURADAMAGEABSORBEDOTHEROTHER =
-- { source=4, dest=1, amount=2, spell=5, damageType=3, crit=DM_DOT, pattern="PERIODICAURADAMAGEABSORBEDOTHEROTHER" }, -- %s suffers %d %s damage from %s's %s (%d absorbed).
_PERIODICAURADAMAGEOTHEROTHER =
{ source=1, dest=3, amount=4, spell=2, damageType=0, crit=DM_DOT, pattern="PERIODICAURADAMAGEOTHEROTHER" }, -- (.+) suffers (%d+) (.+) damage from (.+)'s (.+)
-- "CHAT_MSG_COMBAT_PARTY_HITS" or "CHAT_MSG_COMBAT_FRIENDLYPLAYER_HITS" or "CHAT_MSG_COMBAT_PET_HITS")
_COMBATHITOTHEROTHER =
{ source=1, dest=2, amount=3, spell=7, damageType=0, crit=DM_HIT, pattern="COMBATHITOTHEROTHER" }, -- (.+) hits (.+) for (%d+)
_COMBATHITCRITOTHEROTHER =
{ source=1, dest=2, amount=3, spell=7, damageType=0, crit=DM_CRT, pattern="COMBATHITCRITOTHEROTHER" }, -- (.+) crits (.+) for (%d+)
_VSENVIRONMENTALDAMAGE_FALLING_OTHER =
{ source=1, dest=1, amount=2, spell=DM_DMG_FALLING, damageType=0, crit=DM_DOT, pattern="VSENVIRONMENTALDAMAGE_FALLING_OTHER" }, -- %s falls and loses %d health.
_VSENVIRONMENTALDAMAGE_LAVA_OTHER =
{ source=1, dest=1, amount=2, spell=DM_DMG_LAVA, damageType=0, crit=DM_DOT, pattern="VSENVIRONMENTALDAMAGE_LAVA_OTHER" }, -- %s loses %d health for swimming in lava.
-- "CHAT_MSG_SPELL_PARTY_DAMAGE" "CHAT_MSG_SPELL_FRIENDLYPLAYER_DAMAGE" "CHAT_MSG_SPELL_PET_DAMAGE"
_SPELLLOGOTHEROTHER =
{ source=1, dest=3, amount=4, spell=2, damageType=0, crit=DM_HIT, pattern="SPELLLOGOTHEROTHER" }, -- (.+)'s (.+) hits (.+) for (%d+)
_SPELLLOGCRITOTHEROTHER =
{ source=1, dest=3, amount=4, spell=2, damageType=0, crit=DM_CRT, pattern="SPELLLOGCRITOTHEROTHER" }, -- (.+)'s (.+) crits (.+) for (%d+)
_SPELLSPLITDAMAGEOTHEROTHER =
{ source=1, dest=3, amount=4, spell=2, damageType=0, crit=DM_DOT, pattern="SPELLSPLITDAMAGEOTHEROTHER" }, -- (.+)'s (.+) causes (.+) (%d+) damage
-- CHAT_MSG_SPELL_DAMAGESHIELDS_ON_SELF
_DAMAGESHIELDSELFOTHER =
{ source=0, dest=3, amount=1, spell=DM_DMG_DAMAGESHIELD, damageType=0, crit=DM_DOT, pattern="DAMAGESHIELDSELFOTHER" }, -- You reflect (%d+) (.+) damage to (.+)
-- CHAT_MSG_SPELL_DAMAGESHIELDS_ON_OTHERS
_DAMAGESHIELDOTHEROTHER =
{ source=1, dest=4, amount=2, spell=DM_DMG_DAMAGESHIELD, damageType=0, crit=DM_DOT, pattern="DAMAGESHIELDOTHEROTHER" }, -- (.+) reflects (%d+) (.+) damage to (.+)
-- ? soul link or something?
_SPELLSPLITDAMAGESELFOTHER =
{ source=0, dest=2, amount=3, spell=1, damageType=0, crit=DM_DOT, pattern="SPELLSPLITDAMAGESELFOTHER" }, -- Your (.+) causes (.+) (%d+) damage
-- DAMAGE TAKEN
--"CHAT_MSG_COMBAT_CREATURE_VS_SELF_HITS" -- this gets complicated with pets.
--"CHAT_MSG_COMBAT_CREATURE_VS_PARTY_HITS"
--"CHAT_MSG_COMBAT_CREATURE_VS_CREATURE_HITS"
_COMBATHITOTHERSELF =
{ source=1, dest=0, amount=2, crit=DM_HIT, pattern="COMBATHITOTHERSELF" }, -- "%s hits you for %d.";
_COMBATHITCRITOTHERSELF =
{ source=1, dest=0, amount=2, crit=DM_CRT, pattern="COMBATHITCRITOTHERSELF" }, -- "%s crits you for %d.";
_COMBATHITOTHEROTHER =
{ source=1, dest=2, amount=3, crit=DM_HIT, pattern="COMBATHITOTHEROTHER" }, -- "%s hits %s for %d.";
_COMBATHITCRITOTHEROTHER =
{ source=1, dest=2, amount=3, crit=DM_CRT, pattern="COMBATHITCRITOTHEROTHER" }, -- "%s crits %s for %d.";
_COMBATHITCRITSCHOOLOTHEROTHER =
{ source=1, dest=2, amount=3, damageType=4, crit=DM_CRT, pattern="COMBATHITCRITSCHOOLOTHEROTHER" }, -- "%s crits %s for %d %s damage.";
_COMBATHITSCHOOLOTHEROTHER =
{ source=1, dest=2, amount=3, damageType=4, crit=DM_HIT, pattern="COMBATHITSCHOOLOTHEROTHER" }, -- "%s hits %s for %d %s damage.";
_COMBATHITCRITSCHOOLOTHERSELF =
{ source=1, dest=0, amount=2, damageType=3, crit=DM_CRT, pattern="COMBATHITCRITSCHOOLOTHERSELF" }, -- "%s crits you for %d %s damage.";
_COMBATHITSCHOOLOTHERSELF =
{ source=1, dest=0, amount=2, damageType=3, crit=DM_HIT, pattern="COMBATHITSCHOOLOTHERSELF" }, -- "%s hits you for %d %s damage.";
--"CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE" or
--"CHAT_MSG_SPELL_CREATURE_VS_PARTY_DAMAGE" or
--"CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE") then
_SPELLLOGOTHERSELF =
{ source=1, dest=0, amount=3, spell=2, damageType=0, crit=DM_HIT, pattern="SPELLLOGOTHERSELF" }, -- "%s's %s hits you for %d.";
_SPELLLOGSCHOOLOTHERSELF =
{ source=1, dest=0, amount=3, spell=2, damageType=4, crit=DM_HIT, pattern="SPELLLOGSCHOOLOTHERSELF" }, -- "%s's %s hits you for %d %s damage.";
_SPELLLOGCRITSCHOOLOTHERSELF =
{ source=1, dest=0, amount=3, spell=2, damageType=4, crit=DM_CRT, pattern="SPELLLOGCRITSCHOOLOTHERSELF" }, -- "%s's %s crits you for %d %s damage.";
_SPELLLOGCRITOTHERSELF =
{ source=1, dest=0, amount=3, spell=2, crit=DM_CRT, pattern="SPELLLOGCRITOTHERSELF" }, -- "%s's %s crits you for %d.";
-- bunch of junk in here in the old code
_SPELLRESISTOTHERSELF =
{ source=1, dest=0, amount=0, spell=2, crit=DM_HIT, pattern="SPELLRESISTOTHERSELF" }, -- "%s's %s was resisted.";
_SPELLLOGSCHOOLOTHEROTHER =
{ source=1, dest=3, amount=4, spell=2, damageType=5, crit=DM_HIT, pattern="SPELLLOGSCHOOLOTHEROTHER" }, -- "%s's %s hits %s for %d %s damage.";
_SPELLLOGCRITSCHOOLOTHEROTHER =
{ source=1, dest=3, amount=4, spell=2, damageType=5, crit=DM_CRT, pattern="SPELLLOGCRITSCHOOLOTHEROTHER" }, -- "%s's %s crits %s for %d %s damage.";
_SPELLRESISTOTHEROTHER =
{ source=1, dest=3, amount=0, spell=2, crit=DM_HIT, pattern="SPELLRESISTOTHEROTHER" }, -- "%s's %s was resisted by %s.";
--"CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE"
_PERIODICAURADAMAGEOTHERSELF =
{ source=3, dest=0, amount=1, spell=4, damageType=2, crit=DM_DOT, pattern="PERIODICAURADAMAGEOTHERSELF" }, -- "You suffer %d %s damage from %s's %s."
_PERIODICAURADAMAGESELFSELF =
{ source=0, dest=0, amount=1, spell=3, damageType=2, crit=DM_DOT, pattern="PERIODICAURADAMAGESELFSELF" }, -- "You suffer %d %s damage from your %s."
-- pet
_PERIODICAURADAMAGEOTHEROTHER =
{ source=1, dest=3, amount=4, spell=2, damageType=3, crit=DM_DOT, pattern="PERIODICAURADAMAGEOTHEROTHER" }, -- "%s suffers %d %s damage from %s's %s."
--HEALING
-- "CHAT_MSG_SPELL_SELF_BUFF" "CHAT_MSG_SPELL_PARTY_BUFF" "CHAT_MSG_SPELL_FRIENDLYPLAYER_BUFF" "CHAT_MSG_SPELL_HOSTILEPLAYER_BUFF"
_HEALEDSELFSELF =
{ source=0, dest=0, amount=2, spell=1, crit=DM_HIT, pattern="HEALEDSELFSELF" }, -- "Your %s heals you for %d.";
_HEALEDCRITSELFSELF =
{ source=0, dest=0, amount=2, spell=1, crit=DM_CRT, pattern="HEALEDCRITSELFSELF" }, -- "Your %s critically heals you for %d.";
_HEALEDSELFOTHER =
{ source=0, dest=2, amount=3, spell=1, crit=DM_HIT, pattern="HEALEDSELFOTHER" }, -- "Your %s heals %s for %d."
-- missing some here, ie. HEALEDSELFSELF "Your %s heals you for %d."
_HEALEDCRITSELFOTHER =
{ source=0, dest=2, amount=3, spell=1, crit=DM_CRT, pattern="HEALEDCRITSELFOTHER" }, -- "Your %s critically heals %s for %d.";
__NIGHTDRAGONSBREATHOTHER =
{ source=1, dest=2, amount=3, spell="Night Dragon's Breath", crit=DM_HIT, pattern="(.+)'s Night Dragon's Breath heals (.+) for (%d+)%.", custom=true }, -- "%s's Night Dragon's Breath heals %s for %d.";
__NIGHTDRAGONSBREATHOTHERCRIT =
{ source=1, dest=2, amount=3, spell="Night Dragon's Breath", crit=DM_CRT, pattern="(.+)'s Night Dragon's Breath critically heals (.+) for (%d+)%.", custom=true }, -- "%s's Night Dragon's Breath heals %s for %d.";
_HEALEDOTHERSELF =
{ source=1, dest=0, amount=3, spell=2, crit=DM_HIT, pattern="HEALEDOTHERSELF" }, -- "%s's %s heals %s you %d.";
_HEALEDCRITOTHERSELF =
{ source=1, dest=0, amount=3, spell=2, crit=DM_CRT, pattern="HEALEDCRITOTHERSELF" }, -- "%s's %s critically heals %s you %d.";
_HEALEDOTHEROTHER =
{ source=1, dest=3, amount=4, spell=2, crit=DM_HIT, pattern="HEALEDOTHEROTHER" }, -- "%s's %s heals %s for %d.";
_HEALEDCRITOTHEROTHER =
{ source=1, dest=3, amount=4, spell=2, crit=DM_CRT, pattern="HEALEDCRITOTHEROTHER" }, -- "%s's %s critically heals %s for %d.";
--"CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS" "CHAT_MSG_SPELL_PERIODIC_PARTY_BUFFS" "CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_BUFFS" "CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_BUFFS" -- why?
__JULIESBLESSINGOTHER =
{ source=3, dest=1, amount=2, spell="Julie's Blessing", crit=DM_HIT, pattern="(.+) gains (%d+) health from (.+)'s Julie's Blessing%.", custom=true },
_PERIODICAURAHEALOTHERSELF =
{ source=1, dest=0, amount=3, spell=2, crit=DM_DOT, pattern="PERIODICAURAHEALOTHERSELF" }, -- "You gain %d health from %s's %s."
_PERIODICAURAHEALSELFSELF =
{ source=0, dest=0, amount=2, spell=1, crit=DM_DOT, pattern="PERIODICAURAHEALSELFSELF" }, -- "You gain %d health from %s."
_PERIODICAURAHEALSELFOTHER =
{ source=0, dest=1, amount=2, spell=3, crit=DM_DOT, pattern="PERIODICAURAHEALSELFOTHER" }, -- "%s gains %d health from your %s."
_PERIODICAURAHEALOTHEROTHER =
{ source=3, dest=1, amount=2, spell=4, crit=DM_DOT, pattern="PERIODICAURAHEALOTHEROTHER" }, -- "%s gains %d health from %s's %s."
--CURING
};
--[[ DamageMeters_eventCaseTable
This table defines which msgInfos are checked for which events. Although its a bit of a pain
maintaining this big list there are several big reasons why we do so. First and foremost, we
gain some information about the players involved in a message from the event type. For example,
we can deduce that if the event was CHAT_MSG_COMBAT_CREATURE_VS_SELF_HITS and the message was of the
type "[Someone] hit [someone] for [amount] damage." that the entity being hit was not us but rather
a pet or totem of ours. The second reason for this table is to greatly reduce the amount of patterns
each event is compared against. The final reason is that sometimes the order of parsing is critical.
Here is an example:
HEALEDOTHEROTHER = "%s's %s heals %s for %d."
HEALEDCRITOTHEROTHER - "%s's %s critically heals %s for %d."
If we feed the following message into the above patterns, the
HEALEDOTHEROTHER will generate the following elements:
"Dandelion's Healing Touch critically heals Sterne for 1234."
->
"Dandelion", "Healing Touch critically", "Sterne", 1234
Hence, we must in this case test for HEALEDCRITOTHEROTHER before HEALEDOTHEROTHER.
]]--
DamageMeters_eventCaseTable = {
[DM_MSGTYPE_DAMAGE] = {
CHAT_MSG_COMBAT_SELF_HITS = {
[1] = { n = "_COMBATHITSELFOTHER" }, -- ok
[2] = { n = "_COMBATHITCRITSELFOTHER" }, -- ok
[3] = { n = "_VSENVIRONMENTALDAMAGE_FALLING_SELF", msgType=DM_MSGTYPE_DAMAGERECEIVED }, -- ok
[4] = { n = "_VSENVIRONMENTALDAMAGE_LAVA_SELF", msgType=DM_MSGTYPE_DAMAGERECEIVED }, -- ok
},
CHAT_MSG_SPELL_SELF_DAMAGE = {
-- These two are for school-less "spells" like Heroic Strike.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -