StantonCree Posted September 15, 2018 Share Posted September 15, 2018 I'm having a problem where I would make a static object out of a magazine or crafting component and then swap the material for it with an existing one. The texture changes inside the CK but ingame they all revert back to the texture that the original base object has. I tried generating the precombined visibility for the cell but its not working. Ideas? Link to comment Share on other sites More sharing options...
StantonCree Posted September 16, 2018 Author Share Posted September 16, 2018 (edited) Well I found a temporary workaround for this. What I did was select all the static objects I placed for decoration and then I right clicked the selection in the render window and I selected "Make static collection". After that I generated new previs and precombined meshes for the cell and it seems like it now maintains the custom material swaps I assigned to them.Not sure if this is the way to do it but its what worked for me so far........ I'm still open to other suggestions... Edited September 16, 2018 by StantonCree Link to comment Share on other sites More sharing options...
MissingMeshTV Posted September 16, 2018 Share Posted September 16, 2018 (edited) When generating precombines, any custom material swaps you make on static items will be broken and the objects revert to their default material setting...that’s just the way it works (or doesn’t). It’s OK for things like magazines if they aren't static (as in you can pick them up, add them to your inventory like the vanilla ones). The vanilla game uses custom swaps on the magazines. Your best option for static objects is to make a material swap the “proper” way under the Material Swaps section of the Object Window (under Misc, I think). Then apply it to the object(s) in the Extras tab of the reference placed into your cell. This tutorial should help getting started with that. Swaps made in this way won't break when generating precombines/previs. I’m surprised your custom swaps didn’t break when creating your SCOLS. They will generally break making SCOLs like they when generating precombines. Edited September 16, 2018 by RedRocketTV Link to comment Share on other sites More sharing options...
StantonCree Posted September 16, 2018 Author Share Posted September 16, 2018 (edited) Nope they didn't break, and I generated new precombines several times since I posted. I'm probably not going to mess with it too much for now since its working. "It just works!" Edited September 16, 2018 by StantonCree Link to comment Share on other sites More sharing options...
pra Posted February 13, 2019 Share Posted February 13, 2019 Try this: unit ApplyMatSwap; // called for every record selected in xEdit function Process(e: IInterface): integer; var baseForm, baseMatSwap, refMatSwap: IInterface; begin Result := 0; if (Signature(e) <> 'REFR') then begin exit; end; baseForm := LinksTo(ElementBySignature(e, 'NAME')); if (Signature(baseForm) = 'STAT') or (Signature(baseForm) = 'SCOL') then begin baseMatSwap := LinksTo(ElementByPath(baseForm, 'Model\MODS')); refMatSwap := LinksTo(ElementByPath(e, 'XMSP')); if ((assigned(baseMatSwap)) and (not assigned(refMatSwap))) then begin AddMessage('Doing '+FullPath(e)); SetElementEditValues(e, 'XMSP', IntToHex(GetLoadOrderFormID(baseMatSwap), 8)); end; end; end; end. Link to comment Share on other sites More sharing options...
Recommended Posts