Modme Forums

How can I increase the perk limit for a mod? (Not a map)

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


ModmeBot:

Thread By: Erneld
I made a mod that changes the perk and powerup shaders, and I'd like to have it increase the perk limit as well. I know the code I need to add, for the most part, but I don't know how to have a script work in a mod, not a map, as every tutorial I find is only applicable towards your own map. Since there isn't a "function main ()" or "init ()" in the zone file, I'm confused as to how this would work. Any help as to how to have a script work in the "zm_mod.zone" would be greatly appreciated. This is the code that exists in the .zone file right now.

>mode,zm
>type,common

//Custom Perk Shaders
image,specialty_giant_juggernaut_zombies
image,specialty_giant_marathon_zombies
image,specialty_giant_quickrevive_zombies
image,specialty_giant_fastreload_zombies
image,specialty_giant_ads_zombies
image,specialty_giant_three_guns_zombies
image,specialty_giant_doubletap_zombies
image,specialty_giant_widows_wine_zombies
image,specialty_blue_electric_cherry_zombies
image,specialty_juggernaut_zombies
image,specialty_fastreload_zombies
image,specialty_doubletap_zombies
image,specialty_marathon_zombies
image,specialty_three_guns_zombies
image,specialty_widows_wine_zombies
image,specialty_quickrevive_zombies
image,specialty_2x_zombies
//Custom Powerup Shaders
image,specialty_firesale_zombies
image,specialty_instakill_zombies
image,t7_hud_zm_powerup_deathmachine
image,specialty_giant_2x_zombies
image,specialty_giant_firesale_zombies
image,specialty_giant_killjoy_zombies
image,t7_hud_zm_powerup_giant_deathmachine
image,t7_zm_hd_specialty_zmblood

#include "zm_mod.class"

///////////////////////////////////////////////////////////////////////////////////////////////////////////
rawfile,dummy.cfg
///////////////////////////////////////////////////////////////////////////////////////////////////////////
The code that I would like to implement is:
init()
{
	thread onplayerconnect();
	//SetDvar("r_enablePlayerShadow", 1); // Causes laser flickering
	level.perk_purchase_limit = 13;
}
Any and all help is appreciated, thank you for your time.


ModmeBot:

Reply By: TrueGamerCalls
Shameless plug, but use my TGC Mod Template, it generates mods with working GSC, CSC, and sound files.


ModmeBot:

Reply By: Erneld

TrueGamerCalls
Shameless plug, but use my TGC Mod Template, it generates mods with working GSC, CSC, and sound files.

Thank you VERY much for your help. This will be very useful. I have one question though, is there a function that I can use to give the player the usual starting pistol for the map? Because for SoE, it's the Bloodhound "pistol_revolver38", for The Giant and the BO3 DLC maps it's the MR6 "pistol_standard", and for the Zombie Chronicles maps it's the M1911 "pistol_m1911". Basically, I just want the map to give the starting weapon by default. Other than that, and some things I have to figure out with the differences between GSC and CSC (I know it's client side and server side, but still some things to figure out), I'll ask make another thread if I need to. THANK YOU!


ModmeBot:

Reply By: TrueGamerCalls

Erneld
TrueGamerCalls Shameless plug, but use my TGC Mod Template, it generates mods with working GSC, CSC, and sound files. Thank you VERY much for your help. This will be very useful. I have one question though, is there a function that I can use to give the player the usual starting pistol for the map? Because for SoE, it's the Bloodhound "pistol_revolver38", for The Giant and the BO3 DLC maps it's the MR6 "pistol_standard", and for the Zombie Chronicles maps it's the M1911 "pistol_m1911". Basically, I just want the map to give the starting weapon by default. Other than that, and some things I have to figure out with the differences between GSC and CSC (I know it's client side and server side, but still some things to figure out), I'll ask make another thread if I need to. THANK YOU!

find this
level.giveCustomLoadout =&giveCustomLoadout;
And comment it out
//level.giveCustomLoadout =&giveCustomLoadout;


ModmeBot:

Reply By: Erneld

TrueGamerCalls
Erneld TrueGamerCalls Shameless plug, but use my TGC Mod Template, it generates mods with working GSC, CSC, and sound files. Thank you VERY much for your help. This will be very useful. I have one question though, is there a function that I can use to give the player the usual starting pistol for the map? Because for SoE, it's the Bloodhound "pistol_revolver38", for The Giant and the BO3 DLC maps it's the MR6 "pistol_standard", and for the Zombie Chronicles maps it's the M1911 "pistol_m1911". Basically, I just want the map to give the starting weapon by default. Other than that, and some things I have to figure out with the differences between GSC and CSC (I know it's client side and server side, but still some things to figure out), I'll ask make another thread if I need to. THANK YOU! find this level.giveCustomLoadout =&giveCustomLoadout; And comment it out //level.giveCustomLoadout =&giveCustomLoadout;

Thank you again. Late reply, but I've been trying to work on changing the zm_giant map that's included in the mod tools, and I keep getting an issue with lighting when I export and build the map, and I can't play it because the game won't load the map due to not being able to read the fastfile, even though I've compiled the lighting multiple times. People are able to make mods that can edit the official BO3 maps, so I'm going to post on the Radiant forum hoping that I get a reply that can lead me to the answer, I want to know how it's done so bad.


ModmeBot:

Reply By: Scobalula
You'll need to use an already loaded script to "hook"/load your scripts. People usually use the double points script as it hasn't changed enough to cause any issues across all maps. From there you'll call your script and start doing what you need to do.