Jump to content

Adjusting Weapons for Iron Sights in NifSkope


Site Bot

Recommended Posts

Article link: Adjusting Weapons for Iron Sights in NifSkope

 

ADJUSTING WEAPONS FOR IRON SIGHTS IN NIFSKOPE

=================================================

 

INTRO

---------

This is my first text tutorial for NifSkope, and it will be pretty rough until I get it finished and polished. Pictures coming soon!

 

Part II: 'Blender - Adjusting And Exporting Weapon Meshes' can be found here:

 

http://www.fallout3nexus.com/articles/article.php?id=232

 

 

WHAT IS A .NIF?

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

Files with the extension .nif are models used with the NetImmerse/Gamebryo game engine. Fallout 3, Oblivion, Pirates!, and Civilization IV all use this game engine and its .nif files.

 

The best part of .nif files (for us anyway) is that tools exist to view and edit them for modding.

 

 

REQUIREMENTS

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

To adjust a weapon for iron sights, you must have the latest version of NifSkope, and Bethesda's GECK toolkit. Of course, you must also have an iron sights mod, and naturally I recommend my own: RH_IronSights.

 

RH_IronSights - http://www.fallout3nexus.com/downloads/file.php?id=6938)

 

NifSkope - http://www.fallout3nexus.com/downloads/file.php?id=6064

 

GECK - http://www.fallout3nexus.com/downloads/file.php?id=759

 

Depending on how much you want/need to alter the weapon, you may also require a 3D modeling program. I use Blender, but 3ds Max should also work just as well.

 

Please note that this tutorial assumes the I.S. mod you are using works properly. I suggest you try not to run any mods other than I.S. while testing, just in case.

 

 

STARTING OUT

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

For basic adjustments, run the game using the I.S. mod and your weapon of choice. Aim down the sights and take some screenshots. It will be very helpful if you set iron sights hand drift to minimum and turn on the reticule.

 

Leave the game and open up your screenshots. Consider how the weapon looks, and where you want it positioned. Most weapons will have to be shifted and rotated a little to fit the reticule.

 

I set the sights of my weapons to be slightly lower than the reticule for visibility purposes. If you don't play FO3 with a reticule or HUD, you may want to set your sights directly over the spot where the reticule would be, for increased accuracy.

 

 

NIFSKOPE

-----------

Open the weapon's .nif mesh in NifSkope. NifSkope can be a quirky and occasionally unforgiving little program, but it's great once you get the hang of it. Remember that there is NO Undo option or Ctrl+Z hotkey, so you can't immediately change something you just did without reloading the file. However, the changes are not permanent until you specifically save the file.

 

Weapons consist of pieces of data, organized in the Block List and Block Details panels. If you can't see either of these windows, select them from the View menu.

 

The most important types of data we will be working with are NiNodes and NiTriStrips.

 

 

NINODES

----------

Animations use 'nodes' to interact with mesh models. For example, the player character's model has a LUpperArm node; when the animation applies translations and rotations to that node in the game engine, the player's left arm from the shoulder to the elbow will move accordingly.

 

Weapons are made up of a number of NiNodes. In order for the weapon to animate properly, the NiNodes must be named exactly the same in the weapon mesh and the corresponding .kf animation file. So if a reload animation uses a node called ##SMGClip, and in your .nif file you rename the model's node to MyBadassClipW00t, then it isn't going to animate properly in-game.

 

In fact, until you are proficient at working with .nif and .kf files, you really shouldn't mess with the nodes at all!

 

 

NITRISTRIPS

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

NiTriStrips, on the other hand, are just waiting to be messed around with. Strips represent the 'physical' parts of the weapon - where textures are placed to make the thing look like an actual object - and they are what we will be moving around.

 

Some NiTriStrips are not attached to a NiNode. Usually the main body of a gun will consist of one or more of these Strips. These parts will not animate independently like a clip or lever would, but we can still move them around.

 

Other Strips are part of a NiNode's branch. These Strips will animate with the Node, but do not have to be placed directly over the node.

 

Keep in mind that a rotating object (like the cylinder of a revolver) will rotate around the Node itself, not its own axes - if you translate the object away from the Node, it will probably swing around the weapon as if attached to an invisible arm!

 

To move a NiTriStrip, first identify it by selecting it with Left-click in the Render Window. The piece you have selected will highlight its wireframe (the color depends on how you set the colors for NifSkope, which you can do by choosing 'Render > Settings...' from the top menu).

 

Right-click the highlighted part of the weapon, or its corresponding NiTriStrip line in the Block List window, for a context menu. Select 'Mesh > Edit' and a new window will pop up - the transformation window.

 

This transformation window lets you alter the position of the NiTriStrips in real time by translating (shifting), rotating, or scaling (making bigger or smaller).

 

Try it: increase or decrease the X, Y, and Z characteristics, Euler/Axis rotation, and scale of the NiTriStrips and watch what happens. Remember, there is no Undo in NifSkope, but the changes don't become permanent until you save the mesh. In other words, there is little chance that you will 'break' anything unless you save your work that way!

 

 

CENTERING

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

Using your screenshots as a reference, make small adjustments to the translation and rotation of the NiTriStrips in your mesh.

 

At first, only adjust the parts of the gun that have the sights on them. If you adjust every part of the gun (i.e. clips and levers) then play the game and the gun is still crooked, you will have to re-adjust everything.

 

