UGX-Mods

Call of Duty 5: World at War => Downloadable Items for Mappers => Custom Maps, Mods & Tools => Scripts => Topic started by: WhiteDevil on November 12, 2015, 11:18:26 am

Title: [TUTORIAL] How to add a Colored Zombie Counter
Post by: WhiteDevil on November 12, 2015, 11:18:26 am
I have done some modifications on the original zombie counter made by Tom_Bmx.
 
This is how it looks:
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FV1joLoz.png%3F1&hash=8a7493848d64535d09058c4d594df72fa53100b2)
 
This is how it looks in-game(video):
! No longer available (http://www.youtube.com/watch?v=OGsNcT_h0Ro#)
 
How to add it to your MOD
1). Download the .gsc file:
https://mega.nz/#!XIsgjLzJ!O0CLnhxrst924RxYcLTmHkvvHG96v6t5zloz03shw7M (https://mega.nz/#!XIsgjLzJ!O0CLnhxrst924RxYcLTmHkvvHG96v6t5zloz03shw7M)
 
2). Place the .gsc file in your CODWAWROOT/mods/MODNAME/maps
 
3). Open your MODNAME.gsc and find this line:
Code Snippet
Plaintext
maps\_zombiemode::main();
and change it to this:
Code Snippet
Plaintext
level thread maps\_zombieCounter::main();
maps\_zombiemode::main();

4) Copy CODWAWROOT/raw/maps/_zombiemode.gsc to CODWAWROOT/mods/MODNAME/maps/_zombiemode.gsc
 
5) Open CODWAWROOT/mods/MODNAME/maps/_zombiemode.gsc and find this function:
Code Snippet
Plaintext
round_spawning()
scroll down until you find this:
Code Snippet
Plaintext
level.zombie_total = max;
mixed_spawns = 0;       // Number of mixed spawns this round.  Currently means number of dogs in a mixed round
change it to this:
Code Snippet
Plaintext
level.zombies_spawn_this_round = max;
level.zombie_total = max;
mixed_spawns = 0;       // Number of mixed spawns this round.  Currently means number of dogs in a mixed round

6)  Copy CODWAWROOT/raw/maps/_zombiemode_dogs.gsc to CODWAWROOT/mods/MODNAME/maps/_zombiemode_dogs.gsc
 
7)  Open CODWAWROOT/mods/MODNAME/maps/_zombiemode_dogs.gsc and find this function:
Code Snippet
Plaintext
dog_round_spawning()
scroll down until you find this:
Code Snippet
Plaintext
level.zombie_total = max;
dog_health_increase();
change it to this:
Code Snippet
Plaintext
level.zombies_spawn_this_round = max;
level.zombie_total = max;
dog_health_increase();

 
Include everything in the launcher:
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fs4W6FBd.png&hash=6bbe921edc3eacc0e475f3fc20c74e097fda9556)
 
And you're done... ;D
 
 
---- Update
 * The progress bar can't get longer than the progress bar itself
 * It now works in the dog rounds.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: DidUknowiPwn on November 12, 2015, 04:52:38 pm
I have done some modifications on the origional zombie counter made by Tom_Bmx.

This is how it looks:
(http://i.imgur.com/V1joLoz.png?1)

This is how it looks ingame(video):
https://www.youtube.com/watch?v=OGsNcT_h0Ro (https://www.youtube.com/watch?v=OGsNcT_h0Ro)

How to add it to your Mod
1). Download the .gsc file
https://mega.nz/#!qJE1iJZY!r7hl6DOtyX7kP38kqUK4HlRoKa0wvXj-zEU5rl1kQEI (https://mega.nz/#!qJE1iJZY!r7hl6DOtyX7kP38kqUK4HlRoKa0wvXj-zEU5rl1kQEI)

2). Place the .gsc file in your CODWAWROOT/mods/MODNAME/maps

3). Open your MODNAME.gsc and find this line:
Code Snippet
Plaintext
    maps\_zombiemode::main();

change it to:
Code Snippet
Plaintext
	level thread maps\_zombieCounter::main();
maps\_zombiemode::main();

4). Copy CODWAWROOT/raw/maps/_zombiemode.gsc to CODWAWROOT/mods/MODNAME/maps/_zombiemode.gsc

