JK Unofficial Patch
04-Dec-2006
ZeqMacaw



Patch JK v1.0 for these features:
- Does not cause checksum error, except if the -p param is used (noted below). 
    So, a patched JK can be used even when other players do not have the same 
	patched JK.
- Larger visible sector/adjoin limit.
- Larger thing limit.
- Larger cog linked-symbol limit.
- Larger cog symbol limit.
- Larger material limit.
- No texture size limit.
	NOTE: Textures above 256x256 are still chopped up, but each piece will show 
	entire texture.
- The "pinotnoir" in-game command has been changed to "level", and works in 
	both SP and MP games. For example, in MP game press the Talk hotkey, then 
	press Tab key, then enter "level 1" without the quotes to go to the first 
	level in the episode. (Only works on host. If a client, which has the 
	patch, uses the command, the client will exit the level and not affect any 
	others in the game.)
- The -p replaces /? command-line param. Using -p enables the new cog verbs, 
	and will cause a checksum error for clients that are not using the same 
	patched JK as host.
- The jkConcat and MP messages that normally only print to in-game screen, also 
	print to the Jedi Console.
- New cog verbs:
	Attachment: 
	- surfaceIndex = GetThingAttachSurface(thingIndex); // Returns -1 if not attached to a surface.
	- thingIndex = GetThingAttachThing(thingIndex); // Returns -1 if not attached to a thing.
	Math: 
	- resultInDegrees = ArcCosine(value);
	- resultInDegrees = ArcSine(value);
	- resultInDegrees = ArcTangent(value);
	- result = Cosine(valueInDegrees);
	- result = Power(base, exponent);
	- result = Sine(valueInDegrees);
	- result = SquareRoot(value);
	Surface:
	- boolean = IsAdjoin(surfaceIndex);
	Thing Action:
	- headLVec = GetThingHeadLVec(thingIndex);
	- headPitchInDegrees = GetThingHeadPitch(thingIndex);
	- pyr = GetThingPYR(thingIndex);
	- SetThingPosEx(thingIndex, position, sectorIndex);
	- previousPYR = SetThingPYR(thingIndex, pyr);
	- SetThingRLUVecs(thingIndex, rVec, lVec, uVec);
	- previousSectorIndex = SetThingSector(thingIndex, sectorIndex);



Instructions:
- The jk.exe in these instructions refers to the original unpatched jk.exe file 
	distributed by LucasArts in JK v1.0.
- Backup jk.exe.
- Place patcher.bat, bspatch.exe, patch.dat, and JK-Extension.dll in same 
	folder as jk.exe.
- Run patcher.bat, which will apply the patch to jk.exe.
- Delete patcher.bat, bspatch.exe, and patch.dat.



Credits:
Sige 
	- Created the patcher.exe program and the initial set of patches.
	- Created the initial cogext.dll.
	- Started the documenting of data structures found in memory while JK is 
		running.
Hell Raiser
	- Continued the cogext.dll development.
	- Continued the documenting of data structures found in memory while JK is 
		running.
	- Provided the source for cogext.dll.
