scripting and compiling help

ejonesss

New member
Joined
Apr 30, 2012
Messages
49
i was wondering what does compiling do?

does it take all the text files pertaining to a land and pack them into 1 big chl file?

for example take land 7 (frog shaped)

Land7Archeologists.txt
Land7Challenges.txt
Land7Control.txt
Land7CreatureAI.txt
Land7Departure.txt
Land7DYK.txt
Land7Globals.txt
Land7Hurricane.txt
Land7Intro.txt
Land7JapanCapital.txt
Land7NutOil2.txt
Land7Objectives.txt
Land7Outro.txt
Land7SevenSamurai.txt
Land7SickTown.txt
Land7ThrowBloke.txt

lets say i want to modify Land7SevenSamurai.txt to make 70 or 700 by changing the line

Samurai = create platoon PLATOON_INFO_SEVEN_SAMURAI at {SS_Prism_Pos} with 7 men and 0 women

to Samurai = create platoon PLATOON_INFO_SEVEN_SAMURAI at {SS_Prism_Pos} with 70 men and 0 women

or Samurai = create platoon PLATOON_INFO_SEVEN_SAMURAI at {SS_Prism_Pos} with 700 men and 0 women

then i compile does the Land7.chl contain all the above txt files or do i have to decompile the Land7.chl first?

i know you may say "why not just merge armies"?

this is just an example  of a modification

thanks for the help

 
   Where did the names of the listed text files come from?

   In general, as I understand, a .chl file is a compiled file in a proprietary format created by Lionhead's script compiler program. A .chl file would indeed need to be decompiled to retrieve the actual commands used to create the script. There was a project in the past to create a decompiler, but it was never finished:
[ http://www.bwfiles.com/boards/index.php?topic=2172.0 ]

   When a script is compiled, all of the .txt files that make up the script are combined into the single .chl file. Any script can be contained in one or more .txt files. There are several places to get info on how to compile scripts.
The BW2 scripting library has a bunch of information: [ http://www.bwfiles.com/scripts/index.php ]
I wrote up a quick post for someone else in the past: [ http://www.bwfiles.com/boards/index.php?topic=6158.0 ]

-ego533
 
 
i am on a mac so the path to the scripts folder would be different than on a windows system

scripts/bw2

on the mac you have to right click on the Black & White 2 Loader.app and show package contents then open contents then resources then scripts then bw2 and there you go

windows you can right click on the shortcut on the desktop and show properties

then  click find target

then open the scripts folder

then open the bw2 folder and there you go for windows.

i have a windows system too though it is too slow to run the game i was able to install for the purposes of some mods.


i know that the chl files are possible a proprietary format but i was wondering if i can simply modify the text files and compile them into a chl file or if there are other files compiled in there that would need to included.


i have heard of talk of someone building a console based de/compiler.

the mac user base is growing (hence why now cyber criminals are targeting macs for their exploit based warez) so if it is not possible to make a mac version then at least if a unix command line de/compiler could be made then it could be ran on macs.

because macs have a unix background that unix programs can be ran by applescript front end by the "do shell command" command.
 
   If you do indeed have all of the .txt files, then they will be sufficient to compile into a script. When variables or functions in one .txt file are used in another .txt file, the file the declares them must be specified before the file that uses them in the compiling command. The files are compiled in the order that they are specified.

-ego533

 
 
i am on mac however i do have a pc and i have both versions of the game and looking at the 2.

the pc version does not have the text files but i think it has the bat files.

while the mac version does have some bat files they are not in the scripts folder.

i would have to check and compare the 2 versions.
 
Can you see all the text in the files? If you can, as ego says, this can be compiled in to a working script with relative ease and would be something of a breakthrough!
 
Back
Top