Aussie Cleetus
Members-
Content Count
138 -
Joined
-
Last visited
Everything posted by Aussie Cleetus
-
yeah I can confirm, links are dead.
-
I've been working on a fork of DaRT from DomiStyle's GitHub (linked) with some basic upgrades: An additional tab in the Settings called "Announcers" (working) An option to announce player login/logouts (working) An option to select the location of DayZServer_x64.ADM to be monitored (working) An option to announce player kills to server (working) Monitor ADM file for changes (not working) Grab kill lines from ADM file but strips the UID out of the line (not working) Announce player kills server-wide (working if the above "not working" components do their required tasks) I'm looking for some help from someone who understands filestream better than I obviously seem to after almost a week of near successes (closest I got was a trimmed partial line sent out about 10s after the kill). I figured adding this to DaRT would make sense, because all of the RCon protocol is already implemented. The login/logout announcement option can be used from any location as long as you can login to DaRT. NOTE: This implementation of ADM file reading will require local access to the file, so is not a solution for all servers, but it will definitely be an option for many. If anybody is willing and/or able to provide some assistance looking over what I have already to see where I could possible be going wrong with it, the plan is for it to be a completely free public release with source available to all. Here is the offending code: // added to Program.cs #region ADM Reader ADMReader myADMReader = new ADMReader(); if (Settings.Default.admFile.Contains("DayZServer_x64.ADM")) { myADMReader.Start(Settings.Default.admFile); if (myADMReader.hasUpdated) { rcon.HandleKillFeed(myADMReader.currentLineRead); myADMReader.hasUpdated = false; } } #endregion // added to Classes\RCon.cs public void HandleKillFeed(string killfeedinput) { if (Settings.Default.killFeed) { if (killfeedinput.Contains(" has been killed by player ")) { killfeedinput = Regex.Replace(killfeedinput, @"\(.*\)", ""); // Remove extra spaces. killfeedinput = Regex.Replace(killfeedinput, @"\s+", " "); //_form.Log("Kill Feed Message: " + killfeedinput, LogType.Debug, true); _client.SendCommand(BattlEyeCommand.Say, "-1 " + killfeedinput); } } } // code from Classes\ADMReader.cs (entirely new class to handle FileSystem Watcher and log reader) using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using DaRT.Properties; namespace ADMLogReader { class ADMReader { static private string _currentLineRead; static private bool _hasUpdated; public string currentLineRead { get { return _currentLineRead; } } public bool hasUpdated { get { return _hasUpdated; } set { _hasUpdated = value; } } public void Start(string file) { hasUpdated = false; Watch(file); } private static void Watch(string file) { string admFileName = Path.GetFileName(file); string admFileDir = new DirectoryInfo(file).Name; var watch = new FileSystemWatcher(); watch.Path = admFileDir; watch.Filter = admFileName; watch.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.CreationTime; //more options watch.Created += new FileSystemEventHandler(OnChanged); watch.Changed += new FileSystemEventHandler(OnChanged); watch.EnableRaisingEvents = true; } private static void OnChanged(object source, FileSystemEventArgs e) { if (e.FullPath == Settings.Default.admFile) { _hasUpdated = true; ReadMyFile(); } else { _hasUpdated = false; } } private static void ReadMyFile() { // if you want to read more lines change this to the ammount of lines you want const int LINES_KEPT = 2; string emptyLineRemover = ""; Queue<string> meQueue = new Queue<string>(); using (var fs = new FileStream(Settings.Default.admFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 16384)) using (var sr = new StreamReader(fs, Encoding.Default)) { string lineIn = string.Empty; while ((lineIn = sr.ReadLine()) != null) { if (meQueue.Count == LINES_KEPT) meQueue.Dequeue(); meQueue.Enqueue(lineIn); } _currentLineRead = meQueue.Dequeue(); emptyLineRemover = meQueue.Dequeue(); } } } }
-
unfortunately the ADM file no longer records the BE GUID, it is a different hash of the Steam64id. I'm not entirely sure where that formatted hash comes from (or if it is easily converted backward), but it is the same one the you get with player.GetIdentity().GetId().
-
Switch(player.GetIdentity().GetPlainId()){ case "user1steam64id": // -- insert your group assignment break; case "user2steam64id": // -- insert your group assignment break; }
-
It's easier to use their Steam64 id. https://guid2steamid.com/ to get their Steam64 from their GUID (to get player steam64 from dart/etc). player.GetIdentity().GetPlainId() player.GetIdentity().GetId() is NOT their BE GUID, it's different hash completely
-
The messages are kinda long, but not much can be done about that right now.
-
You'll find bigger problems after a while. To others, I suggest avoid this method. There are viable solutions out there but most forums are shutting down threads because BI specifically said not to try sharding.
-
There are rotation functions too. Because not all houses face the same way
-
Psuedo code means copy/paste won't work. Try providing your offending code and I can try to fix it
-
This will not work. SQLite files are locked by default to the program accessing them when the server is running. The 2nd server will fail to connect to the players db properly and will likely get all sorts of errors. This is not a viable solution.
-
ADVICE AND GUIDANCE - POST TIPS HERE!
Aussie Cleetus replied to TheVampireBat's topic in General Discussion
I hope not. I don't like the idea of 3rd party launchers. I never really have. Workshop, that's promising however. -
Comparing logs from 0.62 to 0.63, there has been a LOT of information taken out of the ADM files. 0.62 provided information on each hit on a player and the weapon as well as damage dealt and the kill. 0.63 sometimes might, if it's feeling generous inform you of maybe 1 in 5 kills. I'd like to see a return of useful information in the ADM files please. It really isn't much to add.
-
Same thing happened to me with an AK shooting at targets down a range on an unshared test server, so of course I was the only one online. No mods, completely vanilla. EDIT: forgot to mention I also had the same thing happen doing the same thing, but prone. I put in a ticket and it was stated to be a known issue with the PSO-1 Scope scheduled for a fix. It is related to you seeing your clothing when looking through the scope.
-
// add in RCon.cs under //if (Settings.Default.refreshOnJoin && message.EndsWith("disconnected") && !_form.pendingPlayers)" //{ // Thread thread = new Thread(new ThreadStart(_form.thread_Player)); // thread.IsBackground = true; // thread.Start(); //} <- Line 696 if (Settings.Default.announcePlayers) { string PlayerConnectOrDisconnectMessage = String.Join(" ", message.Split(' ').Skip(2)); if (PlayerConnectOrDisconnectMessage.EndsWith(" disconnected")) { _client.SendCommand(BattlEyeCommand.Say, "-1 " + PlayerConnectOrDisconnectMessage); } else if (PlayerConnectOrDisconnectMessage.EndsWith(" connected")) { string PlayerConnectedString; PlayerConnectedString = System.Text.RegularExpressions.Regex.Replace(PlayerConnectOrDisconnectMessage, @"\(.*\)", ""); // Remove extra spaces. PlayerConnectedString = System.Text.RegularExpressions.Regex.Replace(PlayerConnectedString, @"\s+", " "); _client.SendCommand(BattlEyeCommand.Say, "-1 " + PlayerConnectedString); } } // insert into GUIsettings.cs // //add under line: tooltip.SetToolTip(connectOnStartup.... tooltip.SetToolTip(announcePlayers, "If checked, DaRT will send an announcement in global chat for login and logout of each player."); //add under line: connectOnStartup.Checked = .... announcePlayers.Checked = Settings.Default.announcePlayers; //add under line: Settings.Default.connectOnStartup = .... Settings.Default.announcePlayers = announcePlayers.Checked; // THIS IS NOT SUPPOSED TO BE DONE, BUT IT WOULDN'T WORK UNLESS I manually added this to Settings.Designer.cs //added under lines: //[global::System.Configuration.UserScopedSettingAttribute()] //[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] //[global::System.Configuration.DefaultSettingValueAttribute("True")] //public bool showUnknownChat { // get { // return ((bool)(this["showUnknownChat"])); // } // set { // this["showUnknownChat"] = value; // } //} [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool announcePlayers { get { return ((bool)(this["announcePlayers"])); } set { this["announcePlayers"] = value; } } This is what I've modified. Only other thing is the [Design] for GUIsettings.cs to add the new tab and the checkbox named "announcePlayers". Added this just in case anyone was wondering exactly what I did.
-
I have modified the code from: https://github.com/DomiStyle/DaRT and added a new option to DaRT to announce player connected/disconnected via /say -1. You will find a new tab called "Announcers" in Settings. There is currently a single checkbox with the option to announce player login/logout. I can separate these to their own checkboxes if it is needed. I prefer to have both as a single option to toggle. DaRT with Login Feed Announcer I make no claim to the creation of DaRT. All credit goes to the respective developers and contributors of it where due.
-
ADVICE AND GUIDANCE - POST TIPS HERE!
Aussie Cleetus replied to TheVampireBat's topic in General Discussion
That doesn't work. Tested it up to 5000 Tonnes. Changing it on the server itself, is pointless, because the client calculates it's own weight, and if there is any form of communication spike, it defaults to the client's calculations. Max stamina still reduces, no matter what you change on the server side -
wow... someone made a paid version of dart from the dart source? that's a bit disgusting actually
-
there seems to be different items on my server
Aussie Cleetus replied to Quake Rocks's topic in Servers
Blue tents are invisible when unpacked. Car tents have full unpacked hitbox when packed, so you cannot get to them to pick them up, they also show inventory when packed. Tents are not working in any way. Barrels work as storage, but are very heavy to move anywhere. I don't think their other functions work properly, but you can poke holes in them which allows you to turn them into fireplaces, which also allows you to put a cooking pot on to cook (all tested). To add them, add this to your types.xml: <type name="Barrel_Blue"> <nominal>15</nominal> <lifetime>3888000</lifetime> <restock>0</restock> <min>10</min> <quantmin>-1</quantmin> <quantmax>-1</quantmax> <cost>100</cost> <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/> <category name="containers"/> <usage name="Village"/> <usage name="Town"/> <usage name="Industrial"/> <usage name="Farm"/> </type> <type name="Barrel_Green"> <nominal>15</nominal> <lifetime>3888000</lifetime> <restock>0</restock> <min>10</min> <quantmin>-1</quantmin> <quantmax>-1</quantmax> <cost>100</cost> <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/> <category name="containers"/> <usage name="Village"/> <usage name="Town"/> <usage name="Industrial"/> <usage name="Farm"/> </type> <type name="Barrel_Red"> <nominal>15</nominal> <lifetime>3888000</lifetime> <restock>0</restock> <min>10</min> <quantmin>-1</quantmin> <quantmax>-1</quantmax> <cost>100</cost> <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/> <category name="containers"/> <usage name="Village"/> <usage name="Town"/> <usage name="Industrial"/> <usage name="Farm"/> </type> <type name="Barrel_Yellow"> <nominal>15</nominal> <lifetime>3888000</lifetime> <restock>0</restock> <min>10</min> <quantmin>-1</quantmin> <quantmax>-1</quantmax> <cost>100</cost> <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/> <category name="containers"/> <usage name="Village"/> <usage name="Town"/> <usage name="Industrial"/> <usage name="Farm"/> </type> -
Great work, I was planning to do the same thing myself. You just saved me a lot of time.
-
thanks pilgrim**, I didn't know a solution, I just knew the root of the problem lol
-
your hard drive is struggling to keep up with the work demanded of it.
-
if it can't run windows 10, it's highly unlikely to perform well enough to host a server
-
Are there many people on this forum who are familiar with BEC Plugin coding? I'm trying to do a Player login/logout announcer Plugin. I've used the extend examples for player connect and disconnect. I get no errors at all, but at the same time, I also get no results happening either. PlayerAnnounce BEC Plugin - GitHub Any help would be greatly appreciated. I understand I could do this in the pbo's, but I'm trying to do it this way, because I want to limit the amount of edits I do in pbo files (to reduce the amount of work required restoring work done when updates happen to the Server code).
-
I agree that it has it's uses, just not often enough in my line of work (music teacher - lol). Though the plugin still reports no errors, user logins and logouts are not being caught. I added print() lines to debug, and it seems as if it's loading, but nothing is triggering. Nothing prints after "Self Instance Setup" is sent out to the console.
-
Thank you for the help. It's mostly the code from the example plugin, I only changed 4 lines. The code examples are poorly commented. I have no python experience myself, there are very limited real-world applications for it in my life, so I never bothered to learn it.