View Single Post
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 02-09-2016 , 09:13   [Subplugin] Kill Icon Modifier (v0.4)
Reply With Quote

Kill Icon Modifier (v0.4)

Description:
This is the second subplugin I have ever made so far for Freak Fortress 2. This is a simple plugin, which changes the kill notification. I have created this subplugin specially for Saxton Hale. In VS Saxton Hale mode, the hale has fists kill icon, but in FF2 the kill icon is a shovel. The plugin is customizable and can be used for other bosses, too.

How to use:
The plugin has 5 modes:
And yes, the modes start from zero

Mode 0:
The kill icon will be changed, if the weapon's item definition index matches those specified item definition index in the config.
Note: Doesn't work with sentry kills!

HTML Code:
"ability6"
	{
		"name" "ff2_changekillicon"     // Ability name
		"arg1"	"0"                         // The mode this plugin works. Here it's mode 0.
		"arg2"  "5"                               // Matching item definition index
		"arg3"  "fists"                          // The kill icon, which will appear
		"plugin_name"	"ff2_killicon"    //Plugin name
	}
Mode 1:
The kill icon will be change by specified weapon slot.
Note: Doesn't work with sentry kills!
HTML Code:
"ability6"
	{
		"name" "ff2_changekillicon"     // Ability name
		"arg1"	"1"                         // The mode this plugin works. Here it's mode 1.
		"arg2"  "2"                               // Slot of the weapon
		"arg3"  "fists"                          // The kill icon, which will appear
		"plugin_name"	"ff2_killicon"    //Plugin name
	}
Mode 2:
The kill icon will be changed, if the kill weapon in the event matches those in the config
HTML Code:
"ability6"
	{
		"name" "ff2_changekillicon"     // Ability name
		"arg1"	"2"                         // The mode this plugin works. Here it's mode 2.
		"arg2"  "shovel"                      // If the weapon matches, it will be replaced by fists
		"arg3"  "fists"                          // The kill icon, which will appear
		"plugin_name"	"ff2_killicon"    //Plugin name
	}
Mode 3:
All kills, made by the boss, will use this kill icon
HTML Code:
"ability6"
	{
		"name" "ff2_changekillicon"     // Ability name
		"arg1"	"3"                         // The mode this plugin works. Here it's mode 3.
		"arg2"  "fists"                          // The kill icon, which will appear.
		"plugin_name"	"ff2_killicon"    //Plugin name
	}
Mode 4:
There will be no kill notice
HTML Code:
"ability6"
	{
		"name" "ff2_changekillicon"     // Ability name
		"arg1"	"4"                         // The mode this plugin works. Here it's mode 4.
		"plugin_name"	"ff2_killicon"    //Plugin name
	}
Example:
This the config of Saxton Hale using this subplugin to change his kill icon from "shovel" to "fists".
Spoiler

And this is RubberFruit, using this subplugin to change his kill icon from "shovel" to "fists".
Spoiler


Pictures:
Spoiler

Installation:
0. To upgrade, just download the precompiled binary and replace the previous file(Don't forget to rename the file with extension ".ff2")!
1. Download the precompiled file(or download the source code file and compile it yourself)
2. Move the files into the freaks folder inside the plugins folder
3. Rename the files from ff2_killicon.smx to ff2_killicon.ff2
4. Restart the server or change the map

Bugs:
  • Mode 1 doesn't work as expected. The problem is that player_death event doesn't provide the entity index of the weapon used for killing the player. Without it, the subplugin can't find the weapon slot, where the weapon is. I will try to fix it! Actually, mode 1 doesn't work at all. Maybe fixed!
  • Sentry kills icon replace with mode 0 and 1 doesn't work at the moment. This is because object_destroyed event not giving entity index of the weapon used for destruction of the building. I will find a way to fix this using OnTakeDamageAlivePost hook.

Version history:
Spoiler



Sorry, if there are grammatical mistakes in the post. Correct me!

Feedback is welcomed!


Downloads:
Attached Files
File Type: smx ff2_killicon.smx (13.8 KB, 795 views)
File Type: sp Get Plugin or Get Source (ff2_killicon.sp - 631 views - 6.7 KB)

Last edited by Naydef; 03-13-2016 at 08:26. Reason: Cleanup for v0.5
Naydef is offline