00_lightning.cog - level modifier (for Canyon Oasis) code starts at initialize:, player interaction starts at activate:, startup: is nulled checks number of things with template of m10column so activation can only occur once if 4 or less, creates 4 columns and removes water flag from most sectors also seals off the top of the water tube with the light side surge darkjedi_*.cog - force pull bug fix fixes a crash bug involving the dark jedi using force pull on the player basically, (GetCurWeapon(victim) != 10) is changed to (GetCurWeapon(victim) < 10) weapon 6A uses a current weapon number greater than 10 the force pull (and darkjedi cogs) template array doesn't go over 10 (leading to a crash) force_absorb.cog - feedback, force damage dealt to player is reflected starts at startup:, player interaction starts at activated: activates bin 28 which allows damaged messages to enter the if statement jkStringOutput(sphere, position); will print text on the victim's screen 4 blanks will also be sent to conceal the deadlysight message (SkillTarget is sync'd) force_blinding.cog - grappling hook deactivates if shot at sky starts at startup:, player interaction starts at activate: (tricky misuse of activated:) activated: is called to conserve modifiable code and then a new pulse rate is declared CaptureThing(victim); allows removed: to deactivate the power if the hook dies SetWeaponFlags(dummy, 0x2000); and ClearWeaponFlags(dummy, 0x10000); straighten the rope force_deadlysight.cog - a template is used in conjuction with SkillTarget to blind starts at startup:, player interaction starts at activated: SkillTarget(victim, player, 27, 0.025); is used to cause a brief force blinding effect +ssparks_saber is used to blind all enemies in view ParseArg(smoke, "flashrgb=(0/0/0)"); keeps +ssparks_saber from blinding the player force_destruction.cog - all mana drained upon use to balance this powerful attack starts at startup:, player interaction starts at activated: very little code to work with so cutting corners is suggested ChangeInv(player, 14, neg400); drains all the player's mana without wasting a minus sign AttachThingToThingEx(dummy, player, 0x8); to keep the sprite following you as it fades force_grip.cog - player can drag the victim around starts at startup:, player interaction starts at activated: damage = CreateThing(starthealth, victim); saves the victim's distance from the player AttachThingToThingEx(damage, player, 0x8); is used because attaching a player is "unsafe" ApplyForce is used to push the victim towards the saved distance force_heal.cog - all mana drained upon use to balance this powerful remedy starts at startup:, player interaction starts at activated: user0: and user1: allow for external calls to particle creation Sleep(0.1); is used to hit the thread limit for the cog to limit and control particles not as much code to work with as there appears to be so basic function was simply expanded force_jump.cog - player's actions are automatically controlled starts at startup:, player interaction starts at activated: upon death, the player is self faded to force a respawn while power is active SendTrigger(-1, satiate, player, 0, 0, 0); is used to prevent excessive suicide counts cost = truecost; is used so the initial cost at startup can be 0 when used as a saberbot force_lightning.cog - higher jumping and levitation combined into 1 power starts at startup:, player interaction starts at activated: upon activation, the player's height is saved and used as a maximum levitation height the player will only receive upward push if below the initial recorded height initial boost upward allows for increased jump height, rapid use can cause very high jumps force_persuasion.cog - can target other players no matter where they are starts at startup:, player interaction starts at activated: extensive calls are used to get maximum use out of spare code 1009 + 60 / rank); searches for different target types based on rank without if statements GetPlayerThing(pcount); is used to target victims regardless of where they are force_protection.cog - immobilizes and opens victim to attack from behind starts at startup:, player interaction starts at activated: without traditional targetting code, a single FirstThingInView is used, limiting control SyncThingPos(victim); isn't used, it pushes the victim and can cause accidental damage SyncThingState(victim); teleports the victim, preventing accidental damage force_pull.cog - properly removes pushed powerups so they can respawn starts at startup:, player interaction starts at activated: ApplyForce(victim, dir); is scaled based on the thing type of the victim being pushed TakeItem(GetParam(0), GetParam(0)); is used on items to ensure proper respawn in the case of actors, type = 10; is used so they get the same force applied as players force_seeing.cog - instant trajectory projectile converted to standard in real-time starts at startup:, player interaction starts at activated: ClearWeaponFlags(dummy, 0x18400); doesn't always sync in time before +force_lightning hits to counter this, CaptureThing(dummy); and a touched: message is used to affect the victim SkillTarget(victim, player, 27, 0); simply makes the victim's screen flash for a second force_speed.cog - balanced form of speed, quick dashes rather than faster running starts at startup:, player interaction starts at activated: ApplyForce and reuse time scale based on rank, higher rank is slower use but more force mana cost remains constant, so lower rank will chew through mana more quickly to keep up channel = -1; is a needless fail-safe to ensure an inactive channel is never messed with force_throw.cog - projectile velocity inversion starts at startup:, player interaction starts at activated: nearly default throw code is used to throw debris and objects at the victim while(debris != -1) includes code to reverse velocity of objects in view GetThingParent(debris) prevents player's own projectiles from hurting them when reversed force_well.cog - raised maximum to 400 regardless of rank, standardized regen rate starts at startup:, no player interaction if(rank > 0) rank = 8; avoids modifying the inventory bin for rank ChangeInv(player, 14, rank * rank - 59); controls mana regeneration, bin max limits mana "- 59" controls the specific amount of mana regenerated per second item_bacta.cog - complete heal no startup, player interaction starts at activated: very little code to work with, so functionality was simply modified Print("Using Med Kit"), 1; was used to give a specific message with no external reference HealThing(player, 100.0); is 333% the healing that the default bacta provides item_datadisk.cog - throw an emergency grenade with any weapon equipped no startup, player interaction starts at activated: nearly no code to work with, so functionality depends on an external call SendMessage(GetInvCog(player, 4), user0); sends a message to weap_thermdet.cog 2 grenades are thrown, 1 impact, the other timed, resulting in a leapfrog-style explosion item_fieldlight.cog - sets player to 0 mass and drains batteries quickly no startup, player interaction starts at activated: calls are used to bypass modification restrictions, external calls to create effects SendMessage(GetInvCog(player, 25), user0); is used to make force_heal.cog create particles SendMessage(GetInvCog(player, 25), user1); stops force_heal.cog from creating particles item_irgoggles.cog - enables walking on walls no startup, player interaction starts at activated: SetMapModeFlags(0x3E); draws everything including the entire level itself ClearPhysicsFlags(player, 0x800); allows the player to attach to walls and not slide SetPhysicsFlags(player, 0xB0); sets the player up for new attachment rules and bouncing item_keygreen.cog - thing desynchronizer no startup or player interaction, this cog is used to make an unsynchronized thing player = GetSourceRef(); can't be changed, else it'll fail checksum projectile = GetParam(0); allows the template to be externally declared in SendMessageEx ReturnEx(CreateThing(projectile, player)); returns the thing number to the external call item_keyimperial.cog - backhand attack with any weapon equipped no startup, player interaction starts at activated: nearly no code to work with, so functionality depends on an external call SendMessage(GetInvCog(player, 1), user0); sends a message to weap_fists.cog a very weak right-handed punch is thrown and the "activate" animation is played for effect item_shields.cog - no drowning when using guidance, modified shield loss code starts at init_two:, execution starts at damaged:, no player interaction if(0) allows a jump in execution without a message call and Return; if(GetParam(1) == 32) shields = 1; allows drowning damage to be processed with 0 shields damage = 0; is used to keep the saberbot from drowning kyle.cog - modified startup:, newplayer:, killed: and force pull bug fix starts at startup:, no player interaction killed: is bypassed to add a fail-safe of only 1 backpack drop per death force pull crash bug is fixed and inventory isn't subtracted when pulled (balance issue) initial inventory values are slightly modified and init_kyle: calls weapon equip routines pow_*.cog - can be picked up even if inventory is full typically starts at touched:, player interaction starts at touched: two methods are used to allow powerups to always be picked up 1) the inventory bin (ammobin for weapon pickups) is changed to 99, which never fills up 2) taken: is replaced with touched: and a TakeItem(powerup, player) forces pickup pow_bryar.cog - processes skill: messages to prevent a crash starts at bypass:, execution starts at touched: or user0: depending on purpose of thing traditional bryar pickup functions normally, always allowing the item to be picked up weap_repeater.cog creates a bryar powerup and sends it a user0: message as a fail-safe code is implemented to reroute skill: messages sent to the player to prevent a crash weap_bryar.cog - non-projectile based scope starts at fire:, player interaction starts at selected: and activated: default projectile fired is used as a bullet casing for effect, flags and model change a local fire sound is used along with fireSound = weaponIndex; (-1) to silence the shot a pulse that sends external calls to weap_saber.cog is used to control zooming in and out weap_concrifle.cog - wall-tracing projectile starts at fire:, player interaction starts at selected: and activated: secondary changes based on singleplayer or multiplayer modes, MP shot doesn't hurt NPCs MP secondary shot traces along walls and aligns it's look vector to it's velocity SetThingRotVel(player, turnVec[powerBoost]); causes the player to turn right while firing weap_crossbow.cog - shoots through walls with little added network traffic starts at startup:, player interaction starts at selected: and activated: primary fires 2 projectiles, one's lookvector is reversed for effect, both auto-aim a lot secondary uses vertex comparisons against the projectile's location to shoot through walls CaptureThing(error); and touched: message allow near flawless shooting through enemies weap_fists.cog - accepts user0: messages to perform an attack at any time starts at startup:, player interaction starts at selected:, activated: and user0: reworking of default weap_fists.cog to mimic MotS style punching user0: is called from item_keyimperial.cog to perform a "backhand" attack nextAnim = 0.5; causes reduced damage and PlayMode(jkGetLocalPlayer(), 23); is for effect weap_raildet.cog - flying projectile that slows down and stops starts at fire:, player interaction starts at selected: and activated: simple projectile manipulation, a sequencer charge is given velocity and rotation call ammo_check; is used to unequip as soon as the last disc is fired ChangeInv(player, 15, -powerBoost); is meant to balance out the overpowering fire rate weap_repeater.cog - 2 weapons on 1 hotkey starts at startup:, player interaction starts at selected: and activated: if(GetInv(player, 6) && GetSenderRef() != 0) makes next/prev weapon hotkeys skip this SetCurInvWeapon(player, 116); is used to put 2 weapons on 1 hotkey SendMessage sends pow_bryar.cog a message to run force pull bypass code to avoid a crash weap_saber.cog - always colliding blade, dual lightsabers starts at timer:, execution at startup:, player interaction at selected: and activated: modified KEY files set saber collision to remain true indefinately jkEnableSaber(player, 50, .12, .11); allows damage to occur during saber collision jkSetFlags(player, 0x15); along with a modified PUP file gives dual lightsabers weap_seqcharge.cog - arc-trajectory projectile without gravity flag starts at startup:, player interaction starts at selected: and activated: CaptureThing(projectile); allows the cog to receive pulse: and removed: messages the projectile's class cog sets the thing's pulse, so SetPulse is unneeded if(2-GetInv(player, 63)) provides a difference when the player has a power boost weap_strifle.cog - non-crashing seifer pov model code starts at fire:, execution at startup:, player interaction at selected: and activated: SendMessageEx interacts with item_keygreen.cog to create an unsynchronized thing ParseArg sets a timer (among other changes) that resets every .1 seconds until deselected: SetThingVel(player, randVec[mode]); is the main difference between fire modes weap_thermdet.cog - fire rate based on rapid clicking or held starts at startup:, player interaction starts at selected: and activated: activated: leading into a pulse: message is used to emulate a fire: message rapid activation allows for a high fire rate without disturbing the pulse rate SetMountWait(player, throwWait); is used to regulate activation rate