Go Back   I-Mockery Forum > I-Mockery Miscellaneous Forums > Questions, Suggestions, and Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Display Modes
  #1  
MetalMilitia MetalMilitia is offline
Hitler's Canoe!
MetalMilitia's Avatar
Join Date: Sep 2004
Location: UK
MetalMilitia is probably a spambot
Old Jan 2nd, 2005, 08:57 PM        Using CounterStrike Source models in HL2\Adding new weapons.
I guess this should be in gameing but only a technophle would even bother attempting it soo... Here is a brief tutorial i wrote for a HL2 site on the subject. I only started creating new guns this morning so there are still a few issues but its pretty good fun once you get used to how everything works.

Importing new guns to HL2 - Rough guide

Required tools

Visual studio .NET 2003
GFCScape (or however it spelt) - Everyone knows about this already.

Required reading.

http://www.valve-erc.com/srcsdk/MyFirstMod.htm - Information on compileing CPP files and basic use of VS .NET
http://collective.valve-erc.com/inde...38409-05843300 - This is the most important thing to read. If followed correctly you should have no trouble creating new guns.

However one or two tips when it comes to reading ^ that tutorial.

1. ONLY CHANGE THE BITS IT SAYS. For example do not change every single mention of "PISTOL". When finding and replaceing in VS .NET it is good to have case sensitive ticked, and match whole word only. This will help you to not change the wrong bits.

2. C++ IS CASE SENSITIVE. Do not mix up your names. e.g dont call one but "weapon_pistol2" and another in the same file "weapon_Pistol2" or it will cause problems.

3. Dont change the top bit of c_weapon__stubs_hl2.cpp, only add to the list at the bottom. Under HL2DM, i believe its called.

------------------------------------------------------------------------------------------------------

Ok so now, if all has gone to plan you have a new weapon set up.. but wait its just like the pistol in every respect. Well this is where we need a new model (and to change some of the settings and whatnot yadda yadda, you should be able to see what can be changed by yourselves).

So in a series of reasonably vauge steps...

* Rip model out of CSS GFC file with GFCscrape. Get all of the bits just to be on the safe side.

* Recreate the GFC's folder structure to the models folder... for example "Modname\models\weapons" and put the model files into this folder.

* Open the script file of the weapon you just created and change this bit to the path of your model. So it will look something like this...

"viewmodel" "models/weapons/v_rif_ak47.mdl"

"playermodel" "models/weapons/w_rif_ak47.mdl"

* Rip the relevant textures out of the CSS .GCF and copy the folder structure of materials also. (i.e. \materials\models\weapons\v_models)

----------------------------------------------------------------------------------------------------

At this stage you will probably want to test the model out, to see wether its working. Go right ahead.....
.
.
.
.
.
.
.
.
hmm that was kind of dissapointing wasn't it? its just the pistol with a new model and really dodgey animations.
Fear not a new sound should add a bi tto the coolness factor..


-------------------------------------------------------------------------------------------------

Custom sounds are very easy to add.

* First you need to rip a few sounds from somewhere. CSS, old CS .WAVs.. whatever you want.

* Create a folder called 'sound' in you root DIR and then put a folder in it called 'weapons'.

* Now, put the sounds into the weapons folder.

* Next you need to find the script file named 'game_sounds_weapons.txt' open it up and you should see whats going on.

You need to add some more sound types.. .for example

//weapon_mp5.txt -Comment. this just tells you where the script your using the sound in is.
"weapon_mp5.single" -Name you will use to 'request' the sound in the weapon's script.
{ -Start of sub
"channel" "CHAN_WEAPON" -i left this as it was
"volume" "0.7" -change this if you want.
"soundlevel" "SNDLVL_NORM" -not sure about this

"wave" "weapons/mp5/mp5-1.wav" the location of you sound.
} -end sub

This is all quite self explanitry when you are actually doing it.

* Now thats done, change the weapon's script file to use the sounds.

For example i would put in my MP5's script file.....

"reload" "Weapon_SMG1.Reload"
"reload_npc" "Weapon_SMG1.NPC_Reload"
"empty" "Weapon_SMG1.Empty"
"single_shot" "weapon_mp5.single"
"single_shot_npc" "weapon_mp5.single"
"special1" "Weapon_SMG1.Special1"
"special2" "Weapon_SMG1.Special2"
"double_shot" "weapon_mp5.single"
"burst" "Weapon_SMG1.single"

I left the special and empty alone. The default sound will do for now.

Thats that done... go test it.
----------------------------------------------------------------------------------------------------

Right now. RSI is stating to set in so im going to have to end it there.

If you thought something in this tutorial didn't make sence, chances are i wrote it wierd. i have not slept in a day or so, so please dont follow this to the letter. It was just a few things i would have liked to have been told this morning when i was doing it.

Feel free to ask questions and il try and answer them from my limited experience. But i dont ant to hear any "i am getting X ammounts of errors when i compile my code. whats up?" type questions. It is most likley caused by the stuff i mentioned up there ^^^^^^^^^^^^.

good luck, and hopefully someone can enlighten me as to how to get the damn models the right way round.







Have fun.
__________________
Quote:
Originally Posted by bigtimecow View Post
japan
Reply With Quote
  #2  
ScruU2wice ScruU2wice is offline
Mocker
ScruU2wice's Avatar
Join Date: Jun 2003
Location: thursday
ScruU2wice is probably a spambot
Old Jan 3rd, 2005, 12:34 AM       
make a banana gun
Reply With Quote
  #3  
Alive Alive is offline
Member
 
Join Date: Apr 2004
Location: Michigan
Alive is probably a spambot
Old Jan 3rd, 2005, 01:48 AM       
Im a doomer.. not a half lifer (but not sayin' half life2 is that bad)
__________________
Im "Alive" im "pro-not buried" im "anti-not breathing"...ect...
Reply With Quote
  #4  
MetalMilitia MetalMilitia is offline
Hitler's Canoe!
MetalMilitia's Avatar
Join Date: Sep 2004
Location: UK
MetalMilitia is probably a spambot
Old Jan 3rd, 2005, 10:50 AM       
hehe, do you how bad the mod support for doom3 is.
There are only a few teams left working on total conversions because there is literally no support.
__________________
Quote:
Originally Posted by bigtimecow View Post
japan
Reply With Quote
  #5  
AChimp AChimp is offline
Resident Chimp
AChimp's Avatar
Join Date: Nov 2000
Location: The Jungles of Borneo
AChimp is probably a real personAChimp is probably a real person
Old Jan 3rd, 2005, 11:22 AM       
Releasing full SDKs only leads to more hacks for your game. :/
Reply With Quote
  #6  
liquidstatik liquidstatik is offline
kitatsdiuqil
liquidstatik's Avatar
Join Date: Mar 2003
liquidstatik is probably a spambot
Old Jan 3rd, 2005, 12:49 PM       
Screenshots look hot. :D
__________________
Reply With Quote
  #7  
MetalMilitia MetalMilitia is offline
Hitler's Canoe!
MetalMilitia's Avatar
Join Date: Sep 2004
Location: UK
MetalMilitia is probably a spambot
Old Jan 3rd, 2005, 04:10 PM       
Introduceing the new improved crossbow bolt launcher....



__________________
Quote:
Originally Posted by bigtimecow View Post
japan
Reply With Quote
  #8  
ScruU2wice ScruU2wice is offline
Mocker
ScruU2wice's Avatar
Join Date: Jun 2003
Location: thursday
ScruU2wice is probably a spambot
Old Jan 4th, 2005, 12:14 AM       
can't you make a gun look like a banana? I'm serious
Reply With Quote
  #9  
MetalMilitia MetalMilitia is offline
Hitler's Canoe!
MetalMilitia's Avatar
Join Date: Sep 2004
Location: UK
MetalMilitia is probably a spambot
Old Jan 4th, 2005, 10:13 AM       
hmmmmmmmm. no i dont think so. The only banana model in the game is a prop so it will not have a 'v_' model.
__________________
Quote:
Originally Posted by bigtimecow View Post
japan
Reply With Quote
  #10  
executioneer executioneer is offline
OH GOD
executioneer's Avatar
Join Date: Oct 2001
executioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contest
Old Jan 5th, 2005, 07:09 PM       
well make a new model geez
__________________
[COLOR=purple][COLOR=Magenta]SHAME ON A [COLOR=Pink]NIGGA WHO TRY TO RUN [/COLOR][URL="http://www.youtube.com/watch?v=NVGI6mhfJyA"]GAME[/URL] ON A NIGGA[/COLOR]
[/COLOR]
Reply With Quote
  #11  
MetalMilitia MetalMilitia is offline
Hitler's Canoe!
MetalMilitia's Avatar
Join Date: Sep 2004
Location: UK
MetalMilitia is probably a spambot
Old Jan 5th, 2005, 07:11 PM       
I MIGHT JUST DO THAT.

Well.. once i learn how to use XSI.
__________________
Quote:
Originally Posted by bigtimecow View Post
japan
Reply With Quote
  #12  
the_dudefather the_dudefather is offline
Whiter than Alabaster
the_dudefather's Avatar
Join Date: Jul 2003
Location: Trapped in a box by a cockney nutjob
the_dudefather is probably a spambot
Old Jan 7th, 2005, 10:13 PM       
Quote:
Originally Posted by MetalMilitia
Introduceing the new improved crossbow bolt launcher....



omg, that is so cool! can i download this amazing mod without having to make it myself?
__________________
Its only taken me about 10 years to understand the water jug riddle in Die hard with a Vengeance. My brain takes a while, but it gets there in the end

Reply With Quote
  #13  
MetalMilitia MetalMilitia is offline
Hitler's Canoe!
MetalMilitia's Avatar
Join Date: Sep 2004
Location: UK
MetalMilitia is probably a spambot
Old Jan 8th, 2005, 08:47 AM       
I have to fix my neigbours computer today but when i get time il make a small mod with it and send to ya. At the moment my mod folder is about 300mb because of all the CSS content in it. :/
__________________
Quote:
Originally Posted by bigtimecow View Post
japan
Reply With Quote
  #14  
St8ic St8ic is offline
Member
 
Join Date: Jul 2004
St8ic is probably a spambot
Old Jan 8th, 2005, 03:47 PM       
Quote:
can't you make a gun look like a banana? I'm serious
[/quote]
Reply With Quote
  #15  
executioneer executioneer is offline
OH GOD
executioneer's Avatar
Join Date: Oct 2001
executioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contestexecutioneer won the popularity contest
Old Jan 8th, 2005, 06:20 PM       
lol
__________________
[COLOR=purple][COLOR=Magenta]SHAME ON A [COLOR=Pink]NIGGA WHO TRY TO RUN [/COLOR][URL="http://www.youtube.com/watch?v=NVGI6mhfJyA"]GAME[/URL] ON A NIGGA[/COLOR]
[/COLOR]
Reply With Quote
  #16  
EisigerBiskuit EisigerBiskuit is offline
Keg Whore
EisigerBiskuit's Avatar
Join Date: Aug 2004
Location: OPE DE DOOH'
EisigerBiskuit is probably a spambot
Old Jan 8th, 2005, 11:10 PM       
I want the trout. >:(
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

   


All times are GMT -4. The time now is 04:00 PM.


© 2008 I-Mockery.com
Powered by: vBulletin
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.