stonefisher Posted October 17, 2018 Share Posted October 17, 2018 I wish to be able to add an attach parent slot to any weapon via script, While you can add a mod association keyword using addkeyword, I have been unable to add the slot even though it is technically a keyword by using addkeyword. I know my script works as I have added the attach parent slot in the creation kit to a weapon, spawned it into my inv and then used the script to process all the weapons in my inv. Only the weapon with the attach point already added is getting a weapon mod installed. This shows me the only line of the script that isnt working is the line to try and add an attach parent slot. Any ideas on things I could try? Link to comment Share on other sites More sharing options...
Reneer Posted October 17, 2018 Share Posted October 17, 2018 You'll need to post your scripts if you want in depth help. Otherwise we'll just be making guesses. Link to comment Share on other sites More sharing options...
stonefisher Posted October 17, 2018 Author Share Posted October 17, 2018 Wild guesses are fine. The part of the script that dousnt work is the add keyword part: ObjectReference property ataah_ContainerStorage autoKeyword property ap_test_ataah autoObjectMod Property mod_Legendary_Weapon_PlasmaBullets_ataah Auto const Event onInit() AddInventoryEventFilter(none)Endevent Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) ObjectReference weapontomod = self.DropFirstObject() weapontomod.AddKeyword(ap_test_ataah) weapontomod.AttachMod(mod_Legendary_Weapon_PlasmaBullets_ataah) ataah_ContainerStorage.additem(weapontomod)Endevent The problem seems that even though the creation kit handles it more or less like a keyword, an attach parent slot is not a keyword as far as the game is concerned as far as I can tell. Link to comment Share on other sites More sharing options...
Reneer Posted October 17, 2018 Share Posted October 17, 2018 You might want to add a short delay before trying to attach the mod to the weapon. Link to comment Share on other sites More sharing options...
stonefisher Posted October 17, 2018 Author Share Posted October 17, 2018 Added a half second delay between adding keyword and attaching mod. Same result. Link to comment Share on other sites More sharing options...
stonefisher Posted October 23, 2018 Author Share Posted October 23, 2018 It is weird I cant seem to add a mod association keyword to a weapon with a script either and that is shown under keywords on the weapon in the creation kit. :/ Does anyone know if that is possible or if there are any mods that have done this? Currently I am not sure you can add a keyword to a weapon. Link to comment Share on other sites More sharing options...
Reneer Posted October 23, 2018 Share Posted October 23, 2018 (edited) You can definitely add keywords to weapons no problem. I'm just not sure about actual attach parents / slots, because those -I think- are only able to be embedded into the actual NIF files for the weapons. Edit: The issue could also be that, in your script, you should to check to see that your dropped weapon Objectreference is actually available and has its 3D loaded before you try adding keywords to it, otherwise it will fail. Edited October 23, 2018 by Reneer Link to comment Share on other sites More sharing options...
stonefisher Posted October 23, 2018 Author Share Posted October 23, 2018 Thats odd, i made it add the mod association keyword using the same script as I used above and no new mod slots appeared. I added it to the weapon in creation kit and it appeared. The mods I am adding have no 3d model, they are a bit like the legendary mods in that regard except I have added mod association keywprds and recipes so they can be swapped at a workbench. Link to comment Share on other sites More sharing options...
JonathanOstrus Posted October 23, 2018 Share Posted October 23, 2018 You cannot add an attach parent to an object unless it is via a mod that is being attached. Just adding the keyword doesn't work that way. It has to be assigned as an attach parent type not a general keyword. The only way to add extra slots to the object is to modify the record in the plugin at design time. Link to comment Share on other sites More sharing options...
Recommended Posts