Call of Duty: Black Ops 3 => Tutorial Desk => Scripting => Topic started by: shinged on December 02, 2016, 10:20:34 pm
Title: [Tutorial] Custom Perks
Post by: shinged on December 02, 2016, 10:20:34 pm
Hey guys, today i'm gonna guide you guys through making a custom perk. You need at least a bit of scripting knowledge to do this as your perk won't actually do anything without scripting it ;)
IT IS EXTREMELY EASY TO GET CLIENT MISMATCH ERRORS WITH THIS, HOWEVER IF YOU ARE POSITIVELY SURE YOU DID EVERYTHING 100% CORRECTLY LET ME KNOW AND I WILL TRY TO FIX IT
Title: Re: [Tutorial] Custom Perks
Post by: Blink-420 on December 03, 2016, 12:55:52 am
Awesome, very very much appreciated. Working great and very easy to follow tutorial! I have a question, might be stupid.. how do you create more than 1 of these custom perks? :)
Title: Re: [Tutorial] Custom Perks
Post by: shinged on December 03, 2016, 01:46:22 am
copy the gsc, gsh, and csc. And you would have to rename a bunch of variables. Then put #using in your mapname GSC and CSC. Also add them too your zone file. Its gonna take a bit of scripting knowledge to figure out and i'd prefer people to try to learn it themselves. It makes it much easier to understand treyarchs coding down the line
Title: Re: [Tutorial] Custom Perks
Post by: Blink-420 on December 03, 2016, 02:27:31 am
copy the gsc, gsh, and csc. And you would have to rename a bunch of variables. Then put #using in your mapname GSC and CSC. Also add them too your zone file. Its gonna take a bit of scripting knowledge to figure out and i'd prefer people to try to learn it themselves. It makes it much easier to understand treyarchs coding down the line
Yeah I figured thats how it would have to be done but wasn't sure.. thanks :) Double Post Merge: December 03, 2016, 04:18:28 amAlso, one thing I just noticed is that you can buy the perk over and over taking up another perk slot, and the shader will repeat itself. But once you buy the perk once the hintstring won't pop up again on the machine.
Title: Re: [Tutorial] Custom Perks
Post by: morphiac on December 06, 2016, 04:54:53 am
How do I select individual objects in a prefab?
Title: Re: [Tutorial] Custom Perks
Post by: hajhaka on December 06, 2016, 03:30:20 pm
It just lets me spam buy it even if i already have it
Title: Re: [Tutorial] Custom Perks
Post by: Blink-420 on December 06, 2016, 11:57:29 pm
Title: Re: [Tutorial] Custom Perks
Post by: qwerty195 on December 30, 2016, 04:44:26 pm
I made a custom model for the perk machine and bottle weapon. How do I refer to them in the gsh though? I don't tink just putting the name in from APE works.
Title: Re: [Tutorial] Custom Perks
Post by: shinged on December 30, 2016, 06:47:15 pm
I made a custom model for the perk machine and bottle weapon. How do I refer to them in the gsh though? I don't tink just putting the name in from APE works.
You also need to precache the model either in your zone file or by placing the model somewhere in your map. Usually you replace the machine model in radiant with yours
Title: Re: [Tutorial] Custom Perks
Post by: qwerty195 on January 02, 2017, 11:55:06 pm
Okay I have no idea why this has happened because it was working alright earlier, but now whenever I buy the custom perk, this happens:
There is no animation involving the drinking of the perk
The shader doesn't appear
The actual perk effect doesn't happen
Player can no longer sprint or knife
Seems to nullify the effects of Solo quick revive (maybe other perks; I haven't really tested)
This is obviously very broken and I don't know why. I checked through all the files a million times to see that I've followed the tutorial, but maybe I'm missing something? The last thing I was doing was trying to get the custom models for the perk machine, bottle and shader to work (which by the way, the perk machine model does work). Any ideas?
Title: Re: [Tutorial] Custom Perks
Post by: HitmanVere on January 08, 2017, 02:53:15 pm
Okay I have no idea why this has happened because it was working alright earlier, but now whenever I buy the custom perk, this happens:
There is no animation involving the drinking of the perk
The shader doesn't appear
The actual perk effect doesn't happen
Player can no longer sprint or knife
Seems to nullify the effects of Solo quick revive (maybe other perks; I haven't really tested)
This is obviously very broken and I don't know why. I checked through all the files a million times to see that I've followed the tutorial, but maybe I'm missing something? The last thing I was doing was trying to get the custom models for the perk machine, bottle and shader to work (which by the way, the perk machine model does work). Any ideas?
Its not properly giving you perks weaponfile, thats why you cant sprint/knife and animation doesnt play
Title: Re: [Tutorial] Custom Perks
Post by: qwerty195 on January 10, 2017, 03:12:17 pm
Quote
Its not properly giving you perks weaponfile, thats why you cant sprint/knife and animation doesnt play
I figured it out. Like you said I didn't do the perk bottle weapon correctly and that caused all the errors. I changed it back to the stock speed cola bottle and now it works fine.
Title: Re: [Tutorial] Custom Perks
Post by: DeletedUser on January 17, 2017, 04:31:18 pm
All you need to do is select it in radiant right click hgover your mouse over prefab and at the bottom it says stamp prefab
Title: Re: [Tutorial] Custom Perks
Post by: Harry Bo21 on January 17, 2017, 10:16:08 pm
dont stamp...
"enter" prefab
Title: Re: [Tutorial] Custom Perks
Post by: qwerty195 on January 20, 2017, 07:36:13 pm
I got this perk thing figured out alright and everything works fine, except that Solo Quick Revive doesn't work after you purchase the custom perk. You just die like you don't have it.
Title: Re: [Tutorial] Custom Perks
Post by: Archaicvirus on May 31, 2017, 12:12:05 am
This is the fix for anyone having the problem where you can spam buy the perk 4 times:
*Credit to death_reaper0 for the solution https://ugx-mods.com/forum/index.php/topic,15329.0.html
Title: Re: [Tutorial] Custom Perks
Post by: Harry Bo21 on May 31, 2017, 05:56:57 pm
you cant use custom speciallties
this wont work
if self haasPerk( whatever ) will stilll return false
Title: Re: [Tutorial] Custom Perks
Post by: Archaicvirus on May 31, 2017, 11:19:11 pm
How so? The way I have it set up I just check a custom variable self.hasFreezePerk which I set in the give perk function and also set it to false in the take perk function. The function that's responsible for the perk effect checks for that custom variable by way of a damage callback on zombies with the attacker. Everything is working fine that I can tell. I'll follow your advice though, my only concern is that if I use an existing specialty, won't I inadvertently gain that ability?
Title: Re: [Tutorial] Custom Perks
Post by: Astaal on July 14, 2017, 12:34:57 am
Potentially dumb question, how do I align the perk to fit in the perkl 'queue'? Is there a bit of code that I'm missing?
(http://i.imgur.com/cElrcKh.jpg)
Title: Re: [Tutorial] Custom Perks
Post by: Seagoatdaddy on May 19, 2020, 04:37:20 am
Not to necro the thread or anything, but your script download is no longer there. It has been removed and I'm wondering where I can even find this script again.