Project Zomboid

Project Zomboid

3,196 ratings
MoodleFramework
3
4
3
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
60.603 KB
5 Sep, 2022 @ 4:22pm
7 Feb @ 12:18pm
11 Change Notes ( view )

Subscribe to download
MoodleFramework

In 2 collections by Tchernobill
PZ Build 41
26 items
Modder Tools
5 items
Description
Makes it easy to add moodles for modders.


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. Else you can
[ko-fi.com] or use donate on paypal[www.paypal.com].

Workshop ID: 2859296947
Mod ID: MoodleFramework
Popular Discussions View All (1)
2
14 Jul @ 4:37am
PINNED: Moodle Framework For Modders
Tchernobill
136 Comments
Sealer Moon 16 Jul @ 8:49am 
Is there a way to reload the moodle UI while in-game?
I don't know if it's this or one of my other 110 mods but something causes moodles to just sometimes vanish until I re-host the server.
Anach 15 Jul @ 9:05pm 
With all these great Moodle additions, I think we need the moodles to overflow into a secondary column(s), if they reach a certain (configurable) number of Moodles on screen.
Naniwara 28 May @ 10:51am 
the pregnancy mod got unlisted, which is curious.
Tchernobill  [author] 13 May @ 10:58am 
@Remanner From my POV this looks a lot like someone is fishing for externalizing their mod problems.
Remanner 13 May @ 4:02am 
This mod conflicts with That DAMN Library and a bunch of it's cars (wich work fine on its own), problem related to car upgrades. Breaks roofrack storage: can't open, spam in log when you walk around or driwing car with roofrack storage
ERROR: General , 1715596533514> LuaManager.getFunctionObject> no such function "DG70.ContainerAccess.Roofrack"
Throws a bunch of errors when the game loads new cars, my guess the errors are related to optional upgrades, but can't say for sure because of lack of knowledge, spent several hours just to figure out what i said above

Other than that, mod works just fine with Medicine Moodles, even when TDL desperately cries in log, thumbs up
Tchernobill  [author] 7 Feb @ 12:20pm 
with version 1.10, this framework is now split screen compatible.
Client mods need to update their use of this mod to deliver the split screen compatibility to users.
Tchernobill  [author] 4 Feb @ 12:47pm 
@Eden1914 fair enough, I clarified.
Eden1914 4 Feb @ 11:14am 
Because I seen you said it wasn't tested. Also because have mods dependant on this framework, and I want to enjoy this game with my wife. Figured if you may fix it some day or something
Tchernobill  [author] 28 Jan @ 9:05am 
@Eden1914 Why would you use in splitscreen a mod that is not compatible with splitscreen ?
Eden1914 28 Jan @ 9:00am 
>version 1.8

>remove ghost moodles bug. (unexpected empty space between moodles)

I know I already commented about splitscreen incompatibility, but I'd like to add that the ghost moodles exist for player 2, so that bug still exists. Also, if both players have the same trait with a moodle that uses this framework, then the moodle for the trait will duplicate on player 2's screen, as it shows moodles for player 1 and player 2 on just player 2's screen. This makes it hard to tell who's moodle could be who's when only one is showing in the moment.