matortheeternal Posted October 10, 2013 Author Share Posted October 10, 2013 Formula. I tried to mulyiply it by 10 (10 * x)... And it simply sets it to 10. Same with 100 * x, 3 * x etc Let me see what I can do to help... Yes, I know why this happens. Currently formula works with integer values, not with floats. So I'll have to adjust things in an update to make it deal with values as floats instead of as integers. It's been on my to-do list for a day now, I'll get to it soon enough. Link to comment Share on other sites More sharing options...
Treplos Posted October 11, 2013 Share Posted October 11, 2013 (edited) Hey Mort, I am pleased to verify that the Copy function seems to be working fine in QuickChange v1.6.I did not test the other functions though. Sorry! The steps I have taken and tested are as follows: (1) Name of function: Copy. (2) Name of function (again): leave blank and press OK.PS: why is this duplicate step needed btw? Just asking out of curiosity if you do not mind. (3) Name of .esp file: xxxxx.esp. (4) Signature of group: WEAP (or ARMO). (5) Location of element: DATA (or DNAM, INAM, TNAM, KSIZ, KWDA, BIDS, BAMT or CRDT). NOTE: this needs to be capital or it won't work.PSS: is there a way to copy more than 1 location at a time in the same iteration of the copy function? Atm I have to do several cycles of the copy function to cover all the different locations. Or is this possible already and I missed how to? (6) Index of element: leave blank to copy all the entries, or specify a number.NOTE: Some locations only have a single Index so you will not get this.PS: Is the Index of element off?For example, in the KWDA location, I have 5 keywords and I want only the 4th one to be copied (as it appears in the list). If I specify index of "4", the 5th one is copied instead. In order to get the 4th keyword to be copied, I have to specify "3".Any idea why? How does this keyword index work anyway? Btw, while working with the script I edited it manually to set certain default values like: name of .esp, signature of group and location of element, because I was working with large lists and this change helped me save time, by avoiding to retype those entries. Being able to do this was quite nice. On a side note, what is the difference between EditValues and NativeValues in the scripts? Both these 2 seem to be doing the same job GetElementEditValues and GetElementNativeValues. The reason I am asking is because I hacked a tiny, simple script (inspired by your work) to save me time by exporting records of a selection, instead of me having to copy/paste them into a text file. { Print records in selection. Hotkey: Ctrl+P } unit userscript; var FName: string; slPrint: TStringList; //=========================================================================== function Initialize: Integer; begin slPrint := TStringList.Create; end; //=========================================================================== function Process(e: IInterface): integer; begin // FormID + EditorID: // slPrint.Add(IntToHex(FixedFormID(e), :cool: + ';' + GetElementEditValues(e, 'EDID')); // EditorID: // slPrint.Add(GetElementEditValues(e, 'EDID')); // Mod Name: // slPrint.Add(GetFileName(GetFile(e))); // Full Name: // slPrint.Add(GetElementEditValues(e, 'FULL')); slPrint.Add(GetElementNativeValues(e, 'FULL')); end; //=========================================================================== function Finalize: Integer; begin FName := ProgramPath + '-- Export.txt'; slPrint.SaveToFile(FName); slPrint.Free; end; end. Edited October 11, 2013 by Treplos Link to comment Share on other sites More sharing options...
matortheeternal Posted October 11, 2013 Author Share Posted October 11, 2013 Hey Mort,What did you call me!? -_- (2) Name of function (again): leave blank and press OK.PS: why is this duplicate step needed btw? Just asking out of curiosity if you do not mind. This lets you execute more than one function per script run. PSS: is there a way to copy more than 1 location at a time in the same iteration of the copy function? Atm I have to do several cycles of the copy function to cover all the different locations. Or is this possible already and I missed how to? Use the copy function more than once. Type "Copy" at step (2), then type "Copy" again for each additional time you want to execute it. For example, in the KWDA location, I have 5 keywords and I want only the 4th one to be copied (as it appears in the list). If I specify index of "4", the 5th one is copied instead. In order to get the 4th keyword to be copied, I have to specify "3".Any idea why? How does this keyword index work anyway? "Index" is 0-based. The first element is 0, the second 1, the third 2... etc. That's just how lists are programmed in pascal. Btw, while working with the script I edited it manually to set certain default values like: name of .esp, signature of group and location of element, because I was working with large lists and this change helped me save time, by avoiding to retype those entries. Being able to do this was quite nice. The more you know about scripting the easier you can set these sorts of things. I could make it even easier, theoretically, by making default string values controllable from the // USER DEFINED SETTINGS section. On a side note, what is the difference between EditValues and NativeValues in the scripts? Both these 2 seem to be doing the same job GetElementEditValues and GetElementNativeValues. The reason I am asking is because I hacked a tiny, simple script (inspired by your work) to save me time by exporting records of a selection, instead of me having to copy/paste them into a text file. { Print records in selection. Hotkey: Ctrl+P } unit userscript; var FName: string; slPrint: TStringList; //=========================================================================== function Initialize: Integer; begin slPrint := TStringList.Create; end; //=========================================================================== function Process(e: IInterface): integer; begin // FormID + EditorID: // slPrint.Add(IntToHex(FixedFormID(e), :cool: + ';' + GetElementEditValues(e, 'EDID')); // EditorID: // slPrint.Add(GetElementEditValues(e, 'EDID')); // Mod Name: // slPrint.Add(GetFileName(GetFile(e))); // Full Name: // slPrint.Add(GetElementEditValues(e, 'FULL')); slPrint.Add(GetElementNativeValues(e, 'FULL')); end; //=========================================================================== function Finalize: Integer; begin FName := ProgramPath + '-- Export.txt'; slPrint.SaveToFile(FName); slPrint.Free; end; end. Native values are the ones stored internally. Edit values are the ones you see TES5Edit displaying. In some cases these differ. E.g. for a reference the native value is just the FormID of the referenced record, whereas the edit value is the whole shebang: EditorID "Full name" [sIGN:01234567] There are other situations as well in which they differ. You usually just want to use Edit Values, but I like to use native values when dealing with references. Link to comment Share on other sites More sharing options...
Treplos Posted October 11, 2013 Share Posted October 11, 2013 (edited) - Oooops I meant to say Mator!! Not sure where Mort came from hahaha :laugh: (btw I always thought your name was a reference to Mator from Cars?) - I tried using "copy" in both step 1 and 2, but it only accepted/copied to 1 location. I even tried to enter "Copy" 3 consecutive times without success. - // USER DEFINED SETTINGS sounds like a really nice idea for upcoming projects, unless you feel it could be handy to be included in whatever scripts you've already made. - Ty for clarifying the index issue and the native vs edit values :smile: Edited October 11, 2013 by Treplos Link to comment Share on other sites More sharing options...
matortheeternal Posted October 11, 2013 Author Share Posted October 11, 2013 - Oooops I meant to say Mator!! Not sure where Mort came from hahaha :laugh: (btw I always thought your name was a reference to Mator from Cars?) Yeh, you crazy. :tongue: No, it's not a reference to May-tur from cars. It's pronounced Mah-tore, and it's a reference to a fictional character I created long before Cars was even a thing. (circa 2000) - I tried using "copy" in both step 1 and 2, but it only accepted/copied to 1 location. I even tried to enter "Copy" 3 consecutive times without success. Ah. I need to make the copy variables local, instead of global. Silly me. - // USER DEFINED SETTINGS sounds like a really nice idea for upcoming projects, unless you feel it could be handy to be included in whatever scripts you've already made. It already exists in all my projects. I'm just saying to add some values to it. - Ty for clarifying the index issue and the native vs edit values :smile: yep. Link to comment Share on other sites More sharing options...
DanielUA Posted October 11, 2013 Share Posted October 11, 2013 Hey mator. Thanks to your scripts I was able to finish my mod. I gave you credits you deserve :)There is one more request I'd like to make.It is about your "Copy" function. Could you add an option to copy values from different elements? For example I have mod A changing prices of armors and other mod B changing weights of them. So I want to copy all weights from mod B to mod A. Is it possible? Link to comment Share on other sites More sharing options...
Treplos Posted October 11, 2013 Share Posted October 11, 2013 (edited) Daniel, Unless I am misunderstanding, you are still copying values of just 1 element (Data / Weight) from 1 mod to another, which is exactly what the copy feature does. Follow these steps (with examples) and you should have what you want: (1) Name of function: Copy. (2) Name of function (again): leave blank and press OK. (3) Name of SOURCE .esp file: xxxxxxxx.esp. <--- this is where you are copying the values FROM. (4) Signature of group: WEAP (or ARMO, etc). (5) Location of element: DATA (or DNAM, INAM, TNAM, KSIZ, KWDA, BIDS, BAMT or CRDT, etc). <--- You want DATA for weights.NOTE: this needs to be capital or it won't work. (6) Index of element: leave blank to copy all the entries, or specify a number to copy a single sub-element from a list.NOTE: Index starts at 0 for the first sub-element.PS: Some locations only have a single Index, so Step 6 may get automatically skipped. HTH! Edited October 11, 2013 by Treplos Link to comment Share on other sites More sharing options...
matortheeternal Posted October 12, 2013 Author Share Posted October 12, 2013 Hey mator. Thanks to your scripts I was able to finish my mod. I gave you credits you deserve :smile:There is one more request I'd like to make.It is about your "Copy" function. Could you add an option to copy values from different elements? For example I have mod A changing prices of armors and other mod B changing weights of them. So I want to copy all weights from mod B to mod A. Is it possible? You're talking about copying overridden values from one mod to the other (values on the same records) correct? I think you mentioned this on a previous page. I think mod merging would do the trick for you. Here's a manual way to do just that: 1. Set Mod B as a master for Mod A. (you'll need to make sure Mod A comes after Mod B in your load order)2. Load Mod A and Mod B in TES5Edit.3. Select all the records from Mod B that you want to copy elements from.4. Right click and click "Deep Copy as Override"5. Choose Mod A6. Profit? Should work for non-conflicting values (which is what you have, it sounds like). -Mator Link to comment Share on other sites More sharing options...
DanielUA Posted October 12, 2013 Share Posted October 12, 2013 Sorry, I explained my request not very clearly.What I really need is to copy and overwrite conflicting values. So... Mator, thanks for your tutorial, really. I just didn't realize well how Tes5edit copies values but now I do.So, speaking about what I need... I think I'll be able to do what I need with just your tutorial and "Remove" function Link to comment Share on other sites More sharing options...
DanielUA Posted October 12, 2013 Share Posted October 12, 2013 Doesn't work for me... Here is what I have.File TMPW.esp which changes weights and values for ALL armorsFile Weapons & Armor Fixes_Remade.esp which changes some weights and values of armors.So I want to copy all weights from Skyrim.esm (if they are untouched by Weapons & Armor Fixes_Remade.esp) and all changed weights from Weapons & Armor Fixes_Remade.esp.What I did:1)Set Weapons & Armor Fixes_Remade.esp as master for TMPW.esp in Wrye Smash2)Used Remove function to remove DATA\Weight from TMPW.esp. Works fine3)Selected all armors in Weapons & Armor Fixes_Remade.esp and pressed "Copy as override into", then chose TMPW.espDATA\Weight were not copied.Than I tried to copy weights from Skyrim.esm. Doesn't work too. Link to comment Share on other sites More sharing options...
Recommended Posts