Jump to content

[DEDI] 7dtmLib - Modding Utility Library


chromecide

Recommended Posts

7dtmlib - **DEDICATED SERVER ONLY**

 

7dtmlib is a Modding Utility Library for 7 Days to Die Dedicated Server Mod developers. It adds many new features and classes for mod developers to simplify server mod development.

 

Quick Links

Downloads - http://github.com/7daystomod/7dtmlib/releases

Docs - http://7daystomod.com/mods/7dtmlib

 

 

Features

  • Wraps Server modding in a C# Event framework
  • Expanded Modding Events
  • Extended Group Based Permissions
  • Chat Command Handlers
  • Modding Utility Classes

 

Event Framework

 

7dtmlib wraps the existing mod functions using c# events and delegates and adds many new events for you to access within your mods including Entity and player Events, Block and Chunk events and Loot Container Events, among others.

 

See the Events doc for more information.

 

ExPerm - Node Based Permissions Manager

 

7dtmlib provides a node based Group and user permissions manager, allowing server administrators fine grained control over the features of your mod.

 

See the ExPerm doc for more information.

 

Chat Commands

 

7dtmlib provides a mechanism for easy construction of chat command handlers.

 

See the ChatCommands doc for more information.

 

Modding Utility Classes

 

7dtmlib wraps many common tasks into handy utility classes for faster mod development.

 

See the UtilityClasses doc docs for more information.

 

Server Installation

1. Download the mod using the links above.

2. Extract the files

3. Copy the Folder containing the DLL and ModInfo.xml into your Server Mods Folder.*

4. Restart your Server

 

* Some Game Server Providers do not allow you to install mods yourself. You will need to submit a support ticket with the URL of this page, requesting your provider to install the mod for you.

Link to comment
Share on other sites

Hello my english is not so good therefore google translation:

 

How do I have to adjust everything?

 

My Mods folder on the FTP looks like this

 

27c7392e9000c300dd11c4db09522b29.png

 

Unfortunately not everything works

 

In the console I can enter experm that works but paydaylib info does not work

 

What do I have to do to keep it running or is something wrong uploaded?

Link to comment
Share on other sites

Here is a section of the logfile ...

 

