Česky
Spellcross - MOD builder/launcher

   Spellcross mod builder is utility that allows to "mix" new game archives according to instructions in mod definition file. It's much more comfortable than manually dearchivate-edit-archivate all modified archives. It is also able to swap game files with the newly build ones and ater game is finished, it moves originals back to game/CD folder so you can play orignal game or another mod again.
   Since not everyone is used to work with batch files I've also made simple mod launcher with GUI. It allows to setup "config.ini" and "launcher.ini" files content, generate game/mod launch files and launching the game in Windows or in DOSbox.
   This program was created and tested in BDS2006 Turbo C++ at M$ Windows XP so I have no idea what it does in newer OS versions but since I didn't used anything XP specific it should work.


1 - Setup

   Both programs uses their own *.ini files. Main builder utility uses unly "config.ini" where is neccessary to define Spellcross installation folder path and CD content folder path. Rest of the file is generated automatically and I strongly recommend you to not edit this because otherwise original game files could not be restored correctly.
   Program Spellcross mod launcher uses both *.ini files. Game folder paths are read from "config.ini" and "launcher.ini" contains your DOSbox path and settings. It also contains emmulated drive letter that is common for Windows and DOSbox launcher. It is also possible to define some process that you need to kill before game startup. This is sometimes neccessary if the game collides with some process. For example I had problems with Nero Drive Speed utlitity that "confuses" game CD detector so I killed it before game start and restarted again after game is finished.
   All neccessary items can be set using Spellcross mod launcher too so it's not neccessary to manually edit theese files.

Spellcross launcher


2 - Spellcross MOD builder

   As I've mentioned erlier this utility is used to build new game archives and swap them between game/CD folder and mod make folder. Usage is very simple:

spell_mod_builder.exe ?
spell_mod_builder.exe -?
spell_mod_builder.exe /?

   Prints usage.

spell_mod_builder.exe

   without parameters it just restores original game files that are stored in "backup" folder which is automacally created in Spellcross mod builder/launcher folder. If it fails it displays warning message and if this happens repetitively it will be neccessary to make cleanup operation and manually restore all game archives from your own backup (both Spellcross and CD files). The same operation is done by "restore.bat" batch file.

spell_mod_builder.exe -cleanup

   This operation is neccessary if restore operation failes. It clears "config.ini" informations if about currently modded archives. After that it's neccessary to manually restore all game archives from your own backup (both Spellcross and CD files). The same operation is done by "cleanup.bat" script.

spell_mod_builder.exe mod_path [-mod]

   Builds specified mod according to its definition file *.def. Mod definition file format is described in mod example. This operation is also done by "build.bat" batch file which will be described later.
   If "-mod" parameter is defined, utility also moves newly build archives into game/CD folder and originals to local "backup" folder. This operation is also done by "mod.bat" script which is described later.

2.1 - build.bat

   Builds mod archives, usage:

build.bat mod_path

2.2 - mod.bat

   Builds and swaps mod archives with game/CD files, usage:

mod.bat cesta_k_modu

2.3 - restore.bat

   Restores original game/CD files from local "backup" folder as mentioned erlier.

2.4 - cleanup.bat

   Makes "config.ini" cleanup operation after insuccessfull restore operation as mentiond erlier.

2.5 - exec.bat

   This script combines "mod.bat" with game launcher. After game is finished it restores original game/CD files. Game startup in Windows is done using "run_XP.bat" script that has to be created in Spellcross folder and DOSbox startup is done using "run_DOSbox.bat" in the same folder. Theese files will be described later. Usage

exec.bat spelcros_folder mod_path XP
exec.bat spelcros_folder mod_path DOSbox



