Skyrim

File information

Last updated

Original upload

Created by

Darkfirebird

Uploaded by

Darkfirebird

Virus scan

Safe to use

About this mod

(Modders Resource) This is just an easy to use and set up \'patcher\' for various uses.

Permissions and credits
Changelogs
=========================
= DFB - Patch Functions =
=========================
(Modders Resource) This is just an easy to use and set up 'patcher' for various uses.

-By request. I was asked to upload my 'patcher' I use for my other mod:
DFB - XP Mod: http://skyrim.nexusmods.com/mods/22628
Note: This is edited version of that mods patcher. This was made to be more generic
and support other uses.

-Currently able to be 'patched':
+Items
++Ammo ( Arrows / Bolts )
++Armors
++Books
++Keys
++Misc. Objects
++Potions
++Scrolls
++Soul Gems
++Weapons

+Globals

+Spells

+Perks

By patching, this just can add or remove up to a limit defined by the user.
++ More explained per function.

Before using any functions. Copy DFBPatchFunctions.pex to Scripts folder.
++ In your script add:
Import DFBPatchFunctions

NOTE: When using these functions. They use Form Lists. Before using, make sure to have them.
Player Functions ONLY target the Player.
Actor Functions ONLY targets Actors.
Object Functions ONLY target Objects.
Other Functions just works with what is given.

If you use this in your mod. Do NOT include it with your mod. Link it to the mods page!
http://skyrim.nexusmods.com/mods/22673

===================
= Version History =
===================
== Version 1.1 ==
Updated all functions. ( They were missing Global option

============================
= Player Functions =
============================

Function: DFBPatchItems<item>(FormList fList, Int iFlag, Int iAmount)<br>fList: List of Items to Add or Remove.<br>iFlag: 0 = Add, 1 = Remove<br>iAmount: Amount to be added up to or removed down to. ( Using 0 to remove, removes all. )<br>Example 1: DFBPatchItems<item>(Add<item>, 0, 30)<br>++ This will check the player. If they have less then 30, this will add up to 30.<br>Example 2: DFBPatchItems<item>(Remove<item>, 1, 10)<br>++ This will check the player. If they have more then 10, this will remove down to 10, using 0 will remove all.<br><br>Function: DFBPatchPerks(FormList fList, Int iFlag)<br>fList: List of Perks to Add or Remove.<br>iFlag: 0 = Add, 1 = Remove<br>Example 1: DFBPatchPerks(MyPerkListAdd, 0)<br>++ Checks if the player has these perks, if not, it is added.<br>Example 2: DFBPatchPerks(MyPerkListRemove, 1)<br>++ Checks if the player has these perks, if so, it is removed.<br><br>Function: DFBPatchSpells(FormList fList, Int iFlag)<br>fList: List of Spells to Add or Remove.<br>Example 1: DFBPatchSpells(MySpellAddList, 0)<br>++ Checks if the player has these spells, if not, it is added.<br>Example 2: DFBPatchSpells(MySpellRemoveList, 1)<br>++ Checks if the player has these spells, if so, it is removed.<br><br>===============================<br>=<span class="wbbtab"></span><span class="wbbtab"></span> Other Functions<span class="wbbtab"></span><span class="wbbtab"></span> =<br>===============================<br><br>Function: DFBPatchGlobal<float int>(GlobalVariable iGlobal, Float iOld, Float iNew)<br>iGlobal: Global that needs to be updated.<br>iOld: Checks this Int or Float. If -1, overwrites regardless. Otherwise, checks if the value is the original old<br>one. This was to make sure it did not overwrite user settings.<br>iNew: Value to be changed to.<br>Example 1: DFBPatchGlobalFloat(MyGlobal, 10, 15)<br>++ This will check if it is 10, if it is, change to 15.<br>Example 1: DFBPatchGlobalFloat(MyGlobal, 10.5, 15.7)<br>++ This will check if it is 10.5, if it is, change to 15.7.<br>Example 2: DFBPatchGlobalFloat(MyGlobal, -1, 50.5)<br>++ This will overwrite any value and change it to 50.5.<br>Example 3: DFBPatchGlobalInt(MyGlobal, 100, 50)<br>++ This will check if it is 100, if it is, change to 50.<br>Example 4: DFBPatchGlobalInt(MyGlobal, -1, 50)<br>++ This will overwrite any value and change it to 50.<br><br>=============================<br>=<span class="wbbtab"></span><span class="wbbtab"></span>Actor Functions<span class="wbbtab"></span><span class="wbbtab"></span>=<br>=============================<br>Function: DFBPatchItems<item>Actor(Actor Target, FormList fList, Int iFlag, Int iAmount)<br>fList: List of Items to Add or Remove.<br>iFlag: 0 = Add, 1 = Remove<br>iAmount: Amount to be added up to or removed down to. ( Using 0 to remove, removes all. )<br>Example 1: DFBPatchItems<item>Actor(MyRef, Add<item>, 0, 30)<br>++ This will check the target. If they have less then 30, this will add up to 30.<br>Example 2: DFBPatchItems<item>Actor(MyRef, Remove<item>, 1, 10)<br>++ This will check the target. If they have more then 10, this will remove down to 10, using 0 will remove all.<br><br>Function: DFBPatchPerksActor(Actor Target, FormList fList, Int iFlag)<br>fList: List of Perks to Add or Remove.<br>iFlag: 0 = Add, 1 = Remove<br>Example 1: DFBPatchPerks(MyRef, MyPerkListAdd, 0)<br>++ Checks if the target has these perks, if not, it is added.<br>Example 2: DFBPatchPerks(MyRef, MyPerkListRemove, 1)<br>++ Checks if the target has these perks, if so, it is removed.<br><br>Function: DFBPatchSpellsActor(Actor Target, FormList fList, Int iFlag)<br>fList: List of Spells to Add or Remove.<br>Example 1: DFBPatchSpells(MyRef, MySpellAddList, 0)<br>++ Checks if the target has these spells, if not, it is added.<br>Example 2: DFBPatchSpells(MyRef, MySpellRemoveList, 1)<br>++ Checks if the target has these spells, if so, it is removed.<br><br>=============================<br>=<span class="wbbtab"></span><span class="wbbtab"></span>Object Functions<span class="wbbtab"></span> =<br>=============================<br>Function: DFBPatchItems<item>Object(ObjectReference Target, FormList fList, Int iFlag, Int iAmount)<br>fList: List of Items to Add or Remove.<br>iFlag: 0 = Add, 1 = Remove<br>iAmount: Amount to be added up to or removed down to. ( Using 0 to remove, removes all. )<br>Example 1: DFBPatchItems<item>Object(MyObjRef, Add<item>, 0, 30)<br>++ This will check the target. If they have less then 30, this will add up to 30.<br>Example 2: DFBPatchItems<item>Object(MyObjRef, Remove<item>, 1, 10)<br>++ This will check the target. If they have more then 10, this will remove down to 10, using 0 will remove all.</item></item></item></item></item></item></item></item></item></item></float></item></item></item></item></item>