Remember when rotating or scaling the weapon: the 'center' of the entire mesh is the node located on the weapon's GRIP. That is directly in line with the player's hand. Other parts (i.e. revolver cylinders) will have their own centers, which should be highlighted in NifSkope and will probably become apparent if you mess around with them for a while.

 

Once you have the weapon's sights lined up the way you want, re-test the game. In other words: playtest, screenshots, adjust, rinse and repeat.

 

 

CLOSING

---------

That's it for starters, but I'll continue to add more detail to this as time goes on. Thanks for reading!

 

 

Continue on to part II:

 

http://www.fallout3nexus.com/articles/article.php?id=232

 

Link to comment
Share on other sites

shael678 ~

 

Working on a version with screenshots.

 

 

EssGeeDee ~

 

You can edit the _1stperson/1hpaim.kf file to change where the hand is placed, but I don't recommend it. You could also make a new pistol hand grip - but I don't recommend that either.

 

I usually end up re-sizing my weapons in Blender to fit both the hand and the reticule. It's not an elegant solution, but FO3 is a pretty inelegant system.

 

Are you working with a pre-made weapon or one you designed?

Link to comment
Share on other sites

RH - I'm editing the Tokarev TT-33 from FOOK2, I raised the weapon's part until it was aligned, but I didn't see a way to raise or lower the hand. Damn it.

 

Picture of the issue: http://i307.photobucket.com/albums/nn291/F...creenShot18.jpg

 

 

Oh well, as long as the pistol lines up properly, and I can execute those Feral Ghouls (I play with MMM's Feral Ghoul Raise), I'll be alright. Ironsights should have been fully integrated into the base game, instead of having to be modded in. :(

 

EDIT: After editing the Wattz 1000 laser pistol, also from FOOK2, everything worked perfectly. The hand still grips the laser pistol where it's supposed to, even after editing. So it's the bloody Tokarev. Which is my second-favourite. >:(

 

EDIT2: It messed up the Beretta 92 as well.

Edited by EssGeeDee
Link to comment
Share on other sites

EssGeeDee ~

 

Unfortunately, when I add in a weapon (especially a pistol) I usually have to scale up its height in Blender to get it to fit both the hand and the sights. Sometimes I wonder if Bethesda left IS out of the original game because it was too much trouble to make every weapon fit the animations!

 

EDIT:

 

I just checked your pic, and I see the problem. I'm sorry to say that this mod doesn't work best in 3rd person. In order to make a weapon like a pistol fit both the hand and the reticule, you usually have to increase the upward scale or make the whole weapon larger overall.

Edited by roguehallow
Link to comment
Share on other sites

  • 2 weeks later...

Righto. Well, I don't play the game in 3rd person view so it doesn't really affect me, but Bethesda should have tried harder. >_>

 

I know what I would have done, is place three markers. one, dead centre on the rear sights. Two, dead centre on the front sight. And three, in the centre of the grip. So then I'd build a little code that looks for those three markers and lines them up correctly.... If only that were the case.

Link to comment
Share on other sites

  • 3 weeks later...

This guide is what encouraged me to do Ironsights for people who add weapons to the game, I'm starting to get the hang of it, adding what I've learn to every new weapon...

Now that I've released a few Ironsights mods, I'm thinking of going for bigger weapon kits. Today I took the leap into doing a bigger weapon kit and decided to do Zealotlee's ACR weapon kit, It's just one weapon but very customizable and I had to change quite a few meshes. But I think I've done very well

http://www.fallout3nexus.com/downloads/file.php?id=11722

Give me your views either in comments or via PM.

Also have a look at others I've done =)

 

All I need to learn now is more about the animations in the .kf files, really not sure how to do that, but I've coped pretty well =)

 

I'm hoping to become as good as RogueHallow so that he wont have to work as much to make Ironsights for those who love his work and want it for more weapons like on FOOK or other weapon mods.

 

RH Thanks a lot, You're an inspiration to us all! =)

Link to comment
Share on other sites

  • 2 months later...

k, I've got a question to ask, which I'll also post on the Iron-sights mod comments, but i was wondering, does anybody have any sort of approximate measurements for me? Such as; "lowering the y value by 1.0 lowers the image on screen by 1 inch". That sort of thing would be extremely useful to have for those of us who are new to the modding scene and want to adjust our favorite other weapon mods to be usable in iron-sights

Thanks in advance

Link to comment
Share on other sites

  • 1 month later...

I think I found a way to be able to edit your weapons for iron sights without having to close the game. At least I think so, this works for me. (Looks like you will need a good PC to do this, seems kinda intensive having nifskope and fallout 3 open at the same time)

 

Small tutorial:

-Load Fallout 3 (Windowed Mode)

 

-Get in game

 

-Place any weapon on a hotkey through the pip boy (Like Assault Rifle on 1)

 

-Select the weapon you want to align, again via pip boy

 

-Aim down the gun you want to align to get an idea of how it must be aligned

 

-Press the hotkey for the weapon you hotkeyed earlier

 

-ALT+TAB out of fallout 3 and load nifskope then open the weapon model for the gun you want to align (Make a backup just incase)

 

-Make the needed changes in the mesh (translation, rotation, etc)

 

-Save the updated mesh

 

-Switch back to the Fallout 3 window

 

-Equip the weapon you are trying to align via pipboy (do not use a hotkey for the weapon you are trying to align, otherwise the game won't load the updated model for some reason)

 

-Aim down the sights and see your changes made without having to wait for Fallout 3 to load up all over again :)

 

Idk if this has been posted in this article or not since I skimmed through and its 3:21AM here. :S

 

Either way the information is there. ^^

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...