Fougerite Official

Fougerite Official 1.8.3C

No permission to download
  • IniParser is now thread safe by default.
  • Fixed the major issue with Entities not having values properly thus breaking many plugins using Entities
  • All the events are now being called in every plugin regardless whether one caused an error during the fire of the event. The exception of this is the chat/console events.
  • Fixed an issue where console event cancelled the chat event
  • Fixed up the script plugins timer class, they will be more robust, functioning better, less error prone
  • Fixed Command/Console restriction not working properly
  • Only Fougerite.dll updated

PATCHER UPDATED, RE-PATCH, OR USE THE PRE-PATCHED DLLS.

The past 21 days Fougerite went through lots of internal changes, which comes with bug fixes, improvements, and performance / stability increasements.

  • Rust++ updated
  • MoonSharp.Interpreter.dll updated
  • NewtonSoft dlls updated
  • Bunch of internal code fixes, code quality, and performance improvements
  • Lots of refactoring
  • Added Util.SplitInPartsLs
  • All string used in the core was changed from concatenation to interpolation
  • Fixed PlayerCache not saving the DateTimes properly https://github.com/Notulp/Fougerite/commit/e40d08341be0f88165f2ea939fc0da995c75df4c
  • Added UnhandledException event internally which should print unhandledexceptions into the log files, when the exception happens in timers or threads.
  • Introduces 3 new Cache types into Fougerite. EntityCache, NPCCache, SleeperCache. All these caches are being called from the internal netcull instantiation classes, or certain Rust Legacy manager classes. ALL these classes are thread safe, and they store all current Entities, NPCs, and Sleepers on their own. This is a major step in the Fougerite core It self, as the EntityCache It self procudes 10ms delay for copying and iterating 80000 objects, instead of UnityEngine's built in FindObjectsOfType, which causes crashes when used by threads/timers for being non thread safe, and FindObjectsOfType caused 800ms delay (0.8 seconds) causing laggs on 80000 objects. Plugins should no more worry of using World.Entities, as It is now directly using the EntityCache, and all old plugins should be performing way more faster than before. EntityCache makes the server use up to 100-150mb ram on 80000 objects. Your server should atleast have 4 (this is barely enough nowadays lol), but 8 gb RAM by the way. NPCCache, EntityCache, and SleeperCache is directly accessable from script plugins too if needed for some reason.
  • Added Server.ServerLoaded property.
  • Added Entity.ChangeOwner(ulong steamid)
  • Fixed an Entity HurtEvent error, where the decay wasn't properly handled. I wiped out the bullshit decay logic implemented by Riketta, and now It is properly handled. Also removed this useless usage from Rust++
  • Fixed a DestroyEvent error
  • Multiple functionalities were marked as Obsolete in the World class
  • Old World.Entities is now World.RangedEntities, and is marked obsolete
  • Added proper == and != implementations for the Entity, Player, NPC classes for easy comparism.
  • Added Entity bool GetObject<T>(out T type) function
  • Entity class's handlings were cleaned up
  • Added On_NPCSpawn event
  • Added NPC.HostileWildlifeAI property
  • Added NPC.BasicWildLifeAI property
  • Added NPC.InstanceID property
  • Added NPC.Damage() function
  • Added World.Animals
  • Added On_TimedExplosiveSpawned event
  • Added On_SleeperSpawned event
  • Added Sleeper.SleepingAvatar property
  • Server.GetRustPPAPI() is now marked as obsolete
  • Added DoorEvent.BasicDoor property
  • Added DoorEvent.Cancelled property
  • Added DoorEvent.State
  • Added World.Doors
  • Added World.Resources
  • Added HurtEvent.Cancelled (HurtEvent is now cancelled if HurtEvent.DamageAmount was set to 0f by a plugin)
  • PlayerCache.LastLogout and LastLogin is now in UTC time
  • Improved ConsoleEvent by minor code changes
  • Fixed Restriction check issue, case is now ignored when comparing the commands / console commands
  • Fixed internal chatreceived logic, OnChatRaw event should no longer fire if It was a command written in the chat, and It is restricted, meaning that Rust++ commands should no longer be accessible when commands are restricted
  • Almost all internal new Entity() was swapped to Entity.GrabOrAllocate to increase performance and maintain memory usage
  • Player.Structures / Deployables / Shelters / Storage / Fires are now all using EntityCache
  • Added bool GetComponent<T>(this GameObject gameObject, out T component) where T : Component extension method
  • Added some overloads for World.SpawnEntity
  • Added On_CommandRestriction event, reason for this is because we never had command registration over the years, and now that part is fucked, so here is an alternative solution
  • All Console/Command Restriction list is now thread safe
  • Fougerite went through tons of refactoring and code optimizations, I tried to cleanup most of the tragical issues, but I don't think alone I'll have any energy left for the rest
  • Fixed an old issue from 2016 that was quite trivial, but lacked the experience to see back then. https://fougerite.com/threads/fougerite-official.348/page-33#post-10567 You can now reference Assembly-CSharp from your script plugins without an issue
  • Added LastLogin, and LastLogout properties to the CachedPlayer class
  • Fixed a very trash inventory fix logic implemented by Riketta ages ago. https://github.com/Notulp/Fougerite/commit/c0b087fef137f5054d55932f4bbdf0abf4fd15a6#diff-5a31291786c67de060470fb99c016810cf5156585b076bc3658216dbe5c2a3b5L24 This is now handled in the main hook event instead of registering playerkilled event for each player, and leaving those events nowhere in the memory. Jesus...
  • Fixed CreateAsyncHTTPRequest for handling other response codes than 200, and 201. Your code should get called with the response codes, and if there is any message to read. https://github.com/Notulp/Fougerite/commit/c8db79d48d2896f01351e16452b748f62256cbec
  • Utilized the Stopper class during the cleanup of code. Almost every Hook class will now print if they are taking longer than 100ms. If you keep seeing these messages you probably have a plugin that causes lagg during execution.
  • Fixed up the Entity, and DataStore classes. They had very ugly code at some part, and bad error management. I'd say they are now sufficient. Also a bit at Util class.
  • Added On_AirdropCrateDropped event. More on this later when i have time to finish wiki for 1.8.1 and 1.8.2. You may ask on discord for usage or figure using github / source code
  • Added On_SupplyDropPlaneCreated
  • Upgraded patcher's Mono.Cecil to 0.9.6 so we are not so dead-ass outdated. Maybe one day I'll set it up for 0.1.0.0
  • Fixed a pathetic mistake for On_ConsoleWithCancel not being called for script plugins.
  • Fixed a pathetic mistake for On_PlayerSpawning not being called for script plugins due to naming convention mistake back in 2018.
  • Fixed up some weird ass decay logic from Riketta. I made the list ConcurrentList
  • Updated Rust++ just because it was using this weird decay logic, please update it along
  • Patcher updated, use prepatched dlls or patcher. Beware of the new Mono.Cecil dll files!
  • Like