5). Open CODWAWROOT/mods/MODNAME/maps/_zombiemode.gsc and find this function:
Code Snippet
Plaintext
       round_spawning();
scroll down untill you find this:
Code Snippet
Plaintext
	level.zombie_total = max;
mixed_spawns = 0; // Number of mixed spawns this round.  Currently means number of dogs in a mixed round
and change it to this:
Code Snippet
Plaintext
	level.zombies_spawn_this_round = max;
level.zombie_total = max;
mixed_spawns = 0; // Number of mixed spawns this round.  Currently means number of dogs in a mixed round

Don't forget to include everything in your launcher!

And you're done... ;D
Welcome back :D
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: WhiteDevil on November 12, 2015, 09:16:54 pm
Thanks man, i have alot of spare time now finally.. so i'm gonna do some more modding :D. More tutorials are comming :)
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: DidUknowiPwn on November 12, 2015, 10:55:02 pm
Thanks man, i have alot of spare time now finally.. so i'm gonna do some more modding :D. More tutorials are comming :)
Wait until BO3 then it'll be more fun :3
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: jei9363 on November 13, 2015, 02:40:52 am
awesome man :) going to add a skull that turns this on in my map. but if you manually spawn in zombies..

(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FB2WzDUM.jpg&hash=7bb366c438167a8761883f6a5b81b03812df040e)

ill post the fix when I get some more modding time:)
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: WhiteDevil on November 13, 2015, 02:26:07 pm
Wait until BO3 then it'll be more fun :3

Yea that's gonna be fucking awesome.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: Tim Smith on November 14, 2015, 08:55:49 pm
awesome man :) going to add a skull that turns this on in my map. but if you manually spawn in zombies..

(http://i.imgur.com/B2WzDUM.jpg)

ill post the fix when I get some more modding time:)

:please: the bar of the counter is going out + textures look awful :troll:

anyway i have seen this somewhere but i can't remember it

thx :P
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: Ping998 on November 15, 2015, 02:33:08 pm
This is fantastic! Good job! :D
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: jakob9696 on November 20, 2015, 08:03:54 pm
Thanks ! nice job ;)
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: TheLapper96 on November 20, 2015, 11:57:23 pm
This is literally my first post on these forums >.> But I'm trying to make my first ever map/mod thing for Waw, and I can't really get this to work. But I did follow everything you said, I only don't get what you meant by including it all in the launcher... But to sum it up, in game, it doesn't show up. Any help is aprieciated ^^;
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: LegendHugo on November 21, 2015, 10:23:18 am
nice one :)
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: WhiteDevil on November 21, 2015, 03:59:29 pm
This is literally my first post on these forums >.> But I'm trying to make my first ever map/mod thing for Waw, and I can't really get this to work. But I did follow everything you said, I only don't get what you meant by including it all in the launcher... But to sum it up, in game, it doesn't show up. Any help is aprieciated ^^;

By include i mean you add the scripts to your mod, so they get loaded in game. Make sure your laucher looks like this:
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fa8DapDf.png&hash=2e7bedd547e530d042460cedf0afaa7de8c83e5c)
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: Ping998 on November 21, 2015, 04:32:44 pm
This will glitch out when you have mixed rounds btw.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: WhiteDevil on November 21, 2015, 04:58:52 pm
You mean de dogg rounds?
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: HitmanVere on November 21, 2015, 06:28:22 pm
You mean de dogg rounds?

He means rounds, where there is both zombies and dogs, which use spawn_zombie thing, same thing as here:

awesome man :) going to add a skull that turns this on in my map. but if you manually spawn in zombies..

(http://i.imgur.com/B2WzDUM.jpg)

ill post the fix when I get some more modding time:)
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: WhiteDevil on November 21, 2015, 06:53:03 pm
He means rounds, where there is both zombies and dogs, which use spawn_zombie thing, same thing as here:

ah alright, I only have zombies i my map so i havenĀ“t tested it for dogs or other spawned creatures. I will make fix for it.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: Ping998 on November 21, 2015, 07:29:23 pm
He means rounds, where there is both zombies and dogs, which use spawn_zombie thing, same thing as here:

That ^

I dont know if you could update it where if the value is -1 or less the percentage is automatically sent to 0, it wont fix the counter but it will fix the progress bar so it is less noticeable
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: WhiteDevil on November 24, 2015, 01:29:41 am
Uploaded a fix for the dogs, and the progress bar can't exceed it's maximum limit of 100%.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: Harry Bo21 on November 24, 2015, 01:39:47 am
Code Snippet
Plaintext
level.zombie_total = max;

