HIT Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How to change weapon of an NPC  (Read 5271 times)

0 Members and 1 Guest are viewing this topic.

Blood Surfer

  • Gargantua
  • *******
  • Offline Offline
  • Posts: 716
    • View Profile
How to change weapon of an NPC
« on: December 22, 2005, 10:26:09 PM »

What i'm going to explain to you is how to replace a NPC's weapon by an other one ,example: the barney's beretta by the Jabutin's beretta

First step:
Get all the model you need, the NPC one and the new, plus a pie if you 're hungry  :P (if you're not send it to me).
Decompile,in separate directory, the NCP model and the p_ model of the gun ,if you don't have the p_ one decompile the w_ one,  with all option check like that:



Second step:
Now import the NPC's gun reference smd (ex: barney_beretta_unholstered_ref.smd) with only two option like that:

if you don't what is the smd you have to import look at the QC file with notepad and seek the gun part.
Now import the new gun's reference smd without bone or skelecton option check like that:

you should see the new weapon now



Third step:
Now move the new gun model to obtain something like that:


reassign the vertex to the right bone hand (ex: Bip01_R_Hand),then delete the old weapon.
You should have this :



Now export your work as a reference smd to replace the old one, like that:


Final step:
Now move the new texture in the NPC directory, compile and then



I kown i've got a very bad english so i hope you understood me
« Last Edit: December 22, 2005, 10:39:09 PM by Blood Surfer »
Logged

Aydin

  • The full metal alchemist
  • DoC Development Team
  • Gonarch
  • *
  • Offline Offline
  • Posts: 3082
    • View Profile
Re: How to change weapon of an NPC
« Reply #1 on: December 23, 2005, 01:11:29 AM »

Good tut, I can never get the gun to fit perfectly in their hand
Logged

Blood Surfer

  • Gargantua
  • *******
  • Offline Offline
  • Posts: 716
    • View Profile
Re: How to change weapon of an NPC
« Reply #2 on: December 23, 2005, 10:12:03 AM »

It's just a size problem on my example i don't take the time to resize the gun so it don't look perfect  :-\
Logged

Gman

  • [Über 1337 noob]
  • Alien Grunt
  • ******
  • Offline Offline
  • Posts: 239
    • View Profile
Odp: How to change weapon of an NPC
« Reply #3 on: July 12, 2006, 12:33:40 PM »

I was replacing the berreta to 357 model and when compile qc then the milkshape show's this thing :

illegal parent bone replacement in model "barney_357_unholstered_ref"
   "Bip01 R Hand" has "Bip01 R Arm2", previously was "Bip01 R Forearm"

WTF i wrong ?

Edit : Ok it's work's :)
« Last Edit: July 12, 2006, 12:46:27 PM by Gman »
Logged

End Of Days

  • 3D Modeller
  • Gonarch
  • ********
  • Offline Offline
  • Posts: 2987
    • View Profile
Re: How to change weapon of an NPC
« Reply #4 on: July 12, 2006, 08:23:48 PM »

Edit: hm, dead bump? Forget my piece of advice then.
Logged

iceman

  • Major Iceman
  • Alien Grunt
  • ******
  • Offline Offline
  • Posts: 300
  • Cold as ice
    • View Profile
    • Opposing Forces
Re: How to change weapon of an NPC
« Reply #5 on: November 09, 2007, 10:21:01 PM »

Sorry to bump but for some reason it wont bind my weapon to his right hand the gun just floats next to his right hip any ideas?, im using milkshape by the way.
 You should NOT have bumped this topic. You are asked in the reules to make a new request thread instead of needlessly resurrecting old threads.
Logged

Greaser

  • Sven Co-op Testing Team
  • Gonarch
  • ********
  • Offline Offline
  • Posts: 1844
  • I want to move to Sweden one day.
    • View Profile
Re: How to change weapon of an NPC
« Reply #6 on: November 09, 2007, 10:28:48 PM »

Make sure that the gun you want him to hold is exactly where it's supposed to be on the skeleton.
Logged