Belthan Posted May 25, 2014 Share Posted May 25, 2014 I'm trying to make an activator that will clone an arbitrary object without knowing what that object is. It would have a script something like the following example. Obviously, this doesn't actually work because the "PlaceRefAtMe" function doesn't actually exist. SCN CloneMachineSCRIPT REF ThingToClone BEGIN OnActivate PlaceRefAtMe ThingToClone ENDIf some equivalent of the hypothetical "PlaceRefAtMe" function existed, the activator could then be used to make a copy of any persistent REF without knowing what it is, like so: set CloneMachineREF.ThingToClone to SomeArbitraryREF CloneMachineREF.activate playerDoes anybody know of a way to simulate the behavior of that hypothetical "PlaceRefAtMe" function? Link to comment Share on other sites More sharing options...
jazzisparis Posted May 26, 2014 Share Posted May 26, 2014 A reference is an instance of a base object (form), therefore, when cloning an object, you essentially create a new instance of the same base form. set CloneMachineREF.ThingToClone to SomeArbitraryREF.GetBaseObject CloneMachineREF.Activate player And then: SCN CloneMachineSCRIPT REF ThingToClone BEGIN OnActivate PlaceAtMe ThingToClone 1 END Link to comment Share on other sites More sharing options...
Belthan Posted May 27, 2014 Author Share Posted May 27, 2014 Any way to do it without FOSE/NVSE? (Despite the advantages, my compulsive aversion to dependencies prevents me from using them). Link to comment Share on other sites More sharing options...
jazzisparis Posted May 27, 2014 Share Posted May 27, 2014 You must use a base form with PlaceAtMe. There is no vanilla function that, given a reference, returns its base form (otherwise GBO would be redundant). Unlike FOSE, NVSE is pretty much essential, with numerous A-list FNV mods requiring it. I wouldn't even consider it a "dependency." Link to comment Share on other sites More sharing options...
Belthan Posted May 27, 2014 Author Share Posted May 27, 2014 Thanks, at least that confirms my suspicion that there's no way to do it with vanilla APIs and I wasn't just missing something. So does anybody have any stats on what percentage of users have NVSE? My own convenience notwithstanding, I'm not going to do something that would leave 20% of users out in the cold, but if it's just one guy and that guy is me, I'd consider it. Link to comment Share on other sites More sharing options...
llamaRCA Posted May 27, 2014 Share Posted May 27, 2014 Thanks, at least that confirms my suspicion that there's no way to do it with vanilla APIs and I wasn't just missing something. So does anybody have any stats on what percentage of users have NVSE? My own convenience notwithstanding, I'm not going to do something that would leave 20% of users out in the cold, but if it's just one guy and that guy is me, I'd consider it. I wouldn't worry about NVSE being a problem if you want the functionality you are going to be able add to the mod by using it. I just added it to my mod in an update and expected the usual whining about script extenders as is seen in the Fallouts in general and I haven't gotten one single complaint about it. I was completely surprised. Players love to complain, as I'm sure you know, and not a single complaint. And the mod continues to add new players as well, so this isn't just old players accepting the addition of NVSE. Jazz is right, I suspect, that it's not a problem because so many mods require it here in NV. (I updated in beta in March to let the players test for me, but the more or less final update has about 6500 unique downloads to give you a sense of scale for potential complainers). Link to comment Share on other sites More sharing options...
Recommended Posts