Codename CURE

Codename CURE

Not enough ratings
Weapon porting and proper scripting
By I can't aim and 1 collaborators
As you may know, You have possibly seen my work for mods such as Deagle over P228 and MP7 over MP5K
with Optic helping out with the mod as well.

Along with my alone project such as CS 1.0 and 1.6 and even M4 over Galil

However they are tricky to script and some may cause a few issues, Some might even have texture errors. Or even don't come with the sound file. But with the right ingredients, You'll be able to make weapon mods in no time!

Keep in mind that this is my first guide to anything, and want to share my scripts and recompiles to others out there to import more weapons! and help the community grow. So please bare with me.

Note: This is only for weapons that go over the guns like SMG on Rifle, or Rifle on SMG and such.
   
Award
Favorite
Favorited
Unfavorite
Only for for Single-Player and host, so far.
As much as i hate to say this, But it seems that the Multiplayer can't seem to make the scripts function right, thus making a big glitch on reloading and shooting at times.

Also the host can have the addons, but other player's addons may be glitchy as well.

I am doing my best to figure out this problem ASAP. So please bare with me. and if you have happend to actually be able to help, please do so. I would really appreciate it!
Reminder
I know this is obvious, But might as well say it.. When publishing weapon mods, Please be sure to always credit the original creator, Especially if it's from Gamebanana. Claiming it as your own will cause you into trouble. But then again, Just a friendly reminder.
Choose your weapon!
To begin, We shall choose any kind of weapon. Usually it's best to do it on a website such as Gamebanana[www.gamebanana.com].
I would want the MP5K replaced by the M4A1. so lets go ahead and download the mod

For this tutorial I'll chose this mod.

Making a folder
If you don't plan on making a folder on custom:
Make a folder and have the VPK convertor with you like this:
So you can transfer the VPK file to the custom folder.

If you do plan on making a folder on custom:
Make a folder on the custom folder
This will make scripting much easier without having to do the hassle of the use of VPK
After downloading, unzip the files to the file of the weapon:
Changing the model files of the weapon
This is where it gets abit tricky; The weapons for the MP5K will have both v_ and w_. Sometimes the mod will only just have v_
Since we're going to move it to the MP5K
Go inside models\weapons
We would want to rename the
v_rif_m4a1 to v_smg_ump45
As same goes for the
w_rif_m4a1 to w_smg_ump45
Like this:
Before
After
https://i.gyazo.com/b62761231a94d414f5d02b3dffbb22c9.png
So far so good! But you're not done yet, As the mod is not sucessful yet.
This is what it looks like incase you're wondering.
Scripting: Sound tweaking
Now that we got the renaming done, We will want to script the weapon so it won't force you to be left handed as i previously showed.
If you perfer the left handed, That is no problem!
But we still need to script the sounds for fire sound. Reload sound still functions, but script is confused on what to use for the fire. That's where this script will come in handy.

If the folder already has a script by any chance, Then good. just go inside the folder and keep reading.

You'll want to have 2 scripts:
game_sounds_weapon_mp5k & sights_weapon_mp5

Though it's best if you get the script originally from the game itself, it can be found under:

Drag both of those to the script folder.

You will also will come across 3 files that the mod came from, since it was for CSS. It will look like this:

remove the 2, but keep "weapon" folder. That will be the M4's weapon scripting, renaming it to game_sounds_weapon_mp5k also works too, and just rename the file inside the folder, drag the file out of the "weapon" folder. remove the folder. And it should look like this:

After all this, go inside the game_sounds_weapon_mp5k file; originally it will be like this:
Be sure to make it so that it detects as a MP5K. To make the script function the shot fire like the MP5K.
"Weapon_M4A1.Single" to "Weapon_UMP45.Single"
Also adding //UMP45 (mp5k)to the top
https://i.gyazo.com/5eed8290706b677c60cfd27ec7f2f74c.png
The sound will now function as a weapon since the script thinks you're using a MP5K weapon instead of the M4. but you're tricking the script.
Scripting: Right hand weapon
To change the hand to right hand, Inside the script sights_weapon_mp5; change the BuiltRightHanded from 0 to 1.

If you perfer left handed, Just leave it to "0"
Scripting: Aim down sight adjustment
You are almost close to finish!

Not all weapons you import are gonna aim down sights properly,
and that's ok.

With the script we looked at earlier sights_weapon_mp5. We can adjust it to anyway we like. Though for most, it's best to have it what Codename CURE originally had it as.

As the script shows:
Aim sight is set to the MP5K's aim sight setting. and we all know right away it won't aim down right. As shown:

Most of the time, you'll be adjusting for abit, but it'll pay off in the end.

with the fixed numbers, It will now look like this!
End
This can happend to any kind of weapon you wish to be in any kind of slot.
For example: AK-47 over Galil, Or TMP over MP5K, Or even a AUG over the MP5K!

And that's all you do! It's pretty simple and pretty fun to do, Some may find this very hard and confusing and it's understandable, You can take the time to read all of this carefully, and if i happend to miss a detail. I can clearly edit it in to make things easier!

And acoridng to some, The script may not exaclty work for Multiplayer on their end. and it can be just cause mostly of conflicting issues with other mods. I will look more into details hopfully about the whole reload glitches that some fans were having issues with.

Happy modding! and be sure to credit the original modder who made the weapon.

M4 over MP5K is also released!
18 Comments
dylanthefurry 17 Jul @ 11:17pm 
the mod i tried to port is invisible ofc
Kaleidø.vtf 23 Jun, 2024 @ 4:42pm 
just curious on how to mod that metal c4 for appears for a second when picking up turrets or supply crates?
Equinox 7 Dec, 2018 @ 2:05pm 
Making weapons work for online requires Crowbar and preferrably Notepad++. The animations not syncing are due to the fact the reload animations don't fit the vanilla reload animations length.
akittu 16 Mar, 2018 @ 11:58am 
Also very helpful guide! As the scripting part was driving me crazy!
akittu 16 Mar, 2018 @ 11:56am 
Sniper's Main Weapon:
w_snip_g3sg1
v_snip_g3sg1
Sniper's Secondary:
w_pist_fiveseven
v_pist_fiveseven
Tech's Main Weapon:
w_shot_m3super90
v_shot_m3super90
Tech's Secondary:
w_pist_usp
v_pist_usp
Assault's Main Weapon:
w_rif_galil
v_rif_galil
Assault's Secondary:
w_pist_p228
v_pist_p228
Support's Main:
w_smg_ump45
v_smg_ump45
Support's Secondary:
w_pist_usp
v_pist_usp
Pointman's Main:
w_shot_xm1014
v_shot_xm1014
Pointman's Secondary:
w_pist_elite
v_pist_elite
@Blazeris The Cat
just for others just in case, I only made this because some people might not have gcfscape to look up the file names.
Flaco Sombra 20 Nov, 2017 @ 7:54am 
Ok! thank you so much!
I can't aim  [author] 19 Nov, 2017 @ 6:45pm 
I can help you. We can add each other's for more info. You can add
Flaco Sombra 19 Nov, 2017 @ 5:54pm 
I also cant find the scripts and changing values doesnt do nothing ive tried in different folders with different mods... please help!
Flaco Sombra 19 Nov, 2017 @ 4:33pm 
I cant find this files and editing the text doesnt do anything...
Tafu 22 Apr, 2017 @ 1:50pm 
You should include the the other file names in CURE. Like v_smg_ump45 but for the other weapons. :Dandelion: