Original BW2 Scripts

sunny

New member
Joined
Jun 6, 2017
Messages
4
Hey! :)

I want to edit the scripts of the original maps of bw2 and BOTG.
But whenever I open a chl. file of a level is only consits of strange signs and letters. I take it that happens because the script is compiled and compressed.

I saw there is a link on the forums to download the original scripts. The link to download them does not work anymore. :/
Does anyone have a functioning link for the scripts of bw2 and BOTG? Or can anyone tell me how to decompile the scripts so that I can read the entries in the scripts?
I also saw the thread about decompiling scripts but the link leads me to a microsoft website  :)

Can anyone tell me how to make the scripts and its entries readable?


Also the download link for 00din's scripting tool does not work either. :( Is there another link to download it?
And how can I add an NPC god on a map? I read something about a God AI by Godplex. Where can I find it?

Sorry for all the questions :D

I'd be so happy if someone could help! :)
 

Matt

Administrator
Staff member
Joined
Aug 28, 2005
Messages
200
Here you go: https://github.com/HandsomeMatt/bw2-modding/tree/master/lhvm/scripts :)

sorry for the broken link in the sticky, fixed that now ^_^
 

sunny

New member
Joined
Jun 6, 2017
Messages
4
Thank you so much! :)

Is there a way to download all of these at once? :)
Do you also have the scripts of BOTG?


Do you also happen to know how I can edit the script of an existing map?
I think I will have to decompile the chl files then, how can I do that? :)

I'd like to change a few things :)
Or is there any other way how I can edit the chl files of the maps?

I'd be so happy if you could help :)



I also saw there is a script library and a waterfall tutorial, however none of these two work :(
Is this script library of bwfiles still available somewhere?
 

Matt

Administrator
Staff member
Joined
Aug 28, 2005
Messages
200
You can download a zip file of that entire repository here: https://github.com/HandsomeMatt/bw2-modding/archive/master.zip

Editing CHL files is incredibly difficult, I have written a decompiler and a partial assembler - however it requires you to edit scripts in a near assembly like language and is incredibly difficult. You can read about the format of the LHVM here: https://github.com/HandsomeMatt/bw2-modding/tree/master/lhvm

And my disassembler can be found here: https://github.com/HandsomeMatt/bw2-tools/tree/master/src/app/chlextract

Also for BOTG scripts they actually use a different script compiler that has different engine calls, so for example the God AI stuff can't simply be ported over from BOTG to BW2 for instance as the engine calls required for it only exist in BOTG: https://github.com/HandsomeMatt/bw2-modding/blob/master/lhvm/native_functions.md#black-and-white-2-battle-of-the-gods
 
Top