Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

Denny Freuder

Uploaded by

Dodoshian

Virus scan

Safe to use

About this mod

Adds a few new native Papyrus script functions (at least ones I couldn't find anywhere). Just a few for now, but I'll continue to add more as I make them for the mods I am working on.
Since this mod uses CommonLib, it should be compatible with any version of Skyrim (SE/AE/VR) as long as Address Library for SKSE Plugins is installed.

Requirements
Permissions and credits
List of functions included:

  • GetTemplateWeapon: Returns the template of a weapon, if it exists.
  • GetTemplateArmor: Returns the template of an armor, if it exists.
  • GetWeaponTemperingRecipe: Returns the tempering recipe of the weapon. 
    It will return the tempering recipe even if it is a weapon that uses another as a template.
  • GetArmorTemperingRecipe: Same as above but for armor items.
  • GetCraftingRecipe: returns the first-located recipe of ANY TYPE (tempering, forging, etc.) for an item. Can optionally take a string argument to specify workbench keyword (ex: "CraftingSmithingForge" or new keywords added by mods) to limit recipes to that workbench type.
  • GetCraftingRecipeArray: Same as above but returns an array of ALL recipes that meet the conditions.
  • AddKeywordToAllArmorsWithKeywords: Adds a keyword to all armors that contain all keywords in an array.


Good luck and have fun. Some possible use-cases of the above:
  • Get the weapon or armor template of a Bethesda premade enchanted item. Then use SKSE enchantment functions to make a "copy" of that enchantment that can be used to implement an enchantment degradation system whereby enchantments lose potency over time.
  • Dynamically add tempering recipes to ANY vanilla or mod weapon or armor that lacks a recipe during runtime. Check to see if it has a tempering recipe already, and if not, get its material keyword or some other info and make a new recipe for it (Dylbill's Papyrus Functions has a function to create new Constructible Objects during runtime btw). Even without DBF you could still have a dummy tempering recipe and use SKSE to change its ingredients list. Just a few dummy recipes would be enough to swap dynamically if you were adding something like an armor/weapon repair system that gives a tool that you can use to temper only equipped gear.
  • Add a system where the more you use a weapon, you become more familiar and it requires less materials to make at a forge.
  • Add a system or a perk that allows you to disenchant a weapon or armor without destroying it.


To Install: Install as you would any other mod with MO2 or Vortex.

For mod authors to use these functions in their scripts: Just put import DennysPapyrusFunctions at the top of your script.

Source code available here.

CREDITS
Mrowr Purr for the template files and extremely useful tutorial videos
Ryan McKenzie, PO3,  and CharmedBaryon for CommonLib
Ashen for never-ending assistance on the SkyrimMods Discord
And many many more people in the Skyrim and Melee modding community for their help with C++ nonsense.