JesterDoobie Posted December 25, 2016 Share Posted December 25, 2016 I can't promise it won't hurt, but I DO promise that I won't use the wire brush OR the glass dust in the sandblaster this time, so it won't be THAT bad. And I've got yummy virtual brownies for after...I'm Working on adding defence/safety capabilities to my Hydroponics Racks mod, and I'm getting something wrong. Anybody Ever modify defence dynamically in a script before? My mod needs a toggleable defence value like it's food and water values to be "perfect" imo(Basic idea is an awesome-looking AIO settlement supplies device, right? kinda needs defence somehow) , and I can make my object worth whatever safety I want on command, and it applies the AV to it's settlement fine, but making it then worth nothing or reducing the value either just don't work at all or breaks it's settlements defence value in unpredictable ways, resulting in settlements showing afaik just a random, +/- Integer from -99,999 to 99,999, while the obj is worth another random # or is totally unchanged and IDK WTF? I'm not modding the Settlement's safety actorvalue directly, BTW, just the Rack's Safety, alpha/beta testing revealed that modding settlement AV's in scripts directly is "touchy", to say the least, musta broken workshopparentscript (and hence my/your settlement) about 20000 times so far. Or if anyone knows a way to make script placed workshop turrets have a functional safety AV or "attach" to their settlement they way they should, and remove the AV from said settlement when they get removed by a script, that'd work, too. ATM I use PlaceatNode() to insert markers into my objects' 3d, then PlaceActorAtme() and MoveTo() to place customed heavy laser/missile turrets at the markers, which works just fine and results in functional workshop turrets (they killed the Queens and baddies i summoned using the console, anyways, I still gotta cause an attack somehow and test 'em "on auto" but since they killed something it looks like I'm all gtg so far, turrets usually either just work or won't fire a shot in my experience) exactly where I want, just they don't apply their safety AV to their respective settlements or to the Rack/Object that Places them, even if I try to RecalculateResources, and as noted above, modding/setting the values in a script is iffy. Food, power and water are treated differently somehow by the engine, I can set them or mod them as needed once I figured out how/when, just safety apparently uses Bethesda-"logic" that results in afaik random things happening and that I can't figure out at all or is more "protected" somehow and I'm stumped. Do I need to add something like TurretRef[count].SetLinkedRef(Settlement, WOrkshopLinkKeyword) or similar to my while loop to cue the workshop? Is there a more formal "WorkshopPlaceAtMe()" function, that'd just add the right sorta workshoplink for me, or an actual Bethesda method/function for such that I missed while scanning the workshopScript(s) somehow? It seems like it, but idk, afaik the game is largely predicated upon either the player adding objects to the world using workshop/build mode or using the CK to place them that way. Placing stuff, specially building complex, interactable compound "objects" ingame using just scripts (fired by pressing a button/throwing a switch ingame, for example) seems to be a bit touchy or weird somehow. I kinda get the feeling Beth is saying " ya the game technically "can" work that way, but we'd really rather you didn't so we're not gonna make it easy." Might just be cuz my technical approach is wrong, that's happened to me before many times, or mebbe I'm skirting a "protected/forced" game function like anims or SWF files/menus again, or just cuz I'm an idiot sometimes and well, sometimes is now. Any ideas? Link to comment Share on other sites More sharing options...
shadowslasher410 Posted December 26, 2016 Share Posted December 26, 2016 So I re-read this several times, and I think I understand what you want to do, but I'm not positive. So you basically want to make your hydroponics racks produce defense, yes? And you want to be able to modify that value via a script? By toggleable, do you mean you want the ability for the player to decide whether it produces defense or not and how much it produces? Or do you the author want to do that? I'm also sort of confused about what you said about turrets. Do you want the hydroponics racks to act like turrets and kill enemies? Or do you want to do something involving turrets in addition to whatever you are doing with the hydroponics racks? Oh, and do you want them to be able to be destroyed in attacks, like normal turrets and crops and stuff? Link to comment Share on other sites More sharing options...
Recommended Posts