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

*****


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author
Gachl
BANNED
Join Date: Feb 2009
Plugin ID:
1109
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Unapprover:
    Reason for Unapproving:
    no longer posted
    Old 08-20-2009 , 16:10  
    #1

    .





    .

    Last edited by Gachl; 09-04-2009 at 15:20.
    Gachl is offline
    noodleboy347
    AlliedModders Donor
    Join Date: Mar 2009
    Old 08-20-2009 , 16:30   Re: [TF2] Custom Achievements
    #2

    Suh-weet! You rock Gachl! +karma
    noodleboy347 is offline
    Jindo
    AlliedModders Donor
    Join Date: May 2009
    Location: England, UK
    Old 08-20-2009 , 16:53   Re: [TF2] Custom Achievements
    #3

    I love you!

    EDIT: I might be able to help with the scripting of achievements.

    EDIT2: Successfully set the database (and web pages etc) up, haven't been able to test in a server yet, the plugin failed to load and I got this error:

    Code:
    L 08/20/2009 - 23:33:05: SourceMod error session started
    L 08/20/2009 - 23:33:05: Info (map "cp_well") (file "errors_20090820.log")
    L 08/20/2009 - 23:33:05: [SM] Unable to load plugin "ca_pack.smx": Native "ProcessAchievement" was not found
    The problem appears to be obvious but I'm not so sure how to fix it, I'm taking a closer look at the code now.

    (I downloaded the source for ca_pack, and recompiled it with my server's compiler making sure that the .inc file was included, so that's not the problem)

    EDIT3: Woops, I think I made a huge mistake, correcting it now.

    I noticed that customachievements.sp uses a prefix cvar, where as the .sql file creates the tables under the assumption that there is no prefix (so the sql creates 'config', 'names', 'users', and the plugin checks for 'ach_config', 'ach_names' and 'ach_users')

    EDIT4: After a small amount of tweaks I've got it all working fully, will be adding some of my own achievements to this test, including one or two involving some test plugins I've made exclusively for my server. (I'm also quite handy with Photoshop if you need any custom achievement icons)

    Last edited by Jindo; 08-20-2009 at 18:14.
    Jindo is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 08-20-2009 , 18:00   Re: [TF2] Custom Achievements
    #4

    Perhaps the message that says you earned an achievement shouldnt be green at the end in order to tell them apart from valves? Looks good!
    __________________

    DontWannaName is offline
    noodleboy347
    AlliedModders Donor
    Join Date: Mar 2009
    Old 08-20-2009 , 18:22   Re: [TF2] Custom Achievements
    #5

    Is it possible to link this with the credits plugin?
    noodleboy347 is offline
    Jindo
    AlliedModders Donor
    Join Date: May 2009
    Location: England, UK
    Old 08-20-2009 , 19:07   Re: [TF2] Custom Achievements
    #6

    Quote:
    Originally Posted by noodleboy347 View Post
    Is it possible to link this with the credits plugin?
    Very, I managed to get this to register an achievement from my 'Goomba Stomp' plugin !

    You might need a small amount of SP coding experience, but either way, this is what I did to add my own achievement (assuming everything was already set up correctly):

    ---

    1: Create an achievement in your configs database (the ID is what matters most)

    2: Go to the plugin you want to add achievements to, add this to the includes 'list':

    PHP Code:
    #include <customachievements> 
    (You will need the customachievements.inc in the appropriate folder for that or any of this to work)

    3: Where you want the achievement to be unlocked, place this:

    PHP Code:
    ProcessAchievement(idclient); 
    client is usually fine as is, depending on where you place the code. id needs to be changed to the ID of the achievement you added to the database (in my case, it was 4)
    Jindo is offline
    Sexual Harassment Panda
    Veteran Member
    Join Date: Dec 2008
    Location: San Diego, CA
    Old 08-20-2009 , 19:13   Re: [TF2] Custom Achievements
    #7

    I have an error in the plugin startup:
    Code:
    16:12:33 L 08/20/2009 - 16:12:36: [SM] Native "CreateNative" reported: Fatal error creating dynamic native!
    16:12:33 L 08/20/2009 - 16:12:36: [SM] Displaying call stack trace for plugin "customachievements.smx":
    16:12:33 L 08/20/2009 - 16:12:36: [SM]   [0]  Line 34, /home/groups/alliedmodders/forums/files/4/8/5/3/9/47998.attach::OnPluginStart()
    16:12:33 [SM] Plugin Custom Achievements reloaded successfully.
    Also, does this create an autoconfig file?
    __________________

    Last edited by Sexual Harassment Panda; 08-20-2009 at 19:15.
    Sexual Harassment Panda is offline
    Jindo
    AlliedModders Donor
    Join Date: May 2009
    Location: England, UK
    Old 08-20-2009 , 19:14   Re: [TF2] Custom Achievements
    #8

    Well it's up and running flawlessly thus far on my private server, http://labs.topaz-games.com/kj/achievements/

    (Although I did have to do some tweaking (mostly to the naming of the SQL table names) to get it completely working)

    Tomorrow I shall get to work on a relatively easy to beat achievement pack either for people to use on their servers or for people to test the functionality of the plugin.

    So far, I'm very impressed with how well this is working, and how awesome it is .

    Last edited by Jindo; 08-20-2009 at 19:20.
    Jindo is offline
    Sexual Harassment Panda
    Veteran Member
    Join Date: Dec 2008
    Location: San Diego, CA
    Old 08-20-2009 , 19:20   Re: [TF2] Custom Achievements
    #9

    could you post your edited plugins and such?
    __________________
    Sexual Harassment Panda is offline
    Jindo
    AlliedModders Donor
    Join Date: May 2009
    Location: England, UK
    Old 08-20-2009 , 19:24   Re: [TF2] Custom Achievements
    #10

    The only real modifications I made were to have all queries go to the correct database tables (since the sql setup + all php files used non-prefixed names and the plugins used prefixed names), no changes were made to the customachievements.sp file, which I believe is what is causing you problems.

    Sorry but I can't help with that right now, if Gachl is unable to sort it out for you by the time I'm able to try and solve it, I'll do my best!

    For now, all I can suggest is that you make sure that you compiled with the compiler respective of your server's SM version.

    EDIT: Looking at the error closer, I'm not sure what exactly you did to put the plugin on your server, but what I did was download the source + include file for 'customachievements' and recompiled it with the correct version of sourcemod (w/e version your server runs (sorry if it sounds obvious or not to you, im not too sure how much you do or don't know about this stuff >.<))

    The only error I got in-game was something about the native not being found, which was because I forgot to add the customachievements plugin to my server .

    Last edited by Jindo; 08-20-2009 at 19:27.
    Jindo is offline
    Closed Thread



    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 08:17.


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