Adding a plugin? Solved
Posted 5 years ago
Hi, so ive wrote a small broadcast messages plugin, how do I get it listed on the site.
Mark
Posted 5 years ago
Sorry found it. Was looking in dashboard etc.
Posted 5 years ago
Last updated 5 years ago
There are existing broadcast plugins that work with the game on our site, so we would generally encourage plugins to be able to provide something unique if there are existing that already do the same.
In general though, Plugins > Add Plugin.
Posted 5 years ago
Last updated 5 years ago
Wulf, what broadcast plugin? The universal one spits all kinds of errors/warnings out. Id rather not use.
AutoBroadcast.cs: (97, 0): error CS1529: A using clause must precede all other elements defined in the namespace except extern alias declarations
AutoBroadcast.cs: (98, 0): error CS1529: A using clause must precede all other elements defined in the namespace except extern alias declarations
AutoBroadcast.cs: (105, 10): error CS0101: The namespace 'uMod.Plugins' already contains a definition for 'AutoBroadcast'
AutoBroadcast.cs: (102, 5): error CS0579: Duplicate 'Info' attribute
AutoBroadcast.cs: (103, 5): error CS0579: Duplicate 'Description' attribute
AutoBroadcast.cs: (114, 32): error CS0111: Type 'AutoBroadcast' already defines a member called 'LoadDefaultConfig' with the same parameter types
AutoBroadcast.cs: (125, 13): error CS0111: Type 'AutoBroadcast' already defines a member called 'OnServerInitialized' with the same parameter types
AutoBroadcast.cs: (154, 13): error CS0111: Type 'AutoBroadcast' already defines a member called 'Broadcast' with the same parameter types
AutoBroadcast.cs: (184, 10): error CS0111: Type 'AutoBroadcast' already defines a member called 'GetConfig' with the same parameter types
AutoBroadcast.cs: (186, 15): error CS0111: Type 'AutoBroadcast' already defines a member called 'Lang' with the same parameter types
AutoBroadcast.cs: (23, 56): error CS0229: Ambiguity between 'AutoBroadcast.random' and 'AutoBroadcast.random'
AutoBroadcast.cs: (23, 65): error CS0121: The call is ambiguous between the following methods or properties: 'AutoBroadcast.GetConfig<T>(string, T)' and 'AutoBroadcast.GetConfig<T>(string, T)'
AutoBroadcast.cs: (26, 53): error CS0229: Ambiguity between 'AutoBroadcast.interval' and 'AutoBroadcast.interval'
AutoBroadcast.cs: (26, 64): error CS0121: The call is ambiguous between the following methods or properties: 'AutoBroadcast.GetConfig<T>(string, T)' and 'AutoBroadcast.GetConfig<T>(string, T)'
AutoBroadcast.cs: (33, 12): error CS0121: The call is ambiguous between the following methods or properties: 'Plugin.LoadDefaultConfig()' and 'Plugin.LoadDefaultConfig()'
AutoBroadcast.cs: (53, 12): error CS0121: The call is ambiguous between the following methods or properties: 'AutoBroadcast.Broadcast()' and 'AutoBroadcast.Broadcast()'
AutoBroadcast.cs: (64, 24): error CS0229: Ambiguity between 'AutoBroadcast.interval' and 'AutoBroadcast.interval'
AutoBroadcast.cs: (79, 34): error CS0229: Ambiguity between 'AutoBroadcast.random' and 'AutoBroadcast.random'
AutoBroadcast.cs: (79, 125): error CS0229: Ambiguity between 'AutoBroadcast.nextKey' and 'AutoBroadcast.nextKey'
AutoBroadcast.cs: (82, 16): error CS0229: Ambiguity between 'AutoBroadcast.nextKey' and 'AutoBroadcast.nextKey'
AutoBroadcast.cs: (82, 26): error CS0229: Ambiguity between 'AutoBroadcast.nextKey' and 'AutoBroadcast.nextKey'
AutoBroadcast.cs: (82, 62): error CS0229: Ambiguity between 'AutoBroadcast.nextKey' and 'AutoBroadcast.nextKey'
AutoBroadcast.cs: (117, 56): error CS0229: Ambiguity between 'AutoBroadcast.random' and 'AutoBroadcast.random'
AutoBroadcast.cs: (117, 65): error CS0121: The call is ambiguous between the following methods or properties: 'AutoBroadcast.GetConfig<T>(string, T)' and 'AutoBroadcast.GetConfig<T>(string, T)'
AutoBroadcast.cs: (120, 53): error CS0229: Ambiguity between 'AutoBroadcast.interval' and 'AutoBroadcast.interval'
AutoBroadcast.cs: (120, 64): error CS0121: The call is ambiguous between the following methods or properties: 'AutoBroadcast.GetConfig<T>(string, T)' and 'AutoBroadcast.GetConfig<T>(string, T)'
AutoBroadcast.cs: (127, 12): error CS0121: The call is ambiguous between the following methods or properties: 'Plugin.LoadDefaultConfig()' and 'Plugin.LoadDefaultConfig()'
AutoBroadcast.cs: (147, 12): error CS0121: The call is ambiguous between the following methods or properties: 'AutoBroadcast.Broadcast()' and 'AutoBroadcast.Broadcast()'
AutoBroadcast.cs: (158, 24): error CS0229: Ambiguity between 'AutoBroadcast.interval' and 'AutoBroadcast.interval'
AutoBroadcast.cs: (173, 34): error CS0229: Ambiguity between 'AutoBroadcast.random' and 'AutoBroadcast.random'
AutoBroadcast.cs: (173, 125): error CS0229: Ambiguity between 'AutoBroadcast.nextKey' and 'AutoBroadcast.nextKey'
AutoBroadcast.cs: (176, 16): error CS0229: Ambiguity between 'AutoBroadcast.nextKey' and 'AutoBroadcast.nextKey'
AutoBroadcast.cs: (176, 26): error CS0229: Ambiguity between 'AutoBroadcast.nextKey' and 'AutoBroadcast.nextKey'
AutoBroadcast.cs: (176, 62): error CS0229: Ambiguity between 'AutoBroadcast.nextKey' and 'AutoBroadcast.nextKey'
Posted 5 years ago
The universal one (by me) is being updated for uMod. If there are errors though, then we would need to update uMod to handle the backward compatibility for Oxide if that is the issue.
We are still giving authors a chance to update for uMod before its release as well.
Posted 5 years ago
Ok, ill guess ill continue to use mine while the site catches up, I highly doubt this will be anytime soon though.
Posted 5 years ago
Last updated 5 years ago
markmozza
Ok, ill guess ill continue to use mine while the site catches up, I highly doubt this will be anytime soon though.
Plugin re-write nearly done. ;)
Also, can't reproduce the issue you had above. Plugin loaded just fine and is working. Did you accidentally load two copies in the plugins folder?
Posted 5 years ago
Ah fair enough, totally wasnt saying that to be a dick, I just know these things can take time. Ill delete all and try re-load let you know what happens.
Posted 5 years ago
No worries, and thanks!
Posted 5 years ago
Last updated 5 years ago
So after reloading, it worked, however, this does something different to mine. The message on mine appears on the center of the screen in big. Yours appears as chat messages.
Server.Broadcast(_config.Messages[current_message]);
Posted 5 years ago
markmozza
So after reloading, it worked, however, this does something different to mine. The message on mine appears on the center of the screen in big. Yours appears as chat messages.
Server.Broadcast(_config.Messages[current_message]);
The method used in uMod has Server.Broadcast as a chat message. I'll be adding a method for notices.
Posted 5 years ago
Last updated 5 years ago
Wulf
The method used in uMod has Server.Broadcast as a chat message. I'll be adding a method for notices.
Server.Broadcast(_config.Messages[current_message]);
I'm not sure what you mean, are you saying it's a bug? I want it this way, I don't want it in chat. The above code is what I have in my plugin. It does NOT appear in the chat at all.
Merged post
Hi, sorry to post on this again, but is
Server.Broadcast("NOTICE");
intended for notice or chat message? As I said it doesn't post a chat message, but an on-screen player notice. But you previous message states it is a chat message.
Posted 5 years ago
Sorry, misread what you had. https://gitlab.com/umod/games/valheim/-/blob/develop/src/ValheimServer.cs#L270-287
[gitlab.com]
Currently the method is a notice, but it'll likely get change to a chat message instead else changed to support multiple formats.
The plugin of mine goes to the chat because it uses a loop to loop over players and sends to them individually using IPlayer.Message instead. This provides localization per player rather than the static messages for just one. The same will be applied to IPlayer.Message, where we'd have a way to send a message to chat, the UI, etc. per game.
Locked automatically
5 years ago