Anyone found out what field creates the backstab flag on a character? In other words, if I create a custom class or specialization, how do I flag the character so that they always backstab when flanking, the same as a rogue.
I want to create a class that can use magic and still backstab.
Backstab flag
Débuté par
HenryBoy01
, janv. 02 2010 02:22
#1
Posté 02 janvier 2010 - 02:22
#2
Posté 02 janvier 2010 - 02:52
I answered my own question. Thought I would post in case anyone else is interested.
The script you want is combat_h under Core_Includes
Here's the code you're looking for:
// Only rogues get the full positional benefits on the battlefield,
// everyone else gets halfa
float fclassModifier = GetCreatureCoreclass(oAttacker) == class_ROGUE?1.0f:0.5f;
float fclassModifier = GetCreatureCoreclass(oAttacker) == class_(YOUR class NAME HERE)?1.0f:0.5f;
return fFactor * fMaxModifier * fclassModifier;
}
// -----------------------------------------------------------------------------
// Check if backstab conditions are true
// -----------------------------------------------------------------------------
int Combat_CheckBackstab(object oAttacker, object oTarget, object oWeapon, float fFlankingBonus)
{
// -------------------------------------------------------------------------
// If we we are a rogue
// -------------------------------------------------------------------------
if (!HasAbility(oAttacker, ABILITY_TALENT_HIDDEN_ROGUE))
{
return FALSE;
}
if (!HasAbility(oAttacker, ABILITY_TALENT_(YOUR class NAME HERE))
{
return FALSE;
}
If you follow the create a custom class tutorial you'll set up the class names you need to insert there. It was working great for me. Hope that helps!
The script you want is combat_h under Core_Includes
Here's the code you're looking for:
// Only rogues get the full positional benefits on the battlefield,
// everyone else gets halfa
float fclassModifier = GetCreatureCoreclass(oAttacker) == class_ROGUE?1.0f:0.5f;
float fclassModifier = GetCreatureCoreclass(oAttacker) == class_(YOUR class NAME HERE)?1.0f:0.5f;
return fFactor * fMaxModifier * fclassModifier;
}
// -----------------------------------------------------------------------------
// Check if backstab conditions are true
// -----------------------------------------------------------------------------
int Combat_CheckBackstab(object oAttacker, object oTarget, object oWeapon, float fFlankingBonus)
{
// -------------------------------------------------------------------------
// If we we are a rogue
// -------------------------------------------------------------------------
if (!HasAbility(oAttacker, ABILITY_TALENT_HIDDEN_ROGUE))
{
return FALSE;
}
if (!HasAbility(oAttacker, ABILITY_TALENT_(YOUR class NAME HERE))
{
return FALSE;
}
If you follow the create a custom class tutorial you'll set up the class names you need to insert there. It was working great for me. Hope that helps!
#3
Posté 02 janvier 2010 - 05:47
Is there a script that can cause different items to change the size of the flanking zone?
I'd like to be able to set fully enclosed helms (IE the Templar helm) to drastically increase the size of the flanking area.
I'd like to be able to set fully enclosed helms (IE the Templar helm) to drastically increase the size of the flanking area.
#4
Posté 06 janvier 2010 - 01:34
there is a passive ability (combat movement) that shows you the modifier for flanking zone on ABI. You could probably figure out the modifiers from that.
#5
Posté 23 septembre 2011 - 03:13
How do you compile combat_h after you edit it?
[Edit] Tried doing an Export all Resources of this Type, and that didn't seem to work. Tried recompiling player_core and creature_core with the function updated in combat_h and that didn't work. The only thing that got my character the ability to backstab was giving him the HIDDEN_ROGUE ability.
Figured this out. I had to recompile the "rules_core" script. Hmmm... hope that file in the toolset is current.
[Edit] Tried doing an Export all Resources of this Type, and that didn't seem to work. Tried recompiling player_core and creature_core with the function updated in combat_h and that didn't work. The only thing that got my character the ability to backstab was giving him the HIDDEN_ROGUE ability.
Figured this out. I had to recompile the "rules_core" script. Hmmm... hope that file in the toolset is current.
Modifié par Obadiah, 25 septembre 2011 - 04:28 .





Retour en haut






