Th3Boar Posted July 4, 2019 Share Posted July 4, 2019 Hey there gals and guys,I've recently asked for help on a problem I am having making the Automatron DLC craftable robots into functional settlement vendors.One of the features I want to add is that their services are available 24/7 (since they're robots) the problem is, that the creation kit's "vendor factions" all use an active time frame from 7am to 8pm. Now I want to avoid changing base game files as much as possible so it can be as compatible as possible.From what I can tell by reverse engineering a mod called "Robot Vendors and Doctors Dialogue Fix" created and uploaded by JigglesJosh, you don't have to add certain factions to an actor in order for that actor to be placed into a faction. One can apparently even call upon that actor being in that faction via conditions in a "dialogue quest".Now, my idea was to make a recurring quest with a script, that checks any player-built robot in a settlement for being in one of the specific vendor factions (for example WorkshopVendorFactionArmor 0, WorkshopVendorFactionMisc 0 etc.) and then subsequently also add that actor (an Automatron Robot) into a different vendor faction that is almost identical to the vanilla one, with the only change being the working hours. I think that is how it has to be done because the robots tag of bwork24hours in the companion script is active (meaning they should not have resting phases) yet they follow the working hours of the faction they are assigned to.Now I don't know how the creation kits factions work together, so I don't know if there is a way that one faction can simply overrule another of the same type or if it would be simpler, that once the robot actor is detected to be in one of the CK's vendor factions (placed there by one of the store objects) that the script would remove the robot actor from that faction again but add it to the new 24/7 one. Then I'd also probably need a custom reset script that on an event where the player removes a robot actor from a workshop store, that it's checked that it then is also removed from both the vanilla and the 24/7 vendor faction. So to boil it down, would it be sensical/doable to make a dummy quest that is loaded on the condition of a robot being assigned/removed to/from a settlement store and then change their faction from the vanilla vendorfaction to a custom made vendor faction? Could one then add anoter script that on the event that a robotic actor is being removed from that store, that both factions are set to -1 again?Does this sound reasonable to anyone with some experience in scripting/companion creation? Because otherwise I really wouldn't know how to get robots to work 24/7 at a settlement store. I hope someone is able and willing to help. Thanks for taking the time to read this.Sincerely The_Boar Link to comment Share on other sites More sharing options...
Th3Boar Posted July 5, 2019 Author Share Posted July 5, 2019 Ok so I have thought some more about this and have come up with a concept. I don't really know how to script, so I would like to ask if someone could tell me if this is complete nonsense or if it would be at least a feasable and semi-smart script idea. I have mainly written down the "logic" behind what I want the script to do.To implement this script I would add a new "hidden" quest in the CK to which I would add this script. It should have two events as script triggers.If I'm not completely off base here I think it should look something like this: ;Event to assign robot vendor from vanilla vendorfaction to customrobotvendorfaction if they are assigned to a store when Event "unclearX" ;I'm unsure on which Event to call on to keep it light in use but effective "unclearX" ideas: - OnCellLoad - Objectreference - OnLoad - ObjectReference - when NPC is assigned to a workshopObject <-- this one Conditions for this Event (in order to run it are) - "if assignedActor is in faction DLC01WorkshopRobotFaction" AND - "cell is in a workshop area" AND - "if assignedObject.VendorType > -1" AND - "if assignedActor is in faction from FormList "CustomMadeVendorFactionListY" then this script removes the assignedActor from the previously added "specificVendorFaction" (maybe via formlist?) and instead adds them to a "newspecificVendorFaction24/7" via the workshopparentscripts index maybe? endEvent ;Event to unassign robot vendor from customrobotvendorfaction once they are unassignd from a store when Event "unclearX" ;I'm unsure on which Event to call on, to keep it light in use but effective Conditions for this Event (in order to run it are) - "if assignedActor is in faction DLC01WorkshopRobotFaction" AND - "cell is in a workshop area" AND - "if assignedObject.VendorType > -1" AND - "if assignedActor is in faction from FormList "newVendorFaction24/7" then this script removes the assignedActor from the "newVendorFaction24/7" FormList after it is no longer assigned to a store endEvent So, what do you think? Any help is appreciated. Link to comment Share on other sites More sharing options...
niston Posted July 5, 2019 Share Posted July 5, 2019 Theres assigned/unassigned events coming from the workshopparent script, IIRC. I suspect however that there might be a better way, such as duplicating and then editing the duplicated AI package. But have never tried this. Link to comment Share on other sites More sharing options...
Th3Boar Posted July 5, 2019 Author Share Posted July 5, 2019 Ok, thanks. I'll take a look at the AI packages. Link to comment Share on other sites More sharing options...
Recommended Posts