afq984 / void-battery

Garena Path of Exile POB exporter
https://void-battery.afq984.org
GNU Affero General Public License v3.0
18 stars 11 forks source link

錯誤:無法翻譯此詞綴:附加的小型天賦給予 # #3

Closed biboy1999 closed 4 years ago

biboy1999 commented 4 years ago

Kyusung4698/PoE-Overlay#324 GGG 把詞綴混在一起== 導致程式認不出詞綴

附加的小型天賦給予:# + 增加 #% 暴擊率 = 附加的小型天賦給予:增加 #% 暴擊率

在遊戲內珠寶會顯示

稀有度: 稀有
鷹翼撫慰
中型星團珠寶
--------
物品等級: 69
--------
附加 5 個天賦 (enchant)
附加的小型天賦給予:增加 15% 暴擊率 (enchant)
--------
1 個附加天賦為苦痛之基
1 個附加的天賦為壓力點
1 個附加的天賦為珠寶插槽
--------
放置於天賦樹已配置的中型或巨型珠寶插槽中。附加的天賦點不與珠寶範圍互動。點擊右鍵從插槽中移除。
afq984 commented 4 years ago

感謝你幫忙找出問題,你要發個 pull request 過來嗎?你的 fork 似乎已經修掉了

afq984 commented 4 years ago

fixed by #4

afq984 commented 4 years ago

2020/04/08 補充 好吧,我其實沒有很懂 3.10 是怎麼運作的。 看起來目前的版本沒有星團珠寶的問題了...所以無視以下內容吧


似乎還是有些詞綴沒有辦法被翻譯,stats_descriptions.json 裡面的東西可能不夠多 舉例來說:

nebuloch.mods.CannotTranslateMod: '附加的小型天賦給予:增加 10% 元素傷害'

要找一下這些詞綴在遊戲數據的哪裡了。 https://poedb.tw/tw/item.php?n=Large+Cluster+Jewel


我們現在有的 stats_descriptions.json 裡面的 附加的小型天賦給予: 都是完整的。把其他這類型的詞綴全部找出來以後,也許就不須要現在這個 hack 了。

> grep -nr '附加的小型天賦給予'
stat_descriptions.json:112458:          "source": "附加的小型天賦給予:%1$+d 全能力",
stat_descriptions.json:112477:          "source": "附加的小型天賦給予:%1$+d 護甲",
stat_descriptions.json:112496:          "source": "附加的小型天賦給予:被捷光環影響時增加 %1%%% 攻擊和施放速度",
stat_descriptions.json:112515:          "source": "附加的小型天賦給予:引導施放技能增加 %1%%% 攻擊和施放速度",
stat_descriptions.json:112534:          "source": "附加的小型天賦給予:混沌技能增加 %1%%% 攻擊和施放速度",
stat_descriptions.json:112553:          "source": "附加的小型天賦給予:冰冷技能增加 %1%%% 攻擊和施放速度",
stat_descriptions.json:112572:          "source": "附加的小型天賦給予:元素技能增加 %1%%% 攻擊和施放速度",
stat_descriptions.json:112591:          "source": "附加的小型天賦給予:火焰技能增加 %1%%% 攻擊和施放速度",
stat_descriptions.json:112610:          "source": "附加的小型天賦給予:閃電技能增加 %1%%% 攻擊和施放速度",
stat_descriptions.json:112629:          "source": "附加的小型天賦給予:物理技能增加 %1%%% 攻擊和施放速度",
stat_descriptions.json:112648:          "source": "附加的小型天賦給予:增加 %1%%% 攻擊速度",
stat_descriptions.json:112667:          "source": "附加的小型天賦給予:增加 %1%%% 光環技能的範圍效果",
stat_descriptions.json:112686:          "source": "附加的小型天賦給予:增加 %1%%% 施放速度",
stat_descriptions.json:112705:          "source": "附加的小型天賦給予:%1$+d%% 暴擊加成",
stat_descriptions.json:112724:          "source": "附加的小型天賦給予:增加 %1%%% 敵人身上元素異常狀態持續時間",
stat_descriptions.json:112743:          "source": "附加的小型天賦給予:增加 %1%%% 投射物速度",
stat_descriptions.json:112762:          "source": "附加的小型天賦給予:增加 %1%%% 範圍效果",
biboy1999 commented 4 years ago
 def match(self, mod_string):
        match = re.match(self.matcher, mod_string)
        if match is None:
            return match
        values = self.default_values[:]
...
mod_string = '附加的小型天賦給予:增加 12% 烙印技能傷害'
self.matcher = '\\增\\加\\ (\\-?\\d+(?:\\.\\d+)?)\\%\\ \\烙\\印\\技\\能\\傷\\害'

mod是不是也要一起切掉,後面的match regex才對得到詞?

afq984 commented 4 years ago

你是對的QQ

JoeyvanCSZ commented 4 years ago

似乎還是有些詞綴沒有辦法被翻譯,stats_descriptions.json 裡面的東西可能不夠多 舉例來說:

nebuloch.mods.CannotTranslateMod: '附加的小型天賦給予:增加 10% 元素傷害'

要找一下這些詞綴在遊戲數據的哪裡了。

Trade API裡面有詞綴表 可能可以從這邊獲得完整的詞綴

http://web.poe.garena.tw/api/trade/data/stats

afq984 commented 4 years ago

Trade API裡面有詞綴表 可能可以從這邊獲得完整的詞綴

http://web.poe.garena.tw/api/trade/data/stats

看起來可行,跟國際服的 ID 是一樣的

RealWei commented 4 years ago

才剛想說沒這個真的好不方便,來看看能不能幫個忙,結果已經改完了XD

感謝你們的付出

afq984 commented 4 years ago

看了下後台 似乎這個問題確實已經解決了 再次感謝 @biboy1999 的協助

@RealWei 我把其他後台抓到的錯誤也開成 issue 了,如果你有興趣的話也可以研究 抓 trade API 的詞綴做一半... 有點懶的弄了 先丟這邊