Project Zomboid

Project Zomboid

Medicine Moodles
 This topic has been pinned, so it's probably important
Lina  [developer] 29 Nov, 2023 @ 6:30pm
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.
Last edited by Lina; 9 Mar, 2024 @ 5:10pm