Starting Simple (I hope)
One of the main reason I picked up this game was for the modding, especially since it is in Unity/C# and not in Java like Minecraft... I hate Java..... Figure I would start off with a simple mod. Which would be a MOTD that executes every nth minute. I followed the guide to set up the EcoModKit in Unity. My question now is after I right click and add Item where do I go. As the tutorial is for adding an actual item. I just want to use the chat messages found at the Chat Message Page Though it doesn't really give an example on what I would have to import. Also when I look at Custom-Chat-Commands Page it shows a few things to import.
So I imported them, though when I did Mono Develop shows them as not being found. Is this an issue with not having any of the game dll located in the EcoModKit and will it work once inside the /Mod/ folder of my server?
Got the idea from here. Though since it doesn't seam to be any other information about it I've gotten stuck.
My goal is when the Start() method is called from script I'm working on, I'll start a timer and during the Update() call if timer is greater than pre determined time then send out the chat message to everyone.
The modkit docs are in need of an update. They are somewhat out of date.
I would encourage you to start looking through the mods folder at all the items / objects and whatnot already in there. You can modify a lot as a good portion of the game logic is there. We have plans to further extent modding to more easily support adding what you describe which is more of a plugin.
If you have dev tier access of course, there is full source so you can somewhat easily do what you describe.
Unfortunately I didn't have enough cash for the Dev Tier. So I have to settle with what I was able to afford. Thanks for the suggestion of looking through the Mod Folder. I didn't think of that and it does sound like a good place to start.
To save you some time:
Client side modding is broken at the moment (adding art for new objects/icons/etc) - hence a lot of the modkit docs being out of date. The basic process will probably be similar however (making an asset bundle within unity, then placing that within your server exported mods folder).
Server side you can freely add new items, change whats there, go to town. This is all done by modifying files in the Mods folder, which are compiled at run-time when you launch the server. There isn't a whole lot of documentation, but feel free to ask away and I can try to help as best as possible.
@Metachronism Thanks again. Looking at how this works, via the /Mods/Misc/AdminChatCommands.cs has given me a lot of detail of what is needed to be done. Though my issue is still on sending chat messages. As I can't seem to find anything on sending a message in the mods folder yet. Though I am still looking. Maybe in a few months when I have some more cash saved up, I'll get the Dev Tier and be able to figure it out a lot faster. Though I still want to try.
EDIT: Found the send chat method for a player. Searching the entire folder helped a lot. So hopefully later tonight, I'll be posting a link to a download for a working MOTD mod for servers.
if you are using visual studio, you can add a project to auto-include all the mods files and then add references to the DLLs and get decent intellisense going:
the above will recursively include all the mod files as links, so you can easily edit them.
As of right now I'm on my mac. Once I get time and switch to my w10 side I will most likely do that. Though I think I found a different way than using the modkit. Testing it now. Though my C# knowledge is out dated and I have to change my timer set up. So far so good.
xamarin studio should open csproj / sln files just fine as well, though I don't have a huge amount of experience working with that IDE.
Yea I use Visual Code... I just don't like xamarin studio. Though I've gotten all my errors down to my Timer being set up wrong and BroadcastServerMessage as the Github page wiki is out of date. So I have to see if I can't figure out what other args that method needs.
EDIT: Now just down to Broadcasting the message.
ChatManager.Obj.BroadcastServerMessage("MESSAGE", saveToLog, "#CHANNEL");
Thanks for all the help. It works. Though the message is hard coded for now. I will need for it to be loaded from a file so it can be easily changed and saved so if the server crashes it won't show the hard coded one but load from the file of what it was last set at.