Aller au contenu

Photo

Basic Q. Changing backstab script to include ranged attacks.


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

#1
Akimb0

Akimb0
  • Members
  • 299 messages
Hi, I found out that the mod which changed bows (Better Archery) was removed after two modders had a kiddie fight over "who copied who".

So I looked into it myself, please remember, I'm not a scripter and consider myself a total novice at modding DA. 

Anyway I found this in the "combat_h_nns" script (Thanks DA Wikia!):

if (nAttackType == ATTACK_TYPE_MELEE) {
  if (nAbility == 0 && Combat_CheckBackstab (oAttacker, oTarget, oWeapon, fFlanking)) {
    nRet = COMBAT_RESULT_BACKSTAB;
  }
}

I assume I need to change nAttackType to include ranged attacks, but I don't know the Variables the toolset uses etc. or even if I change the script, how to save it as a mod. More importantly am I right in my assumption that the change needs to be made there, or am I walking blindly in the dark so to speak?


p.s. do we have no [.code] [./code] tags? they don't show up in the post, but they're there....they just seem to do nothing.

Modifié par Akimb0, 06 janvier 2010 - 01:34 .


#2
Dutch Master

Dutch Master
  • Members
  • 9 messages

Akimb0 wrote...
but I don't know the Variables the toolset uses etc. or even if I change the script, how to save it as a mod. 

I haven't done any scripting yet, but have you tried ATTACK_TYPE_RANGED ?
Can't answer your other questions.




p.s. do we have no [.code] [./code] tags? they don't show up in the post, but they're there....they just seem to do nothing.

They make the text monospace.

#3
Red.Murder1

Red.Murder1
  • Members
  • 38 messages
did you try just changing

this



if (nAttackType == ATTACK_TYPE_MELEE)



to



if (nAttackType == ATTACK_TYPE_MELEE || nAttackType == ATTACK_TYPE_RANGE)



That might work, but I have worked with the toolset enough to know