General Support

[L4D2] How to Create Custom Melee Weapons

[L4D2] How to Create Custom Melee Weapons

Postby samm5506 » Sat Nov 28, 2009 9:40 pm

In this tutorial I will tell you how to create completely new melee weapons for L4D2. This will work with custom models with a catch, more on that later though. (Not worth it, unless you feel like experimenting)

Tools Required:
Notepad++
GCFscape 1.7.3 or above

Creating A Custom Melee Weapon Script:
1. Open up pak01_dir.vpk using GCFscape and navigate to /scripts/melee.
2. Copy melee_manifest.txt and any script located here, except for knife, into the same folder outside of the .vpk file. Example Image
3. Rename the file to anything else (Ex: baseball_bat.txt --> sledgehammer.txt).
4. I won't go into much detail here, but replace whatever you want within your new weapon script file.
5. Now open up melee_manifest.txt and add this line before the end bracket: "file" "scripts/melee/<my-melee-weapon-name-here>.txt" (WITH quotes) Example Image
6. Save and close melee_manifest.txt

Adding Your Custom Melee Weapon into a Campaign:
1. Create a new mission .txt file for your custom campaign OR open an existing campaign<#>.txt.
2. Edit or add the following: "meleeweapons" "<your-weapon-name>;tonfa;frying_pan;machete;electric_guitar;baseball_bat;knife" Example Image
3. Save the mission .txt file.

In-Game Use Setup:
1. Open up pak01_dir.vpk using Notepad++
2. Search for the following: "ÿÿmelee_manifest" (No quotes)
3. Replace this with a single letter replacement such as "ÿÿmelee_manefest"
4. [Optional - For placing in official campaigns] Search for the following: "ÿÿcampaign1", "ÿÿcampaign2", "ÿÿcampaign3", "ÿÿcampaign4", "ÿÿcampaign5"
5. [Optional] Replace a single letter for each searched. Example Image
6. Save.
7. Replace your whitelist.cfg file with the one included in the riotshield mod. (See Downloads)
8. Start up L4D2.

Notes:
• All custom melee weapons work online/offline when locally hosting and do NOT affect playing normally online.

Downloads:
Riotshield mod Alternate Mirror-- Adds a riotshield to all official campaigns. Works as of 11/28/09

Experimental Downloads - these files do not work as intended and need fixing:
Sledgehammer mod -- Not Yet Available
Sledgehammer source files -- Not Yet Available

Q&A:
Q: Will new custom melee weapons affect online play?
A: No. But if you are the host of a local or dedicated server, other players will be able to use the custom weapons.

Q: How come melee weapons work, but regular weapons don't?
A: Both melee and regular weapons have their own manifest files, which makes it seem like they would work, but there is a trick to melee weapons. Melee weapons have to also be added through mission .txt files, while regular weapons don't have that. There might be another method to adding weapons, but as of right now I don't know.

Q: How do I add melee weapons into a custom campaign?
A: You must create a mission .txt file for a campaign. The following file is an example of what it should look like. Use this as a skeleton for your campaign: Skeleton Mission .txt file

Q: How do I enable CS weapons in campaigns?
A: (This Doesn't work, but may lead to finding out how to) In the mission .txt files (ex: missions/campaign1.txt), there should be a line that says "no_cs_weapons" "1". Change the "1" to "0".

Q: Why did my custom model cause the screen to rotate 90 degrees?
A: This is a problem I experienced also in the process of trying to figure out how to get my sledgehammer's animations to work. All melee weapons include a bone called ValveBiped.Camera and ValveBiped.attach_camera. I'm not sure at the moment which one of these causes the problem or if at all, but try rotating -90 degrees.

More Q&A's to come as I think of them.
Last edited by samm5506 on Mon Nov 30, 2009 8:38 pm, edited 8 times in total.

!
WARNING! This post may contain an excessive amount of pure awesomeness.
samm5506
Smoker
Smoker
 
Posts: 111
Joined: Thu Dec 04, 2008 2:55 am
Steam ID: 76561197991989781

Re: [L4D2] How to Create Custom Melee Weapons

Postby Piercefield » Sat Nov 28, 2009 10:37 pm

Riotshield!
User avatar
Piercefield
Infected
Infected
 
Posts: 22
Joined: Sun Oct 04, 2009 10:04 am
Location: Denmark
Steam ID: piercefield

Re: [L4D2] How to Create Custom Melee Weapons

Postby no00dylan » Sat Nov 28, 2009 10:41 pm

Still waiting on the riotshield to upload :D
no00dylan
L4DMods Newbie
L4DMods Newbie
 
Posts: 1
Joined: Sat Nov 28, 2009 10:06 pm

Re: [L4D2] How to Create Custom Melee Weapons

Postby samm5506 » Sun Nov 29, 2009 1:33 am


!
WARNING! This post may contain an excessive amount of pure awesomeness.
samm5506
Smoker
Smoker
 
Posts: 111
Joined: Thu Dec 04, 2008 2:55 am
Steam ID: 76561197991989781

Re: [L4D2] How to Create Custom Melee Weapons

Postby Campin Carl » Sun Nov 29, 2009 1:46 am

That's great, but how do Install it if I have othe stuff I'd like to keep?
Campin Carl
L4DMods Newbie
L4DMods Newbie
 
Posts: 13
Joined: Sun Sep 27, 2009 8:05 am

Re: [L4D2] How to Create Custom Melee Weapons

Postby FuzzyMcFluffenstein » Sun Nov 29, 2009 11:54 am

if only i have the riot shield mod and host a game can everyone have the riot shield??
User avatar
FuzzyMcFluffenstein
28 Posts later
28 Posts later
 
Posts: 37
Joined: Mon Apr 20, 2009 9:37 pm

Re: [L4D2] How to Create Custom Melee Weapons

Postby Savage » Sun Nov 29, 2009 11:55 am

Yeah, if you host it locally everyone should get it. That's what Mod Description says.
Image
User avatar
Savage
Moderator
Moderator
 
Posts: 1214
Joined: Mon Dec 15, 2008 7:41 pm
Location: Sweden
Title: TK-421
Steam ID: MyGiftToYou

Re: [L4D2] How to Create Custom Melee Weapons

Postby chob33 » Sun Nov 29, 2009 12:35 pm

great!! :)
but can't download Riotshield Mod
chob33
L4DMods Newbie
L4DMods Newbie
 
