matortheeternal Posted October 6, 2013 Author Share Posted October 6, 2013 I tried QS v1.3 and I got this error right away: exception message : 'unit' expected but '<' found. This has to be something on your end, because I've been using this script all morning without any problems. You're using TES5Edit 3.0.30 right? You right click -> save link as -> add .pas at the end of the filename -> save in edit scripts folder, correct? Because it's working fine for me. You can try a puush download instead, if you want. QuickChange v1.4:-You can now execute one multiple-value AddElement function per script run. This will allow you to set the value of elements inside of an added element, like a Condition. [link 1: puush][link 2: github] Link to comment Share on other sites More sharing options...
Treplos Posted October 7, 2013 Share Posted October 7, 2013 (edited) Yeah, you were right. When I download the script in Github (save as ...) it was giving me a wrong code. Now fixed. Thank you again (and again :laugh:) I used QS 1.4 and it worked to add an empty condition to a list of item, but I am wondering if it can help me add a specific condition along with all sub-records to a list of items. I am trying to make a new mod that would break items down, and I need to add a check so that it would not break down items that the player is actually using. As per this image, I am trying to add that exact condition to a long list of items: - type Not equal to- function Get Equipped- Inventory Object that would refer to itself (the same item I am editing)- Reference is the player Another thing I would like it to do. The list already has a condition Greater than or equal to, so I would like the added Not equal to condition from above to "move up" 1 time and be on top (so it would actually resemble the image). Can QS already do this (I am a noob) or is it something not within its scope?If it cannot, is there a way to do this?Otherwise, is there a way to copy a full condition from 1 item to another? Dag and drop does not work from 1 item to another if they are different items. Edited October 7, 2013 by Treplos Link to comment Share on other sites More sharing options...
matortheeternal Posted October 7, 2013 Author Share Posted October 7, 2013 (edited) Yeah, you were right. When I download the script in Github (save as ...) it was giving me a wrong code. Now fixed. Thank you again (and again :laugh:) :wink: I are so smart. I used QS 1.4 and it worked to add an empty condition to a list of item, but I am wondering if it can help me add a specific condition along with all sub-records to a list of items. I am trying to make a new mod that would break items down, and I need to add a check so that it would not break down items that the player is actually using. As per this image, I am trying to add that exact condition to a long list of items: - type Not equal to- function Get Equipped- Inventory Object that would refer to itself (the same item I am editing)- Reference is the playerAs I said on the previous page... QC 1.4 can add a single multi-value element per script run. Here are the steps: 1. Enter "AddElement" for function2. Leave function blank and continue...3. Enter "Conditions" for location4. Enter "*" for value5. Enter "CTDA - \Type" for subelement location6. Enter "00000000" for subelement value (this means Not Equal to)7. Enter "CTDA - \Function" for subelement location8. Enter "GetEquipped" for subelement value9. Enter "CTDA - \Inventory Item" for subelement location10. Enter "NULL - Null Reference [00000000]" for subelement value (you can't use a dynamic value in QuickChange v1.4, sorry)11. Enter "CTDA - \Run On" for subelement location12. Enter "Reference" for subelement value13. Enter "CTDA - \Reference" for subelement location14. Enter "Player [00000014]" for subelement value15. Enter "" for subelement location16. Enter "" for subelement value Another thing I would like it to do. The list already has a condition Greater than or equal to, so I would like the added Not equal to condition from above to "move up" 1 time and be on top (so it would actually resemble the image).This is conditional logic. You'll need a separate script for this. And considering the volume of your requests, I'd recommend you make it yourself. I'm happy to help, but I can't make every script you request from here to oblivion (errr, from here to the next installment in the TES franchise...) ;P Can QS already do this or is it something not within its scope?If it cannot, is there a way to do this?Otherwise, is there a way to copy a full condition from 1 item to another? Dag and drop does not work from 1 item to another if they are different items.I've tried finding a way to copy elements in TES5Edit, but I haven't found a way yet. I think I could do it with a ElementByIndex() ElementCount() loop. Edited October 7, 2013 by matortheeternal Link to comment Share on other sites More sharing options...
matortheeternal Posted October 8, 2013 Author Share Posted October 8, 2013 (edited) Well, I just found a way to copy multi-value elements. The script is still in an early testing phase, but I'll probably end up incorporating it into QuickChange v1.5. Edit: Copy elements has been incorporated into QuickChange v1.5.https://github.com/matortheeternal/AutomationTools/tree/master/QuickChange Edited October 8, 2013 by matortheeternal Link to comment Share on other sites More sharing options...
Treplos Posted October 9, 2013 Share Posted October 9, 2013 (edited) Hi and thank you, I assume the copy feature copies 1 or more element(s) (like Conditions or DATA) from 1 target item into a selection of items? Btw there seems to be a bug. I went through the steps of the copy function: 1) Enter function: Copy.2) Left empty and pressed OK.3) Enter name of mod with extension: xxxxxxx.esp.4) Enter signature of group to copy from: ARMO.5) Enter EditorID of item to copy from: DLC2EnchArmorBonemoldBootsCarry03.6) Enter location of element to copy <-- bug starts here. - It is stuck at: Conditions. Even if you press Ok, it does not move forward. - If I enter what I want: DATA (with the intention of specifying Value and Weight after that), it reverts back to Conditions and gets stuck in a loop. - TES5Edit gets locked as well and I have to kill it in Task Manager. Edited October 9, 2013 by Treplos Link to comment Share on other sites More sharing options...
zilav Posted October 9, 2013 Share Posted October 9, 2013 To copy elements you can use wbCopyElementToRecord or ElementAssign (for list members). Link to comment Share on other sites More sharing options...
matortheeternal Posted October 9, 2013 Author Share Posted October 9, 2013 (edited) Hi and thank you, I assume the copy feature copies 1 or more element(s) (like Conditions or DATA) from 1 target item into a selection of items? Btw there seems to be a bug. I went through the steps of the copy function: 1) Enter function: Copy.2) Left empty and pressed OK.3) Enter name of mod with extension: xxxxxxx.esp.4) Enter signature of group to copy from: ARMO.5) Enter EditorID of item to copy from: DLC2EnchArmorBonemoldBootsCarry03.6) Enter location of element to copy <-- bug starts here. - It is stuck at: Conditions. Even if you press Ok, it does not move forward. - If I enter what I want: DATA (with the intention of specifying Value and Weight after that), it reverts back to Conditions and gets stuck in a loop. - TES5Edit gets locked as well and I have to kill it in Task Manager. Yeah, I've a lot of these bugs myself. You can type exit at any step to kill the script though, just FYI. In this case you have to type DATA - Data, because the copy function only uses ElementByName. I tested, it works. In QC 1.6 this is resolved (You can use just DATA). I'm using ElementByPath now, so there shouldn't be any more issues. QC 1.6 also allows you to skip the "index" step (leave it blank to copy the entire element), which is nice. To copy elements you can use wbCopyElementToRecord or ElementAssign (for list members). I couldn't get wbCopyElementToRecord to work for copying elements. I'll try ElementAssign... ElementAssign appears to work. Thanks for that hint zilav. I have a few questions though:-What about larger groups of elements? E.g. Treplos here was trying to copy the entire DATA - Data element group. Would wbCopyElementToRecord work for that?Answer to my own question: Yes. With wbCopyElementToRecord(element, record, True, True) I managed to copy an entire KWDA - Keywords group.-What are the two booleans in wbCopyElementToRecord for? I know for wbCopyElementToFile they're for DeepCopy, AsNew. Is it the same for copying elements to a record? (I'd imagine so, but I'm just curious)I don't know yet, but I know that setting both to true gets the results I want.-Will wbCopyElementToRecord overwrite an existing element?If both booleans are true, yes. I'll probably figure out some of this myself as I investigate it, but if you already know this stuff, it'd be cool to find out! :smile: --- Another question, Zilav:Is there any chance InputQuery could be made to work in a future update to TES5Edit? I tried using it instead of inputbox so I could see when a user clicks cancel (and terminate the script when they do), but it didn't load the user input value into the provided string variable. So like s := 'test'; b := InputQuery('title', 'enter a string', s); if not b then exit; AddMessage(s); Will always print 'test' to the message log, no matter what the user enters for the InputQuery box. The user clicking cancel will terminate the script, however. One more question for you Zilav:Could we get multi-dimensional arrays sometime in the future? They would be really helpful for certain scripts! Edited October 9, 2013 by matortheeternal Link to comment Share on other sites More sharing options...
DanielUA Posted October 9, 2013 Share Posted October 9, 2013 One more bug with QuickChangeWhen I tried to edit "Magic effect", elementMagic Effect Data\DATA\Base CostIt doesn't work properly. Link to comment Share on other sites More sharing options...
matortheeternal Posted October 10, 2013 Author Share Posted October 10, 2013 One more bug with QuickChangeWhen I tried to edit "Magic effect", elementMagic Effect Data\DATA\Base CostIt doesn't work properly. What function in QuickChange? This is of no use to me if I don't know what function you're using. Link to comment Share on other sites More sharing options...
DanielUA Posted October 10, 2013 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 Link to comment Share on other sites More sharing options...
Recommended Posts