SKKmods Posted May 21, 2019 Share Posted May 21, 2019 I would like to move a static placed container object between worldspaces without changing its reference id. It's not keyword bound to any cell/locations. If this is possible, whats the mechanism ? If it's not, then pull the plaster off quick ! Link to comment Share on other sites More sharing options...
Reneer Posted May 21, 2019 Share Posted May 21, 2019 Just so I understand, you're trying to move an object / container from, say, the DiamondCity worldspace to somewhere in the Commonwealth worldspace? And just some random location in the Commonwealth worldspace? In order for this to (potentially) work you will need to create a quest, a ReferenceAlias in that quest with a package and a LocationAlias. The package will have to point to the location alias. You will also want to create a new actor, let's call him Salesman, then place him somewhere in a dummy cell, and finally a Formlist of all the locations you might want the object to end up. Something like this might work:ScriptName RenMoveLocationsQuestScript extends Quest ReferenceAlias Property OurLocationAlias Auto LocationAlias Property OurLocationAlias Auto Objectreference Property SalesmanRef Auto bool Function MoveToRandomLocation(Formlist LocationFormlist, Objectreference ObjToMove) int i = Utility.GetRandomInt(0, LocationFormlist.GetSize() - 1) Location packlocation = LocationFormlist.GetAt(i) as Location OurLocationAlias.ForceRefTo(packlocation) OurReferenceAlias.ForceRefTo(SalesmanRef) SalesmanRef.MoveToPackageLocation() if (SalesmanRef.GetCurrentLocation() == packlocation) ObjToMove.MoveTo(SalesmanRef) OurLocationAlias.Clear() OurReferenceAlias.Clear() SalesmanRef.MoveToMyEditorLocation() ObjToMove.MoveToNearestNavmeshLocation() return true endif OurLocationAlias.Clear() OurReferenceAlias.Clear() SalesmanRef.MoveToMyEditorLocation() return false endFunction Please note this is all untested, but unless I'm missing something it should work. Link to comment Share on other sites More sharing options...
SKKmods Posted May 21, 2019 Author Share Posted May 21, 2019 (edited) Appreciated, but unfortunately the constraints are a little more complex than a simple in-game scripted move. 1. There is a placed static persistent container under the Commonwealth.2. It is used as the central storage container that ties together all workshops and workbenches in a game.3. It holds most of the stuff in 20,000+ active users savegames.4. As a RemoveAllItems() akTransferTo target it must be persistent.5. I would like to move the placed static persistent container to its own own custom holding cell/worldspace in the editor or xEdit without changing its object reference which will cause mayhem. Changing the XYZ coordinates on the object reference form is fine, but there is no worldspace exposed in the form to edit. I have already been through the cycle of creating a new master container, then on game load transferring any contents of the old master container and switching all the script to point at the new one. But that will always leave the old dirty container behind as I don't know when a user will (if ever) upgrade, and is just not elegant enough for an SKK solution. It is probably not possible. Edited May 21, 2019 by SKK50 Link to comment Share on other sites More sharing options...
Reneer Posted May 21, 2019 Share Posted May 21, 2019 Ah, sorry to hear that. :( Link to comment Share on other sites More sharing options...
Korodic Posted May 22, 2019 Share Posted May 22, 2019 What about using FO4Edit? Any tool that would allow you to modify an existing object reference ID to the one you have or copy the existing object reference to another cell? I dont see how you could do this via Creation Kit. If not doable in FO4Edit I dont see any way it can be done without you making the users manually transfer it as a scripted transfer would leave the dirty edit as you have stated. EDIT: I did try looking for you, I didn't see any way to do this natively. However I don't know if some utility exists that would be capable of doing this. Link to comment Share on other sites More sharing options...
SKKmods Posted May 22, 2019 Author Share Posted May 22, 2019 Yes that's exactly my question, can FO4EDIT change the worldspace of an existing object reference ? Link to comment Share on other sites More sharing options...
DieFeM Posted May 23, 2019 Share Posted May 23, 2019 (edited) There's a script named "Put worldspace references in the right cells.pas" in xEdit that moves references, it is meant to fix errors like this one:MASTERFILE: Reference attached to wrong cell for its location: 'Wilderness' (01006609) (27, -5) in WorldSpace 'MyWorld' (01000819) It calls the function SetElementEditValues to edit the Cell of the reference. Maybe you can tinker with it and get the reference moved. PS: there you have a couple of links that you may find of use:https://tes5edit.github.io/docs/11-Scripting-Functions.html#s_11-4-2https://www.tutorialspoint.com/pascal/pascal_operators.htm Edited May 23, 2019 by DieFeM Link to comment Share on other sites More sharing options...
SKKmods Posted May 23, 2019 Author Share Posted May 23, 2019 Many thanks, I'll give that a poke. Link to comment Share on other sites More sharing options...
Recommended Posts