Create and Implement a New Buff

From ARK Modding Wiki
Jump to: navigation, search

Creating the Buff

Pick a buff that is close to the desired buff effect you are wanting to achieve. For this example, we'll be using the buff associated with the Meso's poop-flinging attack Buff_PoopHit. After each step, its good practice to always click the Save and Compile buttons. This is merely a humorous example of how you could edit any existing buff to suit your needs; please feel free to tweak it as you go to suit your preference.

BuffTutorial-InAction.jpg

  1. Copy the Buff_PoopHit file to your mod folder. The file's original path is PrimalEarth/CoreBlueprints/Buffs.
  2. Rename your buff. For this example, we'll name it Buff_Oopsies.
  3. Double-click the file to open. For now, we'll be working on the new buff's Defaults tab, as seen in the upper right corner.


Working on the Defaults Tab

Our goal at this stage is simply customizing the new buff to suit our needs. All of these changes are merely cosmetic in nature.

Click on the Eye icon in the upper right corner and select the "Show Only Modified Properties" option. This will show you all of the changes made in the original buff compared to its parent file Buff_Base which can also be seen listed in the upper right corner.

BuffTutorial-Defaults8.jpg

Feel free to change any of the listed settings to suit your preference. For this example, we'll be making the following changes to the Defaults:


1. Change "Deactivate After Time" from 10 to 5; 10 seems like an awful long time for the target to be... affected by the buff.

2. Change the "Modifier Description" to "You've got a case of the oopsies!", or something similar.

3. To change the HUD message color, click on the "Modifier Color" color box to open the Color Picker window. Lets select an appropriate shade of brown. In the Hex sRGB field enter 654526FF.

BuffTutorial-Defaults2.jpg

4. Expand "Character Status Value Modifiers"; note that it originally affects 4 stats: Health, Speed Multiplier, Temperature Fortitude, and Torpidity.

BuffTutorial-Defaults3.jpg

5. The first Character Status Value Modifier affects Health. We don't want this new buff to deal actual damage, so delete it buy selecting its pull down and selecting "Delete". Leave the other three, as they seem rather fitting; the victim's situation will appropriately slow them down, make them uncomfortable, and very well might be severe enough to knock them out.

BuffTutorial-Defaults4.jpg

6. In order to match the new deactivation time we set earlier, change each of the remaining three value modifiers' "Speed to Add" from 10 to 5.

BuffTutorial-Defaults6.jpg


That's it for changes to the new buff's Defaults tab. Before leaving Defaults, feel free to change other items, such as the "Modifier Icon" or "Sound". Note that the original Buff_PoopHit already comes with a great "Buff Post Process Effect" which is going to enhance our end result.

Now for the Graphing part of our new buff.


Working on the Graphs Tab

BuffTutorial-Graph0.jpg

Our goal at this stage is to set up the primary ability of our new buff. We'll do so by creating a function that will cause the target to poop themselves, then set the function to trigger on a fast loop for the duration of the buff's effect.

1. Create a new function and name it "Oopsies"

BuffTutorial-Defaults7.jpg

2. In the "My Blueprint" window, click the "Show inherited variables" checkbox and search for "Instigator". Drag it onto your blueprint and select "Get" to create a node for it.

BuffTutorial-Graph1.jpg

3. Pulling from the Instigator node, search for "Cast to PrimalCharacter" and select its node. Connect it to the Oopsies function start. Note we're selecting PrimalCharacter as it will effect both players and dinos for maximum fun.

BuffTutorial-Graph3.jpg

4. Pulling from the "As Primal Character" pin of the "Cast to PrimalCharacter" node, search for "poop". Select the node named "Poop" under the Pawn category. Check the "Force Poop" bool on the Poop node.

BuffTutorial-Graph5.jpg

5. On the main Event Graph tab right-click and search for "Event Begin Play". Select it to place its node.

BuffTutorial-Graph2.jpg

6. Pulling from the Event Begin Play node, right-click and search for "Delay". Select to place its node and keep its default setting of 0.02.

7. Pulling from the Delay node, right-click and search for "Switch has Authority". Select it to place its node.

BuffTutorial-Graph7.jpg

8. We want this to only run server-side, so pulling from the Authority pin, right-click and search for "Set Timer"

BuffTutorial-Graph6.jpg

9. On the Set Timer node, enter our Function Name from earlier: "Oopsies". Set the Timer to 0.2. Check the Looping bool. All of this together will ensure the buff victim will really machine-gun 'em out during the duration of the buff's effect.

BuffTutorial-Graph4.jpg

That's it for the buff, its finished!

Now to implement it so we can have some fun.


Implementing the Buff

There are many ways to apply a buff. These are merely four examples of how you could choose to do so. Each example gets a little more complex.


