Grappling Hook

Key Assignment
Written by Brian Taylor

Note: I'm assuming that you have some Cog editing experience, watch Buffy, and have used my grappling hook patch. With that said, lets get started.

People, today we're going to learn the best way to create patches for Jedi Knight: Not replacing anything, but adding a new item completely! Aren't we excited? (Watch Buffy)

First of all, extract items.dat from res2.gob and jkstrings.uni from res1low(or high).gob. Now go watch Buffy. Next, get a cog file (like the fieldlight cog, or possibly the hook.) Open Items.dat. Look for -

bactatank40050x102cog=item_bacta.cog
irgoggles41010x102cog=item_irgoggles.cog
fieldlight42110x122cog=item_fieldlight.cog

here's what this all means:

bactatank ---- This is used to find the bm file. The engine will look for "an icon named icXXXXX8.bm or icXXXXX16.bm in the UI\bm directory, where XXXXX are the first 5 letters of the name in items.dat" so it looks for icbacta8.bm or icbacta16.bm Until we can create new bms, you have to use an existing name, or else jk will crash.
40 ---- This is the bin number
0 ---- Minimum bin value
5 ---- Maximum Bin value
0x102 ---- Flag (this is important)

Copy one of those lines (like, fieldlight), then paste near the bottom, so you get this:

goal15115010000x040
fieldlight42110x122cog=item_fieldlight.cog
hotkeyOffset1500999990x000

Then change the 42 to a 116, and the cog to your cog name (in this case, watch_buffy.cog)

goal15115010000x040
fieldlight116110x122cog=watch_buffy.cog
hotkeyOffset1500999990x000

This will now display the fieldlight picture for your item. Go ahead and save items.dat and close it. We're done with it. Next, open up jkstrings.uni, and scroll down till you get to -

"ACTIVATE15"     0 "IR Goggles"
"ACTIVATE16"     0 "Field Light"

Ok. ACTIVATE15 Will search items.dat for the 15th entry with flags set to 0x100, or anything else with a 0x1xx....Which in this case is bin 41 (IR Goggles). After these lines, add -

"ACTIVATE17"     0 "Watch Buffy"

Next, scroll to the top of the screen, and update the message count from 900 to 901. So now, at the bottom of the control section under options in the game, it will say "Watch Buffy", and you can bind a key to it. Simple, right? Well, there are some limitations.

As of right now, I'm not exactly sure how you would go about adding Force Powers, since they would need to be added to the Force Star chart. Another problem is weapons. Weapons run on a Select1 (fists) to Select0 (saber), so the only way to add a new weapon (without a lot of Cog Programming), is, well, to wait for MotS and hope they change from select1 to select01. And you can only add bins up to 199, and only have 33 total ActivateXX messages. Hope this helps you like, make cool things.


Click here to download a demo gob illustrating the above example.

Brian Taylor (net_jedi@geocities.com) denies attempting to put subliminal messages in this article.


Back to D A R K N E S S   F A L L S