Author Topic: Awards  (Read 11219 times)

0 Members and 1 Guest are viewing this topic.

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Awards
« on: July 15, 2010, 06:08:43 am »
Awards

Script Info:
Script Name:  Awards
Script Version:  1.1
Script Release:  2
Script Description:  Displays some awards at end of round.
Original Author:  zyxstand
Core Version:  2.6.5


Description:
This neat little script I whipped up in a short time displays some end-of-round awards for players.
It's supposed to make soldat a bit more fun, like when everybody spent an extra 2 minutes at the end of 007 GoldenEye to look at everyone's awards.


Updates:
FOR A MORE COMPLETE CHANGELOG AND FUTURE PLANS, PLEASE REFER TO SCRIPT!
Changelog:
    v1.0 -> v1.1
        fixed some small bugs
        added some new awards
        modified how some nominations will be awarded
ToDo:
    Implement statistical features to give award only for very outstanding performance
    Possibly implement statistical information gathering.
    Show one award per player - show 10 awards max (both chosen by significances/difficulty)
Questions:
    Looking for more award ideas and better award names!
    How can I trigger showing awards when game ends?
        currently it checks if (timeleft = 0) or (scorelimit reached).
        how can it check if vote map or /map ended the round?


Commands:
Admin Commands:
    "/showawards 0" disables showing awards at end of round (stats will still be collected)
    "/showawards 1" enables showing awards at end of round
    "/showawards" simply indicates whether showing awards is enabled
Player Commands:
    - none -


Awards-list:
NOTE:  I cannot test all awards on my own.  Please let me know if you feel like some nominations are not awarded correctly!
Positive awards
    Flagrunner (most caps - CTF/INF only)
    Deadliest (Most kills) *1
    The Professional(highest k/d) *1
    Mr. Aggressive (engaged the most in short-distance-combat) *2
    Streak Master (most kills in one life)
    Survivor (longest time without dying)
Neutral awards
    Chatty Cat (most chat) *2
    Vulture (most kills with victim having had < 30% health
    Demolition Expert (most kills using explosives: m79, law, grenade, cluster)
    Close Combat (most close-ranged kills)
    Chuck Norris (most kills using hands)
Negative awards
    Spawnkill Award (most kills with victim having been alive < 3 sec)
    Campmaster (longest cumulitive time not moving (far) - excludes AFK)
    Kamkikaze (most suicides - excludes EndOfRound suicides in survival mode)
    Spray Award:  Most off-screen kills (min. distance for sniper extended)


Hosting Details:
Specifications:
    Compatible with all game modes
    Stats won't be displayed when map changes due to vote or /map command
Limitations:
    Bots might not be counted for some awards and may cause glitches!
Requirements:
    Server may not stay at 0 seconds remaining (ie: due to "could not find next map")



Please give feedback and suggestions for more awards!

Thank you :)
« Last Edit: July 18, 2010, 03:37:23 pm by zyxstand »
Can't think of anything original to put here...

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: Awards
« Reply #1 on: July 15, 2010, 07:08:58 am »
Nice! I will install it right away on my ctf servers!
« Last Edit: July 15, 2010, 07:44:05 am by Bonecrusher »

Im chill like that

Offline Mittsu

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 617
Re: Awards
« Reply #2 on: July 15, 2010, 09:01:28 am »
would be cool to make it work for survival too :)
Realistic-Soldat.net
<+elerok> soldat is dead
<+AThousandD> shit happens

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: Awards
« Reply #3 on: July 15, 2010, 09:12:07 am »
would be cool to make it work for survival too :)

What makes you think that it's not? I haven't tested it for scripting, but I believe it is compatible.

I'm really interested in ideas for more awards, or any improvements overall!
Can't think of anything original to put here...

DarkCrusade

  • Guest
Re: Awards
« Reply #4 on: July 15, 2010, 12:41:51 pm »
I don't like that you use DrawText() to draw the stats. WriteConsole() would be much better.

Offline Beoulve

  • Major(1)
  • Posts: 33
Re: Awards
« Reply #5 on: July 15, 2010, 09:23:48 pm »
I don't like that you use DrawText() to draw the stats. WriteConsole() would be much better.

Agreed. Nice script anyways though. :P

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: Awards
« Reply #6 on: July 15, 2010, 11:47:36 pm »
Might I ask why?  is it because drawtext looks ugly and/or hard to read?  or you think that it shouldn't tkae over the screen?  i don't think i can put 10 lines of code in the console to be displayed all at once.  I was also thinking of making a /addbot and then /kick him immediately before displaying awards to make the scoreboard go away automatically. what do you think?
Can't think of anything original to put here...

