I already had a tutorial for this on ZM for about 2 weeks, and some people might have seen it in the "Christmas with the Joker" map by WhippyTrout ( wich was also on NGT btw! and is a very cool and very custom map!). In that version the site's remained empty after searched. I updated that tutorial and added random respawning, so i decided i'd post it here as well.. Anyways, cut the BS. here's the tut:
Download the files at the end of this post (contains the script, the dollar sign model & materials and the files for the walther-pistol + upgraded one) offcourse, you dont have to use the walther if you dont want to...
1-First download the files and extract them. Copy the contents of the "copy to raw folder" into your \game_root\raw\ folder, and copy the contents of the "copy to mods mapname folder" into the \game_root\mods\name-of-the-map-to-install-to\ (example: nazi_zombie_factory ). These files also contain the files for the walther pistol, and an upgraded version. It doesn't contain any fx or sounds since this tut is using stock fx and sounds so you should be fine if you havent messed with those.
NOTE: the weapons i included in the crates are stock WaW weapons, if you're using UGX-MOD open up _dig_site.gsc AFTER completing this tutorial, search for the gun_reward() function and change the weapons to UGX weapons!!!!!
2-Open your mapname.gsc file (you can find it in \raw\maps\), copy it into your mods\mapname\maps\ folder. --->if your using UGX-MOD it's already in your mods/mapname folder<---- Open it and find the line:
above this line you add:
and below this line you add:
An example of how it should look (your mapname.gsc might look diffent, so don't copy this code!)
example BEFORE:
example AFTER EDITING:
NOTE: I included the walther pistol and an upgraded version in this download because i felt there had to be more crappy pistol's inside the crate's.. You obviously don't need to use it if you don't want to, in that case you can continue with step 7. Keep in mind when you skip step 3-6 entirely the script is NOT ready for use and you need to go inside _dig_site.gsc after completing this tut, and change the rewards that spawn for the gun-crate's so the walther doesn't show up anymore... I left note's in the _dig_site.gsc file on where to make any changes so that shouldn't be to hard at all.
3a- ONLY FOR NON UGX-MOD USERS (if you're using ugx-mod follow step 3b and ignore this one) : next open up dlc3_code.gsc (copy from raw\maps\ to your mods\mapname\maps folder ) and find the part that says 'include_weapon( "zombie_colt" );' etc. etc. right below all these include_weapon lines add these:
3b- FOR UGX-MOD USERS: open up ugx_mod.iwd (with winRAR) open the maps folder, and edit _zombiemode_weapons.gsc in there (make a backup!!!).
find all the line's that say:
and below these line's add these two: Change the first "false" entry IN THE FIRST LINE ONLY to "true" if you want the walther to appear in the random-box
Save and close. When closing the file you'll be asked if you want to update the archive, CLICK YES!
4-FOR NON UGX-MOD users (if you're using ugx-mod skip this step and go to step 6 ): open up _zombiemode_weapons (copy from raw\maps\ to your mods\mapname\maps folder)
-next find the part that says 'add_zombie_weapon( "zombie_colt" .....' and where it add's all the weapons. Now pay attention here!
-if you DON'T want to add the wather as a BUYABLE WALL weapon follow option AAA (save's you a hintstring, because the limit for those seems kind of low..)
-if you DO want to make the Walther a buyable wall weapon follow option BBB.
---I intended the walther NOT to be a buyable weapon, so only way to get the gun/ammo is by power_ups or dig_site's that why i made it a bit more powerfull than for example the colt. It would be a 'rare' weapon and you would be pretty insane to PaP it. That's also why it does have a little kick to it.---
OPTION AAA - Add these lines somewhere in between the other weapon lines
--PROCEED TO STEP 6!--
OPTION BBB- Add these lines somewhere in between the other weapon lines
--PROCEED TO STEP 5!-- (note: the walther will cost 800, you can change this by changing EVERY 800 entry in this step AND IN STEP 5 as wel!!
5-go to "game_root\raw\english\localizedstrings\" and find the file "zombie.str". For this to work you can't copy the file to your mods\ folder (as far as i know) so edit it right where it is, but make a backup first! Open the "zombie.str" file and go to the bottom and add these line's:
6-The upgraded walther is the Walther P382.0 (i suck at making up names, i'm sorry) and it has "double tap 2.0". Meaning in this case: when you fire the gun you see the impact of 2 rounds, while it's a single shot. Also when you shoot a zombie once you get 2x 10 points. To make these changes
FOR NON UGX-MOD users: first open up _zombiemode_spawner.gsc (copy from raw\maps\ to your mods\mapname\maps folder before editing!)
FOR UGX-MOD users:open up ugx_mod.iwd and go to the maps folders, open _zombiemode_spawner.gsc from there, When done and closing the file you'll be asked if you want to update the archive, CLICK YES!
--find the function 'zombie_damage()' and scroll down a bit in this function till you see
right under that, add these lines:
next, scroll down some more till you see the function 'zombie_damage_ads()' and again right under
add these lines:
Save and close.
FOR NON UGX-MOD users.. Find _zombiemode_score (copy from raw\maps\ to your mods\mapname\maps folder )
FOR UGX-MOD users: open ugx_mod.iwd (with winRAR, make a backup!!) and edit _zombiemode_score in there, When done and closing the file you'll be asked if you want to update the archive, CLICK YES!
Next open up and you should be looking at the first function 'player_add_points' (if not, find this function) scroll down a bit till you see the 'switch( event )' and, some lines below that, the case declarations ( "case_death" , "case_damage" etc). Now add these 2 set's of lines right above the line that says 'default:' So to make sure: add both of these in between the lines 'break;' and 'default:'
save and close. That's it for the Walther!
7-go to your \game_root\zone_source\ folder and find yourmapname.csv Leave it where it is, so make a backup before editing. Open it and at the end add the following:
If you included the walther take the code from option A, if you decided NOT to include the walther follow option B.
--OPTION A--
--OPTION B--
NOTE: i put in the FX files for the bouncing_betty because i had previously deleted those from my dl3c.csv to avoid FX-limit error's. If you havent messed with any of the stock FX you could probably delete those last three line's saying: 'fx,weapon/bouncing_betty/...' NOTE2: If you're using UGX-mod you might need to add the FX for the der_riese style powerup-drop to appear correct!!!
That should be the scripting part, if you go to your \mods\mapname\maps\ folder and open up _dig_site.gsc you can edit pretty much anything. From point amounts that drop, to drop rates. change the weapons that drop etc. I left side note's in the script on what to edit where.
The Radiant part:
There are 4 different triggers working in this script, for all 4 goes the same: make the trigger a square box of 40x40x40 units and place it on the ground otherwise the models won't spawn in correct. All models (crate's and saw's use a randomized angle and wil just appear flat on the ground (or table or whatever). You don't need to place actual models, they spawn in through script. For all triggers make a 'trigger_use'.
-first one: Where the player can pick up a saw. A player can only carry 1 saw so no need to add more than 4, there is no limit however. assign these KVP's :
-second one: a normal crate that spawns random points, or an ammo refill for the player that finds it for the weapon he's holding, or a armed bouncing betty. There is no limit on how many you place.. assign these KVP's:
-third one: a special crate that spawn's a random powerup or a armed bouncing betty. Again no limit on how many you use. assign these KVP's:
-last one: a weapon crate that spawn's a 'random' weapon (see vid). Again no limit on how many you use. assign these KVP's:
At the beginning of a new round an empty crate has about 15% chance of respawning. If it does, it'll ignore the original script-noteworthy you gave it and spawns in random as either a special crate (10%) - weapon crate (5%) or a points crate (85%). At round 1 all crate's you placed will spawn in, and they will 'obey' the script-noteworthy you gave them.
That's all, remember to select all new files in the MOD-Builder when compiling!
CREDITS: Don Goony (hacker function implemented in this script), YaPhil (providing a fix for doing damage to the players) and BluntStuffy (that's me :CREDITS
If you implement this in your map, please give credit. Thanks! And if you'd send me a link or message when your map is released that would be great to!
I think i got pretty much everything covered, if you feel like i forgot something, or if you're having troubles with the files or the script. Let me know below
Last Edit: December 30, 2013, 01:13:43 am by BluntStuffy
There are 4 different triggers working in this script, for all 4 goes the same: make the trigger a square box of 40x40x40 units and place it on the ground otherwise the models won't spawn in correct. All models (crate's and saw's use a randomized angle and wil just appear flat on the ground (or table or whatever). You don't need to place actual models, they spawn in through script. For all triggers make a 'trigger_use'.
The size has to be exactly what it says 40x40 i think for the trigger were you want the dig spots
Last Edit: March 10, 2014, 05:05:48 am by rambobada555555
This one works to, i've tested it multiple times and i've also seen 4 or 5 other people that have added them without any issue's..
So no model's spawn, and no error's pop up? Did you thread the script in your mapname.gsc and added the precache line? And are you sure you got all kvp's right??
Also the size for the triggers doesn't matter for them working or not. Only when you make them 40x40x40 the models should spawn on the ground and otherwise they will be floating or stuff like that.. They should work anyway..
Last Edit: March 10, 2014, 07:49:05 am by BluntStuffy
This one works to, i've tested it multiple times and i've also seen 4 or 5 other people that have added them without any issue's..
So no model's spawn, and no error's pop up? Did you thread the script in your mapname.gsc and added the precache line? And are you sure you got all kvp's right??
Also the size for the triggers doesn't matter for them working or not. Only when you make them 40x40x40 the models should spawn on the ground and otherwise they will be floating or stuff like that.. They should work anyway..
my map.gsc looks like this
and im sure al kvps are right :L what may be the problem?
uhmmm...wtf ??? that creeps the shit out of me, zombiemode loaded without a problem and the wasnt syntax errors but thanks anyways xD you saved me again
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.
If the models included with this tutorial download are ripped directly from BO2, please (either by yourself or by recruiting the help of another member) remake your own model so that is legal to host on the site.
Thank you.
Edit: Also, looking at your tutorial I suggest you just edit your scripts so that you don't use STR references - it's an unnecessary complication for newbies and really does not provide any advantage over setting the hintstring text via GSC in quotes.
If the models included with this tutorial download are ripped directly from BO2, please (either by yourself or by recruiting the help of another member) remake your own model so that is legal to host on the site.
Thank you.
Edit: Also, looking at your tutorial I suggest you just edit your scripts so that you don't use STR references - it's an unnecessary complication for newbies and really does not provide any advantage over setting the hintstring text via GSC in quotes.
Nope, only stock WaW models. I used a crate and a saw model, just called it "dig-sites" so people would know what i was talking about.. I'll edit the hintstring part tomorow or maybe monday.. Kind of busy right now
Im getting the same ive edited map .gsc , placed trigger use for the digsites and saw at 40x40x40 (flat) . ive ticked of saw hud in mod builder. (is that the only one I should have) I cant see the saw or digsites but they are there, I pick up saw and it says ive picked it up but I cant see it. I cant see the other digsites , but they are there . I get no fx`s or models apart from the free weapon. can someone help please.
Im getting the same ive edited map .gsc , placed trigger use for the digsites and saw at 40x40x40 (flat) . ive ticked of saw hud in mod builder. (is that the only one I should have) I cant see the saw or digsites but they are there, I pick up saw and it says ive picked it up but I cant see it. I cant see the other digsites , but they are there . I get no fx`s or models apart from the free weapon. can someone help please.
did you add both these line's in your mapname.gsc?
And put them in the right place? post your mapname.gsc if you're not sure..
And you just need to tick every new file in the mod-builder. images - scripts , everything new in there..