Skip to content

Installation

Daniele Lombardi edited this page Aug 16, 2024 · 4 revisions

Follow these steps:

  1. download the C header files, extract and place them in the game folder
  2. install the Black & White Creature Isle Unofficial Patch v1.24.
  3. run Setup.exe, check Windowed mode with a low resolution and save
  4. install the new CHL compiler
  5. install the Mods loader
  6. download the latest debugger.dll from the release page and put it in the mods folder
  7. in the folder Scripts\CreatureIsles create a subfolder named sources and place here the source CHL files
  8. in the sources folder create a batch script named make.cmd with the following content:
@echo off
set OLDPATH=%PATH%
set PATH=%PATH%;path_to\chlasm_ci
set BWPATH=path_to\Black and White\CreatureIsle
call chlasm_ci -compile -path "%BWPATH%" -scriptpath "Scripts\CreatureIsles\test" -inputfile list.txt ..\challenge.chl -dbg
set rc=%ERRORLEVEL%
set autosave_dir="path_to\Black and White\CreatureIsle\Profiles\profile_name\Saved Games\20"
if exist %autosave_dir% (
	rmdir /S /Q %autosave_dir%
)
set PATH=%OLDPATH%
exit /B %rc%

be sure to replace path_to with the proper locations.
${\color{red}WARNING}$ the above script will delete your autosave and overwrite the previous CHL file, so be sure to backup them if you want

  1. in the same folder, create an empty file named init.gdb; you will need this later to automate debug tasks

  2. open a command prompt, cd into the sources directory, type make and press enter. Check that there are no errors before going on.

  3. in the game folder create a batch script named gdb.cmd with the following content:

@echo off
set PATH=%~dp0Scripts\CreatureIsles\sources;%PATH%
cd /d "%~dp0"
start CreatureIsle.exe /console /consolepos bl /windowpos br /gdb /gdb:script init.gdb /debug:src "%~dp0Scripts\CreatureIsles\sources"

Here an explanation of the flags:
/console opens a console window
/consolepos bl sets the console window position in the bottom left corner of the screen
/windowpos br sets the game window position to bottom right corner of the screen
/gdb select gdb as debug interface
/gdb:script init.gdb searches for a file named init.gdb in the source folder and executes it at startup
/debug:src ... sets the CHL source folder

You are now ready to debug your scripts, just double click gdb.cmd and wait for the debugger to start. Please note that gdb will immediately pause the game, you have to type c at the console prompt in order to continue.

Command line options

/console opens a console window
/consolepos bl|br|tl|tr sets the console window position
/windowpos bl|br|tl|tr sets the game window position
/debug:src ... sets the CHL source folder
/debug:inc ... sets the C header files folder

/gdb select gdb as debug interface
/gdb:script ... set a startup script for gdb

/xdebug select XDebug as debug interface
/xdebug:port ... sets the XDebug listen port (default is 9003)

Clone this wiki locally