DarkCrusade

  • Guest
Re: Awards
« Reply #7 on: July 16, 2010, 01:01:13 am »
10 lines of text are nothing compared to your whole screen being filled with text (that disappears, unlike WriteConsole()-text).

I don't think you need to add/kick bots.

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: Awards
« Reply #8 on: July 16, 2010, 01:04:23 am »
kk i'll change it and see how it looks.
also, i was in a server the other day, and it was displaying custom messages, but with no [ * ] in front. how do you do that?

thanks
Can't think of anything original to put here...

Offline VirtualTT

  • Veteran
  • *****
  • Posts: 1026
Re: Awards
« Reply #9 on: July 16, 2010, 02:14:55 am »
Nice script, but some nominations (such as Breadwinner, Deadliest, Professional) are kinda plain.
How about adding Kamikadze award for someone with most nade selfkills; or maybe Bomber for using explosives; Chuck Norris for most kills by hand (lol); Sniper for the longest kill distance... there are plenty of nominations to think about.

Offline Mittsu

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 617
Re: Awards
« Reply #10 on: July 16, 2010, 04:19:56 am »
would be cool to make it work for survival too :)

What makes you think that it's not? I haven't tested it for scripting, but I believe it is compatible.


not sure if survivor award makes sense because you have rounds in survival mode

spawnkill award doesnt make sense because you cant spawnkill in survival

suicide award will be faulty because server kills you at the end of every round which is counted as a suicide

Realistic-Soldat.net
<+elerok> soldat is dead
<+AThousandD> shit happens

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: Awards
« Reply #11 on: July 16, 2010, 05:14:52 am »
Nice script, but some nominations (such as Breadwinner, Deadliest, Professional) are kinda plain.
How about adding Kamikadze award for someone with most nade selfkills; or maybe Bomber for using explosives; Chuck Norris for most kills by hand (lol); Sniper for the longest kill distance... there are plenty of nominations to think about.

yes that is exactly what i wanted to hear! i will implement soon.  in the meantime, i'd like to hear more ideas!


would be cool to make it work for survival too :)

What makes you think that it's not? I haven't tested it for scripting, but I believe it is compatible.


not sure if survivor award makes sense because you have rounds in survival mode

spawnkill award doesnt make sense because you cant spawnkill in survival

suicide award will be faulty because server kills you at the end of every round which is counted as a suicide



survivor makes sense - you can still be the longest-surviving player
i will change it so that in survival mode, survivor will be given to the person with longest cumulative time.
spawnkill is OK because... well if you can't spawnkill then no one gets the award :D
suicide, yeah that's gotta get fixed haha...
Can't think of anything original to put here...

Offline Mittsu

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 617
Re: Awards
« Reply #12 on: July 16, 2010, 05:43:52 am »
maybe in survivor you could make it "most rounds survived"?
Realistic-Soldat.net
<+elerok> soldat is dead
<+AThousandD> shit happens

Offline L[0ne]R

  • Soldat Beta Team
  • Rainbow Warrior
  • ******
  • Posts: 2079
  • need a life. looking for donors.
Re: Awards
« Reply #13 on: July 16, 2010, 05:19:40 pm »
Nice script. Makes the match more fun even when it already ended. :P
A few suggestions:

