pra Posted February 4, 2019 Share Posted February 4, 2019 I made this mod:https://www.nexusmods.com/fallout4/mods/36816 You build a door, you can use it to enter a cellar, so far so easy. Also easy: build each door once at most. Once built, it sets a global variable, then the COBJ checks for it. However, now, once placed, it cannot be moved or stored, only scrapped. I found a workaround for the first problem: create a FormList with all the doors, then create a COBJ for that list, with GetGlobalValue WorkshopNoEdit==1 as the condition. But this messes up the real COBJ's descriptions, they are only displayed half the time.Why, though? I absolutely don't get the logic behind which door has a visible description, and which doesn't. Can it be fixed for all of them? Can storing be fixed somehow, too? Or should I just get rid of the workarounds? If someone complains, "go get Place Everywhere"/tough luck. I use PE myself anyway... Link to comment Share on other sites More sharing options...
DieFeM Posted February 5, 2019 Share Posted February 5, 2019 Check the conditions of the COBJ for the fast-travel mat. Link to comment Share on other sites More sharing options...
pra Posted February 5, 2019 Author Share Posted February 5, 2019 Yes, I did that. The condition checks if the current settlement has less than 1 fast travel mats.This works fine if you want to only allow once per settlement, but I want them to be globally unique. Link to comment Share on other sites More sharing options...
DieFeM Posted February 5, 2019 Share Posted February 5, 2019 You could create a script that uses the events OnWorkshopObjectPlaced and OnWorkshopObjectRemoved to change the value of a global variable property and attach it to all the doors, create a global variable for each door, and set each global to each door's script so it changes to 1 with OnWorkshopObjectPlaced and changes to 0 with OnWorkshopObjectRemoved. Then do a COBJ for each door that checks the global for this door. Link to comment Share on other sites More sharing options...
pra Posted February 5, 2019 Author Share Posted February 5, 2019 Yes, I did that, too: Once built, it sets a global variable, then the COBJ checks for it. What I'm trying to figure out, is if it's possible to make the doors movable and storable, despite this. Link to comment Share on other sites More sharing options...
DieFeM Posted February 5, 2019 Share Posted February 5, 2019 (edited) I've been tinkering with your mod and noticed why you can't store the doors, it seems that the condition for the global variable is the problem, I guess this conditions apply when you can place the object but also when you can store it. It doesn't make sense, since it works for GetWorkshopObjectCount... but that's what I've find out. Edited February 5, 2019 by DieFeM Link to comment Share on other sites More sharing options...
DieFeM Posted February 5, 2019 Share Posted February 5, 2019 Maybe you could create a unique misc object that would be needed to craft each door, and it returns this object when you scrap the door, so you can craft this door only once until you scrap it and get this misc object back. Link to comment Share on other sites More sharing options...
pra Posted February 5, 2019 Author Share Posted February 5, 2019 Maybe you could create a unique misc object that would be needed to craft each door, and it returns this object when you scrap the door, so you can craft this door only once until you scrap it and get this misc object back.I thought about that, too, but that's a kinda ugly solution :/ However, that gave me another idea: make two COBJs per door, where the second has the opposite condition in regard of the global, but requires an unobtainable item. In theory this would mean: after you built a door, that second COBJ kicks in, allowing you to move and store, but not re-craft the door. But if you store it, it returns back to the first one. However, I don't know if the first COBJ will recognize the stored door.I'll have to test it... Link to comment Share on other sites More sharing options...
pra Posted February 5, 2019 Author Share Posted February 5, 2019 Nope, that isn't good either. Seems that after you store an object, all conditions are ignored. That is, after storing, both COBJs are visible.I'm giving up on storing now. I would like to fix the descriptions without sacrificing moving, though.What does determine whenever a COBJ's description is shown, if two COBJs exist for the same object? Link to comment Share on other sites More sharing options...
DieFeM Posted February 6, 2019 Share Posted February 6, 2019 What does determine whenever a COBJ's description is shown, if two COBJs exist for the same object? I think that if you have two COBJ for the same object it will appear twice, each one with its own description. I would like to fix the descriptions without sacrificing moving, though. I can move the doors, but half of the objects don't show the description nor the components needed, but I noticed it shows them when you already built it... pretty weird. I'll continue tinkering with it, if I find some way to fix it I'll tell you. Link to comment Share on other sites More sharing options...
Recommended Posts