OnFilteredEdit callback

At this stage I am not sure the name is fitting, but it serves as a good example for now. I am proposing a new callback added to the DataModel instance. If this callback is not set default filtering would be used, however if it is set then every time a player tries to make a change to the game the function is fired, if the function returns true then the change will be made.

The callback would include the parameters, instance player, instance object, string propertyName, tuple newValue. These parameters can then be used to make the decision such as is the object a member of their backpack and if so, permit them to parent it to the character.

This would be extremely useful for custom filtering and would make certain things easier to do. It also allows us a very easy way to see when things are being filtered and log them if we so wish.

[size=2]This was in response to another thread.[/size]

This would waste the significantly decreased network usage perk that many hold dear with FilteringEnabled. RemoteEvents/RemoteFunctions are a much better alternative to something like this, in my opinion.

What you are proposing is an inferior alternative to FilteringEnabled. This was actually tried a couple of years ago. If you look at ServerReplicator you’ll notice it has several Lua callbacks for filtering based on property changes. It had serious problems: it was at least 30% slower for even heavily optimized games.

FilteringEnabled is a much better solution because the filtering happens on the C++ side.