Jump to content

DanielUA

Premium Member
  • Posts

    68
  • Joined

  • Last visited

Posts posted by DanielUA

  1. Hello everyone!

    Just a few days ago I saw a mod Warmth - Light Armor Replacer which is a compilation of replacers for default armors made by a great modder FranklinZunge.

    I liked and endorsed that mod but I wanted something different. I wanted vanilla armors to be with sleeves and fur, but without chainmail - because I feel that Hide, Studded, Iron armors must be really simple, basic and cheep, and chainmail would make them expensive and more powerful.

    That's why I made another compilation of FranklinZunge's armors to be used as replacers.

    This compilation uses his armors from different mods (mostly from Brigandage ), all of these armors feel really simple, cheap and warm.

    I have his permission and I will release this compilation on Nexus in a few days but I want to upload nice screenshots of these armors - and I cannot do this because I have a five-year-old laptop which is too weak to use all these ENB, UNP, HD textures etc.

     

    So if you like the idea of my mod and want help me with those screenshots - please post in this topic and I give you a link of the compilation file.

  2. Hello!

    I have a mod that overhauls Skyrim prices.

    I want to make compatibility patches for mods like Immersive Armors, Immersive Weapons, Jaysus swords etc.

    That would be just small esp files with changed stats that will still depend on the original mods.

    (similar to the Requiem compatibility patches)

    The question is - do i need to bother authors with permission requests to do those patches or I can simply do them as long as they still require original files?

  3. mator, thank you!!! I'm really happy to finally have and use this script. Makes everything so much easier.

    And immediately a bugreport :)

    Everything worked perfect for me when I tried to copy DATA\Weight from Skyrim.esm to my esp.

    But when I tried to copy it from another esp (Weapon and Armor fixes Remade) I had mistake:

    "List index out of bounds (3)."

  4. Scripts are kept as loose files or in bsa archive. They have extension .pex. These are already compiled files written in Papyrus language. If you want to edit them you need to have source files (with extension .psc). Sometimes these files are provided by author with .pex files... So you should unpack the EOS file and look at its contents

  5. 1. Look at these two mods in Tes5edit

    http://skyrim.nexusmods.com/mods/16231/?

    http://skyrim.nexusmods.com/mods/2762/?

    2 and 3. You will need to change merchant's chests. You will find their names if you open Economy of Skyrim in Tes5edit

    4. The most difficult part. I think it is changed via scripts. So you will have to look at Economy of Skyrim scripts (which are quite buggy...)

    5. you will need to change global value "roomcost" or something like that. Just type 'room' in CK and you will find it.

  6.  

    You have two thens at line "if Name(..."

    It was a copy-paste mistake. Solved it.

    I don't think it's a good idea to use Name for filenames. Use GetFileName()

     

    Done

     

    You don't need to store the copyfile as an IInterface object, you only need the file name, which should be a global string variable.

    Sorry but I don't understand how. 'f' is IwbFile so 'copyfile' must be IwbFile too. Am I wrong?

     

    Fix your indentation, please, it's difficult to read because it's all wrong.

    Put an empty line between functions, this also helps with readability.

    Done

    And about troubleshooting. Looks like the only problem is with "Process" function. I don't get even "Start matching names" message. Here is my code now

    unit userscript;
    
    var
        s1, slPath: string;
        i: integer;
        f, ovrec, copyfile: IInterface;
     
    function Initialize: integer;
    begin
      // initialize your stuff here
      // use InputBox to accept user input for filename, then use a loop to find that file and store it in a variable.  I do this in several of my scripts.
      // use a looping InputBox until the input is empty to add paths the user wants to copy things from to a stringlist: slPaths
       s1 := InputBox('File','Enter the name of the file containing the record you want to copy an element from, including the file extension','Skyrim.esm');
          for i := 0 to FileCount - 1 do
            begin
                f:= FileByIndex(i);
                AddMessage('Checking file '+GetFileName(f));
                if SameText(s1, GetFileName(f)) then
                    begin
                        copyfile := f;
                        AddMessage('File is '+GetFileName(copyfile));
                        Break;
                    end;
            end;
    slPath := InputBox('Path', 'Enter path you want to copy', '');
    AddMessage('Path is '+slPath);
    //here i have not array of pathes but only one. That's what i need
    end;
    
    function Process(e: IInterface): integer;
    begin
        AddMessage('Start Process function');
        for i := 0 to OverrideCount(e) - 1 do
        begin
            AddMessage('Start matching names');
            if GetFileName(GetFile(OverrideByIndex(e, i))) = GetFileName(copyfile) then begin
                AddMessage('Names match');
                ovrec := OverrideByIndex(e, i);
                AddMessage('ovrec assigned: '+GetElementEditValues(ovrec, 'EDID'));
                Break;
            end;
        end;
        wbCopyElementToRecord(e, ElementByPath(ovrec, slPath), True, True);
        //changeg first boolean to False because it is referred as "aAsNew"... And what i need is to replace old record (weight or price), not to add something new.
        //doesn't work both with True of False anyway
    end;
    end.
    

    I hope I don't bore you too much matortheeternal

    I'm just really limited with my time, and this script is all I need to continue development of my mod (which I'm still intending to continue).

    So I just have to hope that you consider helping me with it... And of course I'll understand if you don't want to bother with it.

  7.  

     

     

    But Is there a way to properly sort Z>A, like a reverse sort?
    I am asking because the default reverse sorting is actually not proper, and does not seem to sort well across section.

     

    You could sort A-Z then load the values into a stringlist backwards. So with slTest not yet sorted you'd have:

    slTest.Sort;
    for i := slTest.Count - 1 downto 0 do
      slBackwards.Add(slTest[i]);
    

    Alternatively you could use Zilav's reverse sort function, which would save you a variable.

    --
    Of course, because of this you could also just use a downto for loop to effectively use the A-Z stringlist as a Z-A stringlist.

     

    Btw, are there any resources to read about this? About the functions, commands and whatnot?
    The TES5Edit Pascal seems a bit different from the regular Pascal from what I can see on the net.

     

    TES5Edit pascal is almost exactly like regular pascal asides from the custom functions in it.

    TES5Edit functions

    General Pascal Resource

    Basic Pascal Lessons

    Free Pascal Wiki

    Unfortunately I'm unable to write script "Copy from all records". I totally forgot Pascal syntax I studied at school and there is very little documentation about Tes5edit scripts except this single page
    http://www.creationkit.com/TES5Edit_Scripting_Functions
    So... I give up. Perhaps someone here may do this for me because it doesn't look difficult for someone who has some experience. Here is the algorithm I wanted to implement.
    1)Ask user about path of the element which must be changed for every record;
    2)Ask user about name of the file from which they must be copied.
    3)A string "Celement" gets value of the needed element we want to copy (from the record with same FormID/EditorID, but from the other file).
    4)Set edit value of the element we have to the "Celement"
    Something like that.

     

    That page is more than I had. Regain general pascal knowledge from the links I provided above, use existing scripts to familiarize yourself with syntax and how to write code, then start small and work your way up.

    From what you've been wanting it'd probably be better if you copied elements from overriding records. So like:

    1. User selects records in a file, then applies the script.
    2. User inputs the name of the file they want to copy overriding values from.
    3. User inputs path/s they want to copy values from.
    4. See code.
    5. Done.

    unit userscript;
    
    var
      filename: string;
    
    function Initialize: integer;
    begin
      // initialize your stuff here
      // use InputBox to accept user input for filename, then use a loop to find that file and store it in a variable.  I do this in several of my scripts.
      // use a looping InputBox until the input is empty to add paths the user wants to copy things from to a stringlist: slPaths
    end;
    
    function Process(e: IInterface): integer; 
    var
      i: integer;
    begin
      for i := 0 to OverrideCount(e) - 1 do begin
        if GetFile(OverrideByIndex(e, i)) = filename then begin
          ovrec := OverrideByIndex(e, i);
          Break;
        end;
      end;
    
      for i := 0 to slPaths.Count - 1 do begin
        wbCopyElementToRecord(e, ElementByPath(ovrec, slPaths[i]), True, True);
      end;
    end;
    

    Something like that. That code should get you started. I've done most of the hard parts for you.

     

     

    If you're wondering why I'm having you guys learn code, here's some food for thought:

    "Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." --Chinese Proverb

     

     

     

    I worked with it a little.

    unit userscript;
    
    var
     s1, slPath: string;
     i: integer;
     f, copyfile, ovrec: IInterface;
    function Initialize: integer;
    begin
      // initialize your stuff here
      // use InputBox to accept user input for filename, then use a loop to find that file and store it in a variable.  I do this in several of my scripts.
      // use a looping InputBox until the input is empty to add paths the user wants to copy things from to a stringlist: slPaths
       s1 := InputBox('File','Enter the name of the file containing the record you want to copy an element from, including the file extension','Skyrim.esm');
          for i := 0 to FileCount - 1 do begin
          f:= FileByIndex(i);
          if SameText(s1, GetFileName(f)) then begin
            copyfile := f;
            Break;
          end;
    end;
    slPath := InputBox('Path', 'Enter path you want to copy', '');
    //here i have not array of pathes but only one. That's what i need
    end;
    function Process(e: IInterface): integer; 
    begin
      for i := 0 to OverrideCount(e) - 1 do begin
        if Name(GetFile(OverrideByIndex(e, i))) = Name(copyfile) then then begin
          ovrec := OverrideByIndex(e, i);
          Break;
        end;
      end;
        wbCopyElementToRecord(e, ElementByPath(ovrec, slPath), False, True);
    	//changeg first boolean to False because it is referred as "aAsNew"... And what i need is to replace old record (weight or price), not to add something new.
    	//doesn't work both with True of False anyway
      end;
    end.
    

    Doesn't change anything. I cannot find any mistakes.

    Could you please fix it?

  8. Unfortunately I'm unable to write script "Copy from all records". I totally forgot Pascal syntax I studied at school and there is very little documentation about Tes5edit scripts except this single page

    http://www.creationkit.com/TES5Edit_Scripting_Functions

    So... I give up. Perhaps someone here may do this for me because it doesn't look difficult for someone who has some experience. Here is the algorithm I wanted to implement.

    1)Ask user about path of the element which must be changed for every record;

    2)Ask user about name of the file from which they must be copied.

    3)A string "Celement" gets value of the needed element we want to copy (from the record with same FormID/EditorID, but from the other file).

    4)Set edit value of the element we have to the "Celement"

    Something like that.

  9. Doesn't work for me... Here is what I have.

    File TMPW.esp which changes weights and values for ALL armors

    File 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 Smash

    2)Used Remove function to remove DATA\Weight from TMPW.esp. Works fine

    3)Selected all armors in Weapons & Armor Fixes_Remade.esp and pressed "Copy as override into", then chose TMPW.esp

    DATA\Weight were not copied.

    Than I tried to copy weights from Skyrim.esm. Doesn't work too.

  10. 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

  11. 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?

×
×
  • Create New...