///////////////////////////////////////////////////////////////
//
//   Pol - MUL-Modification (WorldForge...           Statics)
//                          (MultiTemplateManager... Multis)
//
//     Author: Shinigami
//     eMail : Shinigami@gmx.net
//
//   Requires: errormsg.inc (included)
//
///////////////////////////////////////////////////////////////
//
// Files (Statics):
//   Pol\scripts\textcmd\test\staticscheck.src       - Double Item Checker
//     Output -> Pol\config\statics\staticscheck.cfg
//   Pol\scripts\textcmd\test\staticsexport.src      - Export Items (Pol -> Static) [only real Static Items]
//     Output -> Pol\config\statics\statics.cfg
//               Pol\config\statics\staticsno.cfg
//   Pol\scripts\textcmd\test\staticsexportforce.src - Export Items (Pol -> Static) [Export _all_ Items, incl. Doors etc.]
//     Output -> Pol\config\statics\statics.cfg
//   Pol\scripts\textcmd\test\staticsimport.src      - Import Items (Pol <- Static)
//     Input  <- Pol\config\statics\statics.cfg
//               Pol\config\statics\staticsno.cfg
//   Pol\scripts\textcmd\test\staticscheckexport.src - Call StaticsCheck & StaticsExport with same Params
//     Output -> Pol\config\statics\staticscheck.cfg
//               Pol\config\statics\statics.cfg
//               Pol\config\statics\staticsno.cfg
//   Pol\scripts\textcmd\test\staticsmove.src        - Move Items around inside Pol
//
//   Pol\config\statics\staticscheck.cfg             - All double removed Items (just a kind of Logging)
//   Pol\config\statics\statics.cfg                  - All Items ready for Statics-MULs
//   Pol\config\statics\staticsno.cfg                - All Items remaining in World (like Doors, Lights etc.)
//
//   Tools\WorldForge\WorldForge.exe                 - Tool to add/remove Items in/from Statics-MULs,
//     In-/Output -> items.txt                         modified Release to better support Pol incl. some nice Features
//   Tools\WorldForge\Source\                        - Delphi Source
//   Tools\WorldForge\Link\                          - Link to original WorldForge
//
// Files (Multis):
//   Pol\scripts\textcmd\test\multiexport.src        - Export Items (Pol -> Multi) [Export _all_ Items]
//     Output -> Pol\config\statics\multi.cfg          (check the components-file from MultiTemplateManager for Doors etc.)
//   Pol\scripts\textcmd\test\multiimport.src        - Import Items (Pol <- Multi)
//     Input  <- Pol\config\statics\multi.cfg
//   Pol\scripts\textcmd\test\multicheckexport.src   - Call StaticsCheck & MultiExport with same Params
//
//   Pol\config\statics\multi.cfg                    - All Items ready for Multi-MULs
//
//   Tools\MultiTemplateManager\                     - Very nice Tool to add/manage Multis
//     In-/Output -> multi.wsc                         (check the components-file for Doors etc.)
//
// Files:
//   Pol\scripts\include\errormsg.inc                - Needed Include (English & German ErrorMessages)
//
//   Tools\RemoveTabs\RemoveTabs.exe                 - Fix Exported Files (statics.cfg & multi.cfg)
//     Input  <- statics.cfg (Pol StaticItems)         (RemoveTabs w'handle both files @ same time if available...)
//               multi.cfg   (Pol MultiItems)
//     Output -> items.txt   (WorldForge)
//               multi.wsc   (MultiTemplateManager)
//   Tools\RemoveTabs\Source\                        - Delphi Source
//
//   readme.txt                                      - This File

/////////////////
// StaticsCheck
/////////////////
//
// Call: ".staticscheck x1 y1 x2 y2" (0<=x<=6143 / 0<=y<=4095)
//       ".staticscheck"             Whole World
//
// Requires: Pol\config\statics\staticscheck.cfg

Scan's the rectangle for double items (same x y z, same ObjType, excludes lighting Items).
Logs deleted items in "Pol\config\statics\staticscheck.cfg" (u can erase file content after viewing).

Warning!!!
  Can freeze your Server! Can take hours (whole World)!

//////////////////
// StaticsExport
//////////////////
//
// Call: ".staticsexport x1 y1 x2 y2" (0<=x<=6143 / 0<=y<=4095)
//
// Requires: Pol\config\statics\statics.cfg
//           Pol\config\statics\staticsno.cfg

Extract Items to make Static. Excludes (take a look @ "Function ShouldMakeStatic")
Lockable (Doors, Containers), Multis (Houses, Boats), SpawnNet spawned Items &
SpawnRunes, Items with changed Desc (like a sign), Items with UseScript, Control-
Script Or WalkOnScript.
Writes extracted Items into "Pol\config\statics\statics.cfg" (this file is needed
for WorldForge!). Logs excluded Items into "Pol\config\statics\staticsno.cfg" (u can
erase file content after viewing).

