# Item definition file for Jedi Knight # ======================================================================================== # name id min max flags args # ======================================================================================== ########### # Weapons # ########### # ======================================================================================== none 0 0 0 0x004 fists 1 0 1 0x024 cog=weap_fists.cog bryar_pistol 2 0 1 0x0a4 cog=weap_bryar.cog stormtrooper_rifle 3 0 1 0x0a4 cog=weap_strifle.cog thermal_detonator 4 0 30 0x0a4 cog=weap_thermdet.cog tusken_prod 5 0 1 0x0a4 cog=weap_crossbow.cog repeater 6 0 1 0x0a4 cog=weap_repeater.cog rail_detonator 7 0 1 0x0a4 cog=weap_raildet.cog sequencer_charge 8 0 30 0x0a4 cog=weap_seqcharge.cog concussion_rifle 9 0 1 0x0a4 cog=weap_concrifle.cog lightsaber 10 0 1 0x0a4 cog=weap_saber.cog # ======================================================================================== ################### # Ammo and Energy # ################### # ======================================================================================== #energy is used for bryar pistol and stormtrooper rifle. energy 11 0 500 0x080 #power is used for the the bowcaster, repeater and concussion rifle. power 12 0 500 0x080 #battery is used for other inventory items. battery 13 0 200 0x020 #force is used for the force powers. forcemana 14 0 400 0x000 #rail charges railcharges 15 0 30 0x080 # ======================================================================================== ########### # Bonuses # ########### #new force stars gained in a level. new_stars 16 0 32 0x000 #spendable stars spend_stars 17 0 32 0x000 #the choice choice 18 0 2 0x000 ############################# # Damage multiplier powerup # ############################# # ======================================================================================== # Bin 19 is reserved !!! # Damage multiplier powerup should come before force powers... # ======================================================================================== ############## #Force Powers# ############## # Note that the icon names are taken from these names: # ======================================================================================== # Attributes jedi_rank 20 0 8.0 0x000 cog=force_well.cog # ........................................................................................ # Basic Powers f_jump 21 0 4.0 0x108 cog=force_jump.cog f_speed 22 0 4.0 0x108 cog=force_speed.cog f_seeing 23 0 4.0 0x108 cog=force_seeing.cog f_pull 24 0 4.0 0x108 cog=force_pull.cog # ........................................................................................ # Light Side Powers f_healing 25 0 4.0 0x108 cog=force_heal.cog f_persuasion 26 0 4.0 0x108 cog=force_persuasion.cog f_blinding 27 0 4.0 0x108 cog=force_blinding.cog f_absorb 28 0 4.0 0x118 cog=force_absorb.cog # ........................................................................................ # Light Side Bonus Powers f_protection 29 0 4.0 0x118 cog=force_protection.cog # ........................................................................................ # Dark Side Powers f_throw 30 0 4.0 0x108 cog=force_throw.cog f_grip 31 0 4.0 0x108 cog=force_grip.cog f_lightning 32 0 4.0 0x108 cog=force_lightning.cog f_destruction 33 0 4.0 0x108 cog=force_destruction.cog # ........................................................................................ # Dark Side Bonus Powers f_deadlysight 34 0 4.0 0x108 cog=force_deadlysight.cog # ======================================================================================== ################# #Inventory Items# ################# # Note that the icon names are taken from these names: # ======================================================================================== bactatank 40 0 5 0x102 cog=item_bacta.cog irgoggles 41 0 1 0x102 cog=item_irgoggles.cog fieldlight 42 1 1 0x122 cog=item_fieldlight.cog keyimperial 43 0 1 0x042 cog=item_keyimperial.cog wrench 44 0 1 0x042 cog=item_wrench.cog datadisk 45 0 1 0x042 cog=item_datadisk.cog keyred 46 0 1 0x042 cog=item_keyred.cog keyblue 47 0 1 0x042 cog=item_keyblue.cog keyyellow 48 0 1 0x042 cog=item_keyyellow.cog wrchblue 49 0 1 0x042 cog=item_wrenchblue.cog wrchyellow 50 0 1 0x042 cog=item_wrenchyellow.cog keygreen 51 0 1 0x042 cog=item_keygreen.cog # ======================================================================================== ##################### # Player Statistics # ##################### # ======================================================================================== shields 60 0 200.0 0x030 cog=item_shields.cog force_armor 61 0 200.0 0x000 supershields 62 0 1.0 0x010 #cog=item_supershields.cog powerboost 63 1.0 2.0 0x000 s_dark 64 0 1.0 0x000 s_light 65 0 1.0 0x000 revive 66 0 1.0 0x000 # ======================================================================================== ########### # Scoring # ########### # ======================================================================================== secrets 70 0 20 0x000 maxsecrets 71 0 20 0x000 # morality peds_killed 72 0 1000 0x000 peds_total 73 0 1000 0x000 force_morality 74 -40 40 0x000 alignment 75 -100 100 0x000 # ======================================================================================== ##################### # Multiplayer Modes # ##################### # ======================================================================================== teamcolor 80 0 2 0x040 redflag 81 0 1 0x048 goldflag 82 0 1 0x048 redkey 83 0 1 0x042 cog=ctf_itemkeyred.cog goldkey 84 0 1 0x042 cog=ctf_itemkeygold.cog # ======================================================================================== ############################ # Goals & Level Completion # ############################ # ======================================================================================== # Bins 99 - 115 are RESERVED # ======================================================================================== # They will store the number of the first goal description text in cogStrings.uni, and the # display status of up to 16 goals (0 to 15). # ======================================================================================== stringOffset 99 0 99999 0x000 goal00 100 0 1000 0x040 goal01 101 0 1000 0x040 goal02 102 0 1000 0x040 goal03 103 0 1000 0x040 goal04 104 0 1000 0x040 goal05 105 0 1000 0x040 goal06 106 0 1000 0x040 goal07 107 0 1000 0x040 goal08 108 0 1000 0x040 goal09 109 0 1000 0x040 goal10 110 0 1000 0x040 goal11 111 0 1000 0x040 goal12 112 0 1000 0x040 goal13 113 0 1000 0x040 goal14 114 0 1000 0x040 goal15 115 0 1000 0x040 hotkeyOffset 150 0 99999 0x000 # =============== # # MAX Bins = 199 # # =============== # endLucasArts was nice enough to leave a lot of commenting in this file for us. All of the lines beginning with a pound sign are comments - JK will ignore them when it parses the file.
As outlined at the top, bins have a name, an ID, a minimum value, a maximum value, flags, and arguments. The name is pretty obvious, and the only time you'll need to worry about this is when your naming icons (*.bm) for the forces and items - JK generates a name from the bin name and looks for the icon under that name.
The bin's ID is what you will use to access that bin from your code. When we get to the actual Cog commands later on, you'll see how you'll use bin numbers.
The minimum value is the smallest number you can assign to a bin. The main reason to have a "bin" is to hold something - in this case a value. And so it follows that the maximum value is the highest number you can assign to a bin.
A flag is a number used to store true or false settings. We'll cover flags in depth later on. For now, just remember that this flag tells JK what the bin is supposed to do - whether it's supposed to be for a weapon, item, force power, or just a hotkey.
An argument is a term used in programming to mean a value assigned to something. A parameter (which it's often confused with) is an allotted place for an argument. The only known argument that you can add to an inventory bin is its cog assignment. You can see that some of the bins have a cog=x.cog after them. The assigned cog will be able to receive events from that inventory bin.