Project Zomboid

Project Zomboid

Medicine Moodles
 此主题已被置顶,因此可能具有重要性
Lina  [开发者] 2023 年 11 月 29 日 下午 6:30
For modders
You can easily display your own medicine/effect as a moodle by using ModMedicineMoodles:addMedicine.
For example:
ModMedicineMoodles:addMedicine("Antibiotics", "Base.Antibiotics", function(self, player) return player:getReduceInfectionPower() / 50 end)
The 1st parameter is a unique name of your moodle and also a file {name}.png is need for the icon of the moodle (Antibiotics.png in this case).
The 2nd parameter is an item id and its localized display name is used as the title of the moodle.
The 3rd parameter is a function that should return the effect value. The value is usually between 0 and 1.

For further information, check the code or ask here.
最后由 Lina 编辑于; 2024 年 3 月 9 日 下午 5:10