TrickyVein Posted February 21, 2016 Share Posted February 21, 2016 Like some here I've looked pretty closely at how Fallout 4 handles weapons, weapon mods and weapon mod crafting. What I've discovered is a system that references specific parent/child node relationships across .nifs to allow the use of matching keywords to create a hierarchy of mod parts in the crafting menu which can be applied to a base weapon record. It's not a forgiving process to create from scratch for creating a new weapon for the game, and examination of many of Fallout 4's vanilla weapons's modifications shows many departures from any sort of convention. However, There is an underlying framework which can be sussed out and made to work. What concerns me, confuses me, frustrates me is the following:Sometimes, in the crafting menu, choosing another weapon mod removes another mod from my weapon.* Sometimes, choosing another weapon mod removes every other mod applied to the weapon (which in the case of using a 'dummy' receiver in the base weapon record leaves me staring at literally nothing).**This doesn't happen for every kind of weapon that I give myself through console commands. Only for some variations (OBTE subrecord 'Combinations'), and sometimes not at all. It's inconsistent. Have other folks encountered these or similar problems? What has anyone looked at in their weapon mod's .nifs, or in their plugin's object modification (OMOD) records to solve these issues? Here's something I did look at and which I thought solved my issues before: Leaving the 'Root' field in the block details for BSConnectPoint::Parents blank for the receiver modifications for my weapon - the modification which allows every modification to be added to the weapon. Link to comment Share on other sites More sharing options...
TrickyVein Posted February 21, 2016 Author Share Posted February 21, 2016 Pictures always make things easier to understand. Here is my weapon record. http://i.imgbox.com/aPBfo0GM.jpg In it, I have used the available weapon bench crafting keyword 'ap_gun_receiver' to point to a .nif which I'm using as, funnily enough, a receiver. It is defined as such under BSConnectPoint::Children. http://i.imgbox.com/h259pznC.jpg The receiver points to another modification, the weapon's grip. http://i.imgbox.com/Am2QMdlk.jpg http://i.imgbox.com/ln5PQxWh.jpg The grip allows the addition of three additional mods. http://i.imgbox.com/GW6j11oK.jpg 'P-<thing>' always corresponds to 'C-<thing>' in BSConnectPoint::Parents and "Children, respectively. These relationships only work through matching a keyword in a parent object modification's Keyword subrecord to the same in its child's Keywords subrecord. The actual keywords in the records and names used in the .nifs are arbitrary, so long as they match. The weapon crafting bench has a predefined list of keywords which are used to define the broad categories under which all weapon modifications fall. Am I missing anything? Link to comment Share on other sites More sharing options...
jeffglobal Posted February 22, 2016 Share Posted February 22, 2016 I'm uncertain IF the keywords are that arbitrary: Armor and Weapon Keywords Community Resource (AWKCR) and ZephyrWarrior's F4 Modder's Resources - Keywords - Weapons - Armor - Power Armor, were made for a reason. I wish I could completely know why other than to stop conflicts... MAYbe there are conficts, or MAYbe I should stfu. I'm just starting to put nifs together like that too. Link to comment Share on other sites More sharing options...
TrickyVein Posted February 22, 2016 Author Share Posted February 22, 2016 Fallout4.esm already incorporates its own keywords into records, leveled lists, formid lists, quests and the like, and these keywords are what should be used by modders. To stop conflicts. You're right, they're not arbitrary to someone making a mod. What I suspect is that there is no meaningful association between calling a weapon mod a receiver and it literally being a receiver - or functioning as a receiver. A 'receiver' is just one amongst the number of available slots for modding weapons in the crafting bench menu. And a .nif which is used as a receiver can have any number of attach points for other mods, call them what you will. But: The alternative is that calling a modification a 'muzzle' actually means that it needs to be attached to a 'barrel.' I haven't seen that to be the case, though. Link to comment Share on other sites More sharing options...
DOOMBASED Posted February 22, 2016 Share Posted February 22, 2016 Damn, this is just the kind of information I was looking for. The muzzle thing has been confusing me, I'm pretty new to nifskope but this post helped me to understand the Parents and Children thing a little more than I already did. I tried attaching a muzzle to the receiver and nothing shows up in game when I attach the mod. I tried a workaround by making the muzzle attachment from a receiver nif, I haven't tried completely making new nifs at all yet, if that is even possible. Because the weapon doesn't actually have a nif for the barrel I don't really know what to do. The way I've been making weapons is probably pretty dirty but I'm pretty sure it's the same way most of the people putting out weapon mods are doing it. Link to comment Share on other sites More sharing options...
TrickyVein Posted February 22, 2016 Author Share Posted February 22, 2016 The muzzle is the only type of weapon mod which seems to actually require a 'null' modification if muzzle mods exist for a weapon. ...then, if a weapon doesn't have muzzle mods, it still needs a null muzzle mod to prevent the 'No Muzzle' text from appearing in the crafting menu for the weapon. I suppose there's some reason for this since while other parts of a weapon are always required to make a whole, muzzle mods aren't. Still, someone could have just as well decided that standard sights were default/null and then we'd be providing 'null scope' modifications for guns with standard sights. Instead, all sight modifications for weapons, even standard sights are considered 'scopes.' Link to comment Share on other sites More sharing options...
Jkroovy Posted February 24, 2016 Share Posted February 24, 2016 A statement on my experience and what ive learned about weapon .nifs and their mods incase it helps :) The CPA's and CPT's in the nifs and the "ap_" connecting keywords in fo4edit seem to have no relation to each other, ive mixed and matched alot of them and made my own and it seems to work fine. You can even change and move the CPT's in nifskope and have random parts attaching happily to the wrong connect points wherever you want. Thats how i manage to get around BSX flags that give me an arrow to the knee, im about to upload a new weapon mod in the next few days which ive done this with, i cant seem to get extra animations (eg, spinning barrel) to work through doing this. I think (could be wrong ofc) Dummy .nifs are literally just an empty place to build the weapon if it has specific options available or different receivers, so that everything gets applied as a omod so its more creative also if the .nif your trying to put on as a mod has the [WEAPON} node in nifskope it crashes if you use multiple instances of it. And to be fair anything with any extra data or string data has caused me problems too, and BSX flags seem very hit and miss with what will work and what wont, atm all i can say 194 BSX flags are the easiest to work with and their shapes seem to go into most other .nifs without crashing (even if they dont always work) At a guess the Null muzzle must be coded into or uses the IsNullMod keyword? (i think thats what its) some of the No Scope options have standard dummy nifs as well (unless its abandoned bethesda records ive been seeing in f4edit) but you can still change the CPT on those .nifs As an after thought if you look at the laser gun mod tree in f4edit and in-game i think it was once 2-3 weapons thats been combined into one for the sake of modifying it. Let me know if ive got it all wrong or this helped ;) Link to comment Share on other sites More sharing options...
TrickyVein Posted February 25, 2016 Author Share Posted February 25, 2016 Everything that you just posted I've found to be true as well. 194 BSX flags, not needing to match keywords to connect points in the .nif, dummy mods. Especially where it comes to NiStringExtraData. Except for some weapons like the Ripper, multiple modifications do have 'WEAPON' string data which does not obviously crash the game. Some weapons also have this mysterious BSBehaviourGraphExtraData which references an animation file. I've been able to apply a mod that also has 'WEAPON' data, but what happens is that the weapon's animations are only recognized on it, and not both it and another modification which shares WEAPON data. Anyway, to maybe answer your question im about to upload a new weapon mod in the next few days which ive done this with, i cant seem to get extra animations (eg, spinning barrel) to work through doing this. If you wanted to change the animations for a weapon, then I guess you'd have to make sure that whatever specially-named nodes that are used in the weapon's animations were in the .nif that had WEAPON data. The fact that pipe weapons are actually split across three different types of weapons (semi auto, revolver and bolt action) might indicate that it's not possible to do, though. Have you tried including keywords which reference a weapon reload animation only inside of mods, making sure they aren't included in a base weapon record? That way, it seems you could apply mods which determine which animations a weapon gets, assuming they pointed to .nifs that were properly set up. Link to comment Share on other sites More sharing options...
Jkroovy Posted February 27, 2016 Share Posted February 27, 2016 Yeah now we are talking about it I think I noticed the Machete has one or two mods with the WEAPON string as well, and I was under the wrong assumption that the mods themselves held the animation nodes but it must at least be partially held in that WEAPON data as you say, and the proper nodes for animating must in the weapon .nif from whence it came :3 ive tried everything else haha I just dropped that animated mod from this new weapon, though it might be worth trying to apply it to the L.A.E.P instead cos I think it still has all the anim nodes for all the laser guns. I guess maybe the WEAPON strings must be read by the game at the same time as the animation nodes we apply, or maybe the keywords get applied on top of them and then if the shoe doesn't fit the anims don't work. Ive been distracted from my other mods this weekend, working on making all weapons destructible, got it all working great! but one thing stops it being playable... weapons will not take damage while equipped, they seem to be able to take some explosion decals while equipped but wont take damage, I checked out the BPDT records and obviously there is the Weapon body part, I messed around with it a bit but I cannot find a way to relate it to anything except explosions and decal data. Ive thought of making a special gore effect for it but I don't even know where to begin for that. Maybe id need to copy some power armor body parts data or something, they explode n stuff. I tried making dummy weapons with the SM suicider bomb weapon but they wont even appear in the inventory, I tried making grenades into dummy .nifs but it turns out that only the projectile is targetable in or out of VATS, and the projectile doesn't seem to be anything special in fo4edit so I figure its something in the .nif that makes it targetable, was maybe going to trying making a dummy .nif with the projectile later and see if it equips as a weapon and is still targetable. Whats really frustrating is that there is even a "vats targetable" setting under "destructible" in fo4edit but that must just be leftover Bethesda business because it doesn't seem to do anything. Ive tested all the grenade and mine weapon type keywords trying to get this to work, and ive played around with the unknowns in the DATA and they seem to mostly control basic animations and reloading data. I wanted to ask if you knew what other things I could do with the Bool - Set on weapon properties? The Has and Is keywords are used with it to overwrite the laser muskets charged reload in the legendary automatic OMOD and can be used to override the gauss rifles charged attack and I assume any other weapons that have charged reload or charged attack. There are repeatable single fire keywords too but they wouldn't work for me, though I didn't test them much. But so far its been possible to make any gun weapon and some melee weaps have charged attacks and reloads this way. I wonder if there is more that can be done this way. And finally ive just noticed above your DP it says ... Eulalia! .....sounds familiar... isn't that the warcry of salamandastron? ;) Hope you had a good weekend! :) Link to comment Share on other sites More sharing options...
TrickyVein Posted March 6, 2016 Author Share Posted March 6, 2016 The order of parts in OBTE combinations for weapons might be important. When part combinations follow the order of attachments for the weapon modification workbench, it could minimize generating weapons with missing mods. This could have been causing my original problem. Link to comment Share on other sites More sharing options...
Recommended Posts