RuinsFate Posted March 8, 2017 Share Posted March 8, 2017 So I'm looking for help with a project - I'd like to build my own version of a 'more armour slots' mod. I can see how to do it manually easily enough, it'll just be really really tedious. So I'm wondering about writing a script for FO4Edit that would find the relevant armour slots (BOD2 records) and delete them if present? Is this possible? Has it been done? How hard is it? Link to comment Share on other sites More sharing options...
zilav Posted March 8, 2017 Share Posted March 8, 2017 unit RemoveSlot; const iBipedSlot = 41; // slot number to remove function Process(e: IInterface): Integer; begin SetElementNativeValues(e, 'BOD2\First Person Flags', GetElementNativeValues(e, 'BOD2\First Person Flags') and not (1 shl (iBipedSlot - 30))); end; end. Link to comment Share on other sites More sharing options...
RuinsFate Posted March 8, 2017 Author Share Posted March 8, 2017 Geez. that was a fast reply! Thanks! So I just repeat the lines under const, adding the numbers of the slots I want to remove? Link to comment Share on other sites More sharing options...
zilav Posted March 8, 2017 Share Posted March 8, 2017 Yes, or add new constants and copy the only code line that changes slots to use them. Link to comment Share on other sites More sharing options...
RuinsFate Posted March 8, 2017 Author Share Posted March 8, 2017 So something like this? (Sorry, I am very much a novice at this stuff) unit RemoveSlot; const iBipedSlot = 41; // slot number to remove iBipedSlot = 42; function Process(e: IInterface): Integer; begin SetElementNativeValues(e, 'BOD2\First Person Flags', GetElementNativeValues(e, 'BOD2\First Person Flags') and not (1 shl (iBipedSlot - 41))); SetElementNativeValues(e, 'BOD2\First Person Flags', GetElementNativeValues(e, 'BOD2\First Person Flags') and not (1 shl (iBipedSlot - 42))); end; end. Link to comment Share on other sites More sharing options...
zilav Posted March 8, 2017 Share Posted March 8, 2017 That need to have unique names, so something like iBipedSlot2, iBipedSlot3, etc. Link to comment Share on other sites More sharing options...
RuinsFate Posted March 8, 2017 Author Share Posted March 8, 2017 Okay, think I get it now. I'll give it a try when I get back from work tonight and report back. :) Link to comment Share on other sites More sharing options...
Recommended Posts