FiftyTifty Posted July 6, 2018 Author Share Posted July 6, 2018 (edited) Ar_SortAlpha can sort via FormID, but I still don't think it would work quite right. Ar_CustomSort could probably give you something if you thought about what to use as your sorting criteria. But working out why the form list is out of order is probably easier. I don't see why it would be different in FNVEdit with no way to fix it ever implemented. Aye, it turned out there's a legacy setting that automatically sorts form lists. It was enabled, so I just had to turn it off and rebuild the form lists. But now there's a new problem. After making the new form lists, the static items are no longer placed, which is weird because they were before I regenerated the form lists. Here's the current script: https://pastebin.com/syKue3Li Edit: Found the problem, I forgot to create the model path in FNVEdit for the generated static objects. Edited July 6, 2018 by FiftyTifty Link to comment Share on other sites More sharing options...
EPDGaffney Posted July 6, 2018 Share Posted July 6, 2018 I had a gut feeling it was something like that. Weird. Your script looks fine to me. It's long, though, so I may have missed something. The one thing I can say is to try it with a few different items, because scaled items don't respond well to SetPos, so who knows what other odd bugs there are with it. Can you be more specific about what's happening? When you say the statics are no longer placed, does that mean they never appear or does that mean they appear but don't move to position? Wait, just thought of something: PlaceAtMe takes more than a frame and this is a UDF script, which I recently discovered with MadAce can cause serious problems. Link to comment Share on other sites More sharing options...
FiftyTifty Posted July 6, 2018 Author Share Posted July 6, 2018 I had a gut feeling it was something like that. Weird. Your script looks fine to me. It's long, though, so I may have missed something. The one thing I can say is to try it with a few different items, because scaled items don't respond well to SetPos, so who knows what other odd bugs there are with it. Can you be more specific about what's happening? When you say the statics are no longer placed, does that mean they never appear or does that mean they appear but don't move to position? Wait, just thought of something: PlaceAtMe takes more than a frame and this is a UDF script, which I recently discovered with MadAce can cause serious problems. See my edit, I found what the problem was. The FNVEdit script I used to generate the static objects was an older version, and it skipped the model paths for most of them. Fixed it up, and everything's dandy. Now I have to expand my hotkey script to include all the other form lists. Egh. Link to comment Share on other sites More sharing options...
EPDGaffney Posted July 6, 2018 Share Posted July 6, 2018 Oh, nice. It's always simple things like that. Now I have to expand my hotkey script to include all the other form lists. Egh.Now that's what I call fun. Link to comment Share on other sites More sharing options...
FiftyTifty Posted July 6, 2018 Author Share Posted July 6, 2018 Aaaaagh. Finally got the script working, but there's one huge bug. Certain items aren't moved once they're spawned, despite the script specifically calling SetPos and SetAngle on them. So it's essentially useless as it is now. Here's the script: https://pastebin.com/wG9SufW7 Link to comment Share on other sites More sharing options...
EPDGaffney Posted July 6, 2018 Share Posted July 6, 2018 Is it reproducible or random? If the former, any idea what they have in common? Again, PlaceAtMe takes more than a frame to process, and UDFs are called in a single frame, so I'm not surprised there's a problem. I believe MadAce got round this (to some degree) with a callback script. Link to comment Share on other sites More sharing options...
FiftyTifty Posted July 6, 2018 Author Share Posted July 6, 2018 Is it reproducible or random? If the former, any idea what they have in common? Again, PlaceAtMe takes more than a frame to process, and UDFs are called in a single frame, so I'm not surprised there's a problem. I believe MadAce got round this (to some degree) with a callback script. It's reproducible, as in it's the exact same items that don't get moved. They're all misc items, but there are other misc items that are moved properly. Link to comment Share on other sites More sharing options...
EPDGaffney Posted July 6, 2018 Share Posted July 6, 2018 What have you tried for debugging? Can you place them in-game with the console and move them? Does that work? If so, it's probably the frame thing I mentioned, but if not, then I wonder if your script somehow rendered the static NIF in a way that makes SetPos not work on it. I've run into both of these problems before. Thinking about it however, I'm fairly sure SetPos isn't affected by the multi-frame issue with PlaceAtMe and it's just MoveTo that is. Link to comment Share on other sites More sharing options...
JustChill Posted July 6, 2018 Share Posted July 6, 2018 Hey there FiftyTifty, I am wondering if the issue you are talking about can be seen also in my video (even though it was recorded to show a custom container behavior): Do you see the items on the left in the shelf are moving, when I open up the cabinet doors? If that's the issue you are talking about, then this will happen way more often, beside of simply switching to a new cell. I guess that's a physic engine bug, which may be hard to be fixed simply with ingame commands.That might be rather something for reverse engineering. Link to comment Share on other sites More sharing options...
FiftyTifty Posted July 6, 2018 Author Share Posted July 6, 2018 Hey there FiftyTifty, I am wondering if the issue you are talking about can be seen also in my video (even though it was recorded to show a custom container behavior): Do you see the items on the left in the shelf are moving, when I open up the cabinet doors? If that's the issue you are talking about, then this will happen way more often, beside of simply switching to a new cell. I guess that's a physic engine bug, which may be hard to be fixed simply with ingame commands.That might be rather something for reverse engineering. That physics behaviour is similar, but not exactly. It's when you go into a cell that's not been visited during the current session, that you have previously dropped items in, and they will move around like in your video. What have you tried for debugging? Can you place them in-game with the console and move them? Does that work? If so, it's probably the frame thing I mentioned, but if not, then I wonder if your script somehow rendered the static NIF in a way that makes SetPos not work on it. I've run into both of these problems before. Thinking about it however, I'm fairly sure SetPos isn't affected by the multi-frame issue with PlaceAtMe and it's just MoveTo that is. The statics use the exact same models as the items they're replacing, including alternate textures. Using SetPos in the console does move the items. Can't see a way around this, unfortunately. Link to comment Share on other sites More sharing options...
Recommended Posts