PDA

View Full Version : [FF2] Crit mod help


SmackDaddy
10-01-2012, 21:42
We have a crit mod plugin we use (to increase the crit rate).....we'd love to continue using it, but disable the extra crits for the bosses.....is there anyone here who knows how we could get that to happen or could check the code out and modify it for us? Strapped for cash at the moment, but could potentially drum up some donations from my community to pay someone to do this....thanks in advance.

MasterOfTheXP
10-01-2012, 22:36
You could probably just modify it so that players with >500 health aren't affected.

SmackDaddy
10-01-2012, 22:44
Well, therein lies the issue. I don't know sourcepawn. :( Not sure what to come up with but if someone did some code to check for that and tell me where to put it in the .sp file, I'll try it out!!!!

Crit mod I use: http://forums.alliedmods.net/showthread.php?t=69743

(and thanks for the suggestion MasterOfTheXP)

MasterOfTheXP
10-01-2012, 23:54
This oughta do it. Granted, it's not the best method, as if the boss's health goes below 500, they'll get the crits...but that way it could be classified as an Equalizer-type attribute: tons of crits at extremely low health.

The define at the top (BOSS_HEALTH) is there if you wanna change it.

BBG_Theory
10-02-2012, 07:46
Well, therein lies the issue. I don't know sourcepawn. :( Not sure what to come up with but if someone did some code to check for that and tell me where to put it in the .sp file, I'll try it out!!!!

Crit mod I use: http://forums.alliedmods.net/showthread.php?t=69743

(and thanks for the suggestion MasterOfTheXP)
SmakDaddy, the whatever.sp is the open source ( noncompiled) plugin. It goes in the scripting folder and is only there for viewing, posibly editing, and compiling of the plugin. If you are going to do none of these things, it is not needed. The whatever.smx is the compiled whatever.sp that goes in the plugins folder

SmackDaddy
10-02-2012, 15:22
Understood the files and structure -- when I said "where to put it in the .sp file -- I was referring to someone writing the code for me to put in the .sp file and then compile it myself -- but MasterOfTheXP went the extra step and just modified the file for me!

Powerlord
10-02-2012, 15:32
Crit Mods don't work that well with FF2 because FF2 does a lot of its own crit management... although, as I recall, Taunt Crits was redone to fix issues with it and VSH/FF2.

I'd have to check, but FF2 may already block boss crits via the TF2_CalcIsAttackCritical callback. If it doesn't now, I can almost guarantee you it will in the future seeing as how I have this code sitting in front of me right now:
public Action:TF2_CalcIsAttackCritical(client, weapon, String:weaponname[], &bool:result)
{
if (!GetConVarBool(g_Cvar_Crits) && IsBoss(client))
{
result = false;
return Plugin_Changed;
}

return Plugin_Continue;
}

Huntereb
10-02-2012, 15:48
Isn't there a cvar for FF2 that already blocks boss crits? I remember my users telling me to disable it because some bosses could insta-kill a heavy.

Powerlord
10-02-2012, 16:08
Isn't there a cvar for FF2 that already blocks boss crits? I remember my users telling me to disable it because some bosses could insta-kill a heavy.
Yes, ff2_crits. I'm just not sure how it works internally and I don't have the 1.06 code in front of me at the moment.

SmackDaddy
10-02-2012, 17:20
Well, any and all help to block boss crits would be appreciated!!! whatever is the best or most efficient way....currently we have crits.smx loaded and the crits work.....we just need it blocked for the bosses, as they get the additional crits as well.

Thanks again folks!

Chaosxk
10-02-2012, 19:54
Try this version,

Cvars:
sm_crits_enabled 1
sm_crits_chance "0.00 - 1.00"
sm_crits_team "2 - Red 3 - Blue 0 - Disabled"

Since this is for Saxton/FF2, setting sm_crits_team to 2 should only give the crits chance to red team only. Blue team (Boss) will not get crits if this is set to 2.

