[Tutorial] How to get guns ingame (56k Warning!)

Discussion in 'Tutorials' started by RoempaZ, Jan 6, 2005.

  1. RoempaZ Private

    Contributions:
    11
    Hi

    In this tutorial I'm going to show you how to get a gun ingame.

    I do expect you to know:
    :doh: How to open up Milkshape
    :doh: How to save a model in Milkshape
    :doh: How to hide and unhide objects in Milkshape
    :doh: How to select verts or faces in Milkshape

    I used the MoH: Vietnam TT33 to show you how to import a gun..

    First save your model as ms3d..
    [IMG]

    Make a clean new file
    [IMG]

    Import the model you want to replace
    [IMG]

    Example: If you want to replace the nambu pistol, import models/nambu_pistol/nambu_pistol.gr2
    [IMG]

    Now merge your saved model with it
    [IMG]

    Rotate, move, scale your model so it fits the handles
    [IMG]

    Delete the LOD groups numers 0, 1 and 2
    NOTE: Don't remove LOD3
    [IMG]

    Now select the LOD3 group and hide it
    [IMG]

    Select all the remaining verts (not the faces) and hide them
    [IMG]

    You should now have something like this (just a plain model whitout verts):
    [IMG]

    Unhide the LOD3 group and modify the verts to fit you model:
    [IMG]

    Now unhide everything
    [IMG]

    Click the tab joints and select the bone "ROOT"
    [IMG]

    Click SelUnAssigned then click Assign (make sure the bone ROOT is selected)
    [IMG]

    Now regroup all of your model groups
    [IMG]

    Rename the group to LOD0_yourweaponname
    [IMG]

    Delete the material from the game model
    [IMG]

    Rename your material to LOD0_yourweaponname
    [IMG]

    Select the LOD3 group and open up the MDK Model Manager
    [IMG]

    Remove the LOD's 1, 2 and 3 (NOT LOD0)
    [IMG]

    Now, with the LOD3 selected, add it to the Collision
    [IMG]

    If you done it correctly, you would have something like this:
    [IMG]

    Now close the MDK Model Manager by clicking OK in the bottom.

    Select the LOD0_yourweaponname group and open it again..
    [IMG]

    Add it to LOD0
    [IMG]

    Now you should have something like this in the MDK Model Manager:
    [IMG]

    Open up the Material Editor
    [IMG]

    Remove the original game model material.. You will get this message:
    [IMG]
    Click yes..

    Hit convert material to convert your own created LOD0_yourweaponname material to the material editor
    [IMG]

    Now make a folder called models. Then in models a folder weapons then in weapons a folder nambu_pistol or whatever weapon you wanted to replace
    Then put your texture in it so the path will be:
    models/weapons/nambu_pistol/texture.tga

    Click the None button next to diffuse texture
    Then select your texture in the folders you just made.
    [IMG]

    Close the Material Editor by clicking OK in the bottom right

    Export your model
    [IMG]

    You'll probably get this message:
    [IMG]
    Hit continue

    Open the script editor and click the [...] button
    [IMG]

    Click Hag file. Now scroll down till you see your replacing weapon hag file..
    [IMG]

    Click open. Then change the skelmodel file: Like if your gun name tt33.moh you should have in the hag:
    skelmodel tt33.moh
    [IMG]

    Save the file to your hard disk...

    Open up Pakscape
    [IMG]
    Make the folders models/weapons/nambu_pistol/textures/

    Import your texture in models/weapons/nambu_pistol/textures/
    [IMG]

    Import your model in models/weapons/nambu_pistol/
    [IMG]

    Import your hag file in models/weapons/
    [IMG]

    Save your pk3 and put it in your MoHPA/main Directory

    Open up a SP map and type in console spawn weapons/nambu_pistol.hag

    Result
    [IMG]

    Now i gave you all this info, how bout giving me some rep point, huh?

    For any questions, post them here.

    Bye,
    DaRKaNGeL
    1 people like this.
  2. *25th-IDA*Yoda Private

    Contributions:
    4
    Nice tutorial, gonna try it out when i find some time.
  3. 2nd~0v3r|r!de Private

    Contributions:
    54
    Gud tutorial part from the help the noobies bit lol
    by the way, weapons dont need collision, only static weapons and other stuff.
  4. RoempaZ Private

    Contributions:
    11
    I think they do... What do they use when you drop em?
  5. 2nd~0v3r|r!de Private

    Contributions:
    54
    try looking at the other weapon files they dont seem to, i havent really looked into this. My sword seems to work normally without collison, there proberly handled the same way as players, i asume they use bounding boxes or spheres like in many games. but i could be complety wrong, this is just how many games do there collision.
    [IMG]

    Example of a Bounding Box.
  6. JFrank(GD) TMT RELIC

    Contributions:
    106
    Specialties:
    Pure Gamer
    Processing:
    Graphics:
    Nice Tut!!!
  7. destrukt Private

    Contributions:
    0
    error

    Any who knows why i get this error :

    [IMG]

    Im trying to replace a browning with a AK47 :cooler:
  8. 2nd~0v3r|r!de Private

    Contributions:
    54
    Post your hag file.
  9. destrukt Private

    Contributions:
    0
    nvm..sorted it out..

    [IMG]

    I forgot the asign the mesh to the bone :waaaa:

Share This Page