Milo Christiansen Posted February 9, 2018 Report Share Posted February 9, 2018 This mod adds a few simple chat commands to the VS client. The mod does not need to be installed on the server, just add the dll to your "Mods" directory and the commands will be available to use in both single and multi player. Currently there are only a few commands, more are planned for later. ".moon": Prints the current moon phase. Great for judging if you will be able to work outside during the night, before nightfall. ".client+": Change configurable options. Call with no arguments for a list of options. Other features include: A (customizable) sound is played every time a chat message is received, a player joins, or a player leaves. The chat log actually has stuff in it now! All chat messages are logged to the chat log (in the vanilla game the chat log is empty). Suggestions for more commands are welcome, provided that A) they are not cheats or otherwise unfair for only some players on a given server to have and B) they can be implemented without a server component. To install this mod, download the zip and add it to the "Mods" directory in your Vintage Story directory, no need to extract it or anything. ClientPlus.1.0.0.zip Sound Configuration: If you do not like the default sounds, you can change them. To change the default sound, find a sound you like in "assets/sounds/" and type ".client+ chat-sound <sound path>" into the game chat. "<sound path>" should be the asset path used by the sound you want without the "sounds/" prefix and ".ogg" suffix. For example, the default chat sound is "sounds/block/anvil3.ogg", but you would type ".client+ chat-sound block/anvil3". If you want to use a sound in a domain other than "game", simply add the domain to the sound name separated by a colon like so: "game:block/anvil3". When you change a sound setting the game will immediately play the selected sound. If the sound does not play you probably goofed the path up. If you really mess things up and just want to go back to the defaults, you can delete the config file ("%appdata%/VintagestoryData/client+.cfg" on Windows). Changes: 1.0.0 Removed .online, use .clients Updated to work with 1.6.0 and newer. It should still work with 1.5 0.5.0 Fixed a issue with loading on 1.5.2.3 and newer. Mod is now packed in a zip so you don't need to worry about unblocking the DLL. 0.4.0 Added two more sounds, one for group invites, and one for notification messages (off by default, since they are really spammy). If you turn a sound on or off it will now remember that setting. Added a debugging mode to ".online" to maybe help find an annoying game bug. 0.3.0: Added sound alerts for players joining and leaving. Added the ability to change and disable alert sounds (use the ".client+" command). Added a bunch of logging to help identify game bugs related to chat and the online player list. The client chat log isn't empty anymore! 0.2.0: Updated to 1.5.1 Added chat message received alerts. Link to comment Share on other sites More sharing options...
Shaun Graham Posted February 10, 2018 Report Share Posted February 10, 2018 Thanks! I'm trying to use the ".online" command on the public server, and it is returning, "Command online not found". I put the .dll into the mods directory, as per instructions. However, might it be that because no one is currently online I'm getting that response? Link to comment Share on other sites More sharing options...
Milo Christiansen Posted February 10, 2018 Author Report Share Posted February 10, 2018 If no one is online it should return just your name. Are you sure you put it in the correct directory? There should be a couple of other DLLs already there. Also, in "client-main.log" there should be a line like this: Loaded x mod classes (... ClientPlus.ClientPlus ..) If "ClientPlus" isn't in the list then the game isn't loading it for some reason. Anyway, ".online" is super unreliable right now due to a bug in the game. Next version should work much better, and there will be more than just two commands. Link to comment Share on other sites More sharing options...
Milo Christiansen Posted February 17, 2018 Author Report Share Posted February 17, 2018 Added chat message received alerts, this feature needs 1.5.1. Link to comment Share on other sites More sharing options...
tony Liberatto Posted February 18, 2018 Report Share Posted February 18, 2018 Not working for me. It just says Command not found. Question, should I add to the install folder or to the AppData folder? I added it to the Install folder where I also have the creative and survival files. Link to comment Share on other sites More sharing options...
Milo Christiansen Posted February 18, 2018 Author Report Share Posted February 18, 2018 It sounds like you put it in the right place. Does "client-main.txt" have a line something like the following in it? Loaded x mod classes (... ClientPlus.ClientPlus ...) If so, then exactly what command are you trying to use? ".online" and ".moon" (without quotes) are the only two commands. Does the game play a clanking sound when you get a chat message? Link to comment Share on other sites More sharing options...
Tyron Posted February 18, 2018 Report Share Posted February 18, 2018 14 hours ago, tony Liberatto said: Not working for me. It just says Command not found. Question, should I add to the install folder or to the AppData folder? I added it to the Install folder where I also have the creative and survival files. You need to add it to the mods folder Link to comment Share on other sites More sharing options...
tony Liberatto Posted February 18, 2018 Report Share Posted February 18, 2018 This is where the file is. I still do not see the Loaded line in the "client-main.txt" and the commands do not work in the server. Link to comment Share on other sites More sharing options...
Tyron Posted February 18, 2018 Report Share Posted February 18, 2018 Can you upload the client-main.txt please? Link to comment Share on other sites More sharing options...
tony Liberatto Posted February 18, 2018 Report Share Posted February 18, 2018 client-main.txt Link to comment Share on other sites More sharing options...
Milo Christiansen Posted February 18, 2018 Author Report Share Posted February 18, 2018 Ahh, the game errors out trying to load the mod, and it looks like it isn't my fault! whew I'm not sure exactly what is wrong here (I'm not very experienced with .NET) but @Tyron will probably know what to do. Link to comment Share on other sites More sharing options...
Stroam Posted February 18, 2018 Report Share Posted February 18, 2018 @tony Liberatto Let me know when this is working correctly for you. I'd also like to see who all is online. Link to comment Share on other sites More sharing options...
tony Liberatto Posted February 18, 2018 Report Share Posted February 18, 2018 I hope they can fix it quickly. It is a must for online playing. Link to comment Share on other sites More sharing options...
Milo Christiansen Posted February 19, 2018 Author Report Share Posted February 19, 2018 The ".online" command doesn't work right now in any case, since the part of the API it depends on doesn't work properly (I'm hopeful that it will work in the next bugfix version). However, the incoming message alert does work, and it is completely awesome When ".online" works I'll be sure to let everyone know. Link to comment Share on other sites More sharing options...
Tyron Posted February 19, 2018 Report Share Posted February 19, 2018 According to your client-main.txt: Quote "An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information." Did you install the game on a network drive? You might either need to Install the game on your local drive, like C:\ or do this https://stackoverflow.com/a/28339117/1873041 [Edit:] I moved subsequent discussions to the questions board so as to not hijack milos mod thread: Link to comment Share on other sites More sharing options...
Milo Christiansen Posted February 21, 2018 Author Report Share Posted February 21, 2018 Ok, the issue preventing ".online" from working seems to be fixed. I haven't tested it fully yet, but it should work. No need to update the mod, it should Just Work assuming your game is version 1.5.1.1 or newer. Link to comment Share on other sites More sharing options...
Stroam Posted February 23, 2018 Report Share Posted February 23, 2018 In the VintagestoryData folder Spoiler Failed loading mod set ClientPlus.dll. Won't load this mod. Exception: System.IO.FileLoadException: Could not load file or assembly 'file:...\VintagestoryData\Mods\ClientPlus.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) File name: 'file:...\VintagestoryData\Mods\ClientPlus.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information. at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at _x4LTa5xMRotZpSIJmkbdD99l0Nb._UQUVaM1Y2s240ZHPAblf8zHfQ9w(ModSet , String , List`1 ) In the Vintagestory folder Spoiler 23.2.2018 00:36:32 [Error] Failed loading mod set ClientPlus.dll. Won't load this mod. Exception: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\Stroam\AppData\Roaming\Vintagestory\Mods\ClientPlus.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) File name: 'file:///C:\Users\Stroam\AppData\Roaming\Vintagestory\Mods\ClientPlus.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information. at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at _x4LTa5xMRotZpSIJmkbdD99l0Nb._UQUVaM1Y2s240ZHPAblf8zHfQ9w(ModSet , String , List`1 ) 1 using the .cs Spoiler 23.2.2018 00:45:07 [Error] Failed loading a mod c:...\VintagestoryData\Mods\ClientPlus.cs:11 CS1519 Invalid token '=' in class, struct, or interface member declaration c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:11 CS1519 Invalid token '{' in class, struct, or interface member declaration c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:12 CS1519 Invalid token '=' in class, struct, or interface member declaration c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:13 CS1519 Invalid token '=' in class, struct, or interface member declaration c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:14 CS1519 Invalid token '=' in class, struct, or interface member declaration c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:15 CS1519 Invalid token '=' in class, struct, or interface member declaration c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:18 CS1518 Expected class, delegate, enum, interface, or struct c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:20 CS1518 Expected class, delegate, enum, interface, or struct c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:22 CS1518 Expected class, delegate, enum, interface, or struct c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:24 CS1518 Expected class, delegate, enum, interface, or struct c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:36 CS1518 Expected class, delegate, enum, interface, or struct c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:40 CS1518 Expected class, delegate, enum, interface, or struct c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:44 CS1518 Expected class, delegate, enum, interface, or struct c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:46 CS1518 Expected class, delegate, enum, interface, or struct c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:46 CS1518 Expected class, delegate, enum, interface, or struct c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:48 CS1518 Expected class, delegate, enum, interface, or struct c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:51 CS1518 Expected class, delegate, enum, interface, or struct c:\Users\Stroam\AppData\Roaming\VintagestoryData\Mods\ClientPlus.cs:61 CS1022 Type or namespace definition, or end-of-file expected 23.2.2018 00:45:07 [Warning] Mod Set ClientPlus.cs could not be loaded and will be ignored! Link to comment Share on other sites More sharing options...
Milo Christiansen Posted February 23, 2018 Author Report Share Posted February 23, 2018 OK, Tyron figured out what the problem was. Windows was being a jerk about downloaded files @tony Liberatto: Check out the revised install instructions, and it should work for you now. Link to comment Share on other sites More sharing options...
tony Liberatto Posted February 23, 2018 Report Share Posted February 23, 2018 Shouldn't this just be added to the core game? It is such a basic feature that I can't see any player wishing not to have it. Link to comment Share on other sites More sharing options...
Milo Christiansen Posted February 23, 2018 Author Report Share Posted February 23, 2018 Yeah, but until it is, there is this mod. Link to comment Share on other sites More sharing options...
Milo Christiansen Posted February 25, 2018 Author Report Share Posted February 25, 2018 New version, new features (some of which don't work yet, but will probably spontaneously start working in a future game update). Link to comment Share on other sites More sharing options...
heptagonrus Posted March 18, 2018 Report Share Posted March 18, 2018 Yesterday HelDM visited the official server, but .online didn't show his name. It seemed it was "empty", because .online showed an additional comma in the list. I think he visited before 1.5.2 was released, so he could not be using it. Spoiler Link to comment Share on other sites More sharing options...
Milo Christiansen Posted March 18, 2018 Author Report Share Posted March 18, 2018 Yeah, known issue. AFAIK the cause is a game bug, something to do with the game unloading distant entities. Link to comment Share on other sites More sharing options...
tony Liberatto Posted March 19, 2018 Report Share Posted March 19, 2018 Hey Milo, would it be possible to add the mod version number to the file? I was reinstalling my single game and for a moment had no idea what version of client+ I had. Link to comment Share on other sites More sharing options...
Milo Christiansen Posted March 19, 2018 Author Report Share Posted March 19, 2018 To the file name? Sure, I'll do that next version. The version number is in the metadata, so you can see it from the mod manger, but that is somewhat cumbersome. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.