UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

[User Tutorial] BO Perks w/ UGX-Mod v1.0.3 (fix for BamSkater33's perks)

broken avatar :(
Created 11 years ago
by JR-Imagine
0 Members and 1 Guest are viewing this topic.
4,493 views
broken avatar :(
×
broken avatar :(
Location: be
Date Registered: 17 August 2013
Last active: 2 years ago
Posts
369
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
Web & Software Developer and Designer
Signature
"Deleted code is debugged code." - Jeff Sickel
"Mathematicians stand on each others' shoulders and computer scientists stand on each others' toes." - Richard Hamming
×
JR-Imagine's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
For those looking for a completely fixed Mule Kick and perk loss on death: CLICK

First of all I'd like to thank BamSkater33 for his time and effort he put into making the perks work with stock maps, he helped the community a lot. Also, please note that this is only a temporary solution untill the UGX team releases UGX-Mod v1.1. :rainbow:
I'd also like to mention that I'm still not able to make the perks go away after you die. ALL other things have been fixed that were needed to be fixed for UGX compatibility. If anyone has a solution for this, please feel free to share this with us. :)

First of all, I'm asuming that you already have done all modifications to the code needed to continue with this tutorial. If not: http://www.zombiemodding.com/index.php?topic=10345.0 DO NOT add in the codes for Quick Revive sine UGX already has a fixed Quick Revive.

Now onto the fixes:

1. Fixing Mule Kick

Go to mods/mapname/mapname.gsc and look for this line from Bam's tut:
Code Snippet
Plaintext
mule_kick()
{

self.given_kick = false;

while(1)
{

player_load = self GetWeaponsListPrimaries();

if((self hasperk("specialty_extraammo"))&&( player_load.size == 1)&&(self.given_kick == false))
{
if(!(self hasweapon("zombie_colt")))
self giveWeapon("zombie_colt");
if(!(self hasweapon("zombie_kar98k")))
self giveWeapon("zombie_kar98k");

player_load = self GetWeaponsListPrimaries();
if( player_load.size == 2)
{
if(!(self hasweapon("zombie_m1carbine")))
self giveWeapon("zombie_m1carbine");
}
self.given_kick = true;
}

if((self hasperk("specialty_extraammo"))&&( player_load.size == 2)&&(self.given_kick == false))
{
if(!(self hasweapon("zombie_colt")))
self giveWeapon("zombie_colt");
if(!(self hasweapon("zombie_kar98k")))
self giveWeapon("zombie_kar98k");

player_load = self GetWeaponsListPrimaries();
if( player_load.size == 2)
{
if(!(self hasweapon("zombie_m1carbine")))
self giveWeapon("zombie_m1carbine");
}
self.given_kick = true;
}

if(!(self hasperk("specialty_extraammo"))&&( player_load.size == 3))
{
player_load = self GetWeaponsListPrimaries();
if(player_load.size == 3 && self.being_revived == false)
{
self.muleweapon = player_load[2];
self takeweapon(self.muleweapon);
}
self.given_kick = false;
}


wait .1;
}
}

Replace this WHOLE chunck of code with:
Code Snippet
Plaintext
mule_kick()
{

self.given_kick = false;

while(1)
{

player_load = self GetWeaponsListPrimaries();

if((self hasperk("specialty_extraammo"))&&( player_load.size == 1)&&(self.given_kick == false))
{
if(!(self hasweapon("silver_deagle")))
self giveWeapon("silver_deagle");
if(!(self hasweapon("m9")))
self giveWeapon("m9");

player_load = self GetWeaponsListPrimaries();
if( player_load.size == 2)
{
if(!(self hasweapon("m14")))
self giveWeapon("m14");
}
self.given_kick = true;
}

if((self hasperk("specialty_extraammo"))&&( player_load.size == 2)&&(self.given_kick == false))
{
if(!(self hasweapon("m9")))
self giveWeapon("m9");

player_load = self GetWeaponsListPrimaries();
if( player_load.size == 2)
{
if(!(self hasweapon("m14")))
self giveWeapon("m14");
}
self.given_kick = true;
}

if(!(self hasperk("specialty_extraammo"))&&( player_load.size == 3))
{
player_load = self GetWeaponsListPrimaries();
if(player_load.size == 3 && self.being_revived == false)
{
self.muleweapon = player_load[2];
self takeweapon(self.muleweapon);
}
self.given_kick = false;
}
wait .1;
}
}
What this does is it basicly tells the game to add the weapons from UGX specified in the script to be added to the players weapon slots. Feel free to change the weapons to your likings.

2. Fixing Jugg (Yes, it's bugged after using the BO perks...)

Go to mods/mapname/ugx_mod.iwd/maps/_zombiemode_perks_black_ops.gsc. On line 43 change this:
Code Snippet
Plaintext
	set_zombie_var( "zombie_perk_juggernaut_health",	160 );

Into:
Code Snippet
Plaintext
	set_zombie_var( "zombie_perk_juggernaut_health",	280 );
Change the health value from 280 to anything else. (250 is the default in Der Riese, but I just like 280 more. :) )

3. Fixing perk shaders (icons)

There is a simple fix for this. Due to custom perk shaders having to be included in a .ff file we will have to tick the "Build mod.ff fastfile" option:


After compiling your map the Project Mover application will rename the mod.ff file you created to "localized_mapname.ff". (if set up correctly)

EXTRA'S

4. Lighting issues on perk machines
Go into Radiant and select one of the BO perk machines. (Mule Kick in this example) Then press the "Stamp" button.


Normally your perk machine should be lighted ingame now. (IDK why they aren't when still in Radiant as a prefab) If not, select the model entity for your perk machine and turn it into a misc->model by right clicking and selecting misc>model.


5. Changing prices
Open mods/mapname/ugx_mod.iwd/maps/_zombiemdoe_perks_black_ops.gsc and look for: (line 166)
Code Snippet
Plaintext
		cost = level.zombie_vars["zombie_perk_cost"];
switch( perk )
{
case "specialty_detectexplosive": //phd flopper
cost = 2000;
break;

case "specialty_longersprint": //staminup
cost = 2000;
break;

case "specialty_extraammo": //mule kick
cost = 4000;
break;

case "specialty_bulletaccuracy": //deadshot
cost = 1500;
break;
}
This contains the prices for all BO perks.

For an example I will be editing the price for Mule Kick. Find:
Code Snippet
Plaintext
		case "specialty_extraammo": //mule kick
cost = 3000;
break;
And replace "3000" with the price you want Mule Kick to be, for example:
Code Snippet
Plaintext
		case "specialty_extraammo": //mule kick
cost = 4000;
break;

6. Changing "Second Chance" string for Quick Revive to "Quick Revive" & changing the price (this is NOT a string for Bam's perks but for the UGX Revive)

String:
Open mods/mapname/ugx_mod.iwd/maps/_zombiemode_perks.gsc and find:
Code Snippet
Plaintext
// UGX_SCRIPT - self-revive quickrevive hintstring change
ugxm_sp_quickrevive_hint_update()
{
self SetHintString("Press & hold &&1 to buy Second Chance [Cost: " + 500 + ", Uses Left: " + level.ugxm_sp_quickrevive_maxuses + "]");
while(1)
{
level waittill("ugxm_selfrevive_used_quickrevive");
usesleft = level.ugxm_sp_quickrevive_maxuses - level.ugxm_sp_quickrevive_uses;
if(level.ugxm_sp_quickrevive_uses >= level.ugxm_sp_quickrevive_maxuses)
{
self SetHintString("Second Chance disabled!");
break;
}
else
{
self SetHintString("Press & hold &&1 to buy Second Chance [Cost: " + level.ugxm_chance_cost[level.ugxm_sp_quickrevive_uses] + ", Uses Left: " + usesleft + "]");
}
}
}
// UGX_SCRIPT END

Change this to:
Code Snippet
Plaintext
// UGX_SCRIPT - self-revive quickrevive hintstring change
ugxm_sp_quickrevive_hint_update()
{
self SetHintString("Press & hold &&1 to buy Quick Revive [Cost: " + 500 + ", Uses Left: " + level.ugxm_sp_quickrevive_maxuses + "]");
while(1)
{
level waittill("ugxm_selfrevive_used_quickrevive");
usesleft = level.ugxm_sp_quickrevive_maxuses - level.ugxm_sp_quickrevive_uses;
if(level.ugxm_sp_quickrevive_uses >= level.ugxm_sp_quickrevive_maxuses)
{
self SetHintString("Quick Revive disabled!");
break;
}
else
{
self SetHintString("Press & hold &&1 to buy Quick Revive [Cost: " + level.ugxm_chance_cost[level.ugxm_sp_quickrevive_uses] + ", Uses Left: " + usesleft + "]");
}
}
}
// UGX_SCRIPT END

Price:
Open mods/mapname/ugx_mod.iwd/maps/_zombiemode_perks.gsc and find:
Code Snippet
Plaintext
	// UGX_SCRIPT - ability to disable vendings
level waittill("ugxm_voting_complete");

if(!level.ugxm_settings["allow_perks"])
{
self SetHintString( level.ugxm_strings["hint_disabled"] );
self SetCursorHint( "HINT_NOICON" );
return;
}
level.ugxm_chance_cost = [];
level.ugxm_chance_cost[0] = 500;
level.ugxm_chance_cost[1] = 1500;
level.ugxm_chance_cost[2] = 3000;
// UGX_SCRIPT END

Change to this for the BO prices: (constant 500, please note that this might not be the most efficient method but it is however the easiest)
Code Snippet
Plaintext
	// UGX_SCRIPT - ability to disable vendings
level waittill("ugxm_voting_complete");

if(!level.ugxm_settings["allow_perks"])
{
self SetHintString( level.ugxm_strings["hint_disabled"] );
self SetCursorHint( "HINT_NOICON" );
return;
}
level.ugxm_chance_cost = [];
level.ugxm_chance_cost[0] = 500;
level.ugxm_chance_cost[1] = 500;
level.ugxm_chance_cost[2] = 500;
// UGX_SCRIPT END

As I already said, I stil haven't fixed the issue where perks won't go away when you go down. If anyone knows how to fix this, please post a reply and I'll add it to the tutorial and give you credit. Also, if you encounter any other problems, please tell me and I'll try to fix them. I don't remember there being any other problems I fixed but it is possible I forgot some.

I hope this helped you guys out a bit. :)
Last Edit: September 20, 2013, 03:40:58 pm by JR-Imagine
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 9 days ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
KDXDARK's Contact & Social Links
that mule kick script give you free weapons(what i see), this weekend i going to try to make it again.


or today.
broken avatar :(
×
broken avatar :(
Location: be
Date Registered: 17 August 2013
Last active: 2 years ago
Posts
369
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
Web & Software Developer and Designer
×
JR-Imagine's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
that mule kick script give you free weapons(what i see), this weekend i going to try to make it again.


or today.
Yeah, that's the only way people have been able to do it as far as I know. That's why I try to keep those weapons low powered. Although M14 isn't that bad, neither is the Deagle.
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 8 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
Signature
If Java had true garbage collection, most programs would delete themselves upon execution.
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
Great tutorial so far, this will help a lot of people. Now fix Mule Kick the rest of the way and develop a way to lose the perks on death. I was able to do this just fine in UGX Mod v1.1, so it's obviously possible.

The "free weapons" are because the script does not account for every time a weapon is given to the player (such as the Random Box, buying wall weapons, etc). Add some checks and safely to the weapon_give() and weapon_spawn_think() functions in UGX Mod's _zombiemode_weapons.gsc

Perks on Death Hint: Don't use HasPerk(), SetPerk(), or UnsetPerk() for any perks other than the default 4 - the functions are not reliable for the rest of the perk names in the engine. Develop your own version of those three functions which will store each player's perks within a variable set on the player ents themselves. Call your unset function in the same place that unsetperk() is called in _zombiemode_perks.
broken avatar :(
×
broken avatar :(
Location: be
Date Registered: 17 August 2013
Last active: 2 years ago
Posts
369
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
Web & Software Developer and Designer
×
JR-Imagine's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
I'll try to but I'm not that good at scripting in WaW. :( TBH, never even bothered doing it. I know how to do some basic things and I can make like my own perks and stuff but that's mostly copy & paste, change some stuff & done. Still though, I'll look through some documentation and I'll see what I can do. :)
EDIT: I propably won't get to scripting untill the weekend, quite bussy with school... :(
Last Edit: September 18, 2013, 12:32:29 pm by JR-Imagine
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 9 days ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
KDXDARK's Contact & Social Links
i remember mule kick took me like 3 weekends to get it working perfectly
broken avatar :(
×
broken avatar :(
The Doctor
Location: gbUnited Kingdom
Date Registered: 26 March 2013
Last active: 1 year ago
Posts
1,448
Respect
Forum Rank
Zombie Colossus
Primary Group
Donator ♥
My Groups
More
×
timelordalex's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
timelordalex's Contact & Social Links
bit out of place but in v1.1 will QR remain constantly at 500? dont know why it doubles each time
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 8 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
bit out of place but in v1.1 will QR remain constantly at 500? dont know why it doubles each time
It's an extra life, I think you can afford to spend a little more each time you waste it.

 
Loading ...