Jump to content

Client+: Cheat-free client-side chat commands (v1.0.0)


Milo Christiansen
 Share

Recommended Posts

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.
Edited by Milo Christiansen
Link to comment
Share on other sites

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

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

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

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  

 

[Edit:] I moved subsequent discussions to the questions board so as to not hijack milos mod thread:

 

Link to comment
Share on other sites

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!

 

 

Edited by Stroam
Link to comment
Share on other sites

  • 3 weeks later...
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.