Only tested on a regular server, IDK if this will conflict with saxton/ff2.

SmackDaddy
10-02-2012, 20:18
So is the boss in FF2 *ALWAYS* on blue? If so, then cool chaosxk, thanks. We'll check this out.

Chaosxk
10-02-2012, 20:33
If you set
sm_crits_team 2
Then only Red team will have the random crits effect.

If you set
sm_crits_team 3
Then only Blue team will have the random crits effect.

Since you only want red team to have crits and not the boss(blue team), you would leave it as "2"

SmackDaddy
10-02-2012, 21:24
Which is why I asked if the boss was always on blue in FF2....I wasn't sure as I know VSH may operate differently than FF2....

Currently I have it set to 2, thank you.

Chaosxk
10-02-2012, 21:48
I know Hale is always blue on FF2. As for Saxton, it should be the same.

Powerlord
10-03-2012, 08:55
While Bosses are always BLU on vsh_ maps, on every other kind of map the bosses only start on BLU. There's a 50% chance of the Bosses switching teams after 3 rounds (and due to a bug in FF2, every round after until it's switched, at which point there's a 50% chance after another 3 rounds, etc...).

VSH 1.39 added a cvar to force the boss to a specific team on all maps, but FF2 doesn't have such a cvar at the moment.

Huntereb
10-03-2012, 09:26
I've never seen that bug before, I guess it only does this on non-arena maps?

Powerlord
10-03-2012, 14:15
I've never seen that bug before, I guess it only does this on non-arena maps?
FF2 switching the boss team on non vsh_ maps isn't a bug, it's operating as intended (and documented in the first post in the FF2 thread). I think it's because only vsh_ maps are designed with asymmetric spawns (RED spawns in spawn rooms, BLU spawns are placed randomly around the map). arena_sawmill and the like are one of the major reasons this feature exists, as Sawmill is not a symmetric arena map.

SmackDaddy
10-03-2012, 17:01
Dang.....well, then the first mod may work best then, when it checks for health. At least until there is a cvar to force the boss on blue with FF2. Thanks for that Powerlord, I appreciate you pointing that out.

Chaosxk
10-03-2012, 20:57
Now that you mention it, i did see my server get bugged once and Hale was on red team while the rest was on blue.

Could it be possible that some maps have a entity that changes the team every few rounds? (I don't remember the name of the entity)

Powerlord
10-03-2012, 23:15
Now that you mention it, i did see my server get bugged once and Hale was on red team while the rest was on blue.

Could it be possible that some maps have a entity that changes the team every few rounds? (I don't remember the name of the entity)

I already explained when that happens.

While Bosses are always BLU on vsh_ maps, on every other kind of map the bosses only start on BLU. There's a 50% chance of the Bosses switching teams after 3 rounds (and due to a bug in FF2, every round after until it's switched, at which point there's a 50% chance after another 3 rounds, etc...).

VSH 1.39 added a cvar to force the boss to a specific team on all maps, but FF2 doesn't have such a cvar at the moment.

Would you like me to post the actual code in FF2 that does this?

new OtherTeam=2;
new BossTeam=3;

// in event_round_start:
new bool:bBluBoss;
if (!StrContains(currentmap, "vsh_") || !StrContains(currentmap, "zf_")) bBluBoss = true;
else
{
if (RoundCounter >= 3 && GetRandomInt(0, 1))
{
bBluBoss = (BossTeam != 3);
RoundCounter = 0;
}
else
bBluBoss = (BossTeam == 3);
}
if (bBluBoss)
{
new score1 = GetTeamScore(OtherTeam);
new score2 = GetTeamScore(BossTeam);
SetTeamScore(2,score1);
SetTeamScore(3,score2);
OtherTeam = 2;
BossTeam = 3;
}
else
{
new score1 = GetTeamScore(BossTeam);
new score2 = GetTeamScore(OtherTeam);
SetTeamScore(2,score1);
SetTeamScore(3,score2);
BossTeam = 2;
OtherTeam = 3;
}