Project Zomboid

Project Zomboid

Medicine Moodles
 Toto téma bylo přilepeno, takže je nejspíš důležité
Lina  [vývojář] 29. lis. 2023 v 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.
Naposledy upravil Lina; 9. bře. 2024 v 17.10