Project Zomboid

Project Zomboid

Medicine Moodles
 Este tema se ha marcado como fijo, por lo que probablemente sea importante
Lina  [desarrollador] 29 NOV 2023 a las 18: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.
Última edición por Lina; 9 MAR 2024 a las 17:10