Make Items Static - Step by Step:
  1.)  erase content of "Pol\config\statics\static*.cfg"
  Variant A
    2.)   (Client): ".staticscheck x1 y1 x2 y2"
    3.)   (Client): ".staticsexport x1 y1 x2 y2"
  Variant B
    2+3.) (Client): ".staticscheckexport x1 y1 x2 y2"
  4.)  shutdown Pol Server
  5.)  copy "Pol\config\statics\statics.cfg" to your WorldForge Dir
  6.)  call RemoveTab.exe located in your WorldForge Dir
  7.)  (WorldForge): "GetStaticIndex"
  8.)  (WorldForge): "Freeze!"
  9.)  shutdown WorldForge
  10.) remove "pol\sta*.pol"
  11.) startup server, using new sta*.mul
  12.) share your modified "sta*.mul"

//////////////////
// StaticsImport
//////////////////
//
// Call: ".staticsimport"
//
// Requires: Pol\config\statics\statics.cfg
//           Pol\config\statics\staticsno.cfg

Import Items from Statics (from both Configs above) into Pol. If u've extracted
Items with WorldForge your "Pol\config\statics\staticsno.cfg" should be an zero
length file (u can use it to copy Items from one World to another).
All imported Item w'became not decayable and not modifyable.

Make Items NonStatic - Step by Step:
  1.)  shutdown Pol Server
  2.)  erase content of your "items.txt"
  3.)  (WorldForge): "GetStaticIndex"
  4.)  Repeat
         (WorldForge): enter your X/Y block (8x8 tiles)
         (WorldForge): "Melt"
       Until Ready
  5.)  shutdown WorldForge
  6.)  erase "EOF" from "items.txt" manually
  7.)  remove "pol\sta*.pol"
  8.)  startup server
  9.)  copy "items.txt" to "pol\config\statics\statics.cfg"
  10.) (Client): ".staticsimport"
  11.) share your modified "sta*.mul"

///////////////////////
// StaticsExportForce
///////////////////////
//
// Call: ".staticsexportforce x1 y1 x2 y2" (0<=x<=6143 / 0<=y<=4095)
//
// Requires: Pol\config\statics\statics.cfg

Same as ".staticsexport", but ignoring the Item-Type, so every Item w'be exported.

Warning!!!
  This Method w'freeze your Doors etc.pp.

///////////////////////
// StaticsCheckExport
///////////////////////
//
// Call: ".staticscheckexport x1 y1 x2 y2" (0<=x<=6143 / 0<=y<=4095)
//
// Requires: Pol\config\statics\staticscheck.cfg
//           Pol\config\statics\statics.cfg
//           Pol\config\statics\staticsno.cfg

Same as ".staticscheck x1 y2 x2 y2" and ".staticsexport x1 y2 x2 y2".

////////////////
// StaticsMove
////////////////
//
// Call: ".staticmove x1 y1 x2 y2" (0<=x<=6143 / 0<=y<=4095)

StaticsMove w'move all Items within the Range from Location A to Location B.
The TextCMD asks your to target both Locations (e.g. Target Yourself @ Source
Location, Teleport/Jump/Run/Whatever to Dest Location and Target Yourself again).

///////////////
// MultiExport
///////////////
//
// Call: ".multiexport x1 y1 x2 y2" (0<=x<=6143 / 0<=y<=4095)
//
// Requires: Pol\config\statics\multi.cfg

(U should call ".staticscheck x1 y1 x2 y2" first!)

Extract all Items to make Multi. Check the components-file from MultiTemplateManager
for Doors etc./usable Items inside your Multi - MultiTemplateManager w'll split both
Item types @ importing...

Make Items Multi - Step by Step:
  1.)  erase content of "Pol\config\statics\multi.cfg"
  Variant A
    2.)   (Client): ".staticscheck x1 y1 x2 y2"
    3.)   (Client): ".multiexport x1 y1 x2 y2"
  Variant B
    2+3.) (Client): ".multicheckexport x1 y1 x2 y2"
  4.)  shutdown Pol Server
  5.)  copy "Pol\config\statics\multi.cfg" to your MultiTemplateManager Dir
  6.)  call RemoveTab.exe located in your MultiTemplateManager Dir
  7.)  (MultiTemplateManager): "Import WSC Files"
  8.)  (MultiTemplateManager): "Patch MULs"
  9.)  shutdown MultiTemplateManager
  10.) add your new Multi's to Pol-Configs...
  11.) startup server, using new multi.*
  12.) share your modified "multi.*"

////////////////
// MultiImport
////////////////
//
// Call: ".multiimport"
//
// Requires: Pol\config\statics\multi.cfg

Import Items from Multi (from Config above) into Pol.
All imported Item w'became not decayable and not modifyable.

Make Items NonMulti - Step by Step:
  1.)  (MultiTemplateManager): "Export WSC Files"
  2.)  erase "EOF" from "multi.wsc" manually
  3.)  copy "multi.wsc" to "pol\config\statics\multi.cfg"
  4.) (Client): ".multiimport"

/////////////////////
// MultiCheckExport
/////////////////////
//
// Call: ".multicheckexport x1 y1 x2 y2" (0<=x<=6143 / 0<=y<=4095)
//
// Requires: Pol\config\statics\staticscheck.cfg
//           Pol\config\statics\multi.cfg

Same as ".multicheck x1 y2 x2 y2" and ".multiexport x1 y2 x2 y2".

///////////////
// RemoveTabs
///////////////
//
// Requires: statics.cfg and/or multi.cfg

Removes First-Char-in-Line Tabs and exchanges Tabs by Spaces.



Have Fun and report Errors

Shinigami