MemeMayhem / ModExamples

11 stars 3 forks source link

自定义属性报错 #72

Closed fuxiao1563 closed 2 months ago

fuxiao1563 commented 2 months ago

按照案例做的,案例可以生效,但mod就会出错.... 附mod文件和日志 Rance Mod.zip Player.log

Api:RegisterAttribute({ id = "loki_armor_attribute", display_name = "洛基的铠甲", description = "受到10次攻击后, 增加2" .. Api.GameMechanicTags.TAG.heal, icon = DCEI.Texture("loki_armor"), display_type = Api.DisplayType.Integer, is_neutral = true, -- if true, font color will always be white flavor_text = "This is flavor text for a custom quest attribute", display_requirements = { is_hero = true, -- only show for hero default_value = 0, max = 10 -- for visual only, you need to keep current value <= max }, })

Ill-cat commented 2 months ago

把Api.GameMechanicTags.TAG.heal改成Api.GameMechanicTags.TAG.health就好了

fuxiao1563 commented 2 months ago

把Api.GameMechanicTags.TAG.heal改成Api.GameMechanicTags.TAG.health就好了

谢谢...我铸币了.