Jump to content

Automation Tools for TES5Edit - Suggestions Thread


matortheeternal

Recommended Posts

I'm wondering if it would be possible to add an overlay of the perk images (helm for heavy armor, bottle for alchemy, fireball for destruction, etc.) that you see in-game to the existing perk tree ui script. Getting perks to align to the images in the skill menu is a pain when you don't have any kind of reference while placing them.

 

If that isn't possible, would you have any suggestions that would simplify the process of aligning them accurately?

 

Hi VanScythe,

 

You may (or may not) have noticed that the PerkTreeUI script uses a "starfield" image background. This is an image loaded from the Edit Scripts\PerkTreeUI\starfield.bmp image file. You can replace that image with another image if you have one for the skill constellation overlays. You'll probably have to do some tweaking to get things to line up properly, but it's doable.

Link to comment
Share on other sites

  • Replies 446
  • Created
  • Last Reply

Top Posters In This Topic

 

 

Hi VanScythe,

 

You may (or may not) have noticed that the PerkTreeUI script uses a "starfield" image background. This is an image loaded from the Edit Scripts\PerkTreeUI\starfield.bmp image file. You can replace that image with another image if you have one for the skill constellation overlays. You'll probably have to do some tweaking to get things to line up properly, but it's doable.

 

Ah, perfect. Thank you. I knew it was using an image, but I wasn't sure if it was self-contained, or if I could change it.

 

As for its use; does each "tree" use a specific area of the image (e.g. 300x100 px), so only one image is needed, or do I need to swap out the image every time I want to load a new tree?

 

Once again, thank your for the response, and for the clarification.

Link to comment
Share on other sites

Ah, perfect. Thank you. I knew it was using an image, but I wasn't sure if it was self-contained, or if I could change it.

 

As for its use; does each "tree" use a specific area of the image (e.g. 300x100 px), so only one image is needed, or do I need to swap out the image every time I want to load a new tree?

 

Once again, thank your for the response, and for the clarification.

 

The same image is used for every perk tree.

 

If you didn't want to have to swap it out you could program it to load an image file based on the editor ID of the AVIF record the script is applied to.

Link to comment
Share on other sites

  • 4 weeks later...

 

 

The same image is used for every perk tree.

 

If you didn't want to have to swap it out you could program it to load an image file based on the editor ID of the AVIF record the script is applied to.

 

Sorry for the delayed response. I'd love to do that, but I have no idea how to go about doing it. I'd be fairly comfortable editing the script myself, but I don't know how I would have the script call a different image for a specific AV ID. I see where the script uses the images, when it calls them, and the difference in which pogs to use for each axis... but no idea how to add a control for each individual ID.

 

Any help would be greatly appreciated, and thank you again.

Link to comment
Share on other sites

 

The same image is used for every perk tree.

 

If you didn't want to have to swap it out you could program it to load an image file based on the editor ID of the AVIF record the script is applied to.

Sorry for the delayed response. I'd love to do that, but I have no idea how to go about doing it. I'd be fairly comfortable editing the script myself, but I don't know how I would have the script call a different image for a specific AV ID. I see where the script uses the images, when it calls them, and the difference in which pogs to use for each axis... but no idea how to add a control for each individual ID.

 

Any help would be greatly appreciated, and thank you again.

 

 

You'd use the EditorID function on the record the script is currently processing.

 

The lines you noticed were probably lines 1091-1092:

background := TPicture.Create;
background.LoadFromFile(ProgramPath + 'Edit Scripts\PerkTreeUI\starfield.bmp');

`background` is a TPicture global variable. Because this code is happening in the `Initialize` function we don't actually know which record the script is going to display, so we will need to move the code.

 

If we grab this code and move it inside of the OptionsForm procedure, we can access the starting perk record from the variable `sp`.

 

The resulting code should be:

//=========================================================================
// Create the UI Form
procedure OptionsForm(sp: IInterface);
begin
  // -- new code --
  background := TPicture.Create;
  // I'm using forward slashes because Nexus code highlighting thinks a backslash escapes the terminating apostrophe
  // you may need to replace the forward slashes with backslashes for the code to work (I'm not sure)
  background.LoadFromFile(ProgramPath + 'Edit Scripts/PerkTreeUI/' + EditorID(sp) + '.bmp');
  
  // -- old code --
  Form1 := TForm.Create(nil);
  try
     // ...

Which means you'll want separate images for the perk trees based on their EditorIDs. So:

  • AVOneHanded.bmp
  • AVTwoHanded.bmp
  • AVMarksman.bmp
  • AVBlock.bmp
  • AVSmithing.bmp
  • AVHeavyArmor.bmp
  • AVLightArmor.bmp
  • AVPickpocket.bmp
  • AVLockpicking.bmp
  • AVSneak.bmp
  • AVAlchemy.bm,p
  • AVSpeechcraft.bmp
  • AVAlteration.bmp
  • AVConuration.bmp
  • AVDestruction.bmp
  • AVMysticism.bmp (Illusion)
  • AVRestoration.bmp
  • AVEnchanting.bmp

Per the EditorIDs in TES5Edit.

 

If you instead wanted to name the files based on the full names, you could use the following code:

//=========================================================================
// Create the UI Form
procedure OptionsForm(sp: IInterface);
begin
  // -- new code --
  background := TPicture.Create;
  background.LoadFromFile(ProgramPath + 'Edit Scripts/PerkTreeUI/' + geev(sp, 'FULL') + '.bmp');
  
  // -- old code --
  Form1 := TForm.Create(nil);
  try
     // ...

Which would require the following filenames:

  • One-handed.bmp
  • Two-handed.bmp
  • Archery.bmp
  • Block.bmp
  • Smithing.bmp
  • Heavy Armor.bmp
  • Light Armor.bmp
  • Pickpocket.bmp
  • Lockpicking.bmp
  • Sneak.bmp
  • Alchemy.bmp
  • Speech.bmp
  • Alteration.bmp
  • Conjuration.bmp
  • Destruction.bmp
  • Illusion.bmp
  • Restoration.bmp
  • Enchanting.bmp

The advantage of full names is they're more recognizable, but not all AVIF records have full names. If someone had some way of defining custom perk trees using AVIF records and didn't have a FULL name on their perk tree record (which is not required) our code would be unable to work. On the other hand, EditorIDs always exist on AVIF records and are always unique, so they seem like a better design choice to avoid things breaking. I don't think it's that big of a deal in the end which way you go. :smile:

 

 

- Mator

Link to comment
Share on other sites

  • 4 weeks later...

Hi. A script to delete records in skyrim that have an error condition would be golden. When going back and forth between skyrim old and skyrim se it would save so much time. I need to take my mod back to old skryim, and there are water records with errors, which is expected. I just need to delete them and the mod is again usable in old skryim. But there are many.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...