Shutdown server, overwrite the original under RustDedicated_Data/Managed, start server.
Solved Local images for GUI not loading
Discussion in 'Rust Discussion' started by barcode, Dec 1, 2016.
-
Wulf Community Admin
-
http://image.prntscr.com/image/3f0bfd1ebcc344869b397055c1e48553.png -
Wulf Community Admin
-
Shutdown the server replaced the file then started it back up and my Server Rewards still don't work even after loadlocalimages, and the UiPlus Still doesnt load images and they are Url and the map isnt working Screenshot
-
Yes, it does not work.
Can you update it here Release Changelog | Page 7 | Oxide -
Wulf Community Admin
Looking into it still, not releasing until we know for sure it is fixed.
-
I took the following steps:
- download your Assembly-CSharp.dll from this thread
- navigate to my rust server installation and then to .../RustDedicated_Data/Managed/
- delete the old Assembly-CSharp.dll and replace it with the one I downloaded
- start the server
- kill an animal so I can see if the image is displayed and not just a white square
- success it is being displayed
Code:fileIDs[shortname] = FileStorage.server.Store(stream, FileStorage.Type.png, CommunityEntity.ServerInstance.net.ID, 0).ToString();
I made a small write up on Reddit explaining what I think the issue is here: Official Bug Reporting Megathread - Devblog 138 • /r/playrust
So thanks for verifying my suspicions.Last edited by a moderator: Dec 2, 2016 -
Wulf Community Admin
The only change made was here:
I haven't had any success in plugins other than Sign Artist so far. All call the same way though from what I can tell. -
I should also use something constant instead of CommunityEntity.ServerInstance.net.ID to store the files I need to store. Every time the server is being restarted a new directory is being created and a new set of files is being stored. Going with 1433. That's my plugin's ResourceId.
The call looks like this now:
Code:fileIDs[shortname] = FileStorage.server.Store(stream, FileStorage.Type.png, 1433).ToString();
-
Wulf Community Admin
-
-
Just figured that out. I was already wondering why 1433 worked, but it only worked for the images that where already send over to the client earlier when I called Store(...) like this:
Code:fileIDs[shortname] = FileStorage.server.Store(stream, FileStorage.Type.png, CommunityEntity.ServerInstance.net.ID).ToString();
-
Wulf Community Admin
Last edited: Dec 2, 2016 -
When the "CommunityEntity json interpreter" encounters the png string it will call PngGraphicLoadRequested(...)!
PngGraphicLoadRequested(...) in return calls FileStorage's Get(...) function like this:
Code:byte[] numArray = FileStorage.client.Get(textureID, FileStorage.Type.png, this.net.ID);
CommunityEntity.ClientInstance.net.ID is null on the server but you can just use CommunityEntity.ServerInstance.net.ID since it's the same ID. -
Wulf Community Admin
Last edited: Dec 2, 2016 -
Sorry, im not good at all this, but if you have time, could you explain all this to a person who doesnt know too much about this
?
I'm still learning, dont hate me for it! -
If you first use CommunityEntity.ServerInstance.net.ID as an argument for Store(...) inside your plugin all the stored files will be stored in .../server/<identity>/storage/CommunityEntity.ServerInstance.net.ID/0/!
If you then use something like 1433 instead of CommunityEntity.ServerInstance.net.ID as an argument for Store(...) and reload your plugin all the stored files will be stored in .../server/<identity>/storage/1433/0/!
Even if you now restart your client so the images are no longer cached clientside you will still be requesting the files from .../server/<identity>/storage/CommunityEntity.ServerInstance.net.ID/0/ from the server because clientside Get(...) is called with this.net.ID as an argument! You'll receive them just fine too because they are still there.
But if you delete the stored files on the server in between tries .../server/<identity>/storage/CommunityEntity.ServerInstance.net.ID/0/ is no longer there and you'll fail to receive any images. -
Wulf Community Admin
For those having issues after the Rust update, try Oxide build 2781 or higher. We've added a patch to fix the issue in Rust with getting local image files. Make sure to restart your client as well... You may also need updated versions of the plugins affected; check their support threads.