2017-06-18T12:18:19 0.486 INF [MODS] Start loading
2017-06-18T12:18:19 0.488 INF [MODS] Trying to load from 7dtmlib
Non platform assembly: D:\home\sid_250324\sevenDaysExperimental\Mods\7dtmlib\7DTMLib.dll (this message is harmless)
2017-06-18T12:18:19 0.500 INF [MODS] Found ModAPI, creating instance
2017-06-18T12:18:19 0.501 ERR GetInt: InvalidCastException OptionsObjectBlur
2017-06-18T12:18:19 0.519 INF Loaded Permission Node: chatcommand.help
2017-06-18T12:18:19 0.519 INF Added Group: guest
2017-06-18T12:18:19 0.519 INF Loaded Permission Node: chatcommand.*
2017-06-18T12:18:19 0.519 INF Added Group: regular
2017-06-18T12:18:19 0.520 INF Loaded Permission Node: chatcommand.*
2017-06-18T12:18:19 0.520 INF Added Group: moderator
2017-06-18T12:18:19 0.520 INF Loaded Permission Node: *
2017-06-18T12:18:19 0.520 INF Added Group: admin
2017-06-18T12:18:19 0.522 INF Groups Exist
2017-06-18T12:18:19 0.524 INF [MODS] Loaded Mod: 7DTMLib (1)
2017-06-18T12:18:19 0.525 INF [MODS] Trying to load from 7dtmPaydayLib
Non platform assembly: D:\home\sid_250324\sevenDaysExperimental\Mods\7dtmPaydayLib\7DTMPaydayLib.dll (this message is harmless)
2017-06-18T12:18:19 0.526 ERR [MODS] Failed loading DLL
2017-06-18T12:18:19 0.526 EXC The classes in the module cannot be loaded.
ReflectionTypeLoadException: The classes in the module cannot be loaded.
 at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
 at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
 at Mod.BK () [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Logger:masterLogException(Exception)
Logger:Exception(Exception)
Log:Exception(Exception)
Mod:BK()
Mod:LoadFromFolder(String)
ModManager:LoadMods()
GameManager:Awake()

(Filename:  Line: -1)

2017-06-18T12:18:19 0.531 INF [MODS] Trying to load from 7dtmWarpLib
Non platform assembly: D:\home\sid_250324\sevenDaysExperimental\Mods\7dtmWarpLib\7DTMWarpLib.dll (this message is harmless)
2017-06-18T12:18:19 0.532 ERR [MODS] Failed loading DLL
2017-06-18T12:18:19 0.532 EXC The classes in the module cannot be loaded.
ReflectionTypeLoadException: The classes in the module cannot be loaded.
 at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
 at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
 at Mod.BK () [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Logger:masterLogException(Exception)
Logger:Exception(Exception)
Log:Exception(Exception)
Mod:BK()
Mod:LoadFromFolder(String)
ModManager:LoadMods()
GameManager:Awake()

(Filename:  Line: -1)

2017-06-18T12:18:19 0.533 INF [MODS] Trying to load from Allocs_CommandExtensions
Non platform assembly: D:\home\sid_250324\sevenDaysExperimental\Mods\Allocs_CommandExtensions\AllocsCommands.dll (this message is harmless)
2017-06-18T12:18:19 0.534 INF [MODS] Loaded Mod: Allocs command extensions (12)
2017-06-18T12:18:19 0.534 INF [MODS] Trying to load from Allocs_CommonFunc
Non platform assembly: D:\home\sid_250324\sevenDaysExperimental\Mods\Allocs_CommonFunc\7dtd-server-fixes.dll (this message is harmless)
2017-06-18T12:18:19 0.535 INF [MODS] Found ModAPI, creating instance
2017-06-18T12:18:19 0.535 INF [MODS] Loaded Mod: Allocs server fixes (14)
2017-06-18T12:18:19 0.536 INF [MODS] Trying to load from Allocs_WebAndMapRendering
Non platform assembly: D:\home\sid_250324\sevenDaysExperimental\Mods\Allocs_WebAndMapRendering\MapRendering.dll (this message is harmless)
2017-06-18T12:18:19 0.537 INF [MODS] Found ModAPI, creating instance
2017-06-18T12:18:19 0.537 INF [MODS] Loaded Mod: Allocs MapRendering and Webinterface (19)
2017-06-18T12:18:19 0.537 INF [MODS] Trying to load from BCManager
Non platform assembly: D:\home\sid_250324\sevenDaysExperimental\Mods\BCManager\BCManager.dll (this message is harmless)
2017-06-18T12:18:19 0.539 INF [MODS] Found ModAPI, creating instance
2017-06-18T12:18:19 0.556 INF (BCM) Its Alive!!! (Pulse Started)
2017-06-18T12:18:19 0.557 INF Started thread HeartbeatPulse
2017-06-18T12:18:19 0.557 INF [MODS] Loaded Mod: Bad Company Manager (1.6.0_)
2017-06-18T12:18:19 0.557 INF [MODS] Trying to load from docs
2017-06-18T12:18:19 0.557 WRN [MODS] Folder D:/home/sid_250324/sevenDaysExperimental/7DaysToDieServer_Data/../Mods does not contain a ModInfo.xml, ignoring
2017-06-18T12:18:19 0.557 INF [MODS] Trying to load from examples
2017-06-18T12:18:19 0.558 WRN [MODS] Folder D:/home/sid_250324/sevenDaysExperimental/7DaysToDieServer_Data/../Mods does not contain a ModInfo.xml, ignoring
2017-06-18T12:18:19 0.558 INF [MODS] Trying to load from PaydayBounties
Non platform assembly: D:\home\sid_250324\sevenDaysExperimental\Mods\PaydayBounties\PaydayBounties.dll (this message is harmless)
2017-06-18T12:18:19 0.559 ERR [MODS] Failed loading DLL
2017-06-18T12:18:19 0.559 EXC The classes in the module cannot be loaded.
ReflectionTypeLoadException: The classes in the module cannot be loaded.
 at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
 at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
 at Mod.BK () [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Logger:masterLogException(Exception)
Logger:Exception(Exception)
Log:Exception(Exception)
Mod:BK()
Mod:LoadFromFolder(String)
ModManager:LoadMods()
GameManager:Awake()

(Filename:  Line: -1)

2017-06-18T12:18:19 0.560 INF [MODS] Trying to load from PlayerLogger
Non platform assembly: D:\home\sid_250324\sevenDaysExperimental\Mods\PlayerLogger\PlayerLogger.dll (this message is harmless)
2017-06-18T12:18:19 0.561 INF [MODS] Found ModAPI, creating instance
2017-06-18T12:18:19 0.561 INF d:\home\sid_250324\sevenDaysExperimental\saves/Random Gen/GHsave1\playerlogger
2017-06-18T12:18:19 0.562 INF [MODS] Loaded Mod: PlayerLogger (1)
2017-06-18T12:18:19 0.562 INF [MODS] Trying to load from SubSignup
Non platform assembly: D:\home\sid_250324\sevenDaysExperimental\Mods\SubSignup\SubSignup.dll (this message is harmless)
2017-06-18T12:18:19 0.562 INF [MODS] Found ModAPI, creating instance
2017-06-18T12:18:19 0.562 INF [MODS] Loaded Mod: SubSignup (1)
2017-06-18T12:18:19 0.563 INF [MODS] Trying to load from WorldConfigs
Non platform assembly: D:\home\sid_250324\sevenDaysExperimental\Mods\WorldConfigs\WorldConfigs.dll (this message is harmless)
2017-06-18T12:18:19 0.563 INF [MODS] Found ModAPI, creating instance
2017-06-18T12:18:19 0.564 INF [WorldConfigs] Base Config Already Backed Up
2017-06-18T12:18:19 0.579 INF [MODS] Loaded Mod: WorldConfigs (1)
2017-06-18T12:18:19 0.579 INF [MODS] Trying to load from WorldTools
Non platform assembly: D:\home\sid_250324\sevenDaysExperimental\Mods\WorldTools\WorldTools.dll (this message is harmless)
2017-06-18T12:18:19 0.580 ERR [MODS] Failed loading DLL
2017-06-18T12:18:19 0.580 EXC The classes in the module cannot be loaded.
ReflectionTypeLoadException: The classes in the module cannot be loaded.
 at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
 at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
 at Mod.BK () [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Logger:masterLogException(Exception)
Logger:Exception(Exception)
Log:Exception(Exception)
Mod:BK()
Mod:LoadFromFolder(String)
ModManager:LoadMods()
GameManager:Awake()

(Filename:  Line: -1)

2017-06-18T12:18:19 0.582 INF [MODS] Loading done

Link to comment
Share on other sites

OK Thank you ever

 

OK. I've updated the references and tested the builds and they are working now. I have just created new releases on github for 7dtmlib and the mods that rely on it, so you should be able to get the running if you download and install the latest releases.

Link to comment
Share on other sites

it works thanks

 

Can one set player privileges automatically?

 

I have created new releases for all of the mods, that include default permissions. You would need to delete the files in Data/7DTM and then update the mods for this to apply.

 

Alternatively, update the mods and then run the following commands in your command console to add the default permissions:

 

expermad

experm group setperm regular paydaylib.buy.*
experm group setperm regular chatcommands.bounties.*

experm user group <your username here> regular

expermad

This will switch you to a super user, add the permissions to the "regular" group and then assign your user to that group. Running epxermad again then removes you from the super user group.

 

You should then be able to use the "!help" chat command and see all of the available commands.

 

Thanks for the feedback!

Link to comment
Share on other sites

Great work!

I will definitely check it today. I just looking for a way to track block changes on the map to create private zones.

You cant imagine how happy I am.

Thank you for your work.

 

Thanks!

 

Just keep in mind, the event can't currently detect *WHO* changed a block.

Link to comment
Share on other sites

This look great Chrome. Im having a little difficulty understanding exactly how to use the features however.

 

For example the paydaylib commands how do i add the correct path to add an item? say pipeBomb for 10 coins.

 

I think i am getting a handle on the experm.

 

The world tools are fantastic, using them in buildign a custom POI now.

 

Customcommand i have absolutely no idea how this is implemented. I am assuming i would have to create a c# script using 7dtmlib and create a dll and save it into mods folder. Which i dont think im quite good enough to do atm.

 

Some more examples and instructions on how to use the mods would be fantastic.

 

Also a note: the bounty system i cannot add a bounty to myself because i have a space in my name. would be good to allow playerID as a second option for entering a bounty.

 

Ive got some ideas for some scripts that would be extremely useful for server hosts here. idk how much input you want in this are, but for expample(and i wish i was good enough to write it myself) A simple script to run some custom commands the first time a player logs into the server. i see you have the hooks in your API to do this i just dunno how to make it happen ^-^ This could be used by hosts to teleport players to a designated area on their first time log in and send some server pms to freshspawns with server info that doesnt need to be displayed in a motd.

 

Great work love the product.

Link to comment
Share on other sites

This look great Chrome. Im having a little difficulty understanding exactly how to use the features however.

 

For example the paydaylib commands how do i add the correct path to add an item? say pipeBomb for 10 coins.

 

I think i am getting a handle on the experm.

 

The world tools are fantastic, using them in buildign a custom POI now.

 

Customcommand i have absolutely no idea how this is implemented. I am assuming i would have to create a c# script using 7dtmlib and create a dll and save it into mods folder. Which i dont think im quite good enough to do atm.

 

Some more examples and instructions on how to use the mods would be fantastic.

 

Also a note: the bounty system i cannot add a bounty to myself because i have a space in my name. would be good to allow playerID as a second option for entering a bounty.

 

Ive got some ideas for some scripts that would be extremely useful for server hosts here. idk how much input you want in this are, but for expample(and i wish i was good enough to write it myself) A simple script to run some custom commands the first time a player logs into the server. i see you have the hooks in your API to do this i just dunno how to make it happen ^-^ This could be used by hosts to teleport players to a designated area on their first time log in and send some server pms to freshspawns with server info that doesnt need to be displayed in a motd.

 

Great work love the product.

 

I'm always open to suggestions for new mods or new features for existing mods.

 

ATM Paydaylib is more intended for mod developers who want to add support for their own mods. In saying that, it really does need a simple way for a server admin to add an item for sale, so I'll get onto that.

 

I'll be continuously updating the docs, so there will be more usage examples in the near future.

 

I've added a task to my list for updating the player bounty system. I'll update it so you can use the playername, steam id, or entity id to place the bounty. I'll also check through my other mods that have player based commands to do the same thing.

 

 

I'll also have a think about your idea for the custom commands when a player joins. I can't promise it any time soon as I have a few other mods I have to polish up for release, but I'll certainly keep it mind. I'd already though of creating a mod that would allow a server to define a "lobby spawn" that all players would be teleported to the first time they connect, but having something more generic that could run a list of supplied server commands would be even better!

 

Thanks for your feedback, I really appreciate it.

Link to comment
Share on other sites

Good work man!

 

One suggestion though. You imply that your dll can be used for reference in own mod code. Very true, BUT the pimps ModManager does not allow multiple dlls in a mod folder. So the copy local property of the reference will make mod not load.

 

So you might wanna update documentation, that your dll has to be registered in GAC for that to work. Making a deploy on restrictive hosts a hurlde to overcome.

 

Cheers

Link to comment
Share on other sites

Good work man!

 

One suggestion though. You imply that your dll can be used for reference in own mod code. Very true, BUT the pimps ModManager does not allow multiple dlls in a mod folder. So the copy local property of the reference will make mod not load.

 

So you might wanna update documentation, that your dll has to be registered in GAC for that to work. Making a deploy on restrictive hosts a hurlde to overcome.

 

Cheers

 

Thanks for the feedback! You are correct that the ModManager wont load mods with multiple dll files. But it does not need to registered with GAC, it simply needs to be installed in the Mods folder like any other mod. You are also correct that I need to make this clearer in the documentation. Thanks again for the feedback.

Link to comment
Share on other sites

Thanks for the feedback! You are correct that the ModManager wont load mods with multiple dll files. But it does not need to registered with GAC, it simply needs to be installed in the Mods folder like any other mod. You are also correct that I need to make this clearer in the documentation. Thanks again for the feedback.

 

Yeah true, but thats for the modders that want all your implemented functionality ;)

 

For me i would like to use only few of your awesome delegates. But its no prob as we all can dissasemble (if you dont mind (sourcecode would be better ;) )) and implement only what we need.

 

Thanks again. This is cool stuff.

 

Cheers

Link to comment
Share on other sites

 

Yeah true, but thats for the modders that want all your implemented functionality

 

 

Almost all of the features of 7dtmlib are optional. The only one that isn't is the Chat Commands, although I'm close to having that optional as well. Once I finish my next round of updates, you'll be able to configure which features you want to use.

 

 

But its no prob as we all can dissasemble (if you dont mind (sourcecode would be better ;) )) and implement only what we need.

 

Cheers

 

Hell no, I don't mind!! As for source, I'm pushing to have the code cleaned up, commented and up on Github some time soon after A16 stable is available.

Link to comment
Share on other sites

  • 2 months later...

Is there any way to detect a hit on your Land claim block ?

 

I am trying to get a sort of early Alarm system i.e someone hits a block on your land - that fires an even - i.e message to discord.

 

You get a sound when you hit someones land claim block so i presume it can be detected ?

Link to comment
Share on other sites

  • 9 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...