Jump to content

Custom weapons question


nightrifle1015

Recommended Posts

Hi!

 

I've been reading up on all the latest developments and tutorials on changing and adding models and textures. There's a couple things I haven't been able to find out though:

 

If I put a new gun into the game, how are the weapon sights set up? How do you tell the game how to aim with the gun properly? The other thing I haven't been able to figure out is how the game tells where to attach different weapon mods. I'm in the process of making barrels and handles, but how to I make sure they attach to the same receiver properly? Here is a picture of the setup I'm talking about.

 

The team is working hard to bring some new content to the Fallout community, but these questions have mostly halted my progress. Any help figuring this stuff out would be greatly appreciated!

 

Also here is a link to the my previous work before switching to the new setup linked above.

 

 

Link to comment
Share on other sites

Posted one solution to the sights positioning at http://forums.nexusmods.com/index.php?/topic/3733245-f4-sighting-node/

 

Regarding the positioning of the parts, I've yet to verify it, but I'd assume that this is based on nodes or other entities within the .nif file which is used to determine the offset of the part's transform in relation to the parent part such as receiver. Some parts may not necessarily need such if they are static and have no further parts attached to them, in which case you could simply adjust the mesh so that the part has same origin point as any other part. I cannot comment on how much animations like magazine swap cause the positioning, but they may require certain type of positioning for proper animations.

 

Apart from the issue, I'm looking forward to seeing your lasgun in game, and hoping that you haven't yet completely abandoned the kantrael/cadian design :)

Link to comment
Share on other sites

Awesome! Thanks for the info! That was my biggest concern at the moment which had stopped all modeling progress. Do you know if you can adjust it by weapon mod part? Each barrel mod will have a different set of sights since the majority of the model is on the barrel instead of the receiver in our mod. I'll have to do more digging into the vanilla model's nodes to fully understand what you're telling me here, but at the minimum the reload animations are going to have to be redone.

 

Glad to hear it! On the contrary, not only will the new setup allow for more accurate models, but it will include all but the triplex and accatran pattern lasguns! I can link you our google drive folder if you're interested in seeing what we have so far and following our progress. :)

Link to comment
Share on other sites

It should be possible, as for example combat rifle barrels should have different anchor points for the muzzle attachments, otherwise the shorter barrels would have theirs floating in the air. However there is the possibility that this is controlled by keywords instead, which would mean it'd need to be adjusted with FO4Edit but this seems less likely.

 

Sure, I could take a peek, and probably give my feedback if you're interested.

Link to comment
Share on other sites

Haven't come across as far as I can remember, but you can see the main idea by checking out the .esp for mods that have weapon mods in them. Some major points :

  • The WEAP has a keyword that represents the frame part, usually the receiver (ap_gun_receiver [KYWD:00024004]). (1 in the images)
  • The OBTE section in WEAP is used to set the default mods for the weapon's part slots, and allows several different setups including random setup. However even a single setup is sufficient. (2)
  • To specify what weapons can use what mods, the mod pieces have MNAM keywords (for example ma_Bow [KYWD:63000804]), which must be also found on the weapon to allow user to attach it. (3)
  • The mods assigned as frame part have several keywords assigned to them that represent the sub-parts that can be attached to them, like barrel, magazine etc. The muzzle device uses same function with barrel. (4)
  • Besides the actual object modification, each weapon mod also needs a form as constructible object if you want to allow players to craft them. Also in order to be able to remove and reuse mods, each mod can be given a misc item that represents the mod as inventory item.(5)

Images: http://imgur.com/a/Ql0fC

Link to comment
Share on other sites

Woah, that's super helpful! Thanks for all the assistance Junnari! Now I just need to figure out how the nodes work and we should be in business!

 

One other thing we were wondering about: It's possible to tag an animation to a mod, but is it possible to have that animation be replaced with a different animation if there is a combination of mods? For instance the pistol grip looks fine on most bethesda models because even their longer barrels are somewhat feasible to wield one handed. The models I'm making will look ridiculous one handed with all but one barrrel. Would it be possible to have the pistol grip be wielded like a pistol when using the pistol barrel, but switch to a rifle animation when using a rifle barrel?

Edited by nightrifle1015
Link to comment
Share on other sites

You might be able to do it in theory by removing the animation keyword from the main weapon, and having each barrel add a animation keyword, for example:

 

Property

FormID,Int

Add

Keywords

AnimsCombatShotgun [KYWD:000B9560]

1

0.00000

Haven't tested this in practice, and it might have issues with positioning and cross-compatibility if you use existing animations, but I'd assume that's how you could do it. Making the laspistol (that I assume you are talking about) a separate weapon from the lasgun might however be more plausible to do.

Edited by Junnari
Link to comment
Share on other sites

That's awesome. You're really saving my bacon here man! I'll definitely give that a try when everything is modeled and tell you how it goes. Now that fallout has been shown to already allow custom animations, we're planning on eventually replacing the reload animations to get a more satisfying reload for our lasguns.

 

Have you played around with the nodes yet?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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