Th3Boar Posted June 27, 2019 Share Posted June 27, 2019 As the title implies, I am working on a mod that allows all robot workbenche "craftable" voicetypes from the Automatron DLC to be used as settlement vendors, doctors, barbers and surgeons (last two are from the Vault-Tec Workshop DLC and I would like to do those extra). I have been banging my head against this for almost 3 straight weeks now and I just can't figure out the best way to go about this. Part of the problem is, that I am not Papyrus (or any script language for that matter) savy. I can understand the logic and figure out script fragments, but once more involved terms come into play I'm sadly out.I'm stuck at the most important part: How to get every "player created robot" to be able to be used as a fully functional vendor? I'd have to create dialogue paths for all voicetypes, that's easy. I'd so it in a separate quest. Now since they are robots I'd want them to be available 24/7. That would either work by making 6 new vendor factions where I just edit the work hours OR (and I'm not sure what gets the priority) I just use the vanilla vendor factions (by adding them to the template robot) and the vanilla "dlc01:workshoprobotscript" on the "DLC01LvlCompWorkbenchBot" robot template has the bWork24Hours value set to TRUE already. Again I don't know if the script overrides the vendor faction set working hours or not. In any case, the last hurdle (as far as I can tell) would be to get my dialogue quest somehow connected to any robot that is assigned to one of the player-built settlement stores or services so that the robots can access the newly created dialogue paths.I have been going through all vendor related entries in the ck and the attached scripts and the closest I've found is this part of the "workshopparentscript": ; utility function for setting/clearing vendor data on an actor function SetVendorData(WorkshopScript workshopRef, WorkshopNPCScript assignedActor, WorkshopObjectScript assignedObject, bool bSetData = true) wsTrace(" SetVendorData actor=" + assignedActor + ", object=" + assignedObject + ", bSetData=" + bSetData) if assignedObject.VendorType > -1 wsTrace(" vendor type " + assignedObject.VendorType) WorkshopVendorType vendorData = WorkshopVendorTypes[assignedObject.VendorType] if vendorData ; -- vendor faction wsTrace(" vendor faction " + vendorData.VendorFaction) if bSetData assignedActor.AddToFaction(vendorData.VendorFaction) if vendorData.keywordToAdd01 assignedActor.AddKeyword(vendorData.keywordToAdd01) endif else assignedActor.RemoveFromFaction(vendorData.VendorFaction) if vendorData.keywordToAdd01 assignedActor.RemoveKeyword(vendorData.keywordToAdd01) endif endif ; -- assign vendor chests ObjectReference[] vendorContainers = workshopRef.GetVendorContainersByType(assignedObject.VendorType) int i = 0 while i <= assignedObject.vendorLevel if bSetData wsTrace(" linking to " + vendorContainers[i] + " with keyword " + VendorContainerKeywords.GetAt(i) as Keyword) assignedActor.SetLinkedRef(vendorContainers[i], VendorContainerKeywords.GetAt(i) as Keyword) else assignedActor.SetLinkedRef(NONE, VendorContainerKeywords.GetAt(i) as Keyword) endif i += 1 endif else ; ERROR endif endif endFunction The problem is that this script is too complex for me to fully grasp and I wouldn't know where to begin in order to change it so to add a condition that if the "assignedActor" is in the "DLC01WorkshopRobotFaction" that they get added to the new VendorFaction that allows for 24/7 working hours. I don't even know if that would be a good way to go about it. I would love to stay as compatible as possible, so changing vanilla things is always my last resort but I just don't see how else to do it.So I guess my biggest issue is ... making this mod >.< Because my question is how do I get any robot that was player-made in the robot workbench to be a voiced vendor/service provider and that works 24/7? How do I connect the robot template with either new vendor factions and a new dialogue quest OR with the vanilla vendor faction and a new dialogue quest?I hope someone can help. In any case, thanks for reading this far. Have a good day.The_Boar Link to comment Share on other sites More sharing options...
niston Posted July 5, 2019 Share Posted July 5, 2019 You should probably not edit the workshopparent script (or any other vanilla script). Doing so will make your mod incompatible w/ anything else that edits those scripts (such as the unofficial patch, wsfw, etc). Link to comment Share on other sites More sharing options...
Th3Boar Posted July 5, 2019 Author Share Posted July 5, 2019 Yeah, my second post is more where my head is at now, but thanks for the warning. Link to comment Share on other sites More sharing options...
Recommended Posts