Project Zomboid

Project Zomboid

5,085 beoordelingen
Moodle Framework B41
5
6
4
2
2
2
   
Prijs
Toevoegen aan favorieten
Toegevoegd aan favorieten
Verwijderen uit favorieten
Bestandsgrootte
Geplaatst op
Bijgewerkt op
111.139 KB
5 sep 2022 om 16:22
21 jan om 16:17
15 wijzigingsnotities (weergeven)

Abonneren om te downloaden
Moodle Framework B41

In 2 verzamelingen van Tchernobill
PZ Build 41
27 items
Modder Tools
5 items
Omschrijving
Makes it easy to add moodles for modders.


Moodle Framework Configuration
If you want colors to be easier to distinguish, you can set to white the reference color for moodles.
This applies to both vanilla and modded moodles.
You can also deactivate various displays to enhance mod compatibility.
Modded Backgrounds with small extensions right or down are now handled too.


How to create a new moodle
If you wanna create a Moodle * then follow the next steps, replacing * by your moodle name.

1/ Moodle Texture
Add Moodle *.png under media\ui.
Should be 30 by 30 pixels png with alpha enabled.

2/ Texture
Add the following text under media\lua\shared\Translate\EN
Moodles_EN { Moodles_*_Good_lvl1 = "text_1", Moodles_*_Good_desc_lvl1 = "text_desc_1", Moodles_*_Good_lvl2 = "text_2", Moodles_*_Good_desc_lvl2 = "text_desc_2", Moodles_*_Good_lvl3 = "text_3", Moodles_*_Good_desc_lvl3 = "text_desc_3", Moodles_*_Good_lvl4 = "text_4", Moodles_*_Good_desc_lvl4 = "text_desc_4", Moodles_*_Bad_lvl1 = "text_1", Moodles_*_Bad_desc_lvl1 = "text_desc_1", Moodles_*_Bad_lvl2 = "text_2", Moodles_*_Bad_desc_lvl2 = "text_desc_2", Moodles_*_Bad_lvl3 = "text_3", Moodles_*_Bad_desc_lvl3 = "text_desc_3", Moodles_*_Bad_lvl4 = "text_4", Moodles_*_Bad_desc_lvl4 = "text_desc_4", }
You can implement only a subset of this as long as you call only the implemented part.

3/ Moodle object creation
Add these lines in your mod:
require "MF_ISMoodle" MF.createMoodle(*);

4/ Moodle value updates
Access your moodle from your code with
require "MF_ISMoodle" MF.getMoodle(*,playerNum):setValue(myNewMoodleValue)--float
0.0 <= myNewMoodleValue <=1.0
Missing playerNum will make the mod incompatible with SplitScreen.

For tuning options see dedicated discussion


Limitations
  • Not tested with multiplayer. (it is expected to work)
  • Not tested with splitscreen. (it is expected to work since last version)
  • Oscillations are not based on vanilla value and the behaviour may depend on performances.


Credits where it is due


Known mods using this
Have a look at how they use this mod.


Ask for permission[theindiestone.com]
This mod can only be added to and extended with the express permission from the original creator. Having received permission, credit must be given to the original creator, both within the files of the mod and wherever the mod roams online.

If no permission is received you may not alter the mod.

You wanna support? A nice word is always welcome. Constructive feedback too.

Workshop ID: 2859296947
Mod ID: MoodleFramework
Populaire discussies Alles weergeven (1)
7
28 jul om 6:22
BELANGRIJK: Moodle Framework For Modders
Tchernobill
174 opmerkingen
A 21 aug om 10:56 
I encountered a bug just now, Here is what happened "I was camping near the source water, no zomboids around and no dead bodies. Then sudden an awful smell moodle just pop out. I drive away from the lake (no zomboids / dead bodies). I tried to disable the mod and the awful smell is gone."
Tchernobill  [auteur] 16 jun om 14:12 
@theplanettree you should use B42 version instead of this one if you play B42
theplanettree 16 jun om 11:55 
You should change name to b41/b42 , almost skipped this
darkArt 22 apr om 0:22 
If I subscribe to this and the new b42 only version of this mod it only shows me one moodle framework mod on the mod list.
Mrlaz 1 apr om 15:11 
Turkish language does not work in b42.6 version
ROZZIE O.O 24 mrt om 9:37 
Epic
bballzki01 28 feb om 10:39 
my game is also doing that. did you guys ever figure it out
PepperCat 21 jan om 11:08 
My mod is B41/B42 so I'm using the original one.

Code for one of my moodles:

local moodle = MF.getMoodle("dtemcaffeine", player:getPlayerNum())
if moodle ~= nil then
if player:getModData().DTEMcaffeineOnBody > 0 and player:HasTrait("AddictedToCaffeine") then
moodle:setValue(0.6);
moodle:setBackground(moodle:getGoodBadNeutral(), moodle:getLevel(), getTexture("media/ui/dtemcaffeine.png"))
--print("Moodle 1 positive")
elseif player:getModData().DTEMtimeSinceLastCaffeine > 1440 and player:HasTrait("AddictedToCaffeine") then
moodle:setValue(0.4);
moodle:setBackground(moodle:getGoodBadNeutral(), moodle:getLevel(), getTexture("media/ui/dtemcaffeine.png"))
--print("Moodle 1 negative")
else
moodle:setValue(0.5);
--print("No Moodle")
end
end

I still can't see the red/green background circle in the moodle. It just displays the icon
Tchernobill  [auteur] 21 jan om 11:02 
@PepperCat For B42, yes. You probably modified the related mod options.
Aside, if your mod is not hybrid B41/42, I suggest you link to B42 version of this. (not both)
PepperCat 21 jan om 9:35 
Hello!
Question. I had my Moodles working all good but now, my image is being displayed but the green/red circle behind the Moodle icon is not displayed anymore, do I need to add an additional line of code for that? Did something related to that changed in the latest update?