dafydd99 Posted January 11, 2021 Share Posted January 11, 2021 Hi there, I'm currently trying to get a small boat to move around a route using the TranslateTo function. I'd like to attach other refs to this, eg some boards, a lantern and also including an activator or two (buttons, doors etc). Ideally I'd also like to be able to attach a light source too, but that may be too much to ask! I've used the 'Attach Ref' tab from the 'Reference' window to attach these additional items to the boat, and they seem to work okay, and rock to and fro fine in the water. The journey then gets underway (in an external cell) and proceeds fine until around three cells in when all the items 'Attach Ref'd to the boat simply disappear and are gone for good. I'm thinking the whole 'attach ref' thing was never really fully implemented, and was just there for arrows stuck in actors etc. Does anyone know better, or can point me towards a better description for this feature that explains how it works? I know I can edit the nif and add extra bits (although I'm not sure it's that easy to add an additional collision entry for them), but I don't think this will let me do activators, or add light sources. Many thanks for any help, dafydd99 Link to comment Share on other sites More sharing options...
maxarturo Posted January 12, 2021 Share Posted January 12, 2021 "Attach Ref" is not meant to be used by moving objects (long distances) and especially by any of the "Translate" functions. Your objects don't actually disappear, they just return to their place/location of origin. * You need to make your boat one single mesh. "(although I'm not sure it's that easy to add an additional collision entry for them), but I don't think this will let me do activators, or add light sources." This is where the modder's 'Innovation' ability comes in... Link to comment Share on other sites More sharing options...
dafydd99 Posted January 12, 2021 Author Share Posted January 12, 2021 Thanks Maxaturo. Actually, they don't seem to return to their editor location. Once they're gone they can no longer be found anywhere - though possibly they re-appear after respawn. Any thoughts as to how to attach a light source or an activator to a moving object? Link to comment Share on other sites More sharing options...
maxarturo Posted January 12, 2021 Share Posted January 12, 2021 NifSkope has a "LightNode", but i've never used it or do i know if it actually works, as for the activator (especially if you want it to be actibetable during the boat's ride)... i can't think right now of a way to do it, i'm tired and i'm heading to bed... Link to comment Share on other sites More sharing options...
dafydd99 Posted January 12, 2021 Author Share Posted January 12, 2021 Okay - thanks again for all your help! Link to comment Share on other sites More sharing options...
dylbill Posted January 12, 2021 Share Posted January 12, 2021 For lights, you might check out chesko's wearable lantern mod. Not sure about activators, the only thing I could think to do is make the entire boat an activator, then use a script on the activator to check relative position and do different things based on that. Link to comment Share on other sites More sharing options...
dafydd99 Posted January 12, 2021 Author Share Posted January 12, 2021 Thanks dylbill - I'll check that mod out. Yeah I'm not too sure about a moving activator either! I guess I could do a 'translateTo' for that too, but with the rocking of the boat it would be moving to slightly odd positions. Shame there doesn't appear to be any documentation for Attach Ref - it works totally fine for around five minutes of the journey, until suddenly it doesn't! Or a way to 'refresh' them etc. I suspect it was one of those areas that was written for a specific task, and wasn't designed to be used for anything else and just happens to... a bit! This thread discusses it a little, though for fallout4 - I'll maybe have a play with some of the things they suggest and see if any work with SSE. https://forums.nexusmods.com/index.php?/topic/8151478-how-to-set-up-nif-for-placeatnode/ Cheers - dafydd99 Link to comment Share on other sites More sharing options...
dafydd99 Posted January 12, 2021 Author Share Posted January 12, 2021 Hmm... thinking about it - I bet it something to do with the original parentCell of the 'attach ref'd items. I'll bet as they're moved it's not set to the new cell, unlike the reference that was moved with translateTo. So when the parentCell gets unattached they disappear. Link to comment Share on other sites More sharing options...
dylbill Posted January 12, 2021 Share Posted January 12, 2021 Yes you're probably right. Maybe using PlaceAtNode() will work better. Link to comment Share on other sites More sharing options...
dafydd99 Posted January 23, 2021 Author Share Posted January 23, 2021 Okay, got some results here. PlaceAtNode() is not in SSE I don't think. The attached refs are definitely disappearing because their parent cell has been unloaded. Unlike an object reference which is translated, their parent cells aren't being updated. However, there is a small way this can be cheated without breaking the attach ref. MoveTo will reset the parentcell. So whilst the 'master' object reference translates itself from cell to cell, it polls itself to check if it's changed parent cell (which it will do automatically as it is translated), and if it has, call a moveto followed by setangle on the attached refs. This does require some location calculations though, and might lead to slightly inaccurate placing as the x,y,z and angles of the master object reference have to be requested in real time, and it could change position between requests. Irritatingly, triggerboxes don't move (for the activator) but regular activators do - might be because they have a 3d model and the triggerboxes don't - so that can fix the 'activateable doors on a moving boat' problem. Still looking at lights, but I think there may be a way to do it with spells. Cheers, dafydd99 Link to comment Share on other sites More sharing options...
Recommended Posts