your defining this twice in two different places

_zombiemode.gsc

&

_zombiemode_dogs.gsc
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: WhiteDevil on November 24, 2015, 01:48:48 am
Code Snippet
Plaintext
level.zombie_total = max;

your defining this twice in two different places

_zombiemode.gsc

&

_zombiemode_dogs.gsc

Yes. This is because when it's a zombie round this will get the maximum amount of zombies that spawn in that round and when it's a dog round it will get the maximum amount of dogs that spawn in that round. Because call of duty uses 2 different spawning function for dog rounds / zombie round i have added it twice. These two functions will never be called together in 1 round. So therefore there shouldn't be a problem.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: Harry Bo21 on November 24, 2015, 02:04:13 am
Yes. This is because when it's a zombie round this will get the maximum amount of zombies that spawn in that round and when it's a dog round it will get the maximum amount of dogs that spawn in that round. Because call of duty uses 2 different spawning function for dog rounds / zombie round i have added it twice. These two functions will never be called together in 1 round. So therefore there shouldn't be a problem.
ok fair enough, but what about mixed rounds? Will it actually count the dogs? They are spawned "alongside" a zombie if i recall the code correctly like :

Spawning logic()
{
  can i spawn a zombie?
  yes - can i spawn a dog, if so spawn dog + zombie
  if no - just spawn zombie
}
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: WhiteDevil on November 24, 2015, 02:09:12 am
Yes because before a dog or zombie is spawned in a mixed round there is already a maximum enemies(Zombies/Dogs) defined. So for example the maximum enemies is 72. When a zombie spawns, 71 enemies still have to spawn(These enemies can be dogs or zombies). When a dog spawns, 70 enemies still have to spawn(These enemies can also be dogs or zombies). This will go on and on. Until it reaches 0 and no enemies will be spawned, then it will wait until all the enemies are dead and the next round will start.

My counter only grabs the maximum enemies that can spawn in that round.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: Harry Bo21 on November 24, 2015, 02:24:04 am
Yes because before a dog or zombie is spawned in a mixed round there is already a maximum enemies(Zombies/Dogs) defined. So for example the maximum enemies is 72. When a zombie spawns, 71 enemies still have to spawn(These enemies can be dogs or zombies). When a dog spawns, 70 enemies still have to spawn(These enemies can also be dogs or zombies). This will go on and on. Until it reaches 0 and no enemies will be spawned, then it will wait until all the enemies are dead and the next round will start.

My counter only grabs the maximum enemies that can spawn in that round.
hmm... well if you say so but the way i read it was

can i spawn 1 zombie? If yes, then also try to spawn a dog, regardless of the remaining count. which would leave you on -1

But i dont remember and cant check atm. If your sure its ok, it prob is
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: WhiteDevil on November 24, 2015, 02:29:35 am
i'm sure because when a zombie is spawned the maxium is lowerd with -1, and when a mixed dog is spawned it's again lowered with -1. Before either one of those spawns it first check if it can spawn(It check if the maxium is higher than 0). Doesn't matter if it spawn first the zombie and then checks if it can spawn a dog and then spawns a dog.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: Harry Bo21 on November 24, 2015, 02:45:20 am
i'm sure because when a zombie is spawned the maxium is lowerd with -1, and when a mixed dog is spawned it's again lowered with -1. Before either one of those spawns it first check if it can spawn(It check if the maxium is higher than 0). Doesn't matter if it spawn first the zombie and then checks if it can spawn a dog and then spawns a dog.
alrighty then  :)
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: cqgzxcvbnm on November 27, 2015, 10:48:18 am
it's nice setting, but shades is limited  :(
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: TheLapper96 on November 27, 2015, 03:57:05 pm
I really don't know what I'm doing wrong, I've followed this tutorial about 10 times, but every time I go in game, the counter stays at 0, doesn't matter how many zombies spawn...
Anyone know what I did wrong?
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: LegendHugo on November 27, 2015, 07:28:01 pm
I really don't know what I'm doing wrong, I've followed this tutorial about 10 times, but every time I go in game, the counter stays at 0, doesn't matter how many zombies spawn...
Anyone know what I did wrong?
Im a noob in scripting and i managed to do it easily. Make sure you edit the script correctly. Also try to rebuild the mod
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: TheLapper96 on November 27, 2015, 07:40:35 pm
Im a noob in scripting and i managed to do it easily. Make sure you edit the script correctly. Also try to rebuild the mod

