AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   ***** (https://forums.alliedmods.net/showthread.php?t=101088)

Gachl 08-20-2009 16:10

.





.

noodleboy347 08-20-2009 16:30

Re: [TF2] Custom Achievements
 
Suh-weet! You rock Gachl! +karma

Jindo 08-20-2009 16:53

Re: [TF2] Custom Achievements
 
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)

DontWannaName 08-20-2009 18:00

Re: [TF2] Custom Achievements
 
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! :D

noodleboy347 08-20-2009 18:22

Re: [TF2] Custom Achievements
 
Is it possible to link this with the credits plugin?

Jindo 08-20-2009 19:07

Re: [TF2] Custom Achievements
 
Quote:

Originally Posted by noodleboy347 (Post 907254)
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 :D!

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)

Sexual Harassment Panda 08-20-2009 19:13

Re: [TF2] Custom Achievements
 
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?

Jindo 08-20-2009 19:14

Re: [TF2] Custom Achievements
 
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 :3.

Sexual Harassment Panda 08-20-2009 19:20

Re: [TF2] Custom Achievements
 
could you post your edited plugins and such?

Jindo 08-20-2009 19:24

Re: [TF2] Custom Achievements
 
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 :3.


All times are GMT -4. The time now is 18:22.

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