Project Zomboid

Project Zomboid

Medicine Moodles
 Este tópico foi afixado, então deve ser importante
Lina  [desenvolvedor(a)] 29/nov./2023 às 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 edição por Lina; 9/mar./2024 às 17:10