SandMouseAnarchy Posted March 3, 2019 Share Posted March 3, 2019 (edited) so in an effort to get weapons desplaying on the player in a dynamic way - ive found this potential solution - https://www.creationkit.com/fallout4/index.php?title=Equip_Slot It seems like we can make custom EquipSlots and assign parrents to them.but the question is - how do we overwrite a weapon to equip to that new slot instead of its default EquipSlot(0/1/2/3)? Ultimately i figure a new equipslot can be made in ck and in the nif and placed on the back,this way when the normal weapon is drawn the weapon on back is unequipped, and when the player holsters their gun the weapon on the back re-equips. if it can be done by script, we can then clone the normal weapon and use that clone for the weapon on back telling it to use the new EquipSlot - I think this could work nicely with very little script overhead, but i have no idea how to tell the weapon which equipslot it should use. I havent really touched weapons in the ck, so there may well be a little EquipSlot drop down box in the weapons record, but i dont know, so i thought id ask here while i continue experimenting ^.^ Any ideas guys? Edited March 3, 2019 by SandMouseAnarchy Link to comment Share on other sites More sharing options...
SandMouseAnarchy Posted March 3, 2019 Author Share Posted March 3, 2019 (edited) **UPDATE** So i can now confirm that in the weapons record in ck there is infact a little drop down box to select which EquipSlot the weapon can use... this is great... but without the ability to change the slot by script we would need a copy of every weapon in ck with the new EquipSlots in them, and then a simple script to tie it all togeather. My next test will be to see if i can actually create and reference a custom EquipSlot on a copy of a weapon and force it to equip when the normal gun un-equips (that part should be simple enough, but it really will need some true coding genius to find a way to tell the weapon which equipslot to use dynamically...... and there might be a solution to that too - from what ive been reading a weapon can have multiple equipslots available to it, and so far as i can tell, when one equipslot is full the weapon is equipped in the other slot if applicable. meaning that the game should be able to equip the weapon to the back instead of just disapearing back into the invintory, and then re-equip it to the hand when drawn...i think we will be able to ocupy the normal hand equipslot with a dummy weapon so that the gun will be forced into the only remaining slot, but im not sure about that one at the moment...((from what i can tell, the game doesnt even pull a gun out of the invintory to equip it, it just makes a reference copy of the weapon to place at the weapons node in the hand, and then disables that reference once the gun is holstered again.)) im not sure who/if anyone is following along, but feel free to drop some ideas up in here im happy to look into any workaround or potential solution.ill get back to work and keep ya all updated as i go ^.^ Edited March 3, 2019 by SandMouseAnarchy Link to comment Share on other sites More sharing options...
DieFeM Posted March 4, 2019 Share Posted March 4, 2019 Well, I've tested changing the Equip type in a weapon, and equipping it made no visual changes, it maybe have something to do with other internal things I guess. On the other hand there's a mod called Visible Weapons - 3rd Person Holster from registrator2000, which does what you want. Link to comment Share on other sites More sharing options...
SandMouseAnarchy Posted March 4, 2019 Author Share Posted March 4, 2019 (edited) Thanks DieFeM :) I already have that mod in my game ^.^ it's great and everything but I'm looking to expand that kind of idea and make it super compatible with modded weapons. So at the moment I can dump all the parts of a gun by script onto a connect point in the player skeleton, which looks just like a gun is attached to the player, but that method on its own isn't dynamic enough - so it got me thinking that there really isn't much difference between a gun and a bunch of outfit mods (relatively speaking). moreover - a gun is not animated in order for it to follow the player, it's not skinned to the player skeleton for example, much like the placeatnode experiment the gun is being placed at the weapons node in the hand - I haven't tested that part thoroughly yet, but I suspect that if that weapons node were moved, the game would have to place the gun at the new location, I can't see anything else that controls where the weapon gets placed. Thanks so much for experimenting with me mate :) I think the trick is going to be in duplicating repositioning and renaming the weapons node in the nif, then in making a new equip slot for that new node etc etc ^.^ Edited March 4, 2019 by SandMouseAnarchy Link to comment Share on other sites More sharing options...
SandMouseAnarchy Posted March 4, 2019 Author Share Posted March 4, 2019 **UPDATE** so ive had some time to mess with ck now, and i have found that changing the equipslot in the weapon record will not change where the weapon is located when drawn... it turs out that as far as i can tell an "EquipSlot" is just a place holder so that two weapons cannot be equipped at the same time, the "equipSlot" doesnt seem to actually point to anything physical on the skeleton. ive tried adding a "part"(Back) = nothing, so i tried hooking it upto a parent = still nothing... i also tried moving the WEAPON node in the skeleton nif, and pointed the HumanRace record to the new skeleton, i thought that would work, but nothing... i wonder if the game uses a different skeleton or updates the skeleton when drawing a weapon? so i opened a gun nif (10mm) to check what data is in there, and low and behold there is a transform controller tied to the root, and its target is WEAPON, im still convinced that changing this "WEAPON"(node) position in the skeleton will force the weapon to change location when drawn, but im not too sure which skeleton needs the custom WEAPON node location? maybe the 1st person skeleton? not sure... ill do more experimenting :/ Link to comment Share on other sites More sharing options...
SandMouseAnarchy Posted March 4, 2019 Author Share Posted March 4, 2019 (edited) so... this is a picture of what happens when the WEAPON node in the skeleton nif is changed :smile: so, changing the possition of the weapons node manually in each nif would probably need copies of each weapon so the original can still equip to the hand, in the new copy of the weapon i bet we could specify any "node" we like for the weapon to attach to, so the original vanilla weapons node wont have to be changed, just the node in the copy's nif... i dont think we can add a bone to the skeleton by script??? and to do this manually for every weapon in game and custom weapons from the nexus would suck and wouldnt be very dynamic or modder friendly...so, i think that using just the vanilla weapons node, we can apply a transform controller to it and a simple animation, all within the nif to move the node to the back, and then set up a simple script to play that animation when a weapon is drawn/put away.... this way all that will be needed now is a way to tell the game to keep the weapon out after its put away (so we can move it to the back) or possible use a dummy weapon that doesnt change the player animation (and ofcourse doesnt fire), im not sure how to do that one yet... but hey... posibilities :wink: -additionally - it doesnt seem to matter where in the nif hierarchy the weapon node is, which may or may not be a good thing, left under the hand bone the weapon will follow the hand always, but that would be bad if we just moved the node to the back because it would behave like its in the hand, and placing the node under the chest or something else in the hierarchy would be great for the weapon on the back, but then when drawing the weapon it would just stay still, im not sure of a way around this yet... maybe while the node is on the back we can tell the node not to animate somehow and to just stay still... some kind of subgraph animation maybe? needs more research my end. **edit**ill try and make myself clear, without rambling so much haha...so, we give the weapon node a nif animation - the bone will move from hand to back, stop, and then from back to hand, stop.in game, the weapon is put away, triggering a script that will play our animation and move the node from hand to backin game, the weapon is drawn, triggering a script that will play the animation from back to hand. the problem is = how to keep the weapon out/visible when the weapon is put away. :sweat: :teehee: **edit 2**so, we can play a nif animation from a script in game, can we change any of the data in the transformcontroller of the nif in the same way? if we can then we can just specify another node to attach to when the weapon is put away, so no nif animation would be necissary, but i havent seen any documentation on that yet, so that might not be possible. **edit 3**i think i will start another post for this as the title just isnt accurate anymore seeing as we need to adjust NiTransforController Target() by script, not the equipslot.... Edited March 4, 2019 by SandMouseAnarchy Link to comment Share on other sites More sharing options...
langnao Posted March 5, 2019 Share Posted March 5, 2019 In my playing around , looking into the possibility of dual wielding, u can move the weapon to the left hand by editing the weapon nif, change WEAPON to WeaponLeft (weaponleft bone) and at the weapon equipslot change to left hand/both hand? . But dual wielding is more than just animation. Firing is triggered by the annotation but how to trigger the firing effect (also reduce ammo) at the left hand weapon? I could be something "bake" into the engine thus its not supported. Dual wielding melee weapon is doable (since Skyrim we have that) ... But this is not what u asked. Anyway, if u wanna do any holstering, the weapon will be part of the armor/clothing and u need to paint body weight. I did my own holstering for katana,etc. But all those need specific attention to them. Even if u specifically take care of all the default weapons but for FO4 each weapon, there r so many mods and thus variation so its madness to custom. Maybe u can attach the weapon to some custom bone like ur pic with no modification but then its not nice and looks weird. Example, removing the WEAPON data from the nif, the weapon will not be hold by ur hand but stay at your feet .... Link to comment Share on other sites More sharing options...
SandMouseAnarchy Posted March 5, 2019 Author Share Posted March 5, 2019 well it seems to me mate that duel wielding could be done with this method, but ya would have to change the second weapon's equipslot by script, or, have a left hand version set up with the left hand equip slot (and in its nif it would need to point to some custom "lefthandWEAPON node" (unless there is already one on the skeleton(?)) but its doable... with two weapons equipped with different equipslots that both have the 'on righthand fire condition' (i forget what thats called) then both weapons should fire at the same time, moreover, if that lefthand weapon were actually replaced by a dummy then its fire rate can be offset by script - ie the dummy can be forced to fire .5 seconds after the right hand weapon fires normally, so long as the dummy has a projectile node, i think that would work nicely :)- obviously there would need custom left hand firing animations, but its doable with enough work i say. RE my post:the current holstered weapon mod on the nexus uses empty apparal versions of weapons, and doesnt support dynamic weapon modifications, wheras this method would display all mods on a weapon. i really want to get away from actual apparal weapons and make something more dynamic so im still experimenting and looking for options. i thought that animating the weapon node in the nif was the answer, but if we cant keep the weapon out when its "put away" then it wont matter and will be imposible, instead now i think the answer will be in connect points and the remapnode function to tell the game which point to build a dummy weapon with all mods at then disable when the weapon is drawn. i even found a feature hidden away in keywords - "RemapNode" function call keyword, i have tried this on normal NiNodes, but it doesnt seem to have the effect i wanted, it seems that RemapNode can only remap connect points in a nif, but not bone name. shame, but it does open possibilities for other things and features. im now thinking this feature is going to be the way forward, but still experimenting, and working on other stuff too haha. extra note - in a weapons record in ck there is an option to "hide Backpack" this is blatently a cut feature that would have allowed for weapons on back, but i cant find and legacy code hidden in the game to diturmine what a backpack is - it was probably a keyword that was supposed to be applied to a weapon, but there is no script left to handle that function, a real shame. what was bugthesda thinking.... Link to comment Share on other sites More sharing options...
Recommended Posts