View Single Post
Author Message
NoloZero01
Member
Join Date: May 2020
Location: Async Research Institute
Old 06-02-2020 , 07:01   [Updated] Boss Custom Attribute Adapter
Reply With Quote #1

This plugin allows Freak Fortress bosses to have custom attributes applied to their weapons via configuration files.
Works with spawn-in weapons (specified with weaponX) and weapons received at any point in the game (for example with rages). Weapon Index sections can contain multiple attributes.


Usually you would need to write boss abilities to change how weapons behave. This simplifies the process and instead applies custom attributes that use the Custom Attributes Framework by nosoop.

Installation:

Code:
  1. - Install TF2 Custom Attribute Framework .
  2. - Put the plugin into your addons/sourcemod/plugins/ folder and load it. There is no need to rename it into .ff2.
  3. - Install your desired custom attributes. You can write your own or use the ones listed at Custom Attribute Public Sets.

Now you can open your boss configuration file and add your desired custom attributes. Add the following structure inside the root "characters" section (alongside weaponX, abilityX etc).

Code:
           "Custom Attributes"
	{
		"Weapon Index" //weapon index that the boss might get
		{
			"custom attribute" "value"
		}
		"Weapon Index"  //weapon index that the boss might get
		{
			"custom attribute" "value"
		}
		...
	}
Now whenever the boss receives a weapon with the corresponding index, all specified custom attributes will be added to it.
If you wish to see debug information from this plugin whenever it applies custom attributes to a boss, turn FF2's ff2_debug ConVar on.

Changelog:
  • 02-06-2020 - Initial release
  • 22.01.2022 - Version 2.0 released, (almost) full code rewrite, now can apply custom attrubutes to any weapons, not only ones that the boss spawns in with.

GitHub: https://github.com/Nolo001-Aha/ff2_c...ribute_adapter

Updated because I felt reponsible for making the mess that was ver. 1.0 public.

Plugin compiled and tested under SourceMod 1.10.0.6528 for Windows.
Attached Files
File Type: sp Get Plugin or Get Source (ff2_custom_attribute_adapter.sp - 67 views - 3.8 KB)
File Type: smx ff2_custom_attribute_adapter.smx (10.4 KB, 93 views)

Last edited by NoloZero01; 01-22-2022 at 16:35. Reason: GitHub
NoloZero01 is offline