Modme Forums
Menu:

Ancient Evil Styled Challenge System

Game Modding | Call of Duty: Black Ops 3 | Scripting


F3ARxReaper666:

This is a system i've made that adds challenges to your map, the challenges are designed to work like the bo4 map "Ancient Evil"

how they work:
any player can purchase a challenge from buyable points (price increases slightly after some rounds)
all players have 2 minutes to do as the challenge says, doing so earns "challenge points"
when player has enough of these they can be redeemed for randomized rewards depending on the amount the player has
reward can include points, guns or powerups (can be customized as you want)

script files:

https://mega.nz/#!OBpxSCwK!nKlEJ7DySAvbXftdyW0JCj3yEosuw2cFL1YUd9234rU
instructions to install are in the zip file within a text file



RADIANT PART
in your map make a "script_struct" and give it the targetname "podium_challenge"
this is where a player will go to buy a challenge, you can have as many as you want

create 4 more "script_struct" and give it the targetnames:
"podium_challenge_redeem_0"
"podium_challenge_redeem_1"
"podium_challenge_redeem_2"
"podium_challenge_redeem_3"

these are where player redeems their rewards from, "podium_challenge_redeem_0" is player 1, "podium_challenge_redeem_1" is player 2 etc
you can also have as many of these as you want


ADDING/CHANGING REWARDS

near the top of the _zm_ancient_evil_challenges.gsc file you can find a bunch of lines looking like this

add_challenge_reward(1, level.zombie_powerups["nuke"].model_name, &spawn_powerup, "nuke");

these are what adds rewards to the system
the "1" is what level of reward it is, should always be 1-4
the "level.zombie_powerups["nuke"].model_name" is the name of the model for the reward, this example will get the model of the nuke powerup
"&spawn_powerup" is the name of the function that is run when this reward is taken, this example is for spawning powerups
"nuke" is the information passed on the the function in the part before, in this example its "nuke" because its a nuke powerup
another example is this

add_challenge_reward(2, getweapon("shotgun_pump").worldModel, &free_gun, getweapon("shotgun_pump"));

this one will be a tier 2 reward, with the model of the KRM shotgun, running the give weapon function with the information of the krm weapon
i hope this is easy to understand if you want to change any of these rewards, or even add new ones, there's no limit to how many you can have, but you must have at least 1 reward per tier


ADDING/CHANGING CHALLENGES

near the top of the _zm_ancient_evil_challenges.gsc file you can find some lines that look like this

add_challenege("Anchored Down", &challenege_anchored, "Don't Move");

these lines add new challenges to the system
the "Anchored Down" is the name of the challenge that appears when active
the"&challenege_anchored" is the function that runs when the challenge is active
"Don't Move" is the description that appears under the challenge name
you would require some know how of scripting for you to make custom ones of these, they are threaded by the level, so if you want it threaded by players you will have to set it up to thread to players in the function.
to add "power" when a player does whatever you deem required, thread this

player thread add_ancient_evil_challenge_power(power);

this will set up all the tings required, it wont add if its over the limit so don't worry about that. power is on a range of 1-100 so make sure you don't add to much at once


if anything isn't working or is confusing let me know and i'll try and fix as necessary
also please credit if used


Khramos:

********************************************************************************

UNRECOVERABLE ERROR:

^1SCRIPT ERROR: No generated data for 'scripts/zm/_zm_ancient_evil_challenges.gsc'

ERR(83) scripts/zm/_zm_ancient_evil_challenges.gsc (26,35) : Compiler Internal Error : Compile error processing "using" file - file not found : scripts/zm/_zm_perks_legacy.gsc







Linker will now terminate.

********************************************************************************


F3ARxReaper666:

sorry for super late reply, fixed that issue


Khramos:

sorry for super late reply, fixed that issue

Thanks. Just wanted to let you know there may be a memory leak in this feature. I've seen this cause maps that run fine to stutter during a challenge. Please consider getting that fixed in the next patch.


modric1337:

Yea I have heard this script and the collective challenge script posted on here both stutter, I'm thinking it's a delay getting information from zm_stats, it stutters for me when i start and complete challenges on the collective script


Brodie3750:

im wondering if the abovementioned issue was resolved or how much it impacts gameplay?
im looking to implement a challenge style system to my map and this would be useful if its working correctly