Raised This Month: $51 Target: $400
 12% 

[ANY] MechaWare: Custom Achievements 2.0! (0.6)


Post New Thread Reply   
 
Thread Tools Display Modes
iloveportalz0r
Member
Join Date: May 2010
Location: Up yours
Old 06-02-2010 , 16:32   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.32)
Reply With Quote #81

Wow, this looks great! Does it work in Half-Life 2: Deathmatch?
__________________
I sure was dumb in 2010
iloveportalz0r is offline
Thraka
AlliedModders Donor
Join Date: Aug 2005
Old 06-03-2010 , 14:05   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.32)
Reply With Quote #82

This is based on 0.32.

Ok. I've modified the achievements plugin a bit to really create a true custom plugin trigger. The mw_achievements_get_ach table has a new column named id_name which must be the last (or 6th) column. This is a named identifier for the achievement because the ID may not always be the same.
Code:
`id_name` varchar(128) NOT NULL
The include file for plugins to use the achievements system has been expanded to not only allow triggering the achievement, but to query the achievement system for status. So you (from a plugin) can ask if a specific achievement (either by id_name or id) has been completed for a user or not.

There is also a forward in the achievement plugin now that will notify other plugins when an achievement has been completed.

I've attached all the files I've changed. My name is in each section that changed as THRAKA. Just search for the text THRAKA and you can easily find the additions.

The real reason for id_name is because I didn't want to have to hijack the task system for a fake event and run it through the whole detection system when I know I want to (through a plugin) trigger the achievement. This also has the added benefit of allowing an achievement to use the standard task based detections AND also be triggered through a plugin.


EDIT:
I've attached index.php which is the new admin page and supports the new id_name column, this was based on website v0.5. Additionally, I fixed the bug for deleting an achievement that gives you an error but still succeeds. Another bug I fixed is when you save an achievement (edit) which has no tasks, it would create a duplicate.

EDIT2:
Updated events.inc. There is a bug (even in original code) which allows an achievement to be triggered when it has no task associated with it when another achievement is actually achieved
Updated mw_achievements.sp. I think I left a print statement somewhere. I removed it.
Attached Files
File Type: inc mw_achievement_natives.inc (1.6 KB, 102 views)
File Type: inc sql.inc (8.5 KB, 102 views)
File Type: sp Get Plugin or Get Source (mw_achievements.sp - 102 views - 11.1 KB)
File Type: zip admin_index_php.zip (7.4 KB, 128 views)
File Type: inc events.inc (13.9 KB, 102 views)

Last edited by Thraka; 06-04-2010 at 01:24.
Thraka is offline
nakashimakun
Senior Member
Join Date: Feb 2010
Location: England
Old 06-07-2010 , 02:20   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.32)
Reply With Quote #83

Hey guys,

Im curious is there anymore currently being added to this plugin or is it a finished item now? if some changes are coming what are they. Im just curious =)
nakashimakun is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 06-07-2010 , 02:43   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.32)
Reply With Quote #84

I am getting plenty of errors on the website and the game server.
__________________

DontWannaName is offline
janvier1985
Junior Member
Join Date: Dec 2008
Old 06-07-2010 , 04:19   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.32)
Reply With Quote #85

PHP Code:
// Enable error reporting on admin page?
// Default "0"
$error_report_admin "0";

// Display error reporting
if($error_report_admin == 1){
    
error_reporting(E_ALL);
    
ini_set("display_errors"1);
    }else{
    
error_reporting(0);

janvier1985 is offline
Mecha the Slag
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 06-07-2010 , 14:14   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.32)
Reply With Quote #86

Thraka I'll look into your things but it seems as if you've changed quite a bit rather than just add a single include file?
__________________
Mecha the Slag is offline
Thraka
AlliedModders Donor
Join Date: Aug 2005
Old 06-07-2010 , 14:54   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.32)
Reply With Quote #87

The sql and events inc-files only have minor changes to them. This is to create the new way of making a custom plugin triggered achievement.

The sp has changes only (besides the version #) to the new sections I created previously for the natives.inc file and for a single forward. Remember, the natives.inc is just referenced by OTHER plugins so they can talk to the achievement pluign. The changes in the SP for the natives is more of a copy\paste of the original code in the INC and a slight refactor. But it's also encapsulated and doesn't affect the actual plugin itself.

If you search for my name in the files, you'll see where I changed a single line or multiple lines. Or just do a DIFF on them. It's not a lot of changes really.
Thraka is offline
Jindo
AlliedModders Donor
Join Date: May 2009
Location: England, UK
Old 06-07-2010 , 15:53   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.32)
Reply With Quote #88

Impressive, looks like a very big leap from the previous plugin.

Good work!
__________________
Jindo is offline
janvier1985
Junior Member
Join Date: Dec 2008
Old 06-09-2010 , 17:28   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.32)
Reply With Quote #89

Here is my version
a bit crappy but sweet looking

Open config.php !!
edit to you needs
Upload, ... have fun

Demo:

http://scampiml.com/l4d/webinterface_0.6/admin/
Attached Files
File Type: zip htdocs.zip (449.5 KB, 132 views)
janvier1985 is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 06-10-2010 , 16:13   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.32)
Reply With Quote #90

With the last achievement plugin it was lagging my server. This one may be too but I dont know why they would. All I can think of is the mysql connection but I switched the old one to a local mysql server and it still lagged.
__________________

DontWannaName is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode