Oxide Changes/Add - List of SuggestionsSolved
Hello,

I wanted to know if it's possible to add/change few things for Oxide ( Rust ) ;

- Remove the restriction of System.IO or add the ability to remove a file with the Oxide DataFileSystem ( just for datas / config files ).

- Remove the restriction of System.Threading to be able to use the System.Threading.Tasks.

- Rework the UI system, it's actually impossible to create advanced UI with good performances, possibility even with a Custom Library ( too many elements to draw => player ping issues + player GC ), I need to put a coroutine on the draw system to make it work without big issues and it's still not perfect.

Example of UI :

https://i.gyazo.com/856f01c12292354d1e603f132258ce94.mp4

 

- Rework the OnPlayerInput Optimization ( OnPlayerTick / OnReceivedTick are too fast ( 250 players && 2 pluggins use OnPlayerInput =>  0.0625 * 250 * 2 => 8000 OnPlayerInput Call per second ).

- Fix the duplication of the enumeration row in the config/data files when they are here as default.

        public enum test { test1, test2 };

        public CFileData CFile;

        public class CFileData
        {
            [JsonProperty(PropertyName = "Oxide Test")]
            public Dictionary<test, bool> oxideTest { get; set; }

            public CFileData()
            {
                oxideTest = new Dictionary<test, bool>
                {
                    { test.test1, false },
                    { test.test2, true }
                };
            }
        }
​


- Fix the CanNetworkTo, it cause some random NRE errors.

- Change the private void Tick_Spectator()  to public virtual void Tick_Spectator() ( It's not clean at all to override the default spectate system because this function / variables restriction )

Thanks in advance,
^6MyBad'
  1. The System.IO restriction is there for the protection of server owners and shared providers, this isn't being removed. If you want full access, you can write extensions for personal use that are not sandboxed.
  2. System.Threading is restricted as this is a tricky thing to work with in most servers, and easy to mess things up. Once again, you want full access, you can write extensions for personal use that are not sandboxed.
  3. If there are specific data storage types you'd like to see available, let us know and we will consider them.
  4. The UI system is provided by Rust, not Oxide; we can't "re-work" it.
  5. OnPlayerInput/OnPlayerTick/etc. are expensive hooks and should be used lightly, there isn't really any way to optimize those and keep the same functionality and purpose.
  6. Custom data files such as what you are showing above are not provided by Oxide, those are created by your plugin; not Oxide's API.
  7. CanNetworkTo, as with all hooks, is simply triggered when Rust (or other games) triggers that code; so what it provides is what the game has available.
  8. We can expose various methods, fields, and such from the game, that is doable.
In response to Wulf ():
The System.IO restriction is there for the protection of server owners and shared providers, this i...
Thanks for this fast answer,

In conclusion, exept for few things, there's nothing we can do until facepunch does something.

About the Enumeration issue, the code above is just an example to re-create the issue, the issue come from the DataFileSystem from Oxide, you have an option to override or fill the config file, when you try to fill the current file ( so already created ) and the enumeration rows already exist, an other one is created for some reason, the issue appear with Enumeration only.

^6MyBad'
In response to 6MyBad ():
Thanks for this fast answer,

In conclusion, exept for few things, there's nothing we can...
The DataFileSystem things are something we can look in to, but the only thing really related to Facepunch is the CUI (community UI). The hook calling and such happens at the rate they are called in the game, which is a lot for those specific hooks because that's how the game works.
In response to 6MyBad ():
Thanks for this fast answer,

In conclusion, exept for few things, there's nothing we can...
You should use ObjectCreationHandlind = ObjectCreationHandling.Replace so enumeration rows wont be created again / .. in JsonProperty
You can check out my Smart Chat Bot
In response to Wulf ():
The DataFileSystem things are something we can look in to, but the only thing really related to Face...
This is too much restricted / poorly developed by Facepunch for the external developers like me, It make no sense, All the Facepunch big games ( Garry's Mod, S&box ( not release yet ) ) exept Rust are built to provides almost everything for the external developers to completely change the game from A to Z.
In response to 6MyBad ():
This is too much restricted / poorly developed by Facepunch for the external developers like me, It...
Considering Rust isn't a sandbox game but the other two are, I wouldn't really say they are in the same category nor do they have the same purpose. Rust was made with the specific purpose of being a survival game. I don't think there was ever any plans to add custom UI support, but something was added to appease those looking for some basic customization.
In response to misticos ():
You should use ObjectCreationHandlind = ObjectCreationHandling.Replace so enumeration rows wont be c...
My goal by doing this post is not to a get solution just for me, but for everyone else as well, a fix directly in the oxide Patch will be better.
In response to 6MyBad ():
My goal by doing this post is not to a get solution just for me, but for everyone else as well, a fi...
Oxide (and our other projects) are open source, so if you'd like to take a look and see about a change for what you are suggesting, the source can be found at https://github.com/theumod/umod
In response to Wulf ():
Considering Rust isn't a sandbox game but the other two are, I wouldn't really say they are in the s...
Yeah, I can understand that, but you have so many things to do with this game, It's a little too bad.
Locked automatically