Reward mod

Share source code that can be compiled/de-compiled here.
Post Reply
User avatar
Kelly
Posts: 185
Joined: Fri Sep 29, 2017 1:54 pm
Location: Coos Bay Oregon

Reward mod

Post by Kelly »

I scripted this as a set of rewards to be used mostly on a sniper rifle server. It's designed to encourage players to move around more if they want to claim some of the rewards for their kills. Usage is modular, you can turn on/off any of the behavior and use whatever parts you like. I just liked the idea of claiming someone you killed as an extra bit of teabagging to rub it in on them.

The readme:
Spoiler
RewardMod

Just a simple set of awards for killing people various ways. This is designed to be modular but bear in mind that awards can stack, meaning if you enable headshot bonus as well as (for example) longshot bonus then the awards will combine. You can deal with this in the ini by adjusting the awards.

The reward sections:

1) Longshot and Super Longshot
This set of awards is for distance kills. By specifying a range limit you can enable a reward for kills that exceed this. There is a long range shot with a small bonus and a super long range shot with a larger bonus. Also the award sounds can be changed in the ini file to anything you want as well as both distances and amounts of awards and also the message your clients will see when they get the awards.

Set the distance limits depending on the sniper rifle you use. I have them set very high for sniper rifles with no range limit so draw it way back if you use regular sniper.

2) Drop Weapons
This is a simple pinata-type mutator that will cause killed players to dump their weapon inventory on the ground.

3) Translucent bodies
When a player is fragged their body will become see-through. I just like this visually, especially on a crazy server with bodies falling all over. It makes sorting players out much easier.

4) Headshot bonus
Gives awards of extra health, ammo, and frag bonus (configureable, use any or all) for headshots. Useful on a sniper server to give extra points for headshots.

5) Tombstones
When you kill a player they will spawn a tombstone at their death site that will stay for a limited time. If you can get to it before it goes poof you can claim their soul and receive an award of health. Amount of award and how long the stone will stay is configureable.

6) Random Awards
When a player dies there is a 10% chance they will drop one of five items: HealthPack, ShieldBelt, Armor2, UDamage, or JumpBoots. Anyone may claim that gets to it first.

I included source code with comments so feel free to use anything in here that excites you. You may extend, alter, or rework this mod however you like. See me if you need any help.

ServerPackages=RewardMod
Mapvote: RewardMod.UTmod

Kelly
(gopostal)
agutgopostal@hotmail.com
and the download:
RewardMod.zip
(132.18 KiB) Downloaded 438 times
Source code in the zip. It's heavily commented too so you can learn from it if you want to add parts to your work.
I don’t wanna give the end away
but we’re gonna die one day
User avatar
D13GO_{HoF}
Posts: 343
Joined: Thu Sep 21, 2017 11:23 pm
Location: Costa Rica

Re: Reward mod

Post by D13GO_{HoF} »

This is quite interesting
Post Reply