From 9a746a67835ca83223445c15563e1d406511b47c Mon Sep 17 00:00:00 2001 From: Mator Date: Tue, 9 Feb 2016 17:29:39 -0800 Subject: [PATCH] wrapped some comments in code examples so it doesn't overflow --- Documentation/mxpf.html | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/Documentation/mxpf.html b/Documentation/mxpf.html index 3d606d7..6d478b2 100644 --- a/Documentation/mxpf.html +++ b/Documentation/mxpf.html @@ -495,8 +495,10 @@

Record Processing

records that are children of Cell or Worldspace records (NAVM, ACHR, REFR, etc.).

SetExclusions(mxHardcodedDatFiles);
-LoadChildRecords('WRLD', 'NAVM'); // loads all NAVM (navmesh) records from the WRLD (worldspace) group
-LoadChildRecords('CELL', 'REFR'); // loads all REFR (object reference) records from the CELL (cell) group
+// load all NAVM (navmesh) records from the WRLD (worldspace) group
+LoadChildRecords('WRLD', 'NAVM');
+// load all REFR (object reference) records from the CELL (cell) group
+LoadChildRecords('CELL', 'REFR');
 

@@ -636,8 +638,11 @@

Macros


Accepts a comma-separated string of record signatures sRecords. Can also accept signature pairs. Calls LoadRecords for each record signature in sRecords, and calls LoadChildRecords for each record signature pair.

-
MultiLoad('ARMO,ARMA,WEAP'); // loads ARMO, ARMA, and WEAP records from the file selection
-MultiLoad('CELL:REFR,CELL:ACHR'); // loads REFR and ACHR children records from the CELL record group from the file selection
+
// load ARMO, ARMA, and WEAP records from the file selection
+MultiLoad('ARMO,ARMA,WEAP');
+// load REFR and ACHR children records from CELL record groups in the
+// file selection
+MultiLoad('CELL:REFR,CELL:ACHR');
 

@@ -645,7 +650,10 @@

Macros


Calls InitializeMXPF and DefaultOptionsMXPF. Then calls SetFileSelection with the input sFiles and bMode, and calls MultiLoad with the input sRecords.

-
QuickLoad(mxBethesdaSkyrimFiles, 'CELL:ACHR,WRLD:ACHR', false); // loads all ACHR records from the CELL and WRLD record groups in all loaded non-bethesda files.
+
// load all ACHR records from the CELL and WRLD record groups in all loaded 
+// non-bethesda files.
+QuickLoad(mxBethesdaSkyrimFiles, 'CELL:ACHR,WRLD:ACHR', false);
+// loop through loaded records
 for i := 0 to MaxRecordIndex do begin
   rec := GetRecord(i);
   npc := LinksTo(ElementByPath(rec, 'NAME'));
@@ -658,17 +666,23 @@ 

Macros


Calls InitializeMXPF and DefaultOptionsMXPF. Then calls PatchFileByAuthor with the input sAuthor. Then calls SetFileSelection with the input sFiles and bMode, and calls MultiLoad with the input sRecords. Finally, calls CopyRecordsToPatch.

-
QuickPatch('Rebalance', 'Skyrim.esm', 'AMMO,ARMO,WEAP', true); // loads all AMMO, ARMO and WEAP records from Skyrim.esm, and copies them to a patch file with the author "Rebalance"
+
// load all AMMO, ARMO and WEAP records from Skyrim.esm, and copy them to 
+// a patch file with the author "Rebalance"
+QuickPatch('Rebalance', 'Skyrim.esm', 'AMMO,ARMO,WEAP', true);
 // loop through records in patch
 for i := 0 to MaxPatchRecordIndex do begin
   rec := GetPatchRecord(i);
   sig := Signature(rec);
   // double the armor rating of all armors
-  if sig = 'ARMO' then
-    SetElementNativeValues(rec, 'DNAM', GetElementNativeValues(rec, 'DNAM') * 2.0)
+  if sig = 'ARMO' then begin
+    oldValue := GetElementNativeValues(rec, 'DNAM');
+    SetElementNativeValues(rec, 'DNAM', oldValue * 2.0)
+  end
   // double the damage of all weapons and ammo
-  else
-    SetElementNativeValues(rec, 'DATA\Damage', GetElementNativeValues(rec, 'DATA\Damage') * 2.0);
+  else begin
+    oldValue := GetElementNativeValues(rec, 'DATA\Damage');
+    SetElementNativeValues(rec, 'DATA\Damage', oldValue * 2.0);
+  end;
 end;
 FinalizeMXPF;