Project Zomboid

Project Zomboid

Not enough ratings
Simplify
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
68.234 KB
4 Jul, 2022 @ 8:36am
4 Oct, 2022 @ 6:21pm
23 Change Notes ( view )

Subscribe to download
Simplify

Description
This mod doesn't add any in-game features. It provides utilities for modders.

For anyone interested,
The direction for this mod has been decided.

1. Provides utilities that is helpful in mod development process.
2. Provides necessary utilities for mods.
3. Provides plugins feature so that other modders can add new features to your mod.

Utilities of Interest:
1. Mod.lua - Creates a global mod table key which contains table with basic mod information and metatable that contains accessible utilities such as 'loadModule' which allows you to load module inside your 'mod_folder/modules' directory.
2. Module.lua - Load module inside 'mod_folder/modules' directory. This allows you to load modules using your mod id and file path. Haven't try loading a module from different mod using different mod id yet.
3. Exception.lua - Simulate exception class which can be derived to output different exception type for error string.
4. File.lua - Utility to get mod file writer and reader.

Workshop ID: 2830406268
Mod ID: simplify
15 Comments
« Zero »  [author] 7 Sep, 2022 @ 5:57pm 
Attention:
Please get the latest update ASAP. There's a security issue introduced with recent overhaul update.

I have restricted cache/lua folder to server sided script.
« Zero »  [author] 4 Sep, 2022 @ 5:50pm 
Extensions will be updated to affect only modules that is requesting for the feature. There will be no changes to the api.

This way, it will not interfere with functionality of unrelated mods.

The update will take some time.
« Zero »  [author] 3 Sep, 2022 @ 10:30pm 
I've updated this mod ahead of the schedule since Evelynn encountered errors involving the previous version's mod loader.

Now that it's confirmed, if you see any errors related to require.lua #77 Simplify, it means that other mods is having compilation error caused by vanilla require.

The reason why my mod listed in the stacktrace is because it calls the default require when there's no such file inside cache/lua and root enabled mods directories.

Feel free to look at 'simplify/core/extension/require,lua'
« Zero »  [author] 22 Aug, 2022 @ 10:46pm 
Heya, I'm currently rewriting this mod which has become a very big mess due to MP mod loader requirements. I can't give the ETA but the upcoming update contains a lot of new stuffs such as hashmap, switch syntax, better sandbox settings value access, event manager for registering custom events, and streamlined server / client command processing which will channel specific module command's data into mod's command channel.

To be honest, it's getting difficult for me to maintain this mod alone since the scale became much bigger than I expected. Once the next update is released, I'll upload it to github so that anyone can contribute with validations / improvements / bug fixes / design changes and etc.

Please forgive me for not releasing update for my other mod. It's being heavily affected by the current state of this mod.
UdderlyEvelyn 19 Aug, 2022 @ 12:32pm 
Sorry for the lack of responses on my end I'm extremely busy making content and fixing things for my server's public debut in the coming weeks. Will re-test today and report in.
« Zero »  [author] 15 Aug, 2022 @ 10:41am 
I've uploaded a new patch. This time I removed the split function from extension list since it already exists by default. And also updated another extended function for compatibility. Please give me a bug report if the errors still occur. If there is one, then I'll need to rewrite my const module.
« Zero »  [author] 15 Aug, 2022 @ 9:22am 
yeah sure, i'll update it in 1 hour or something since this stuff already happened.
UdderlyEvelyn 15 Aug, 2022 @ 9:14am 
There might be other things breaking still - I highly recommend naming your methods something that people cannot accidentally call, like that split function could be simplifySplit or something, for example, to avoid unintentional use. This sort of thing is a minefield if you use names that others might define functions for that behave differently.
UdderlyEvelyn 15 Aug, 2022 @ 9:14am 
Does not fix the issue with Buffy's, also breaks Bikinitools. The error is not relevant-seeming (probably a result of the output of your tools being unexpected rather than them not working). Possible something wrong with something else but this occured at the same time and it would make sense.

function: restrictCheats -- file: 05_BT_Config.lua line # 5 | MOD: bikinitools
function: applyCheatRestrictions -- file: 05_BT_Config.lua line # 186 | MOD: bikinitools
function: initialize -- file: 99_BT_Event.lua line # 62 | MOD: bikinitools

ERROR: General , 1660579526429> 0> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: log of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1660579526429> 0> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: log of non-table: null
UdderlyEvelyn 15 Aug, 2022 @ 8:12am 
It also happens with Buffy's Roleplay Chat, though not errors, it breaks text coloring/formatting parsing. Hopefully your patch fixes that, I'll test it out soon.