Skip to end of metadata
Go to start of metadata

 

NOTE: Before reading this guide, determine where your World at War root directory is located.

Non-Steam Install: C:\Program Files (x86)\Activision\Call of Duty World at War\

Steam Install: C:\Program Files (x86)\Steam\steamapps\common\Call of Duty World at War\

For the rest of this guide, it will be assumed that the word "root" refers to the appropriate installation path shown above.

Say 'Yes to all' if Windows asks you about replacing files when dragging files into your root directory.

You need to download files in order to use this tutorial. These files can be downloaded here!

 

Thanks to BluntStuffy for creating this tutorial! (Original Topic)

I wasn't sure if i should release this because this tutorial might look a bit complicated, and i'm not sure if people even want to add this to their maps.. But in the end it's really easy to use and i had it laying around anyways, so i decided to post this. Just read carefully step by step and i hope it's understandable. Adding achievements just takes 2 or 3 lines of code!

This script will allow you to put achievements in your map, their stats will save between games. For example when you add an achievement: "Kill 100 zombies" and a player gets 75 kills, then dies and starts a new game and get 25 kills he will earn the achievement. 

When a player unlocks an achievement a message shows up on screen, and you can choose to also have an icon appear, a sound play, and have points rewarded.

You can add your own achievements for your map pretty simple, anything like 'Kill X amount of zombies' or 'Kill a boss without jugg' or 'Open 50 doors' or whatever you want.

For now the player will just get the message on screen once, and it will be "unlocked". There's no menu to view your achievements or anything like that ( yet, might do it depending on if people actually use this.. )


1.

Lets get started, first download the files and put them in the correct folder. One goes into your \RAW\mp\ folder, and the other in your \MODS\mapname\maps\ folder.


2.

Open your _zombiemode.gsc and around line 60-70 you'll see similar line's, add this one:

maps\_blst_achievements::init();

 


3.

to include the stringtable-csv in your mod, add this line to the mod.csv in your mod-builder-tab on launcher;

stringtable,mp/my_achievements.csv

4.

if you want to use (custom) shaders for the achievement-notify's, add the materials to a .csv and make sure the images are included in your mod! They will be precached automaticly by the script, so no need to worry about that.


5.

Now how to setup you own achievements: 

 I left two examples in the files so its easier to understand. You can just remove / change those as you wish.

First a short explanation to clear things up:

You can add multiple 'levels' for one achievement, for example you can add one for killing 10 zombies and then also one for killing 25 zombies.

Obviously those are 'the same' achievement( ...they are related to the same stat -> zombie kills ) so to tell the game they are the same stat but a different achievement you'll need to add two 'names' for each achievement you add. One is called the 'name' and the other the 'ref'!

 * The achievement NAME, wich should be the same for all achievements that relate to the same stat! So in the example above both could be named: kills_all

 * The achievement REF, wich should be different for all achievements! so in the example above it could be: kills_all_1 and kills_all_2

 

Make sure you pay attention to that, then adding achievements is going to be easy  :)


6.

Open the file you copied to raw\mp\ named: my_achievements.csv it basicly works the same as a soundalias. This just stores stuff like strings. You need to add every achievement you want to use in your map here.

this is an example of a line from that file:

1,kills_all,kills_all_1,Kill 10 zombies,2105,10,250,specialty_juggernaut_zombies,

In the following order ( the bold text between the braces refers to the example line above )

0Index (1)
1Achievement NAME ( see explanation in the previous step ) (kills_all)
2Achievement REF ( see explanation in the previous step ) (kills_all_1)
3Achievement description: The line that will show up on screen once the player unlocks the achievement, if you dont want a this fill in: none (Kill 10 Zombies)
4

Stat number: (2105) THIS ONE IS IMPORTANT: there's a few rules to follow with these

You make up the numbers yourself, but keep these rules:

 - start counting from 2100

 - increase by 5, so go from 2100 to 2105 to 2110 etc

 - each achievement that has the same achievement NAME should have the same stat number ( ...they are related to the same stat! )

5The amount needed to complete this achievement, so in the example: Kill 10 zombies. The amount will be 10. (10)
6If you want the players to recieve points for unlocking this achievement, add the amount of points here. Otherwise fill in: none (250)
7If you want a shader to appear on screen for this achievement add it here ( the material name ). Otherwise fill in: none ( specialty_juggernaut_zombies ) 

 


7.

Next open the _blst_achievements.gsc, at the top you'll see the line's to setup the achievements. If you want a sound to play when a player unlocks an achievement, change it in this line:

level.achievement_sound = "none";

Next to tell the script wich achievements to add, copy this line once for every achievement you added, and edit it: Fill in the correct achievement REF for every achievement you want to add ( "kills_all_1" in the example below )

level.custom_achievements[level.custom_achievements.size] = "kills_all_1";

 


8.

That's everything to setup the script, but now comes the hard part. You need to make the game keep track of the achievements you added. For example if you add an achievement 'Use the mystery box 5 times' you need to edit the box-script, and make the game count the stats.

You can do that by adding the following line in a script:

self maps\_blst_achievements::add_to_my_stat( "use_box_5_times", 1 );

In this line 'self' is the player! You need to fill in the correct achievement NAME ( not ref! ). The '1' tells the game to add 1 to the stat. It will automaticly check for achievement-unlocks every time you use that line so no need to add anything else.

For some people this will be the hard part to figure out, i'll try to help out if needed in the topic below. In the download i allready made the 'zombie kills' achievement work, the one for opening doors does not work! It's just an example!! If you want to make that work, you need to add the line mentioned above in _zombiemode_blockers_new for each door/debris trigger.


Last thing, in the _blst_achievements.gsc there's one level. var at the top called: level.map_testing  If you set that to true, it will use prints to display your current stats so you can easily test stuff, and at game start you have the option to reset your stats.

Credits: Bluntstuffy