UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: GerardS0406 on February 22, 2015, 09:19:41 pm

Title: Weapon Chance
Post by: GerardS0406 on February 22, 2015, 09:19:41 pm
How do you change the chance of a weapon coming out of the box?
Title: Re: Weapon Chance
Post by: MrDunlop4 on February 22, 2015, 09:35:55 pm
Hey

Im not sure but i think this is impossible. I dont know :/

MrDunlop4
Title: Re: Weapon Chance
Post by: GerardS0406 on February 22, 2015, 09:37:16 pm
Hey

Im not sure but i think this is impossible. I dont know :/

MrDunlop4
Impossible? But my custom shotgun never shows up, neither does the ae4 but the Thundergun does almost every time...
Title: Re: Weapon Chance
Post by: MrDunlop4 on February 22, 2015, 09:42:22 pm
Impossible? But my custom shotgun never shows up, neither does the ae4 but the Thundergun does almost every time...

Hmm ask a scripter. I think a scripter knows more than me about this :D

MrDunlop4
Title: Re: Weapon Chance
Post by: JBird632 on February 22, 2015, 09:45:52 pm
Impossible? But my custom shotgun never shows up, neither does the ae4 but the Thundergun does almost every time...
Do you mean it literally never shows up, or that it rarely shows up, 'cause if it doesn't show up at all then you obviously didn't add it properly.
Title: Re: Weapon Chance
Post by: GrantDaddy007 on February 22, 2015, 10:36:20 pm
I could be wrong but I always thought it had to do with the number given to it in zombiemode_weapons.gsc.

so here is an example:
Code Snippet
Plaintext
include_zombie_weapon_ugx("m60", 						"M60", 							3000,	true,	undefined,									undefined, 	"vox_mg",  		4);

at the very end of the script the number "4" is the rarity of the gun coming out of the box.

Like I said I've never messed with it but I think that is how it's done.
Title: Re: Weapon Chance
Post by: JBird632 on February 22, 2015, 10:57:24 pm
I could be wrong but I always thought it had to do with the number given to it in zombiemode_weapons.gsc.
No if u read what the function does that number is actually the number of variants for the voiceover quotes that the players would say when you buy the weapon.
Title: Re: Weapon Chance
Post by: daedra descent on February 22, 2015, 11:14:08 pm
I think your looking for the weight arg in dlc3_code.gsc. Looks like you use a function to determine the weight:

Code Snippet
Plaintext
	include_weapon( "ray_gun", true, ::factory_ray_gun_weighting_func );
Title: Re: Weapon Chance
Post by: steviewonder87 on February 22, 2015, 11:25:51 pm
I think your looking for the weight arg in dlc3_code.gsc. Looks like you use a function to determine the weight:

Code Snippet
Plaintext
	include_weapon( "ray_gun", true, ::factory_ray_gun_weighting_func );
There is a stock function for the ray gun, tesla gun and monkeys, but they are quite complicated and make the guns more likely to appear in the box after a certain number of rolls of not seeing it I believe, but there is no simple number you can just change to make guns more rare/common. Also probably you didn't add the guns in dlc3code.gsc if you don't ever get them in a test map which from the looks of your video has no more than 10 guns in it.

On a side note why are all the guns you mentioned not from BO2, I thought you were spending all your time working really hard on making a BO2 mod?  ???
Title: Re: Weapon Chance
Post by: DeletedUser on February 23, 2015, 12:18:32 am
There is a stock function for the ray gun, tesla gun and monkeys, but they are quite complicated and make the guns more likely to appear in the box after a certain number of rolls of not seeing it I believe, but there is no simple number you can just change to make guns more rare/common. Also probably you didn't add the guns in dlc3code.gsc if you don't ever get them in a test map which from the looks of your video has no more than 10 guns in it.

On a side note why are all the guns you mentioned not from BO2, I thought you were spending all your time working really hard on making a BO2 mod?  ???
This ^ :P
Title: Re: Weapon Chance
Post by: GerardS0406 on February 23, 2015, 01:12:49 am
There is a stock function for the ray gun, tesla gun and monkeys, but they are quite complicated and make the guns more likely to appear in the box after a certain number of rolls of not seeing it I believe, but there is no simple number you can just change to make guns more rare/common. Also probably you didn't add the guns in dlc3code.gsc if you don't ever get them in a test map which from the looks of your video has no more than 10 guns in it.

On a side note why are all the guns you mentioned not from BO2, I thought you were spending all your time working really hard on making a BO2 mod?  ???
Because you don't read the BIG ALL CAPS WORDS WHICH SAY THE BOI GUNS ARE FOR SOMETHING ELSE! ;)
Title: Re: Weapon Chance
Post by: steviewonder87 on February 23, 2015, 02:24:20 am
Because you don't read the BIG ALL CAPS WORDS WHICH SAY THE BOI GUNS ARE FOR SOMETHING ELSE! ;)
And you didn't read my whole answer to your 'help' question and just focused on the side note...:poker:
Title: Re: Weapon Chance
Post by: GerardS0406 on February 23, 2015, 04:43:49 am
And you didn't read my whole answer to your 'help' question and just focused on the side note...:poker:
I really don't care anymore, obviously I'm not help to the zombie community so yea  :lol:  :alone:
Title: Re: Weapon Chance
Post by: steviewonder87 on February 23, 2015, 11:52:28 am
I really don't care anymore, obviously I'm not help to the zombie community so yea  :lol:  :alone:
:ok:
Title: Re: Weapon Chance
Post by: GerardS0406 on February 23, 2015, 08:44:40 pm
:ok:
BTW for your actual response not just the side note, adding guns to dlc3code is one of the most basic things in adding guns so why would I forget that?
Title: Re: Weapon Chance
Post by: steviewonder87 on February 23, 2015, 09:17:52 pm
BTW for your actual response not just the side note, adding guns to dlc3code is one of the most basic things in adding guns so why would I forget that?
Adding fire sounds is also one the most basic things, and normal/spc maps.... :poker:
Title: Re: Weapon Chance
Post by: GerardS0406 on February 23, 2015, 09:19:07 pm
Adding fire sounds is also one the most basic things, and normal/spc maps.... :poker:
Yup ;)  :poker: