Project Zomboid

Project Zomboid

664 个评价
Moodle Framework
2
2
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
60.079 KB
2024 年 12 月 30 日 下午 3:04
3 月 10 日 下午 2:11
3 项改动说明 ( 查看 )

订阅以下载
Moodle Framework

在 Tchernobill 的 1 个合集中
B42
23 件物品
描述
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 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.


On Lockdown[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
热门讨论 查看全部(4)
1
2024 年 12 月 30 日 下午 10:15
Better movement sync
UnCheat
0
10 月 2 日 上午 12:01
"Tchernobill" adds people to the blacklist without reason
phxntom1213
0
9 月 20 日 上午 9:28
Does not work correctly
GestumStage
27 条留言
Zepehr 9 月 29 日 下午 3:58 
still works with .12?
tacticaltomatoes 9 月 25 日 下午 7:20 
mod isnt showing up in mod list
Acee 9 月 24 日 下午 10:18 
why cant i see it in my mods?
ribs 9 月 2 日 上午 11:53 
I made a mod that lets you customize the thresholds for vanilla moodles:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3560934901
KoBaYaShi 8 月 17 日 上午 7:31 
为什么订阅后不显示在mod列表里
Benzo-Kazooie 8 月 1 日 上午 1:13 
Suggest adding in Build 42 to the title or throw a tag on the mod that says it.
58g 7 月 6 日 上午 7:37 
I don't see it in my mod list and so the other mods that require it won't work. How can it be fixed?
darkArt 4 月 22 日 上午 12:23 
If I subscribe to this and the old B41/B42 version of this mod it only shows me one moodle framework mod on the mod list.
Monkey 3 月 31 日 上午 7:13 
Or perhaps use the texture's width + height ratio and scale it up/down to fit in the moodle accordingly.
Monkey 3 月 31 日 上午 7:11 
Hey, I'm working on a mod where I need to use some item icons for the moodle picture (with SetPicture). However these are generally bigger than 30x30, sometimes even now a 1:1 ratio, and ultimately end up being bigger than the moodle boundaries. Is there a way to perhaps have optional width and height parameters, and maybe aspect ratio when passing setPicture?