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

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


Post New Thread Reply   
 
Thread Tools Display Modes
DrWagstaff
SourceMod Donor
Join Date: Apr 2010
Location: Livermore
Old 05-14-2010 , 05:12   Re: [ANY] MechaWare: Custom Achievements 2.0!
Reply With Quote #11

Excellent! As soon as that's implemented I'll be on board. Looking forward to it. I have a few suggestions for conditions too. Can your plugin currently detect if a medic is healing an enemy spy? Or if teammates are hacking at eachother if friendly fire is off? (Maybe for an achievement like "Pent up Agression"). Or maybe detecting if they kill people on the same team as them (friendly fire enabled after round end). Or detecting that only one spy is left on a team for a "Last man Hiding" achievement. Or "suicide" command?

Also, can you add some sort of support for the TF2Stats mod so I can give achievements (achievements that would also be revoked when the conditions are no longer met) for being in a certain spot on the scoreboard, or a certain range of spots?

EDIT: Another also, maybe support for the popular "Custom Votes" mod, just so people that first start a vote that ends up passing can be given the "Democratic Proponent" achievement? Or perhaps detecting people saying "Need a dispenser here" for a "HERE, TAKE IT" achievement.

Just some ideas. Glad to hear there's a new achievement mod in the works.

Last edited by DrWagstaff; 05-14-2010 at 05:17.
DrWagstaff is offline
Send a message via AIM to DrWagstaff
Mecha the Slag
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 05-14-2010 , 05:43   Re: [ANY] MechaWare: Custom Achievements 2.0!
Reply With Quote #12

Quote:
Originally Posted by DrWagstaff View Post
Can your plugin currently detect if a medic is healing an enemy spy?
Certainly!
Make a block
Event: on_heal
Requirement: 17,0,1|14,1,spy
(healer is not on same team as target, target is a spy)

and that's it!

Quote:
Originally Posted by DrWagstaff View Post
Or if teammates are hacking at eachother if friendly fire is off? (Maybe for an achievement like "Pent up Agression").
There is no hit detection when teammates hit eachother, sadly

Quote:
Originally Posted by DrWagstaff View Post
Or maybe detecting if they kill people on the same team as them (friendly fire enabled after round end)
Event: kill
Requirement: 16,0,1
(killer is on same team as victim)

Quote:
Originally Posted by DrWagstaff View Post
Or detecting that only one spy is left on a team for a "Last man Hiding" achievement.
This isn't currently possible because there is no targeting players that do not perform an action themselves. However, I'll look into adding a "alive_players" where it returns the players that are a live and the number of them. That way you'll be able to do it

Quote:
Originally Posted by DrWagstaff View Post
Or "suicide" command?
Event: kill
Requirement: 18,0,1
(killer and victim is the same. Aka suicide )

Quote:
Originally Posted by DrWagstaff View Post
Also, can you add some sort of support for the TF2Stats mod so I can give achievements (achievements that would also be revoked when the conditions are no longer met) for being in a certain spot on the scoreboard, or a certain range of spots?

EDIT: Another also, maybe support for the popular "Custom Votes" mod, just so people that first start a vote that ends up passing can be given the "Democratic Proponent" achievement? Or perhaps detecting people saying "Need a dispenser here" for a "HERE, TAKE IT" achievement.

Just some ideas. Glad to hear there's a new achievement mod in the works.
Support for other plugins is possible, but will not be natively implemented I'll look into including an optional library!
__________________
Mecha the Slag is offline
CosmicD
Senior Member
Join Date: Dec 2009
Location: Hasselt, Belgium
Old 05-14-2010 , 07:53   Re: [ANY] MechaWare: Custom Achievements 2.0!
Reply With Quote #13

this has great potential. Although I can't program I hope that some people will make l4d(2) achievements like
- bleed out (only use pills/Adrenaline to survive)
- Sole survivor
Reach the safehouse as the only survivor
- N00b molly
THrow a molotov that does no single HP damage
- Bitch in law
Smoke a survivor into a witch
- I'm not here for a happy reason today
Succefully boom at least 1 survivor with a rocket boom combo
__________________
CosmicD is offline
Mecha the Slag
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 05-14-2010 , 10:05   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.12)
Reply With Quote #14

0.12
  • Extended L4D2 events
  • Extended requirements
  • Fixed bugs that would disallow the plugin from running in L4D2
__________________
Mecha the Slag is offline
Thraka
AlliedModders Donor
Join Date: Aug 2005
Old 05-14-2010 , 16:01   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.12)
Reply With Quote #15

Suggestion!!!

I have an idea for a plugin and I want to incorporate achievements into it. Basically in the plugin some very rare things can occur, and if they do and if the server has this plugin, I want to trigger an achievement.

Would it be possible for you to add a trigger type that means it's triggered externally? If I understand how your plugin works, you would make a trigger that has a name key. The key allows it to be uniquely created via my personal plugin. I'm thinking something like this would be called from the plugin to the achievement system:

Code:
RegisterAchievement("19xxak329d4", "The name of my achievement", "The description of my achievement", 1)