I think the names of players should show up on the left, and awards on the right. Because you read from left to right, you need to put more important things (WHO's received the awards) on the left, and put additional details (Award name) to the right. That's just my opinion though. But I think it's the right one. :D

Comments on the awards themselves:

Quote
Breadwinner (most caps - CTF/INF only)
Breadwinner just sounds kinda.. "wtf?" Flagrunner would make more sense.

Quote
Mr. Aggressive (most hurt + hurting over time*)
I don't get it.. Does that mean YOU got hurt? Or you hurt others? If first - then that's not really aggression. :S If hurting others but not killing them - that's more like.. Mr.Noob McSpray :S

Quote
Streak Master (most kills in one life)
That also means that a player probably has highest K:D, which will conflict with The Professional (highest K:D) award. I think this award should be awarded to those who got the highest kill streak (if multiple people got the same streak - one who got it more times gets awarded).

Quote
Chatty Cat (most chat over time*)
Nice one. :P That should exclude taunts though..

Quote
Campmaster (longest cumulitive time not moving far)
Don't forget to exclude flaggers in situations when both teams have enemy flags.

Quote
Suicide Award (most suicides)
There will always be at least one such player. This award should only be given to those who really just fail. So this award could be given if the difference between "best" and "second-best" suicider is greater than 5.


Award ideas:
TrickShoooter (most ricochet kills)
Damage Master / Ambusher (at least 5 fast kills (took no longer than 3 seconds to kill an enemy)
(without scope in case of barrett))
Vulture (killed more injured players (60% hp or less) than enemies with at least 90% hp)

Some gun-specific awards:
Demolition Man (most kills with explosives and shockwaves)
Psycho (most kills with chainsaw and minigun)
Commando (most kills with a knife and soccom + disarms or kills with fists)
EagleEye (most scoped kills with barrett)
CloseCombat (if most kills are within a certain distance from the enemy)
« Last Edit: July 16, 2010, 05:38:49 pm by L[0ne]R »

DarkCrusade

  • Guest
Re: Awards
« Reply #14 on: July 16, 2010, 05:42:35 pm »
Nice ideas, but you cannot detect how many ricochets a kill had via scripting, nor can you detect scoped kills and disarming (well, barely).


Offline L[0ne]R

  • Soldat Beta Team
  • Rainbow Warrior
  • ******
  • Posts: 2079
  • need a life. looking for donors.
Re: Awards
« Reply #15 on: July 16, 2010, 06:01:56 pm »
Yeah, I had a feeling some of those things weren't quite possible. :S
For scoped kills you could count barret kills that are:
- made while crouching or prone, and
- distance is greater than one screen length (not sure how long that is in soldat meters).

Disarming - enemy got hit with a punch (weapon drop detection wouldn't even be necessary since hitting enemy with a fist already deserves award points)

Ricochets - even one ricochet should be enough, I don't think the exact number of them matters (sorry if I didn't make it clear. I meant how many enemies you killed with indirect shots, not how many times a bullet ricochetted). Can scripts at least detect a ricochet kill?
« Last Edit: July 16, 2010, 06:28:50 pm by L[0ne]R »

DarkCrusade

  • Guest
Re: Awards
« Reply #16 on: July 16, 2010, 06:20:06 pm »
1 meter ~ 14 units in Soldat.

Scoped kills will be very inaccurate. You can already get some key input, but only once a second. So it would most likely fail at the very beginning.

Disarming would work, because a punch deals an exact amount of damage (can vary between 3 values).

Scripts cannot detect ricochets. For a better understanding of what scripting can actually do take a look at this page: Link

Offline squiddy

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 333
  • Flagger assassin
    • SoldatX
Re: Awards
« Reply #17 on: July 16, 2010, 06:24:07 pm »
Loner, I don't think so. Although, I liked the most of your ideas.

If may I suggest something, I'd say "change the Award-Display for the guys who won Awards only!"

I mean... Let's assume Kruger got the Mr. Agressive award, and Billy got the DeadLiest.
In that way, the message "Mr. Agressive - Kruger" shall be changed into "You were the Mr. Agressive!", and shall be displayed to Kruger ONLY. In the same way that Billy shall receive the "You were the DeadLiest!" message for himself.

For the rest of the folks who haven't got any Awards, message shall be "You haven't played well. No awards for you!", or w/e.

As the matter of DrawText Vs. WriteConsole, my points shall be followed. I named the Positive/Negative points of each use. Take the conclusion yourself:
1~ DrawText can be easily seen at the end of the map (obviously, because of it's size).
2~ WriteConsole can be hidden by some dudes spamming taunts (making the Awards only visible by pressing T, or w/e).
3~ DrawText hides messages, such as "Team Alpha is winner", "Kruger is winner", or w/e. WriteConsole doesn't.
4~ Not all people actually see WriteConsole messages at the end of the round.

In my honest opinion, I'd say "Wait for 2.7.0 and use WorldText! Hurrrrrrra!!"! :P

Very nice Script. Congratulations of my greatest sincerity. Rock on, fellow.
« Last Edit: July 16, 2010, 06:25:58 pm by squiddy »
www.soldatx.com.br - The brazilian Soldat community.

DarkCrusade

  • Guest
Re: Awards
« Reply #18 on: July 16, 2010, 06:41:08 pm »
I strongly recommend to stick with writing the text to every player, because it doesn't make much sense to write "You were the Mr. Agressive!" when you can see exactly that anyway. You wouldn't believe it, but most Soldat players know their own name!

WriteConsole is much handier than DrawText, and WorldText ... mate, that's ridiculous. Maybe teleport them all to the same place before writing the text then, too? Like one of my fellow friends said once: "RIDICULER!!"

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: Awards
« Reply #19 on: July 16, 2010, 06:44:41 pm »
Well it should be WriteConsole since most of the nicks are too long to fit the screen. So make it WriteConsole or decrease DrawText size so long nicks are also visible. About the awards names these should be changed too.

Im chill like that

Offline squiddy

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 333
  • Flagger assassin
    • SoldatX
Re: Awards
« Reply #20 on: July 16, 2010, 07:56:43 pm »
I strongly recommend to stick with writing the text to every player, because it doesn't make much sense to write "You were the Mr. Agressive!" when you can see exactly that anyway. You wouldn't believe it, but most Soldat players know their own name!

Meh. It was just an idea. I wouldn't like to see what freaking award has Kruger won in the round. I'd pretty much care about my own, anyways.

Well, it was a suggestion.
Suggestions were made to be accepted or declined.

In regards to the WorldText..
It has the hability to send multiple Texts in the screen, without deleting the previous messages (like DrawText), right?
'Coz I don't have this much experience with WorldText, anyways.

Good job, ZYX.
www.soldatx.com.br - The brazilian Soldat community.

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: Awards
« Reply #21 on: July 17, 2010, 03:01:46 am »
holy wow! so much feedback! but regarding all suggestions: i'm taking copious notes.

@all:
i will keep it at DrawText! it has too many perks imo over writeconsole. i'm gonna

@VTT:
I like Chuck Norris and Sniper.  also: I like criticism! I was expecting you to yell about my poorly organized code :P (though it's not currently really bad)

@Mittsu
regarding survival: I will still like using cumulative alive time.

@L[One]R:
thnx a ton for the list. i took down many that i liked.

@squiddy:
thanks for your opinion! i think it should remain at showing awards to everyone. a lot of players get off from showing off their awards, plus if you play with people you know, you can comment on each other's awards (which is really what the awards are meant to do). also, i would have waited for 2.7.0 to go public - but who knows how long that's gonna take. plus adopting this code shouldn't be too hard - it's good to get the nittygritty aspect out of the way!
also, regarding WorldText: Here's enesce's help doc on it:  WorldText - there'd be no problem using WorldText, except for its inpracticality for my purposes.

@DarkCrusade:
why use WorldText and teleport when drawtext already displays it well on your screen?  :P

@BoneCrusher:
i will trim people's names to something reasonable when displaying awards (maybe 15-20 chars? wat u guys think?) i'm definitely gonna rename most awards. I knew going into this that they were totally uncreative.

Again, thanks a lot guys - someone who knows, please address my questions in the mainpost!
« Last Edit: July 18, 2010, 01:35:19 pm by zyxstand »
Can't think of anything original to put here...

DarkCrusade

  • Guest
Re: Awards
« Reply #22 on: July 18, 2010, 06:14:42 am »
Mr Aggressive is bugged. I know I am a raging troll but why do I get the award for being spectator for a round?

Also add a noob award for the player with the worst rate.
« Last Edit: July 18, 2010, 06:16:52 am by DarkCrusade »

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: Awards
« Reply #23 on: July 18, 2010, 03:37:02 pm »
New version 1.2
you can read the changelog in the "awards v1.1.pas" for a list of fixes, modifications, and new features.
also, like i said, i can't really test if the awards work correctly, though i'm quite confident they should.  Please let me know if you think that something is messed up.
Can't think of anything original to put here...

DarkCrusade

  • Guest
Re: Awards
« Reply #24 on: July 24, 2010, 10:14:43 am »
I found a little but annoying error: You forgot to remove one line that you probably used to debug your script in OnPlayerKill() that spams the console...

Offline Centurion

  • Flagrunner
  • ****
  • Posts: 699
Re: Awards
« Reply #25 on: July 24, 2010, 10:35:07 am »
I think that the awards are not displayed long enough. You can't actually read all all awards during the 1 or 2 second till next map starts. Could you extend that time?

DarkCrusade

  • Guest
Re: Awards
« Reply #26 on: July 24, 2010, 11:13:26 am »
On Zabijaka CTF we use WriteConsole() instead so it's displayed as normal text. Works fine ;)

Offline VirtualTT

  • Veteran
  • *****
  • Posts: 1026
Re: Awards
« Reply #27 on: July 24, 2010, 11:28:25 am »
How about adding Rocket Man award for most jet used?

Offline squiddy

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 333
  • Flagger assassin
    • SoldatX
Re: Awards
« Reply #28 on: July 24, 2010, 06:11:32 pm »
How about adding Rocket Man award for most jet used?

I don't think there is a way to check if the player is using jets. I do know is that there is a way to return the Jet Ammount.

I'd say "add Flying-Man for the player with most time off the ground!"

Rocket Man would be kinda of hard to do, but even so, possible. If we knew the Standard-Jet-Ammount for each map, it's easy. If not, then it shall be harder.

Good luck.
www.soldatx.com.br - The brazilian Soldat community.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Awards
« Reply #29 on: July 24, 2010, 07:49:12 pm »
squiddy i never tried so i don't know, maybe GetPlayerStat the jet amount OnPlayerRespawn or OnJoinGame / Team; if any of those have a full jet, you can use that (except on map change, you require somebody joining / changing teams in order for somebody to gain the achievement, if OnPlayerRespawn doesnt work that is)

and ofc u can always just check apponidle everybody's jet amount; have 1 variable for "largest jet amount" (if somebodys is max on an apponidle, then you got the right number)

or just make max jet not needed; change in jet every apponidle, total jet use can still be calculated (not 100% accurate, like almost anything done in apponidle)
« Last Edit: July 24, 2010, 07:51:07 pm by DorkeyDear »

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: Awards
« Reply #30 on: July 24, 2010, 09:43:54 pm »
i got demotivated with this project when i didn't see a strong response. i'll clear up some code and hopefully have good system for awarding these only under superior performance...
gonna add more time to the display time. i guess it wouldn't hurt seeing the text well into the next round for those that wanna see it...
i'll keep you up to date with this
Can't think of anything original to put here...

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: Awards
« Reply #31 on: July 26, 2010, 08:19:00 am »
Code: [Select]
(15:18:09)  [*] [Error] awards -> (OnPlayerDamage): Out of Global Vars range
(15:18:09)  [*] [Error] awards -> (OnPlayerSpeak): Access violation at address 080A0B43, accessing address 0000010D
(15:18:09)  [*] [Error] awards -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 0000010D
(15:18:09)  [*] [Error] awards -> (OnPlayerRespawn): Access violation at address 080A0BCC, accessing address 00000120
(15:18:09)  [*] [Error] awards -> (OnPlayerDamage): Access violation at address 080A0BCC, accessing address 00000130
(15:18:09)  [*] [Error] awards -> (OnPlayerDamage): Access violation at address 080A0BCC, accessing address 00000140
(15:18:09)  [*] [Error] awards -> (OnPlayerDamage): Access violation at address 080A0BCC, accessing address 00000150
(15:18:09)  [*] [Error] awards -> (OnPlayerDamage): Access violation at address 080A0BCC, accessing address 00000160
(15:18:09)  [*] [Error] awards -> (OnPlayerDamage): Access violation at address 080A0BCC, accessing address 00000170
(15:18:10)  [*] [Error] awards -> (OnPlayerKill): Access violation at address 080A0BCC, accessing address 00000180
(15:18:10)  [*] [Error] awards -> (OnPlayerDamage): Access violation at address 080A0BCC, accessing address 00000190
(15:18:10) [*] Too many script errors! Recompiling "awards"
(15:18:10)  [*] [Error] awards -> (OnCommand): Access violation at address 080A0BCC, accessing address 000001A0

Im chill like that

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: Awards
« Reply #32 on: January 25, 2017, 10:30:11 am »
Code: [Select]
17-01-25 16:15:16 186
17-01-25 16:15:17  [*] [Error] awards v1.1 -> AppOnIdle(343:3) Out Of Range
17-01-25 16:15:17  [*] [Error] awards v1.1 -> OnPlayerRespawn(172:3) Out Of Range
17-01-25 16:15:17  [*] [Error] awards v1.1 -> OnPlayerRespawn(172:3) Out Of Range
17-01-25 16:15:18  [*] [Error] awards v1.1 -> AppOnIdle(293:3) Out Of Range
17-01-25 16:15:19  [*] [Error] awards v1.1 -> OnPlayerRespawn(172:3) Out Of Range
17-01-25 16:15:19  [*] [Error] awards v1.1 -> OnPlayerRespawn(172:3) Out Of Range
17-01-25 16:15:20  [*] [Error] awards v1.1 -> AppOnIdle(343:3) Out Of Range
17-01-25 16:15:20  [*] [Error] awards v1.1 -> OnPlayerDamage(281:2) Out Of Range