Example 1: Consumable
  1. In the PrimalEarth folder, search for Tinto and copy the PrimalItemConsumable_Berry_Tintoberry file to your mod folder. Full original path is PrimalEarth/CoreBlueprints/Items/Consumables. Rename the new file PrimalItemConsumable_Berry_Dingleberry.
  2. Double click your new file to open.
  3. In the Defaults tab, search for "buff". Under "Buff to Give Owner Character", select your Oopsies buff.BuffTutorial-Berry.jpg
  4. Search for "Desc" and edit the "Descriptive Name Base" and "Item Description" to suit your taste.

That's it! Now you just need to get someone to eat your tasty new berries.


Example 2: Dino Attack Effect

Note: In order to apply a buff to a dino's attack, one must locate the associated dino's Damage Type files. You can easily find them by searching the dino's Attacks on the Defaults tab. This example does so with the Dilo and its relevant files.

  1. In the PrimalEarth folder, search for "Dilo Character" and create a child of the Dilo_Character_BP file in your mod folder. Full original path is PrimalEarth/Dinos/Dilo. Rename the new file DirtyDilo_Character_BP.
  2. In the PrimalEarth folder, search for "ProjDilo" and copy ProjDilo file in your mod folder. Full original path is PrimalEarth/CoreBlueprints/Projectiles. Rename the new file ProjDirtyDilo.
  3. In the PrimalEarth folder, search for "DiloSpit" and copy DmgType_Melee_Dino_Carnivore_Small_DiloSpit file in your mod folder. Full original path is PrimalEarth/CoreBlueprints/DamageTypes. Rename the new file DmgType_Melee_Dino_Carnivore_Small_DirtyDiloSpit.
  4. Double-click your DmgType_Melee_Dino_Carnivore_Small_DirtyDiloSpit file to open.
  5. Search for "Buff". Change "Buff to Give Victim Character" to your Oopsies buff.BuffTutorial-Dino1.jpg
  6. Double-click your ProjDirtyDilo file to open.
  7. Select the "Show Only Modified Properies" option (by clicking the Eye icon in the upper right).
  8. Under Effects>WeaponConfig, change "Direct Damage Type" to your new DmgType_Melee_Dino_Carnivore_Small_DirtyDiloSpit file.BuffTutorial-Dino2.jpg
  9. Double-click your DirtyDilo_Character_BP file to open.
  10. Search for "attack". Under "Attack Infos" know that the second attack (aka 1) is the spit, so that's the one we'll be editing.
  11. Under Attack Info 1 change the "Projectile Class" to your new ProjDirtyDilo file.BuffTutorial-Dino3.jpg


Example 3: Weapon Effect

Note: In order to apply a buff to a weapon attack, one must locate the associated weapon's Damage Type files. You can find them by searching the weapon's Weapon Template on the Defaults tab, then searching that file's Defaults for its Damage Type. This example does so with the Shotgun and its relevant files.

  1. In the PrimalEarth folder, search for "WeaponShotgun" and copy PrimalItem_WeaponShotgun file in your mod folder. Full original path is PrimalEarth/CoreBlueprints/Weapons. Rename the new file PrimalItem_WeaponShatgun.
  2. In the PrimalEarth folder, search for "WeapSawedOffShotgun" and copy WeapSawedOffShotgun file in your mod folder. Full original path is PrimalEarth/CoreBlueprints/Weapons. Rename the new file WeapSawedOffShatgun.
  3. In the PrimalEarth folder, search for "ShotgunBullet" and copy PrimalItemAmmo_SimpleShotgunBullet file in your mod folder. Full original path is PrimalEarth/CoreBlueprints/Weapons. Rename the new file PrimalItemAmmo_ShatgunBullet.
  4. In the PrimalEarth folder, search for "Torpidity_StoneWeapon" and copy DmgType_Melee_Torpidity_StoneWeapon file in your mod folder. Full original path is PrimalEarth/CoreBlueprints/DamageTypes. Rename the new file DmgType_Melee_Torpidity_Shatgun.
  5. Double-click your DmgType_Melee_Torpidity_Shatgun file to open.
  6. Search for "Give". Change the "Buff to Give Victim Character" to your Oopsies buff.BuffTutorial-Weapon1.jpg
  7. Double-click your WeapSawedOffShatgun file to open and select the "Show Only Modified Properties" option in the Defaults tab.
  8. Under WeaponSawedOffShatgun header, Change the "Weapon Ammo Item Template" to point to your new PrimalItemAmmo_ShatgunBullet file.BuffTutorial-Weapon2.jpg
  9. Under Config header and Instant Config, change the "Damage Type" to point to your new DmgType_Melee_Torpidity_Shatgun file.BuffTutorial-Weapon2b.jpg
  10. Double-click your PrimalItem_WeaponShatgun file to open and select the "Show Only Modified Properties" option in the Defaults tab.
  11. Change "Weapon Template" to point to your new WeapSawedOffShatgun file.BuffTutorial-Weapon3.jpg


Example 4: Graphing

You can add a buff directly through any blueprint's graph. The node which does so is the "Static Add Buff". To find it, just right click on the graph and search for "Static Add Buff".

BuffTutorial-StaticAddBuff.jpg