TriggerAchievement("19xxak329d4", UserID)
The register inside your plugin would check the DB to see if it exists or not, if not, then it would insert it. If it did exist, it would update the name and description. This allows a plugin to update itself.

The trigger would take the userid of who to apply it to. If I wanted it applied to more than one person I can just call it X times with the correct user identifiers. Additionally, the 1 at the end shows how many times it needs to be triggered to be achieved.

In your plugin, this would just automate the creation of the conditions and blocks and triggers etc.

For example, if I wanted an achievement for a suicide bomber plugin I could do this:

Code:
// REGISTER CODE
RegisterAchievement("86fds8af79", "Suicide Bomber", "Use the sm_explode command and kill another player.", 1)

RegisterAchievement("8923jgada", "Suicide Bombee", "Be killed by another player who exploded.", 1)

// The plugin would then contain all the code it needed to do the condition checking and then call the appropriate achievement
TriggerAchievement("86fds8af79", UserIDWhoIssuedCommand)
TriggerAchievement("8923jgada", UserIDOfVictimKilled)
Thraka is offline
noodleboy347
AlliedModders Donor
Join Date: Mar 2009
Old 05-14-2010 , 20:14   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.12)
Reply With Quote #16

There's no web interface?
noodleboy347 is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 05-14-2010 , 21:53   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.12)
Reply With Quote #17

Quote:
Originally Posted by noodleboy347 View Post
There's no web interface?
Affirmative.
Afronanny is offline
Mecha the Slag
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 05-15-2010 , 05:18   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.12)
Reply With Quote #18

Quote:
Originally Posted by noodleboy347 View Post
There's no web interface?
technically there is
[IMG]http://img140.**************/img140/4813/allpurposeimagee.png[/IMG]
but its not done yet


Quote:
Originally Posted by Thraka View Post
Suggestion!!!

I have an idea for a plugin and I want to incorporate achievements into it. Basically in the plugin some very rare things can occur, and if they do and if the server has this plugin, I want to trigger an achievement.

Would it be possible for you to add a trigger type that means it's triggered externally? If I understand how your plugin works, you would make a trigger that has a name key. The key allows it to be uniquely created via my personal plugin. I'm thinking something like this would be called from the plugin to the achievement system:

Code:
RegisterAchievement("19xxak329d4", "The name of my achievement", "The description of my achievement", 1)

TriggerAchievement("19xxak329d4", UserID)
The register inside your plugin would check the DB to see if it exists or not, if not, then it would insert it. If it did exist, it would update the name and description. This allows a plugin to update itself.

The trigger would take the userid of who to apply it to. If I wanted it applied to more than one person I can just call it X times with the correct user identifiers. Additionally, the 1 at the end shows how many times it needs to be triggered to be achieved.

In your plugin, this would just automate the creation of the conditions and blocks and triggers etc.

For example, if I wanted an achievement for a suicide bomber plugin I could do this:

Code:
// REGISTER CODE
RegisterAchievement("86fds8af79", "Suicide Bomber", "Use the sm_explode command and kill another player.", 1)

RegisterAchievement("8923jgada", "Suicide Bombee", "Be killed by another player who exploded.", 1)

// The plugin would then contain all the code it needed to do the condition checking and then call the appropriate achievement
TriggerAchievement("86fds8af79", UserIDWhoIssuedCommand)
TriggerAchievement("8923jgada", UserIDOfVictimKilled)
You actually pretty much explained how it works yourself! All you do is call
Code:
CallAchievementEvent("event_name",target0, target1, target2, add0);
however, at the moment it isn't registered in other plugins. I'll make an include library to allow this
__________________
Mecha the Slag is offline
kwski43
Senior Member
Join Date: Mar 2009
Old 05-15-2010 , 06:04   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.12)
Reply With Quote #19

mw_achievements.sp:83-94
Code:
    if (g_Gamemode == 1) { // TF2 Events
        HookEvent("teamplay_point_captured", Point_Capture);
        HookEvent("pills_used", Pills_Used);
        HookEvent("deploy_buff_banner", Deploy_Buff_Banner);
        HookEvent("player_mvp", Player_Mvp);
        HookEvent("player_sapped_object", Player_Sapped_Object);
        HookEvent("player_healedbymedic", Player_HealedByMedic);
    }
    if (g_Gamemode == 2) { // L4D2 Events
        HookEvent("heal_success", Heal_Success);
        HookEvent("player_entered_checkpoint", Player_Entered_Checkpoint);
    }
Shouldn't the line "HookEvent("pills_used", Pills_Used);" be in l4d2 events? Pills_Used is in l4d2 events file
__________________

Last edited by kwski43; 05-15-2010 at 06:06.
kwski43 is offline
Mecha the Slag
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 05-15-2010 , 06:06   Re: [ANY] MechaWare: Custom Achievements 2.0! (0.12)
Reply With Quote #20

Quote:
Originally Posted by kwski43 View Post
Shouldn't the line "HookEvent("pills_used", Pills_Used);" be in l4d2 events? Pills_Used is in l4d2 events file
oops, I'll quickly correct that
__________________
Mecha the Slag 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 07:44.


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