Reactions: P0LENT4 and KankTry
  • Like
Reactions: P0LENT4 and KankTry
  • Fixed ConcurrentDictionary not having Clear() method
  • Fixed Rust++ references to Server.Cache causing errors, all of it is now using the correct functions. Update your RustPP dll.
  • Type of Server.Cache has been changed back to IDictionary to retain compatibility
  • Improved function calling speed for Python scripts
  • Sleeper class now uses PlayerCache to get the name of the player
  • https://github.com/Notulp/Fougerite/commit/3f1484244af71e27c8de307032ca196520695172
Tons of changes, they can be viewed here:

Appreciate @MrDan4es's testing during this release, and reports.


A Fougerite update after more than a year? Wasn't 1.7.9E supposed to be the "last" update of Fougerite?

Yeah, you might be saying that... and you would be right. Last year I have graduated as a Computer Science Engineer. During the years after my Java carrier in Minecraft, Rust Legacy was truly an astonishing journey. I was a noob, and totally new to the coding in terms of C# back in 2015. This project is the reason why I have gained so much experience, and started my path alongside the current jobs I have, and my reverse engineering career. From 2020, and during these absent months I never even bared to look at Fougerite's discord. I knew that so many things could be improved with my knowledge yet I wanted to let this project go. There are always fresh people, maybe not a lot, but there still are who join into the world of rust legacy, to start and gain experiences on how things were working during the Fougerite life cycle. Researching, facing problems, and what not.

So I couldn't just let this project go, and I still promised I'd push out a big release with all the fixes I had in my mind. All the problems that I didn't understand in 2015-2018. Obviously there are still things to work on, but most of the things cannot be caved out due to many plugins relying on the current API's build up. Even though there are parts that are clean, there are parts that should be cleaned up, or solved.

To be honest, I currently have 3 projects I work on, and there is absolutely no chance I'd take on updating Fougerite regularly. However I do wish to sometimes make hotfixes, and propose new opportunities that can be still caved out from legacy. What you can put into or make out of this depends on you honestly.

Since 1.8.0 is done, my next aim will be to do a similar big stabilization update for RustBuster. There is going to be plenty of work needed right there. Anyway, enough with the words, here are the changes briefly.

