I'm not sure if I agree. Database overhead is comparable to filesystem overhead. Considering most of the relevant data is stored in-memory anyway, I think SQL queries would not have a significant effect and might even reduce performance. Not to mention that it is preferable to have to data stored in an intermediate format like JSON for easy integration with other systems and plugins.
Introducing SQLite would require significant code modifications. Considering how few lines of code the DataFileSystem approach requires(with the EntityProfile as a JSON contract and serialization), how big this mod already is, and that I'm not aware of any modelling layer in Oxide for handling potentially complex SQL relationships, I think I'll stick with this method until the SQL stuff is as seemless as the DataFileSystem approach.
EntityOwner
Moved
Total Downloads: 7,292 - First Release: Jul 23, 2015 - Last Update: Dec 8, 2017
- 5/5, 25 likes
-
Calytic Community Admin Community Mod
-
Wulf Community Admin
My only thought was if there was a lot of I/O with the files. I'm not really familiar with your plugin. The sub-directory feature is available though in the latest releases though.
-
Calytic Community Admin Community Mod
The majority of the IO happens at server start when the (active) profiles are loaded into memory. The active player list can be expired (however online players are automatically reloaded). There is the potential that a lot of IO could occur if a large structure (built by many people) is prodded soon after ownership is manually expired (with /expireowners or owners.expire). There is no automatic expiration of players to an inactive state and therefore ownership profiles exist solely in memory 99% of the time.
On a side note, it is intended that admins run /wipeowners or "owners.wipe" from console after a wipe. If ownership is not wiped right after a map wipe, ownership files for previous players will become EXCESSIVELY LARGE and potentially bog down performance on high population servers.
[DOUBLEPOST=1440030551][/DOUBLEPOST]Let me also say that the SQLite approach would remove the need for the expiration feature of this mod, however - like I said I think the technical debt here is manageable until the Oxide SQLite component is more mature.
Thanks a ton for adding that stuff to the DataFileSystem. -
Still got this errors. Whats wrong with?
Code:[Oxide] 8:47 AM [Error] Failed to call hook 'OnPlayerInit' on plugin 'EntityOwner v0.2.9' (ArgumentException: An element with the same key already exists in the dictionary.) [Oxide] 8:47 AM [Debug] at System.Collections.Generic.Dictionary`2[System.UInt64,Oxide.Plugins.EntityOwner+OwnerProfile].Add (UInt64 key, Oxide.Plugins.OwnerProfile value) [0x00000] in <filename unknown>:0 at Oxide.Plugins.EntityOwner.GetOwnerProfile (.BasePlayer player) [0x00000] in <filename unknown>:0 at Oxide.Plugins.EntityOwner.OnPlayerInit (.BasePlayer player) [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
-
Calytic Community Admin Community Mod
I'll look into that again later tonight. -
Calytic Community Admin Community Mod
Calytic updated EntityOwner with a new update entry:
0.3.1
-
how loging who put a block,ladder etc. i try this plugin but when who put ladder on build its make them owner ...
-
Could we get prod to work with setting owners because when i run /own all playername it seems to affect almost all houses around it. prod would be great if it affected blocks that were connected
thanks. -
Calytic Community Admin Community Mod
The player who originally places any block entity will always be the owner. If you prod a ladder that doesn't mean that the player who built the ladder now owns the wall behind it. The structure before is still owned by the previous owner. Changing ownership of deployables depending on where they are deployed is outside the scope of this mod, however it would be possible without much difficulty for another mod author to write that using the EntityOwner API.
Currently mass prod (/prod2) and /own work in exactly the same way. Both commands will include any entities or building blocks within 3 tiles (12 feet) of any other entity or building block (in your query). I will add an option to both of these commands to use another distance other than 3. -
[Entity Owner] Entity Owner: Removing invalid entry for "SteamID" ? What's this? I'm getting a lot of this!
Edited: i saw ... this is when a player remove a building part (remover tool) .
Can you remove that line? Not showing the line: Entity Owner: Removing invalid entry for ...
Iwant that because of this screenshot
... Attached Files:
Last edited by a moderator: Aug 28, 2015 -
-
Calytic Community Admin Community Mod
Hmm, that shouldnt be happening repeatedly for an individual but on a per-profile basis. I'll look into it later tonight
-
I think you dont have to :x Latest Oxide fixed this error.
-
I think not ...
... i updated again the server
and same "errors"... -
My entity owners doesn't seem to save on server restart? i save the server every 20 minutes but no data is saved?
-
Calytic Community Admin Community Mod
This message occurs when there is an error loading an OwnerProfile and as such represents a critical failure of EntityOwner to properly save the OwnerProfile. Because it appears to be occuring every time LoadProfile is called, this means that an entity profile is corrupted and can no longer be loaded. The log message is there to indicate as such and I will have to fix the underlying issue.
Is this occurring for a single player or all players? If it is one individual, or maybe even a few, I recommend deleting their OwnerProfile under the data directory (usually "entityowner_STEAMID.json") -
all players...
-
Calytic Community Admin Community Mod
Calytic updated EntityOwner with a new update entry:
0.3.2
-
Would you know why my entity owner doesn't seem to save on restart, even though the server.save is called every 20 minutes
-
Calytic Community Admin Community Mod
Well, no. Follow the steps below to ensure its not saving properly.
1. Console: server.save
2. In-game: place an entity, like a foundation
3. Console: server.save
After doing that, you should see the following message in your console:
Please do that and confirm whether or not you see that message.Code:EntityOwner: Saved 1 profiles
Also please confirm your Oxide is updated to the most recent version.. Oxide recently had a problem with the OnItemDeployed hook that might prevent deployed items from being saved. -
So i followed your steps and it worked saved 1 profile, but it only seems to work for myself it doesn't work for any other player?
[DOUBLEPOST=1440980582,1440912006][/DOUBLEPOST]any suggestions? or will i have to write my own entity owner?

