Aller au contenu

Photo

Backstab flag


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
HenryBoy01

HenryBoy01
  • Members
  • 5 messages
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.

#2
HenryBoy01

HenryBoy01
  • Members
  • 5 messages
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!

#3
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
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.

#4
HenryBoy01

HenryBoy01
  • Members
  • 5 messages
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
Obadiah

Obadiah
  • Members
  • 5 718 messages
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.

Modifié par Obadiah, 25 septembre 2011 - 04:28 .