* A new event: On_ConsoleWithCancel. This event allows you to cancel console commands easily. This was not possible before, but now It pretty much is. :) More on this on the wiki later.
* Fougerite has been upgraded to the latest C# version. (The language, API set is still Mono, .NET 3.5)
* Tons of refactoring, and clean up in the project. And this was really a big work.
* Fougerite is now built via SERVER preprocessor. Some API sets in Rust Legacy Server checks for the SERVER constant, and since I just patched one function using It, It was necessary to declare.
* Lots of Code quality improvements
* Fixed an issue at HurtEvent, where in some cases It would assign the "Attacker" property to the "Victim" property as well, causing a mismatch between the two players. (I only noticed this by code, surprised that nobody noticed this through the years lol https://github.com/Notulp/Fougerite/pull/152/files#diff-f051a1552b30c8caec3394e122aa6ea5a6e70d0d1b886bf4dc577fe32df00286L73)
* Removed useless, or unused patching functions.
* A new event: On_GrenadeThrow. This event can be used in any scripting language unlike the shooting events which are only available for C#. More on this on the wiki later.
* Added SuperFastHash algorithm to the API.
* You can now use Util.GetUtil().SuperFastHash(string), Util.GetUtil().SHA1Hash(string), Util.GetUtil().MD5Hash(string) to generate hashes for specific inputs.
* The Web class has been completely reworked. Web.GET, Web.POST, Web.GETWithSSL, Web.POSTWithSSL have been marked as obsolete. These are blocking functions, and they shouldn't be used on the main thread unless you intentionally tend to cause laggs on the server. I have added tons of new references (dlls), which gives the opportunity for the inner .NET API to access new functions, and with this you also have deeper .NET API available. One of this is that we are now able to process new modern TLS protocols / SSL certificates on websites. Web class defines a default connection limit count of 200 now.
* Web.CreateAsyncHTTPRequest(url, callback, method, headers, timeout, compression) has been added. More on this on the wiki later.
* NewtonSoft has been updated to the latest version.
* Oracle Mysql has been updated to 6.9.8, the latest possible version we can update to.
* Following DLLs were added or updated: Mono.Data.Tds.dll, Mono.Security.dll, Mysql.Data.dll, Mysql.Data.CF.dll, Mysql.Data.Entity.dll, Mysql.Fabric.Plugin.dll, Mysql.Web.dll, System.Data.dll, System.Drawing.dll, System.Runtime.Serialization.dll, System.Xml.dll, System.Xml.Linq.dll (These contain new APIs, bugfixes, and what not)
* Facepunch.MeshBatch dll's issue has been re-patched. Instead of a crappy try catch, we actually check for the gameobject being null, thus avoiding the exception. (https://fougerite.com/threads/nullreferenceexception-on-entity-destroy.435/#post-4644 )
* A new set of .NET 4.0 standardized classes implemented. ConcurrentDictionary, ConcurrentEnumerator, ConcurrentList, LockCookie, LockQueue, ReadWriterLock. You can use these in your plugins! Go look these up on google, and read the microsoft documentation page what they are for. Basically these are classes that we should have implemented years ago. Some things in legacy must be done on a new thread if we want to avoid causing laggs to the server. However, there are functionalities after that must be ran on the main thread to avoid crashes from UnityEngine. For that purpose we introduced the class Loom which old developers already know about. It's on the wiki.
For example, ConcurrentDictionary, and ConcurrentList is a Dictionary, and List in C#, but they are thread safe, meaning that multiple threads can access these collections, and safely modifying them, instead of causing errors while they update the same entires.
* Fougerite's main config reading now handles errors, and logs them if they were to happen
* I shall introduce the new Cache system, the PlayerCache. This cache stores the connected player's history, meaning that the steamid stores the player's current name, used names in the past, and all the used IP addresses. It can be used via the PlayerCache class from script plugins, more on this later. This cache is thread safe, and Fougerite uses It to find the name of entities owners, when they didn't connect since last start (As rust doesn't store this info), and can be used for many other things as well.
* Server.Players is now completely thread safe, and the same goes for the Server.Cache (Well almost..). Server.Cache can be directly accessed to retain API functionality, but this shouldn't be used in this way, It should be Server.GetCachePlayer(steamid) that should be used instead. This cache by default from server runtime stores all the connected player's Player class, and we use this in the API to quickly find the players that we are looking for by ID.
* I shall introduce the new PermissionSystem! This has actually been slipped into 1.7.9E, but not in a perfect condition, and not finished either. Now all the API is finished, some bugs were fixed, and the good news is that PermissionSystem is also thread safe! This was actually a very necessary standardization needed for the plugins, and If I remember well, I updated almost all of my plugins for this. There are some I need to finish as well.
Before you upgrade, please open up Save/GroupPermissions.json via Notepad++ program, and check all entries. Look for the "UniqueID" properties, and ensure that every number is not a negative one. Where you spot a '-' sign just delete those and save the file. Or you can just delete GroupPermissions if you haven't been using It at all.
* For this new PermissionSystem I wrote a new plugin as well to complement It. You can find It in the Modules folder under "PermissionManager". This plugin contains several new commands, that you can use to manage users and groups, and their permissions. More on this later on the wiki.
* Rust++ now completely supports PermissionSystem. It uses the same permission names as It used already.
* Patching is required. Use the Patcher on cleaned dlls, or use the prepatched dlls from the prepatch folder!

Gathering all these new dlls were taking efforts, mostly due to the fact that we are limited in a specific mono API.
I guess for the future we could attempt upgrading to new versions as well, and I should implement our already existing AppDomains from RustBuster to Fougerite.
Obviously this is not all the full changes but the most important ones. Next update is for RustBuster in some days hopefully. Enjoy this fresh update, should make your server a lot more smoother already!
Fixed download link lmao.
Given the ability to temporarily remove all permissions of a player like a Restriction or smh in the PermissionSystem API.
Made script plugins to access the PermissionSystem easier.

  • Like
Reactions: KankTry and KINGER
  • Like
Reactions: KankTry and KINGER
Fixed the compatibility issue with the Logger.LogError function.
  • Like
Reactions: KankTry and KINGER
  • Like
Reactions: KankTry and KINGER