YouDoNotKnowMyName Posted May 30, 2022 Author Share Posted May 30, 2022 Ok, now that part works, but I am getting the following error when compiling:D:\proginstall\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\DbMiscFunctions.psc(66,25): variable PO3_SKSEFunctions is undefined That is from your functions mod, right? Link to comment Share on other sites More sharing options...
dylbill Posted May 30, 2022 Share Posted May 30, 2022 Yes, it requires papyrus extender: https://www.nexusmods.com/skyrimspecialedition/mods/22854 and papyrus util: https://www.nexusmods.com/skyrimspecialedition/mods/13048 sorry I forgot about that. Link to comment Share on other sites More sharing options...
YouDoNotKnowMyName Posted May 30, 2022 Author Share Posted May 30, 2022 (edited) Ok, so now it compiles! I enabled logging and the debug trace stuff in the ini file, but when I start the game and COC int some random cell the message box that says that the script is finished immediatley appears.There is nothing in the log files, except the usual log stuff.Am I still missing something? I used the "Tamriel" worldspace as a property, by the way. Actually there is this line in the log:[05/30/2022 - 10:37:07PM] error: Unbound native function "All" called Your script uses the "all" thing to list all the objects.How can I tell the game that "this is ok, ignore this 'error' "? Edited May 30, 2022 by YouDoNotKnowMyName Link to comment Share on other sites More sharing options...
dylbill Posted May 30, 2022 Share Posted May 30, 2022 that means the SkyPal_References.all() isn't working. It may be because when you install SSE it auto updates to AE, version 1.6, while SkyPal looks like it only works on SE 1.5.97. You may need to use this to roll back your skyrim version https://www.nexusmods.com/skyrimspecialedition/mods/57618 Link to comment Share on other sites More sharing options...
YouDoNotKnowMyName Posted May 31, 2022 Author Share Posted May 31, 2022 Ok, that worked!But it wasn't really useful because one important thing is missing:What cell the object is in! Is it possible to also print the cell that the object is in? So the output would look like this: #################### All objects in cell -64,-64 RefId ObjectType PosX PosY PosZ RotX RotY RotZ Scale #################### All objects in cell -63,-64 RefId ObjectType PosX PosY PosZ RotX RotY RotZ Scale Or RefId CellX CellY ObjectType PosX PosY PosZ RotX RotY RotZ Scale How can I get the cell that an object is in?So the X and Y numbers of the cell? Link to comment Share on other sites More sharing options...
dylbill Posted May 31, 2022 Share Posted May 31, 2022 To reference the cell the obj is in, you can use Obj.GetParentCell() https://www.creationkit.com/index.php?title=GetParentCell_-_ObjectReference Link to comment Share on other sites More sharing options...
YouDoNotKnowMyName Posted May 31, 2022 Author Share Posted May 31, 2022 Ok, but the CK wiki says:If the reference is in an unloaded exterior cell, this function will return None.So, if I coc into Riverwood and the script starts running would it only return valid data for all the currently loaded cells?(those around riverwood) Link to comment Share on other sites More sharing options...
dylbill Posted May 31, 2022 Share Posted May 31, 2022 Hmm, yes that's correct. Here's another method that's similar to the first one I posted. Use Papyrus Extender to get all cells in game, then print the cell data if it's in your world space: WorldSpace Property MyWorldSpace Auto Event OnInit() Form[] AllCells = PO3_SKSEfunctions.GetAllForms(60) ;get all cells in game int i = AllCells.Length While i > 0 i -= 1 Cell CurrentCell = AllCells[i] as Cell If CurrentCell ObjectReference Obj = CurrentCell.GetNthRef(0) ;get first ObjectReference in cell If Obj If Obj.GetWorldSpace() == MyWorldSpace TraceCellObjData(CurrentCell) Endif Endif EndIf EndWhile EndEvent Function TraceCellObjData(Cell akCell) Debug.Trace("Cell ID: " + DbMiscFunctions.ConvertIntToHex(akCell.GetFormId())) Int i = akCell.GetNumRefs() While i > 0 i -= 1 ObjectReference Obj = akCell.GetNthRef(i) String S = (Obj.GetType() + " " + DbMiscFunctions.ConvertIntToHex(Obj.GetFormId()) + " " + Obj.GetDisplayName() + " " + Obj.GetPositionX() + " " + Obj.GetPositionY() + " " + Obj.GetPositionZ() + \ " " + Obj.GetAngleX() + " " + Obj.GetAngleY() + " " + Obj.GetAngleZ() + " " + Obj.GetScale()) Debug.Trace(S) EndWhile EndFunctionRequires SSE as well. Link to comment Share on other sites More sharing options...
YouDoNotKnowMyName Posted May 31, 2022 Author Share Posted May 31, 2022 Wow, thanks! My approach would have been to go in the game, enter TCL, fly up a lot.Then activate the script.The script would print out all the objects in the current cell then move the player one cell to the left (something like this modposX or modpoxY console command) then read in all the objects from that cell and so on for every cell in the worldspace. But your approach is (of course) better! (The script is running right now ...) Link to comment Share on other sites More sharing options...
YouDoNotKnowMyName Posted May 31, 2022 Author Share Posted May 31, 2022 Question:What does the "If Obj" do?You don't compare the variable Obj to anything, wouldn't this always execute the if branch?Because it is always true. Link to comment Share on other sites More sharing options...
Recommended Posts