Raised This Month: $51 Target: $400
 12% 

FF2 Half-Zatoichi lethality


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
93SHADoW
AlliedModders Donor
Join Date: Jul 2014
Location: Houston, TX
Old 07-30-2014 , 16:42   Half-Zatoichi lethality
Reply With Quote #1

Originally, i was gonna release a variation of the Reimu boss i released wielding the half-zatoichi, but the one issue is that on a katana duel, a single hit from the enemy is lethal.

Already tried to use a few attribute modifiers without success, as it is still lethal.

What would be the best way to limit the half-zatoichi's duel crit damage, to that of the maximum crit damage it would normally do when not in a zatoichi duel? OnTakeDamage? SDKHooks?

Here's an example of what i mean about the duel kill's lethality to any boss that would wield the half-zatoichi:
93SHADoW is offline
Send a message via AIM to 93SHADoW Send a message via Skype™ to 93SHADoW
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 07-30-2014 , 17:02   Re: Half-Zatoichi lethality
Reply With Quote #2

Best way to find the answer is to find out how it works.
So start off with SDKHooking of OnTakeDamage and then print out the damagecustom var + damagetype var to server
__________________
WildCard65 is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 07-31-2014 , 01:29   Re: Half-Zatoichi lethality
Reply With Quote #3

Just set damagecustom to 0 andr eturn plugin changed when the boss gets hit by it.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-31-2014 , 10:48   Re: Half-Zatoichi lethality
Reply With Quote #4

What attribute changes have you tried? I haven't messed with the Zatoichi's attributes to check if they're display only.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Blinx
Senior Member
Join Date: Oct 2013
Old 07-31-2014 , 13:08   Re: Half-Zatoichi lethality
Reply With Quote #5

Quote:
Originally Posted by Powerlord View Post
What attribute changes have you tried? I haven't messed with the Zatoichi's attributes to check if they're display only.
A completely attributeless Zatoichi can still one-shot duel, pretty sure the mechanism is applied to it's item index.
Blinx is offline
sarysa
Senior Member
Join Date: Mar 2014
Old 07-31-2014 , 13:29   Re: Half-Zatoichi lethality
Reply With Quote #6

So I checked the zat real quick because it's easy for me to, and here's what I see:

22 attacked by 23 (infl=23) for 75369.000000 damage, flags 0xc101080, weapon 503, custom 20 force: 38.873569,-23981.736328,-935.304138 pos:143.289398,-2824.835449,-93.839355

So you have multiple clues there. The high damage, but you can't just use that. Custom is 20 and that is...
TF_CUSTOM_DECAPITATION
Not bothering with the flags in this example.

So what you need to do is to do is give your hale an OnTakeDamage SDKHook (remember to disable it after the round ends), check for damage hooks with damagecustom=TF_CUSTOM_DECAPITATION, and change the damage to 65.0. (crit damage is applied later)

Though I will say this, it'd be really wasteful to have a plugin that does just that.
__________________

Last edited by sarysa; 07-31-2014 at 13:35.
sarysa is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-31-2014 , 15:16   Re: Half-Zatoichi lethality
Reply With Quote #7

Quote:
Originally Posted by Blinx View Post
A completely attributeless Zatoichi can still one-shot duel, pretty sure the mechanism is applied to it's item index.
It might be worth a shot applying the Holiday Punch's attributes to it and seeing if they work.

Then again, if they do work that'd mean the boss would be stuck laughing instead...
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 07-31-2014 , 15:41   Re: Half-Zatoichi lethality
Reply With Quote #8

But (vsh) automatically undoes the stopping in place from laughing. (Dunno about ff2).

Also wouldn't the damagecustom always be decapitation, even if it's not zatoichi vs zatoichi? I'm pretty sure the sword is always like that. The only other surefire way is to just see if both players have a zatoichi.
__________________
Chdata is offline
sarysa
Senior Member
Join Date: Mar 2014
Old 07-31-2014 , 16:22   Re: Half-Zatoichi lethality
Reply With Quote #9

Quote:
Originally Posted by Chdata View Post
But (vsh) automatically undoes the stopping in place from laughing. (Dunno about ff2).

Also wouldn't the damagecustom always be decapitation, even if it's not zatoichi vs zatoichi? I'm pretty sure the sword is always like that. The only other surefire way is to just see if both players have a zatoichi.
Or you can go the "close enough" route. Checking for damage to be above, say, 130.0 (or 2x base melee damage) will cover -most- cases where a server has modified some sword weapons to do more than the base damage. Aside from the obvious case of the unheard of hale server where weapons with decapitation do over 130.0 base damage (390.0 crit), you'll also have the rare edge case where a zat could kill a 300 HP hale faster than expected. (though even that may not happen, since in my example the zat soldier did more than 2x the hale's existing health)

Another "close enough" check is on the weapon...get its entity classname and only act if the weapon is tf_weapon_katana. Only the zatoichi is of type katana and it'll cover future cases of festive zatoichi. Only thing that could go wrong is another katana being introduced into the game, but I'll bet it'll be restricted to zatoichi variants make it easier for festive and non-festive zatoichis to still have the duel feature.

(though TBH I believe the TFF 10x hale server has scotsman's skullcutter as a high damage decapitation weapon, but its speed penalty makes it unusable)
__________________

Last edited by sarysa; 07-31-2014 at 16:26.
sarysa is offline
sarysa
Senior Member
Join Date: Mar 2014
Old 07-31-2014 , 16:35   Re: Half-Zatoichi lethality
Reply With Quote #10

Anyway, here's what I'm talking about in code. You'd still need to add and remove the hooks yourself.

Code:
public Action:OnTakeDamageZatoichi(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon, Float:damageForce[3], Float:damagePosition[3], damagecustom)
{
	// this assumes you've only assigned this SDKHook to the boss
	if (damagecustom == TF_CUSTOM_DECAPITATION && IsValidEntity(weapon))
	{
		new String:classname[48];
		GetEntityClassname(weapon, classname, sizeof(classname));
		if (!strcmp(classname, "tf_weapon_katana") && damage > 130.0)
		{
			damage = 65.0;
			return Plugin_Changed;
		}
	}
	
	return Plugin_Continue;
}
__________________
sarysa is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode