Forum Thread
  Posts  
Adding a Brand New HL2MP weapon help. (Forums : 3D Modeling & Animating : Adding a Brand New HL2MP weapon help.) Locked
Thread Options
Mar 11 2009 Anchor

OK guys I am officially lost. I have spent a few weeks now trying to figure out how this all works. I need to get a .obj file I have right now from 3ds max (or i can import it into XSI... whichever is easier) into my hl2mp mod. I basically want to use my model as a completely new weapon in the mod. But does anyone know of a concrete tutorial for this or would be willing to write one. All the stuff I have found either has exporter programs that I cannot get to work properly or either I am missing some sort of file somewhere. Also I have having trouble finding the .qc files for the weapons. I am just really not sure what I am doing wrote or how to go about doing this so if anyone has suggestions please do tell. I would greatly appreciate some feedback.

Edited by: StinkyFinga

Mar 14 2009 Anchor

Hm, well we all had to learn from the various tutorials.

Anyway, you should export that obj from 3ds max. Import it into xsi - theres allready functionality for that. For xsi to export smds (unless you're allready using the xsi mod tool which allready has it) youll need to get the valve plugin from softimages site.

You'll then need arms to animate with presumably (if its a viewmodel, which you neglected to say). For this you can go to your steam file then go here

steam/steamapps/username/sourcesdk_content/hl2/modelsrc/weapons/v_hands/scenes

and take that hands_reference.scn to somewhere more handy (in the other weapons folders you will find other hl2 weapon scn files, as well as their qc files you said you couldnt find)

Well in xsi with your obj file in (and hopefully rigged) then you wanna go file>merge and select your hands_reference file. This will import the arms into your scene. Also texture it now (with a texture of the same filename, or the actual texture youre gunna use).

Then you need to merge the meshes (turning off normalising, off tolerance, and click merge on all the mergey buttons).

So then you have one mesh and its enveloped to a bunch of bones for you to play with.

Allrighty, position it all up - often a weapon model's bone can be parented to the bone of the right hand or whatever - once you do this though it usually moves off somewhere random. To fix this and get it in position click chldcomp or whatever in the bottom right (child compensation) and the you can move it into position. Then unclick it.

Ok now thats ur reference - at top go valve>exportsmd, you want a model, and unselect the 3 boxes. Then you have a reference smd. Usually yourwep_ref.smd.

Then you can start on animations, you need an idle, draw, fire and im sure you know some more. Look in your qc, and link em all up to a mdl name and dir, make sure your material dir's are right.

Then what I use is GUIStudioMDL - its easy enough to find. In that just set up yer tools paths and you pick a game, load a qc then compile.

Then you have a model, check it in the sdk modelviewer. Then you need someone to code a new wep into game, and in mod/scripts/yourwep.txt or whatever change the viewmodel to your mdoels name and dir.

Then you have a working model hpefully, if its in the wrong place relative to the screen you can jiggle it about with the $origin 0 0 0 parts of the qc file. (easyer to see when done with the model viewer open - and just refreshing after each compile with new qc origin - also in modelviewer go view(orsomething up top)>viewmodel mode - to see roughly what you would in game)

Ok really sorry for the haphazard writing style but i just woke up + im just doing it out of sympathy for the no reploes

Mar 16 2009 Anchor

You are a true godsend lol. I am gunna get to work on this asap. TYSM!!! Sorry I didnt mention it earlier but yes it is a viewmodel. The location of the hands geometry was an amazing help. I feel like a complete moron for not finding this sooner. Tysmmmm again man. I'll stick up another post when I have some sort of working product :)

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.