Posts: 5
Joined: Fri Sep 18, 2009 4:01 pm

Re: [L4D2] How to Create Custom Melee Weapons

Postby paperboi126 » Sun Nov 29, 2009 12:52 pm

Same here, downloading of riot shield is broken :(

Is there no other way to download this?
Last edited by paperboi126 on Sun Nov 29, 2009 3:20 pm, edited 2 times in total.
paperboi126
L4DMods Newbie
L4DMods Newbie
 
Posts: 2
Joined: Sun Nov 29, 2009 12:47 pm

Re: [L4D2] How to Create Custom Melee Weapons

Postby Tribalizer » Sun Nov 29, 2009 12:54 pm

Calm down people, I think the downloads are just temporarily broken and they'll probably be fixed soon...Also I just got the knife for the uncensored german's game working ingame i'll upload it soon...
Image
User avatar
Tribalizer
Smoker
Smoker
 
Posts: 116
Joined: Sun May 03, 2009 7:27 pm
Location: That Way --->
Steam ID: Tribalizer

Re: [L4D2] How to Create Custom Melee Weapons

Postby paperboi126 » Sun Nov 29, 2009 3:20 pm

Anybody who have this riot shield downloaded that can upload it to a site like mediafire?

Thanks in advance, the site that is hosting the file could be offline for days...
paperboi126
L4DMods Newbie
L4DMods Newbie
 
Posts: 2
Joined: Sun Nov 29, 2009 12:47 pm

Re: [L4D2] How to Create Custom Melee Weapons

Postby Tribalizer » Sun Nov 29, 2009 3:45 pm

I just uploaded a fix to get the CSS knife working in L4D2 without being German, but seeing as L4DMods is having download issues I have also temporarily uploaded it here http://www.filefront.com/15056429/Working-German-Knife.zip/ Big thanks to samm5506 for his guide on getting new melee weapons into the game, and =DIKK=1SG.Heartless for helping me test it out.
Last edited by Tribalizer on Fri Dec 04, 2009 1:15 pm, edited 1 time in total.
Image
User avatar
Tribalizer
Smoker
Smoker
 
Posts: 116
Joined: Sun May 03, 2009 7:27 pm
Location: That Way --->
Steam ID: Tribalizer

Re: [L4D2] How to Create Custom Melee Weapons

Postby hilmart » Sun Nov 29, 2009 4:20 pm

Tribalizer wrote:I just uploaded a fix to get the CSS knife working in L4D2 without being German, but seeing as L4DMods is having download issues I have also temporarily uploaded it here http://www.filefront.com/15022761/Working-German-Knife.zip/ Big thanks to samm5506 for his guide on getting new melee weapons into the game, and =DIKK=1SG.Heartless for helping me test it out.

Could you tell us what lines in the pak01_dir.vpk have to be edited/added? Because I have other mods enabled and I want to use them aswell.
Image Image
User avatar
hilmart
Infected
Infected
 
Posts: 20
Joined: Sat Aug 22, 2009 12:48 pm
Location: Iceland
Steam ID: 76561197992608401

Re: [L4D2] How to Create Custom Melee Weapons

Postby Tribalizer » Sun Nov 29, 2009 4:49 pm

hilmart, follow the first 6 steps in the "In-Game Use Setup" part of the tutorial above
Image
User avatar
Tribalizer
Smoker
Smoker
 
Posts: 116
Joined: Sun May 03, 2009 7:27 pm
Location: That Way --->
Steam ID: Tribalizer

Re: [L4D2] How to Create Custom Melee Weapons

Postby hilmart » Sun Nov 29, 2009 4:53 pm

Tribalizer wrote:hilmart, follow the first 6 steps in the "In-Game Use Setup" part of the tutorial above

Ah... I kept reading that part over and over again and I didn´t know that all custom melee weapons use the same lines. Thanks.
Image Image
User avatar
hilmart
Infected
Infected
 
Posts: 20
Joined: Sat Aug 22, 2009 12:48 pm
Location: Iceland
Steam ID: 76561197992608401

Re: [L4D2] How to Create Custom Melee Weapons

Postby Ceiling Cat » Sun Nov 29, 2009 5:05 pm

For those of you wanting the RiotShield mod, I was able to download it a few days ago and I've uploaded it to FileFront for samm so you guys can download it from there until the link on this topic is fixed.

http://www.filefront.com/15023295/l4d2_ ... ld_mod.rar

^ Samm = ftw
User avatar
Ceiling Cat
L4DMods Newbie
L4DMods Newbie
 
Posts: 14
Joined: Sun Nov 29, 2009 5:04 pm
Location: Your Ceiling.
Steam ID: ceiling_cat_rawr
XBL: XBL = Fail.

Re: [L4D2] How to Create Custom Melee Weapons

Postby samm5506 » Sun Nov 29, 2009 6:15 pm

I don't know why the l4dmods.com mirror went down, so I added another mirror.

EDIT: Added Q&A's which should hopefully answer some questions. Also, for mappers, download the mission skeleton file to figure out how to add melee weapons into your campaign.

!
WARNING! This post may contain an excessive amount of pure awesomeness.
samm5506
Smoker
Smoker
 
Posts: 111
Joined: Thu Dec 04, 2008 2:55 am
Steam ID: 76561197991989781

Re: [L4D2] How to Create Custom Melee Weapons

Postby Hatschi » Sun Nov 29, 2009 9:09 pm

Maybe you should add in your "Q&As" this here from the riotshield mod, otherwhise many people wonder why their weapons are not appears after an update:

--IMPORTANT/WARNING--
Any updates to L4D2 will void this mod unless you know how to redo the
pak01_dir.vpk edits. Also remember to
backup your pak01_dir.vpk file before installing this mod.

--How to Reactivate Mod Incase of Update--
1. Open up pak01_dir.vpk using Notepad++
2. Search for the following: "ÿÿmelee_manifest" (No quotes)
3. Replace this with a single letter replacement such as "ÿÿmelee_manefest"
4. Search for the following: "ÿÿcampaign1", "ÿÿcampaign2", "ÿÿcampaign3", "ÿÿcampaign4", "ÿÿcampaign5"
5. Replace a single letter for each searched.
6. Save.
Hatschi
Infected
Infected
 
Posts: 21
Joined: Sat Jul 04, 2009 11:17 pm

Re: [L4D2] How to Create Custom Melee Weapons

Postby josko91 » Sun Nov 29, 2009 10:12 pm

Hope someone will figure out how to make a fully working minigun to run around with ;D ( If it would be possible that is)
josko91
Hunter
Hunter
 
Posts: 59
Joined: Sat Nov 22, 2008 4:16 pm

Re: [L4D2] How to Create Custom Melee Weapons

Postby Ferret205 » Mon Nov 30, 2009 1:32 pm

Can you have 2 custom weapons in the game at once and if you can, how do you do it?
Ferret205
L4DMods Newbie
L4DMods Newbie
 
Posts: 5
Joined: Sun Oct 11, 2009 1:03 pm

Re: [L4D2] How to Create Custom Melee Weapons

Postby Ferret205 » Mon Nov 30, 2009 2:32 pm

i Made a video of the Riot Shield in-game


Please comment, Im getting sad at the lack of them :(

EDIT: Just finished The CSS Knife too
Ferret205
L4DMods Newbie
L4DMods Newbie
 
Posts: 5
Joined: Sun Oct 11, 2009 1:03 pm

Re: [L4D2] How to Create Custom Melee Weapons

Postby Hatschi » Mon Nov 30, 2009 2:56 pm

The riotshield looks bad ingame, and the knife has a short range. Well is there an option to turn on the baseball bat ? I preordered the game, but on amazon.. and i didnt got this weapon =/
Hatschi
Infected
Infected
 
Posts: 21
Joined: Sat Jul 04, 2009 11:17 pm

Re: [L4D2] How to Create Custom Melee Weapons

Postby Tribalizer » Mon Nov 30, 2009 3:05 pm

The bat can (and will) be incorporated into L4D2 like the knife, I am making a pack that will include all the melee weapons for easy install/use.
Image
User avatar
Tribalizer
Smoker
Smoker
 
Posts: 116
Joined: Sun May 03, 2009 7:27 pm
Location: That Way --->
Steam ID: Tribalizer

Re: [L4D2] How to Create Custom Melee Weapons

Postby yuv912 » Mon Nov 30, 2009 3:06 pm

Hey,
I have a lot of questions I wanna get rid of...
Well, first of all I kinda like the idea of a riotshield but is it somehow possible to not make it a one-hit-kill weapon? I mean the purpose of a riotshield should be to avoid any contact with the infected and not to kill them. I already tried to change the damageflag in the riotshield.txt to "0" or maybe "5" but it's still one-hit-killing...

The next thing is, that I can't get my custom melee weapons to work. I don't know what I did wrong...but I think there might be still some problems with custom weapons. Would be nice if you could tell us how it works as soon as you figured it out. ;D

Last but not least...
You guys think it's possible to make some throwable weapons? I'm just thinking about a bowling ball which you can use as a simple melee weapon by clicking the left mousebutton but also throw it into the horde instead of shoving the infected by clicking the right mousebutton.
Would be awesome... (=
User avatar
yuv912
Infected
Infected
 
Posts: 15
Joined: Thu Nov 20, 2008 6:36 pm
Location: USA
Steam ID: yuv912

Re: [L4D2] How to Create Custom Melee Weapons

Postby Tribalizer » Mon Nov 30, 2009 3:12 pm

Here it is, the Melee Weapon Megapack http://www.filefront.com/15119321/Melee%20Weapon%20Megapack.zip

Currently includes:
- Riotshield
- CSS Knife
- Pre-Order Bat
Last edited by Tribalizer on Sat Dec 12, 2009 7:54 pm, edited 3 times in total.
Image
User avatar
Tribalizer
Smoker
Smoker
 
Posts: 116
Joined: Sun May 03, 2009 7:27 pm
Location: That Way --->
Steam ID: Tribalizer

Re: [L4D2] How to Create Custom Melee Weapons

Postby Savage » Mon Nov 30, 2009 4:31 pm

I'd like to see the police text when holding it aswell :) It looks really nice, would be cool if you used it to defend your front with scroll, push with right click and have a melee weapon/single pistol in your right hand to kill with. Unfortunately, that's probably not doable now (or ever)
Image
User avatar
Savage
Moderator
Moderator
 
Posts: 1214
Joined: Mon Dec 15, 2008 7:41 pm
Location: Sweden
Title: TK-421
Steam ID: MyGiftToYou

Re: [L4D2] How to Create Custom Melee Weapons

Postby Ferret205 » Mon Nov 30, 2009 4:48 pm

I noticed something with the Riot Shield. If you go into thridperson and switch to primary the Shield clips through like your whole body..Sorta ruins it when you see it on someone elses back.
Ferret205
L4DMods Newbie
L4DMods Newbie
 
Posts: 5
Joined: Sun Oct 11, 2009 1:03 pm

Re: [L4D2] How to Create Custom Melee Weapons

Postby H1Z1 » Mon Nov 30, 2009 7:56 pm

Um...

This is the result of trying to gnome-ify No Mercy o.0

http://www.fileden.com/files/2007/11/10 ... deways.png
H1Z1
Infected
Infected
 
Posts: 17
Joined: Mon Nov 30, 2009 7:50 pm

Re: [L4D2] How to Create Custom Melee Weapons

Postby samm5506 » Mon Nov 30, 2009 8:28 pm

H1Z1 wrote:Um...

This is the result of trying to gnome-ify No Mercy o.0

http://www.fileden.com/files/2007/11/10 ... deways.png

Let me add another Q&A that should answer this.

!
WARNING! This post may contain an excessive amount of pure awesomeness.
samm5506
Smoker
Smoker
 
Posts: 111
Joined: Thu Dec 04, 2008 2:55 am
Steam ID: 76561197991989781

Re: [L4D2] How to Create Custom Melee Weapons

Postby H1Z1 » Mon Nov 30, 2009 8:41 pm

Ok, well if anyone finds a way for Gnome Chompski to work, post on here since I think i can speak for us all in saying he's the best Weapon of all.
H1Z1
Infected
Infected
 
Posts: 17
Joined: Mon Nov 30, 2009 7:50 pm

Next

Return to General Support

Who is online

Users browsing this forum: No registered users and 2 guests

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 60 minutes)
Most users ever online was 1910 on Mon Oct 05, 2009 4:28 pm

Users browsing this forum: No registered users and 2 guests