Project Zomboid

Project Zomboid

4,673 vurderinger
Moodle Framework B41
5
6
4
2
2
2
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Filstørrelse:
Offentliggjort:
Opdateret:
111.139 KB
5. sep. 2022 kl. 16:22
21. jan. kl. 16:17
15 ændringsbemærkninger ( vis )

Abonner for at downloade
Moodle Framework B41

I 2 samlinger af Tchernobill
PZ Build 41
27 genstande
Modder Tools
5 genstande
Beskrivelse
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
Populære diskussioner Vis alle (1)
5
16. dec. 2024 kl. 5:22
FASTGJORT: Moodle Framework For Modders
Tchernobill
171 kommentarer
darkArt 22. apr. kl. 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. kl. 15:11 
Turkish language does not work in b42.6 version
ROZZIE 24. mar. kl. 9:37 
Epic
bballzki01 28. feb. kl. 10:39 
my game is also doing that. did you guys ever figure it out
PepperCat 21. jan. kl. 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  [ophavsmand] 21. jan. kl. 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. kl. 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?
Tchernobill  [ophavsmand] 30. dec. 2024 kl. 15:11 
While this version works for both B41 and B42,
I uploaded a B42 only version with higher update frequency here . It already includes minors updates and is likely to include more in the future.
vsnegupal 29. dec. 2024 kl. 1:02 
Greetings. Can you please give me permission to include this mod in my modpack for the server? There will be a link to this mod in the description, and I will always be in touch, if you change your mind. You can post your approval/disapproval here or in private messages.
thesimphany 28. dec. 2024 kl. 16:13 
Please consider to keep a build 41 Version for those of us That will be remaining on Build 41 And the servers and files we have used for Years