Makes it easy to add moodles for modders.
This version may have frequent updates that we do not wanna bother B41 MP players with.
Moodle Framework Configuration
If you want colors to be easier to distinguish, you can set to white the reference color for moodles (default on).
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 [url=https://steamcommunity.com/workshop/filedetails/discussion/2859296947/3380536561724844838/]see dedicated discussion[/url]
Limitations
[list]
[*] 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.
[/list]
Credits where it is due
[list]
[*] This is inspired from the (removed) mod [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2665369300]Zombie Camouflage[/url] moodle management by the awesome [url=https://steamcommunity.com/id/Dislaik/myworkshopfiles/?appid=108600]Dislaik[/url].
[/list]
Known mods using this
[list]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=1299328280]More Traits[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2459400130]Dynamic Traits and Expanded Moodles[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2584991527]Auto Sewing[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2859304462]ProteinsMoodle[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2863455507]CannotAttackMoodle[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2863908612]SixthSense[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2864043248]Excrementum[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2864671032]MoodleCombatSpeed[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2870436656]Nuclear Winter[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2874801834]MoodleSanity[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2884027700]SanityMoodleRocky[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2890281039]Rick's MLC Concussion[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2903623882]General Anxiety[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2909759179]MoodleDog[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2914075159]Evolving Traits World (ETW)[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2920735875]Weather Moodles[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2922713082]Seismic Events[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2923439994]More Smokes[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2927791312]Serious Cigarette Withdrawl[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2942096995]More Moodles[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2988665127]Out of Breath Moodle[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3001306950]Dirtiness Sickness[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3013557742]BCU Mod[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3019024205]Radiated Zones[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3027968416]Sleepy Moodle[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3042111975]Pregnancy[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3042207469]Customizable Fake Infection[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3043614121]Anomaly Roasting[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3048123717]Real Knockouts[/url]
[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3093700684]Medicine Moodles[/url]
[/list]
Have a look at how they use this mod.
[url=http%3A%2F%2Ftheindiestone.com%2Fforums%2Findex.php%2Ftopic%2F2530-mod-permissions%2F%3Fp%3D36479]On Lockdown[/url][theindiestone.com]
This mod cannot be modified by anyone else, for anything else, at all, ever. Even if the user disappears, he or she would much rather you didn't touch the fruits of their hard labour.
You wanna support? A nice word is always welcome. Constructive feedback too.
Workshop ID: 3396446795
Mod ID: MoodleFramework