• Common Prop Protection Interface (CPPI) v1.1
    28 replies, posted
The purpose of CPPI is to define a standard interface for prop protectors to use for easy third-party integration with any prop protector. This is an RFC, so any and all input is valued. Let us know if you have any questions. Tell us if you make something that uses CPPI and we'll list your release here. Download the standard at [url]http://ulyssesmod.net/archive/CPPI_v1-3.pdf[/url]
Strange, something by Megiddo that has no 'U' in the title..
[QUOTE=Ryx]Strange, something by Megiddo that has no 'U' in the title..[/QUOTE] We wanted something with no ties to any current projects or developers. :)
I think it's a good idea. Simple Prop Protection appears to work well enough, but some minimum standards for future protection scripts would be good ;)
I like it, I'll make sure to use it for any future things.
I'm planning on following this for my custom prop protection implementation as well. Looks like a good set of standards to me.
I tried something like this before (like a website with loads of standards) but nobody gave a shit.
I'll tie this into my Entity Protection ASAP.
I like this a lot, especially the actual meta ties with the entities makes things a whole lot easier.
So did anyone end up using this? I had suggested something like this a while back and had a good list of get functions. Seems like Megiddo covered everything I'd like to see.
Yes, it's being used in our UPS (currently in beta testing). There were a few updates we made, let me update the first post... [b]Edit:[/b] Forgot to mention it's used by Uclip as well. Also, anyone have any ideas instead of GetDate()? Seems to complicated to expect devs to do it but we should have a way to compare version numbers using relations (<,>,==).
Cool, I'll make wire's new target finder use it when I get around to redoing it. [QUOTE=Megiddo]Forgot to mention it's used by Uclip as well. Also, anyone have any ideas instead of GetDate()? Seems to complicated to expect devs to do it but we should have a way to compare version numbers using relations (<,>,==).[/QUOTE] What is the intent for GetDate()? Just for more info on the version of the addon/mod/module? What would you compare it to? Another version number for that addon/mod/module? Or against the version of another addon/mod/module? It would be nice to have NameFromPly(ply) too.
I never use any prop protection, just ban the bastards if they get out of hand.
I just went ahead and removed the GetDate() from the spec. If someone really wants to compare versions badly they'll just have to use GetVersion(), though it is a string. This marks the release of version one of the interface. Please feel free to implement CPPI into your prop protectors! Bug the author of your favorite protector to implement it! UClip is the first addon that runs off CPPI support, and UPS (though yet unreleased) is the first prop protector to implement CPPI. If there are any changes at all to the standard we'll update the interface version number. tad2020, by NameFromPly I assume you mean our NameFromUID() function?
I think GetOwner should be server side only. Some entity protectors don't want to share with the client which entities belong to who. Mainly because it's really stupid having to assign a networked string or whatever for who the owner is.
[QUOTE=Megiddo]I just went ahead and removed the GetDate() from the spec. If someone really wants to compare versions badly they'll just have to use GetVersion(), though it is a string.[/QUOTE] Why not return a number instead? Versions tend to only be a short decimal number. [QUOTE=Megiddo]tad2020, by NameFromPly I assume you mean our NameFromUID() function?[/QUOTE] Yeah, it seems a little out of the way to have to get the UID of a player object to pass to NameFromUID. I don't use UIDs, I had some strange non-unique problems once and never tried again.
[QUOTE=Kudo]I think GetOwner should be server side only. Some entity protectors don't want to share with the client which entities belong to who. Mainly because it's really stupid having to assign a networked string or whatever for who the owner is.[/QUOTE] Hmm, good point. That should be optional I suppose. [b]Edit:[/b] [QUOTE=tad2020]Why not return a number instead? Versions tend to only be a short decimal number. Yeah, it seems a little out of the way to have to get the UID of a player object to pass to NameFromUID. I don't use UIDs, I had some strange non-unique problems once and never tried again.[/QUOTE] "tend to be" is the operative word there. Some people like to throw in alpha numeric junk too. The idea behind using uid is that it support protectors that keep track of ownership after disconnect.
Updated to version 1.1. This addresses Conna's concerns about not all prop protectors implementing certain things client side. Thanks Conna!
Good idea. I must have missed this. This may need some clarification in the CanTool function: "May not be one of the default Garrysmod tools." To me that sounds like it must not be one of the default tools but I'm not sure that's what is intended.
It means that the value passed in is not guaranteed to be one of the default tools. IE, it might be adv dupe. I'll fix that and reupload since it doesn't change the standard any.
[QUOTE=Catdaemon;9190629]I tried something like this before (like a website with loads of standards) but nobody gave a shit.[/QUOTE] It's just people [i]do[/i] give a shit about Meggido. It still is a cool idea to have a database of standards. (GMSI anyone? Like ANSI, for GMod :D )
Post Deleted Sorry bout that.... wrong thread
Here's a new [i]proprosed[/i] version, 1.2. Please don't implement this yet, I want to get input first on the changes: [url]http://ulyssesmod.net/archive/CPPI_v1-2_PROPOSED.pdf[/url] Quickly generated diff: [url]http://ulyssesmod.net/archive/CPPI_changes_1-1_1-2.htm[/url] Changes: [quote]08/06/10 &#8211; Proposed Version 1.2 of standard *Changed hook recommendation from gamemode.Call to hook.Call *Added third parameter uid to CPPIAssignOwnership, changed definition so return value of true indicates that ownership should be assigned *Added new required entity functions, CPPICanUse and CPPICanDamage *Added ability to clear ownership by passing nil to CPPISetOwner and CPPISetOwnerUID[/quote] Thanks Mechanical Mind for most of these changes. Better a year late than never, right, Mechanical Mind? [b]Edit:[/b] Forgot to update the GetInterfaceVersion function for 1.2, but I've got it marked down for change now.
Almost four years later is this still [i]proposed[/i] or has it been made [i]official[/i] yet?
Still proposed. Everybody's still using 1.1.
Two more proposals for CPPI: [url=http://wiki.garrysmod.com/page/SANDBOX/CanProperty]CanProperty[/url] and [url=http://wiki.garrysmod.com/page/GM/CanEditVariable]CanEditVariable[/url] EDIT: Another: [url=http://wiki.garrysmod.com/page/SANDBOX/CanDrive]CanDrive[/url]
Oh wow, I haven't seen this in quite a while! I've pinged Megiddo about the proposal, he'll hopefully have time to take a look at it tomorrow. :)
I uploaded version 1.3, let me know what y'all think -- [url]http://ulyssesmod.net/archive/CPPI_v1-3.pdf[/url]
Shouldn't this go in Gamemodes and Addons releases?
Sorry, you need to Log In to post a reply to this thread.