Aller au contenu

Photo

Scripting the best for this?


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

#1
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
As part of Arms and Armor, I want to make different armor types stronger or weaker against different types of "penetration" damage. Looking through the 2DA files it appears that there already is a foundation for this. Three different types of armor penetration are referenced by weapons in the BITM_base spreadsheet: Cutting, Piercing and Blunt. However I'm NOT seeing anything to specify how armor reacts to these different types of penetration damage. As far as I can tell, penetration is penetration, regardless of the type.

What I WANT to be able to do is something like this, using mail as a reference:

On hit, if penetration type is cutting it resists 40% damage
On hit, if penetration type is piercing it resists 10% damage
On hit, if penetration type is blunt it resists 55% damage

These figures are entirely arbitrary and more just to give a sense of what I'm trying to do.

Since the game mechanics don't appear to provide any way to account for this, my first thought would be that a script could do it. Would this be possible, and if so is it going to be the most practical way about doing this? Also, what would be the best way to implement it? Should I make it part of the module script?

#2
Hoagsie

Hoagsie
  • Members
  • 101 messages
 From a scant review of the events list I believe you want to override the EVENT_TYPE_ATTACK_IMPACT event.

http://social.biowar...E_ATTACK_IMPACT

So, catch the event, put a switch on the event type and look for EVENT_TYPE_ATTACK_IMPACT. In there, do your armor worn and weapon used checking and adjust the damage as needed.

Modifié par Hoagsie, 02 décembre 2009 - 09:30 .


#3
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Ok, so would this be in an entirely seperate script from the module script? You're talking to a rank coding newbie, here. I'm lost without a step-by-step walkthrough on this stuff.



I'm assuming I'll also need to zero out any penetration outlined for weapons in the 2DA to prevent a conflict/overlap?

#4
TimelordDC

TimelordDC
  • Members
  • 923 messages
Don't the different types of weapons already have a armor penetration value?

Having this will, in effect, have 2 layers of damage calculation specific to armor penetration alone.



...or am I missing something here?

#5
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Timelord,



Yes, they already have armor penetration, but it doesn't appear that the game accounts for the different TYPES of penetration. The BITM_base 2DA outlines penetration types of cutting, piercing, and blunt, but AFAIK it doesn't actually mean anything.



Arms and Armor will be MAKING the penetration type mean something, and I'm just trying to figure out the best way to go about it.



I'm already expecting that if I do some sort of script-based penetration, that it will require zeroing out the penetration rating in the 2DA files.

#6
TimelordDC

TimelordDC
  • Members
  • 923 messages
For example, don't longswords (slashing) already do less armor penetration than daggers (piercing) which does less armor penetration than mauls (blunt)? Or, are you saying that armor penetration is broken in the game?



And in your first post (though you meant that as just an example), blunt weapons are far more effective against armor than slashing or piercing weapons - primarily due to the area of impact. Smaller (thinner) edges cannot penetrate armor; however, blunt weapons, due to the larger area of impact, can deliver harm even through the armor.


#7
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Timelord,



The armor penetration is not set by the TYPE of penetration. The rating is a set number specified in the 2DA files. IE, longswords and greatswords are both set to use "cutting" penetration, however greatswords have much higher penetration. I could easily make a greatsword more effective against armor than a mace just by jacking up its penetration rating. It has nothing to do with the TYPE.



And incidentally, piercing weapons are FAR more effective against a coat of mail because of the ease with which the links are separated.

#8
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
*Bump*



Does anyone have an example of how a modification to the Attack Impact script might look? Say in the case of the armor example I provided above?