• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Beta Release [Mutator] Server Achievements

scary ghost

Grizzled Veteran
Sep 13, 2010
899
316
California
Download and Release Notes
Version 0.1.0
https://github.com/scaryghost/KF2ServerAchievements/releases/tag/0.1.0

Copy the contents of "BrewedPC" to your KF2 directory of the same name. For players, that would be:
%USERPROFILE%\Documents\My Games\KillingFloor2\KFGame\Published\BrewedPC
and for servers:
%SERVER_HOME%\KFGame\BrewedPC
You can also subscribe to the mod in the workshop:
http://steamcommunity.com/sharedfiles/filedetails/?id=644431313

About
Server Achievements provides a framework for creating custom achievements. The mutator comes with:

  • Base class all achievement packs extend from
  • GUI displaying achievement progress
  • Achievement progress persistence
Source code and README are on the GitHub page (https://github.com/scaryghost/KF2ServerAchievements). The README details how to configure the server.

I haven't gotten around to writing a How To guide for creating custom achievement packs. There is a sample achievement pack (https://github.com/scaryghost/KF2Se.../0.1.0/classes/TestStandardAchievementPack.uc) that I started for testing purposes. You can use that as a template for building your own achievements.

This mod is still a work in progress. There may be breaking changes along the way to a v1.0.0 release.

Servers
Load the mutator by adding "ServerAchievements.SAMutator" to the command line.
?Mutator=ServerAchievements.SAMutator
  • By default, you can either store achievement progress locally to a text file or remotely via HTTP requests.
    • Read this section in the README for more details
  • Run the mutator once to create the INI file
  • If you're using the HTTP data link and don't want to bother with setting up Apache and a database, you can use this Java application (https://github.com/scaryghost/RemoteDataLocker) I wrote for my own use to handle the HTTP requests. If you are not keen on using a Java based solution, any php / python / whatever language you want will do as long as there is a valid URL the mutator can communicate with.

Players

  • The achievement menu is built with mobile GUI elements.
    • List scrolling requires a mouse click and drag as opposed to using the scroll wheel
    • GUI is drawn through the Canvas class, no fancy Scaleform
  • The achievement menu is also separate from the other KF menus and is toggled with its own command. It is recommended you bind a button to toggle the menu as demonstrated here.
Screenshots
https://www.dropbox.com/sh/8p74j9bfr4g610f/AAAKiXGOAWVn5wOK76qnj_R5a?dl=0
 
Last edited:
Has this been tested for compatability with ServerExt?
No compatibility testing has been done with other mods. I don't see why there would be any conflicts with server ext; the mods alert different parts of code.

Great job! looks very good.

I am looking into adding a settings menu for KF-SomeTestMap, would you mind if I use some of your code to build my settings UI?
Go for it, my code is open for everyone. I only ask that you credit me with 99% of the work on your map ;) :p
 
Last edited:
Upvote 0
Nope no problems works with my installed mutators. Regarding modifications to TestStandardAchievementPack.uc:

I should be able to just change values in the default properties to better suit an rpg server. For example the new carrying capacity for grenades is 10+ So I could blow through the 'FIRE_IN_THE_HOLE' in the first wave of one map.
frown.gif


Modified TestStandardAchievementPack :

Code:
defaultproperties
{
    achievements[0]=(maxProgress=1000,nNotifies=4)
    achievements[1]=(maxProgress=15,hideProgress=true,discardProgress=true)
    achievements[2]=(maxProgress=10)
    [COLOR="DarkOrange"]achievements[3]=(maxProgress=500,hideProgress=true,discardProgress=true)[/COLOR]
    achievements[4]=(maxProgress=1,hideProgress=true,discardProgress=true)
    achievements[5]=(maxProgress=50,nNotifies=2)
    achievements[6]=(maxProgress=100,nNotifies=4)
    achievements[7]=(hideProgress=true,discardProgress=true)
}
Should set this to 500 without jeopardizing integrity of mod correct?
 
Upvote 0
Nope no problems works with my installed mutators. Regarding modifications to TestStandardAchievementPack.uc:

I should be able to just change values in the default properties to better suit an rpg server. For example the new carrying capacity for grenades is 10+ So I could blow through the 'FIRE_IN_THE_HOLE' in the first wave of one map.:(

Modified TestStandardAchievementPack :

Code:
defaultproperties
{
    achievements[0]=(maxProgress=1000,nNotifies=4)
    achievements[1]=(maxProgress=15,hideProgress=true,discardProgress=true)
    achievements[2]=(maxProgress=10)
    [COLOR=DarkOrange]achievements[3]=(maxProgress=500,hideProgress=true,discardProgress=true)[/COLOR]
    achievements[4]=(maxProgress=1,hideProgress=true,discardProgress=true)
    achievements[5]=(maxProgress=50,nNotifies=2)
    achievements[6]=(maxProgress=100,nNotifies=4)
    achievements[7]=(hideProgress=true,discardProgress=true)
}
Should set this to 500 without jeopardizing integrity of mod correct?

You should not be modifying any of my code directly nor should you be modifying my package. This is lazy modding and will cause more headaches down the line; take the time to do it right. What you need to do is extend the TestStandardAchievementPack class and put the modifications in your own separate class. Your code should reside in its own package and you can use the SAMutator config options to load your achievements into the game.

Until this bug is fixed, you should put your achievements on the Workshop and have your community subscribe to it.

As its name implies, TestStandardAchievementPack is a class for testing the code and server configuration, and serves as a temporary "How To" guide for creating your own achievements. It is not meant to be real achievements that players would be working towards.
 
Upvote 0
Yes your absolutely right. Thank you for making that clear. I will give it a shot making my own instance pack.

For server owners running ServerExt you must disengage the GUI with your designated keybind before the ESC option for MOTD, PERK, SETTINGS willl work.

Great work Ghost looking forward to playing round with this and incorporating it into my server.
 
Last edited:
Upvote 0
Need some help with this...
I compiled the source from the link. It only had 3 warnings which didn't concern me.
Spoiler!


Uploaded the new ServerAchievements.u to server and I get this output.
Spoiler!


Mr ScaryGhost provided a ServerAchievements.u that works. When using his it worked fine. The one I compiled with his source generates a bad output. I'm sure there is something I'm doing wrong. I left the source as it was and didnt add a thing to it for testing purposes before adding my own additions.

The ServerAchievements.ini used.
http://osg.site.nfoservers.com/KFServerAchievements.ini

Any help would be greatly appreciated Thanks in advance.
rolleyes.gif
 
Upvote 0
You need to setup a localization file for the package.

Thank You for that
biggrin.gif

Spoiler!
Im am not a coder. Im just a server owner operator that is trying to bring the best expirience and newest content I can to my players. So I thank you for your patience and help.

So I will continue to add to what I have now based on my limited coding ability. If I get stuck I will ask how to 'achieve' what it is Im trying to do.

Thanks You Sir!
 
Upvote 0