Creating a Random Proc Effect

From HIVE
Jump to: navigation, search

This tutorial will teach you how to add a random procedure (proc) effect to a Weapon, though it could be applied to an Ability as well. If you aren't sure what a "proc" or procedure is (when used in this context), basically think of it as a term describing an event that occurs when a condition is met. Typically it is used to describe events that have a percentage chance of going off. In this case, we'll give the Marine's "Gauss Rifle" a 20% chance to slow enemies when the Marine attacks with it.


Create the Proc's "Set" Effect

In order to make this possible, we have to use a Set Effect. Essentially this type of "Effect" will allow you to trigger multiple Effects at the same time, as opposed to something like a "Create Persistent" Effect that may be triggered over and over again.


Open up the Data Editor (F7) and under "Data Type:" select "Effects." Right-click in the left box and select "Add Object..." (or press Ctrl+=). Name this new effect "Gauss Rifle Proc," click "Suggest" for the ID, and set the type to "Set" and based on "Default Effect (CEffectSet)." As a side note make sure the "Show Table View" button is pressed, next to the right "Search" bar.


With your new Effect selected, find "Effect - Effects" and double-click the space next to it to open an "Object Values" window. Click the green X on the right to add a new value to the white box, and set that value to "Marauder - Punisher Grenades (Apply Slow Behavior)." This will be the Effect that takes place 20% of the time.


Now click that green X again, and this time leave the Effect as "(None)." Do this three more times, so there are a total of four blank lines and then our one "Punisher Grenades" effect. Click "OK" to close the window.


Next find "Effect - Maximum Count" and change that to 1. Find "Effect - Maximum Count" and change that to 1 as well. Finally, find "Effect - Random" and double-click the space next to it to open a new "Object Values" window. Click the checkbox next to "Enabled" and click "OK" to close the window.


Essentially what this means is that when the effect is triggered, it will randomly select one of the "Effects" listed under "Effect - Effects." If one of the blank lines is chosen, there will be no slowing effect added to the damage. If the "Punisher Grenades" Effect is chosen, then the target will be slowed. Since there is a 1 in 5 chance of that happening, we now have a 20% proc chance to slow an enemy.


Creating the Weapon's "Set" Effect

Because the Marine's weapon only has a "Damage" Effect associated with it, we will need to create a new "Set" effect that triggers the normal "Damage" Effect as well as our new proc Effect. Right-click in the left box again and select "Add Object..." (or press Ctrl+=). Name this new effect "Gauss Rifle (Set)," click "Suggest" for the ID, and set the type to "Set" and based on "Default Effect (CEffectSet)."


With this new Effect selected, find "Effect - Effects" and double-click the space next to it to open an "Object Values" window. Click the green X on the right to add a new value to the white box, and set that value to "Gauss Rifle Proc." Click the green X again and set the new value to "Marine - Guass Rifle (Damage)." Yes, Blizzard misspelled their own weapon name. That is not a typo on my part. Click "OK" to close the window.


Applying the Effects to the Weapon

Under "Data Type:" select "Weapons," and search for "Marine - C-14 Gauss Rifle." Yep, they spelled it correctly there. With the weapon selected, find "Effect - Effect" on the left and change that to "Gauss Rifle (Set)." Now theoretically anytime the gun fires, it will trigger the "Gauss Rifle (Set)" Effect, and have a 20% chance to slow enemies. I say "theoretically" because in order for this particular Effect to work, we still need to remove the "Validators".


Under "Data Type:" select "Effects" again, and search for "Marauder - Punisher Grenades (Apply Slow Behavior)." Now find "Effect - Validators" and double-click the field next to it to open an "Object Values" window. Select "Marauder - Punisher Grenades Researched" and click the red X to delete it. Now select "PunisherGrenadesSlowTargetFilters" and delete that as well. Click "OK" to close the window, and now your Marine's "Gauss Rifle" will have a 20% chance to slow targets.