Solved PLUGIN.ResourceId = ??

Discussion in 'Rust Development' started by Quicken, May 31, 2015.

  1. Hi there,

    I am a server admin and I have been looking at several mods and using them. I am an experienced developer and wanted to tweak a few plugins that seem to have been ignored or make my own.

    I keep seeing PLUGIN.ResourceId = ### (how do I get a rust ID?

    also for C# do I just submit the .CS file to the oxide/plugins and the server oxide components compile it? I assume that is the case since the mods I am loading are .cs and .py and .lua and I see compile messages in my rcon.

    thanks for any guidance.

    PS: I tried to just change another .cs mod and send it to my server and got a ton of errors - so something else seems required :)
     
  2. The "ResourceId" is just the ID for the uploaded plugin here on the site.

    For example; my QuickSmelt plugin is resource ID 1067. You'll find that same ID in the link to the resource: http://oxidemod.org/plugins/quicksmelt.1067/

    For *all* plugins, you put them in your "serveridentity/oxide/plugins" folder. Oxide will compile/load them as needed.

    As for your last issue, what errors are you getting? What mod? Etc.
     
  3. 1. how do I insure my ResourceId is Unique? that I guess is really my question :)

    2. when I take a .cs or .lua file and make a simple change like adding a comment. then upload it to my server serverid/oxide/plugins folder I get a bunch of errors like (tried commenting out a line in warp.lua):
    Code:
    Oxide] 9:25 PM [Error] Failed to load plugin warp-system (IOException: Sharing violation on path c:\games\108_61_109_174_28036\1206599\ruste\server\1206599\oxide\plugins\warp-system.lua)
    [Oxide] 9:25 PM [Debug]  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
      at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
      at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
      at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0
      at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in <filename unknown>:0
      at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
      at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string,System.Text.Encoding)
      at System.IO.File.ReadAllText (System.String path, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
      at System.IO.File.ReadAllText (System.String path) [0x00000] in <filename unknown>:0
      at Oxide.Ext.Lua.Plugins.LuaPlugin.Load () [0x00000] in <filename unknown>:0
      at Oxide.Ext.Lua.Plugins.LuaPluginLoader.Load (System.String directory, System.String name) [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: May 31, 2015
  4. The way I do it, is just upload my plugin, and wait for it to be approved (usually by Wulf), then grab the resource ID from there. Alternatively, just make it some random number. (Positive integers only) You can also just not set the ResourceID at all if you don't want to. It's not a required field.

    That seems to be a small bug in Oxide (or your "upload" not releasing the file). Oxide should be looping every once in a while to see if it can reload the plugin on IOExceptions like that.

    Basically, your upload keeps the file open, so Oxide can't access it properly. That's all. :)
     
  5. Wulf

    Wulf Community Admin

    For future reference, the Docs are a good place to start. http://docs.oxidemod.org/#getting-started ;)

    With the error, it's exactly as apocdev suggested. You can fix it by using "oxide.reload pluginname" after uploading it.
     
  6. yep a reload worked.

    Basically I wanted to load my plugin to my server to test it without having to register or have it show up on the list until it was working the way I wanted it. OR keep it private to give my server an edge :)

    thanks everyone.
     
  7. Wulf

    Wulf Community Admin

    It doesn't show up anywhere, it's just for tools to utilize for updating checking.