3 - Spellcross MOD launcher

   It is simple GUI launcher for Spellcross mod builder. You can set most of *.ini items, create game launcher batch files (for Windows and DOSbox) and execute them. It's also possible to open some game and DOSbox config files with this.
   At first program startup you have to set Spellcross game folder path, game CD folder where you have to copy CD content (if you are using virtual CD) and DOSbox path if you want to use it. You also have to set emmulated drive letter. This letter is automatically written into SPELCROS.CD file that defines game CD location. If you, from some reason, don't want to use emmulated CD, disable "Allow CD mod" (not recommended). If you'll ban CD mod then Spellcross mod builder skips CD archives modifications (game usually work without it).
   If everything was setup correctly you should be able to run the game at least in DOSbox (there is no reason why it should not work). In Windows it's a bit more complicated. It depends on system version and hardware/OS configuration but it should work at least in XP. The way how the game is launched in both Windows and DOSbox is described later.


4 - Installation and usage

   Entire game installation can be described as follows:

  1. Install Spellcross somewhere, lets say C:\GAMES\SPELCROS.
  2. Install last game patch (V1.06/1.07 for CZ version, V1.04 for EN version).
  3. Copy entire game CD content in some folder, lets say C:\GAMES\SPELLCD.
  4. Make backup of all game archvies *.FS/FSU (folder DATA in your installation and CD content folder).
  5. Download Spellcross mod builder/launcher and unpack it somewhere (idealy to the same drive as Spellcross).
  6. Setup "config.ini" and "launcher.ini" manually or using Spellcross mod launcher as described previously.

   Step 4) is crutial because if mod builder or game or system failes in wrong moment, restoration of orignal game files might not be done correctly and therefore you'll have to manually restore all your game archives from this backup (both game and CD).
   Reason why should be my program placed to the same drive as the game is that moving files between partitions is much slower.

4.1 - Startup in Windows

   There are several ways how to run Spellcross directly in Windows but since I need to mod CD files too, it's neccessary to use virtual drive emmualted from folder. Luckily Spellcross with last patch accepts virtual drive created using SUBST. This command (utility from windows\system32) maps selected folder as virtual drive which is set as Spellcross CD letter (SPELCROS.CD). This command acts very similar to DOSbox "mount" command.
   Because it's a bit incomfortable to type this command before game start Spellcross mod launcher automatically creates batch file "run_XP.bat" into game folder. This script mounts virtual drive from your CD content folder, runs Spellcross and then unmounts virtual drive again.    This way worked in all XP systems I've tested but I have no idea what this wuold do in newer version.

4.2 - Startup in DOSbox

   If you can't run Spellcross in Windows directly it will work at least in DOSbox. Spellcross mod launcher creates two batch files for this purpose. First one is "run_DOSbox.bat" which calls DOSbox with "box_exec.bat" as parameter. So if you have already Spellcross launch code in [autoexec] section of "dosbox.conf" you'll have to disable it with "Disable autoexec" option in Spellcross mod launcher. Virtual CD drive is craeted from folder instead of image so it's same as in Windows.
   Spellcross mod launcher also creates "setup_DOSbox.bat" that calls DOSbox with "box_set.bat" as parameter. This script runs Spellcross SETUP.BAT in DOSbox if you wish/have to setup it there.


5 - Versions history

V1.00 - 1.10.2011: First version.
V1.10 - 10.10.2011: Added some settings into *.ini files. Both Spellcross builder and launcher programs adapted to work in Windows 98 (also some *.bat scripts changed).
V1.20 - 15.10.2011: Fixed some bugs in *.bat scripts.
V1.30 - 2.6.2013: Fixed some bugs in *.bat scripts (problems with spaces in mod path).


6 - Licence

   It's freeware so you are free to use and redistribute it but only with all included files together (especially with this help) without any modifications!
   Since it's freeware you are using this at you own risk! Any possible dammage caused by this SW is your problem.
   If you don't agree with theese terms don't use this SW.


7 - Contact

   In case of some problems with this SW you can contact me at s.maslan@seznam.cz. Additional informations and new versions could be find here: http://www.spellcross.kvalitne.cz/mod/spell_mod_builder.html.



(c) 2011-2013, Stanislav Mašláň - All rights reserved.