I have rebuilt the mod, several times even.
But it didn't make a difference, sadly.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: WhiteDevil on November 27, 2015, 08:58:18 pm
I have rebuilt the mod, several times even.
But it didn't make a difference, sadly.

It's very important you copy your _zombiemode.gsc / _zombiemode_dogs.gsc to your wawroot/mods/MODNAME/maps and include them in your launcher! This means checking them in the iwd file list
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: TheLapper96 on November 28, 2015, 01:51:41 pm
It's very important you copy your _zombiemode.gsc / _zombiemode_dogs.gsc to your wawroot/mods/MODNAME/maps and include them in your launcher! This means checking them in the iwd file list

I have done this I mean, let me show you in a screenshot:
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FXQuFwfF.png&hash=cb1902be6eebc7dcc5841ca8fa36476446f0ba30)

I think I did this part correct, I mean, the counter does show up in game, it just doesn't count zombies, it just says 0 all the time.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: UnholyBeast on November 30, 2015, 07:29:46 am
Sweet thanks! Gonna use this in my map.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: WhiteDevil on November 30, 2015, 08:47:29 am
I have done this I mean, let me show you in a screenshot:
(http://i.imgur.com/XQuFwfF.png)

I think I did this part correct, I mean, the counter does show up in game, it just doesn't count zombies, it just says 0 all the time.

If the counter shows up in the game then you have successfully included the _zombieCounter.gsc and started the main function of the script(Step 1 to 3). You probably have edited the _zombiemode.gsc and _zombiemode_dogs.gsc in your raw/maps instead of your mods/MODNAME/maps. So make sure you do step 4 to 7 correctly.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: steviewonder87 on November 30, 2015, 10:48:46 am
I have done this I mean, let me show you in a screenshot:
(http://i.imgur.com/XQuFwfF.png)

I think I did this part correct, I mean, the counter does show up in game, it just doesn't count zombies, it just says 0 all the time.

Off topic but why do you appear to have your map source folder in your mod? ???
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: TheLapper96 on November 30, 2015, 03:09:24 pm
Off topic but why do you appear to have your map source folder in your mod? ???

I followed a youtube video and it literally said I had to do that >.>
But I guess that youtube video was wrong, I'm pretty sure there's much more in the wrong places...
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: MZslayer11 on November 30, 2015, 04:41:04 pm
I followed a youtube video and it literally said I had to do that >.>
But I guess that youtube video was wrong, I'm pretty sure there's much more in the wrong places...
Yeah map source does not need to be in mod folder. Just in the root of the folder.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: Tim Smith on November 30, 2015, 08:29:18 pm
Off topic but why do you appear to have your map source folder in your mod? ???

stevie people teaching other people to have map source folder in their mods coz they want to steal it , i would have do that if i'm a youtuber :troll:
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: Harry Bo21 on December 03, 2015, 08:19:11 pm
stevie people teaching other people to have map source folder in their mods coz they want to steal it , i would have do that if i'm a youtuber :troll:
odds are there would be nothing to steal, would just be extracting prefabs which they dont have the resources from,so will just be a assortment of red cubes and patches/brushs with the default texture on them

his point was, its completely unnecesary and bloats your mods size

* edit, unless youve been really silly and put your map file in there lol
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: Tim Smith on February 11, 2016, 10:21:32 am
odds are there would be nothing to steal, would just be extracting prefabs which they dont have the resources from,so will just be a assortment of red cubes and patches/brushs with the default texture on them

his point was, its completely unnecesary and bloats your mods size

* edit, unless youve been really silly and put your map file in there lol
don't you want my xanims/xmodels to put in the mod ? ffs.
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: Harry Bo21 on February 12, 2016, 03:41:27 pm
don't you want my xanims/xmodels to put in the mod ? ffs.
not sure what that response is actually trying to say
Title: Re: [TUTORIAL] How to add a Colored Zombie Counter
Post by: BixMix on November 08, 2019, 08:18:33 pm
Dead link mate, please update with a new link.