Me by my self is right now trying to create a Broadcasting Plugin to Simulate ingame Radio Stations which players can Register thair own Radio Station and or Listen to one. Still somewhat new to C# i am hanging on the problem to get the used OnPlayerVoice obejct modified/working so it recives but also transmitts the voice to a group or specific player. Is there any snippets or Documentary how such a thing in an easy axample might get to work?
Using voice chat as in-game radio?Solved
- 1
- 2
Hey!
I think I can make something like that just will need some time
I think I can make something like that just will need some time
hm well if others and i are allowed to look over your code and maybe use it. it would be great. there is also another question. i see that the object OnPlayerVoice uses Byte[] data and i am asking my self how is the voice ingame handled? is there in any sort a RMTP and if how can i access it and use it? I know that the server it self is used to recive and transmit voice data but how? Knowing the used voice transmitting engine used in rust would help allot.
Rust uses steams voip. How its transmitted from steam through server to clients I have no clue. Lol
But cool idea you have going here.
But cool idea you have going here.
In response to Wulf ():It was P2P in the past, but the server is now a middleman as of a few months ago I believe.
Ah ya I dunno how they have it exactly. I know setting mic can be a pain sometimes since hardware selection has to be selected in steam instead of in Rust options. Unless I am missing it in Rust somewhere lol.
Merged post
Rust always gives me trouble when trying to get voicemeeter setup the way I want it. I get discord and other stuff way I want and bam rust ingame voice wont work but other games it will just by making selection in game setting for sound plug to use lol.
Merged post
Rust always gives me trouble when trying to get voicemeeter setup the way I want it. I get discord and other stuff way I want and bam rust ingame voice wont work but other games it will just by making selection in game setting for sound plug to use lol.
admin radio the plugin is called its not available on here
In response to Gamingoutlaws ():Rust uses steams voip. How its transmitted from steam through server to clients I have no clue. Lol<...
Steams VoiP you say? hm thanks, that might helped allot.
Merged post
Hi there again,
i did some fourthr coding and now i wanted to use a text based data base. So i looked into the samples and stumbled over Data Files. Now i have a problem.
Under
But when i just for testing copy it into a new plugin sample file (with the start setup for creating oxide mods) in the given method
the compiler tells me that dataFile needs to be deklared as variable.
But if i am defining it, the oxide compiler tells me that dataFile is already set as a variable and can´t be deklared again... So as still a beginner i got brain fucked. ^^
Merged post
Hi there again,
i did some fourthr coding and now i wanted to use a text based data base. So i looked into the samples and stumbled over Data Files. Now i have a problem.
Under
# Using a data file
there is a code sample.But when i just for testing copy it into a new plugin sample file (with the start setup for creating oxide mods) in the given method
private void Init()
{
Puts("A baby plugin is born!");
}---using System;
using Oxide.Core;
namespace Oxide.Plugins
{
[Info("broadcaster", "zyankali", "0.1.0")]
[Description("Placeholder")]
class Broadcaster : CovalencePlugin
{
private void Init()
{
DynamicConfigFile dataFile = Interface.Oxide.DataFileSystem.GetDatafile("MyDataFile");
dataFile["EpicString"] = "EpicValue";
dataFile["EpicNumber"] = 42;
dataFile.Save();
}
// The rest of the code magic
// TODO (you): Make more epic stuff
}
}the compiler tells me that dataFile needs to be deklared as variable.
using System;
using Oxide.Core;
namespace Oxide.Plugins
{
[Info("broadcaster", "zyankali", "0.1.0")]
[Description("Placeholder")]
class Broadcaster : CovalencePlugin
{
private void Init()
{
//Deklare dataFile (Ass the compiler told to do... results in that the compiler says DON´T deklare it
// becouse it´s already deklared.... WTF!)
string dataFile;
//Example code
DynamicConfigFile dataFile = Interface.Oxide.DataFileSystem.GetDatafile("MyDataFile");
dataFile["EpicString"] = "EpicValue";
dataFile["EpicNumber"] = 42;
dataFile.Save();
//End of example code
}
// The rest of the code magic
// TODO (you): Make more epic stuff
}
}
But if i am defining it, the oxide compiler tells me that dataFile is already set as a variable and can´t be deklared again... So as still a beginner i got brain fucked. ^^
A DynamicConfigFile is not a string, it's a DynamicConfigFile.
You declare a 'dataFile' var of type 'string' and then you declare another var with the same name (which is unsupported by C#) of type DynamicConfigFile, haven't you been warned by your IDE for performing such curious move?
As for the answer to your question 'and this means....?' - this means that string var will output an object of type 'string' from 'String' class and a DynamicConfigFile will output object of type 'DynamicConfigFile' defined in class DynamicConfigFile.
UPD. I missed your comment that You have been warned by IDE already. That's a good practice to read what IntellySense is trying to say =)
As for the answer to your question 'and this means....?' - this means that string var will output an object of type 'string' from 'String' class and a DynamicConfigFile will output object of type 'DynamicConfigFile' defined in class DynamicConfigFile.
UPD. I missed your comment that You have been warned by IDE already. That's a good practice to read what IntellySense is trying to say =)
Hello,
I'll give you an update on this topic. I looked around, talked to others and continued writing myself... now I did it! Unfortunately there are some remarks.
1 As Rust is currently working it is NOT possible to create a radio station or to listen to it without creating external invisible sources at the "listeners".
2. because Rust already uses its own IngameVoice system, it is not possible to add another one. Especially since the server simply refuses/cannot process it. And yes I know you could copy the voice data and process it further... if you could only look into the sourcecode of Rust ;).
3. i had to develop my own client -> server solution which, however, in itself makes the idea null and void since you could theoretically use discord or teamspek as a radio replacement.
Also I had to go from C# back to C++ to at least make sure that the server itself can act effectively without unnecessarily burdening the CPU. Unfortunately this excludes the possibility to create and upload a plugin for UMod. But I already tested it on my test branch and it works fine.
What had to be done.
I had to write a plugin for UMod in C# which simply handles the logon and logoff functions of the radio stations and listeners. Since it seems that UMod doesn't currently allow SQL, I had to resort to a text based database.
In C++ I then had to program an interface which accesses the text file and reads it correctly. Then I had to recognize the micro and send it via client-server technique to other listeners what the sender is sending and to supply the listeners who were registered in the database with the data before. It works. But it also means that the server has to allow you to install extra software, which most servers you can rent but don't allow.
Also the plugin doesn't work without the extra.
So an addon of the base would be necessary.
In short, it is currently NOT possible without extras or meaningless workarounds to set a radio station in Rust using the plugin dynamic except Rust itself allows this in a way. But then the developers of rust have to insert this and make it possible.
Solong Zyankali
I'll give you an update on this topic. I looked around, talked to others and continued writing myself... now I did it! Unfortunately there are some remarks.
1 As Rust is currently working it is NOT possible to create a radio station or to listen to it without creating external invisible sources at the "listeners".
2. because Rust already uses its own IngameVoice system, it is not possible to add another one. Especially since the server simply refuses/cannot process it. And yes I know you could copy the voice data and process it further... if you could only look into the sourcecode of Rust ;).
3. i had to develop my own client -> server solution which, however, in itself makes the idea null and void since you could theoretically use discord or teamspek as a radio replacement.
Also I had to go from C# back to C++ to at least make sure that the server itself can act effectively without unnecessarily burdening the CPU. Unfortunately this excludes the possibility to create and upload a plugin for UMod. But I already tested it on my test branch and it works fine.
What had to be done.
I had to write a plugin for UMod in C# which simply handles the logon and logoff functions of the radio stations and listeners. Since it seems that UMod doesn't currently allow SQL, I had to resort to a text based database.
In C++ I then had to program an interface which accesses the text file and reads it correctly. Then I had to recognize the micro and send it via client-server technique to other listeners what the sender is sending and to supply the listeners who were registered in the database with the data before. It works. But it also means that the server has to allow you to install extra software, which most servers you can rent but don't allow.
Also the plugin doesn't work without the extra.
So an addon of the base would be necessary.
In short, it is currently NOT possible without extras or meaningless workarounds to set a radio station in Rust using the plugin dynamic except Rust itself allows this in a way. But then the developers of rust have to insert this and make it possible.
Solong Zyankali
In response to zyankali ():Hello,
I'll give you an update on this topic. I looked around, talked to others and conti...
- You can use the in-game voice system in Rust to send byte[] data to other players from the server, so it is possible without an external source
- Oxide/uMod does allow SQL, we even bundle extensions for this which you can find with every download; there are even plugins that utilize this and have for the past few years
A general idea of how to send voice data to a collection of players:
Net.sv.write.PacketID(Message.Type.VoiceData);
Net.sv.write.UInt32(player.net.ID);
Net.sv.write.BytesWithSize(byte[] data given here);
Net.sv.write.Send(new SendInfo(IEnumerable<Connection> collection of players)
{
priority = Priority.Immediate
}); Locked automatically
- 1
- 2