Jump to content


Photo

Interesting research on attacks in the round


  • Please log in to reply
26 replies to this topic

#1 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 08 April 2012 - 04:41 AM

I've been looking carefully at how attacks are determined using the RNDBASE#.BMP files in conjunction with the binary code. We have some rather interesting (and skewed) results.

The first row represents the nth attack in the round. The first column represents the number of attacks a creature has in the round.
<table border="1"><tr><td></td><td>1st</td><td>2nd</td><td>3rd</td><td>4th</td><td>5th</td></tr>
<tr><td>1</td><td>Ar</td><td>n</td><td>n</td><td>n</td><td>n</td></tr>
<tr><td>2</td><td>Ar</td><td>Al</td><td>n</td><td>n</td><td>n</td></tr>
<tr><td>3</td><td>Ar</td><td>Ar</td><td>Al</td><td>n</td><td>n</td></tr>
<tr><td>4</td><td>Ar</td><td>Ar</td><td>Ar</td><td>Al</td><td>n</td></tr>
<tr><td>5</td><td>Ar</td><td>Ar</td><td>Ar</td><td>Ar</td><td>Al</td></tr>
<tr><td>0.5</td><td>0.5Ar</td><td>n</td><td>n</td><td>n</td><td>n</td></tr>
<tr><td>1.5</td><td>Ar</td><td>0.5Ar</td><td>n</td><td>n</td><td>n</td></tr>
<tr><td>2.5</td><td>Ar</td><td>Al</td><td>0.5Ar</td><td>n</td><td>n</td></tr>
<tr><td>3.5</td><td>Ar</td><td>Ar</td><td>Al</td><td>0.5Ar</td><td>n</td></tr>
<tr><td>4.5</td><td>Ar</td><td>Ar</td><td>Ar</td><td>Al</td><td>0.5Ar</td></tr></table>

A = an attack is made
n = no attack is made (obviously because the nth attack won't exist for a certain m number of attacks)
r = right hand attack
l = left hand attack
0.5 = 50% probability of an attack

There are a few things to note:
  • Attacks are heavily biased towards the right hand. In an integer number of attacks, only one left-handed attack is made per round. For 1 attack per round only, the left hand is never used. In a non-integer number of attacks, the similar is the case. For 0.5 and 1.5 attacks per round, the left hand is never used.
  • The 0.5 attacks are a statistical probability (this is implemented as a rand(2) in the code). This means that if you are having a really lucky day, and knowing the random number generator isn't so good anyway, you could possibly roll the Heads on the coin and attack every round.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#2 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 08 April 2012 - 11:25 AM

Odd. Why did they use bitmaps instead of 2da tables for this?

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#3 10th

10th
  • Member
  • 621 posts

Posted 08 April 2012 - 11:38 AM

In an integer number of attacks, only one left-handed attack is made per round.


Isn't that part of the rules? Dual-wielding nets you one bonus attack with your left hand. Therefore it stands to reason that Al is only used if # of attacks is > 2.

10th
Avast! You cannot defeat our titan-mounted submarine staffed by cannibal vikings! - Nodwick

"I grab his deceased spirit and piledrive it back into his body, duplicating raise dead." - Psyren Oots board

#4 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 08 April 2012 - 03:34 PM

The biggest quirk I have with the attack system is that the animations hack-n-slash more often that they actually do a statistical attack (roll to hit, etc.). I've managed to tweak the RNDBASE system so that the creatures will only make an attack animation when they actually roll to hit. Combat looks much more like standing around that way, but it plays out more appropriately.

Isn't that part of the rules? Dual-wielding nets you one bonus attack with your left hand. Therefore it stands to reason that Al is only used if # of attacks is > 2.

You are correct. For reference, this is the quote from the DnD2E Revised Handbook.

The use of two weapons enables the character to make one additional attack each combat round, with the second weapon. The character gains only one additional attack each round, regardless of the number of attacks he may normally be allowed. Thus, a warrior able to attack 3/2 (once in the first round and twice in the second) can attack 5/2 (twice in the first round and three times in the second).

However, this doesn't explain the fact that someone with 3/2 attacks (because of something that reduced the number of attacks per round of a dual-wielder with normally 2 attacks per round) will never attack with the offhand. In fact, according to the rules, the attacker would normally have 1/2 attacks with one hand, with the offhand adding an extra 1 attack (hence, 1 offhand attack in the first round, and then 1 offhand and 1 main hand attack in the second). Or, at least if you think that 3/2 means 3 attacks in 2 rounds, one of those attacks should be with the offhand.

The random 50% probability of attack system is probably the major flaw. It would be have been easy to make a toggle boolean value that will alternrate whether the extra attack is made or not.

Edited by Ascension64, 08 April 2012 - 03:38 PM.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#5 Salk

Salk
  • Modder
  • 1411 posts

Donator

Posted 08 April 2012 - 03:42 PM

I think you have a point, Ascension64 (by the way, welcome back!)

Is there anything that ToBEx can do about it?

#6 aVENGER

aVENGER
  • Modder
  • 1680 posts

Posted 08 April 2012 - 08:06 PM

I've managed to tweak the RNDBASE system so that the creatures will only make an attack animation when they actually roll to hit. Combat looks much more like standing around that way, but it plays out more appropriately.


Awesome! :new_thumbs:

I wanted a tweak like that since I first played BG all those years ago. The cosmetic attacks serve no purpose but to confuse the player.

#7 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 08 April 2012 - 08:15 PM

Sure can. The question is what?
1. RNDBASE corrections - that requires no hacking, so a tweak mod can easily take this up.
2. 50% prob of 0.5 attack. This can be changed to use a toggle boolean instead. Needs hacking.
3. Dual-wield with 3/2 attacks. This can be changed so that one offhand attack is made every 2 rounds. Needs hacking.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#8 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 08 April 2012 - 08:51 PM

Sure can. The question is what?
1. RNDBASE corrections - that requires no hacking, so a tweak mod can easily take this up.
2. 50% prob of 0.5 attack. This can be changed to use a toggle boolean instead. Needs hacking.
3. Dual-wield with 3/2 attacks. This can be changed so that one offhand attack is made every 2 rounds. Needs hacking.

all three and let players choose :P

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#9 phordicus

phordicus
  • Member
  • 212 posts

Posted 08 April 2012 - 09:56 PM

#3. Hack away. There's already problems with randomization in effects & spells. I don't think luck should play any part in whether or not a bought-and-paid-for (half) attack is supposed to happen.

Edited by phordicus, 08 April 2012 - 09:56 PM.

Druid Kit Enhancements 1.0 (requires Dispel Magic fix, whether ToBEx's or Taimon's)

#10 Galactygon

Galactygon

    Modding since 2002

  • Member
  • 938 posts

Posted 09 April 2012 - 01:13 AM


I've managed to tweak the RNDBASE system so that the creatures will only make an attack animation when they actually roll to hit. Combat looks much more like standing around that way, but it plays out more appropriately.


Awesome! :new_thumbs:

I wanted a tweak like that since I first played BG all those years ago. The cosmetic attacks serve no purpose but to confuse the player.


Those many jabs serve a purpose: in PnP a combat round is meant to have several jabs, feints, and other combat moves in addition to one or more sincere attempts to hit the opponent.

-Galactygon
Posted Image

#11 aVENGER

aVENGER
  • Modder
  • 1680 posts

Posted 09 April 2012 - 01:36 AM

Those many jabs serve a purpose: in PnP a combat round is meant to have several jabs, feints, and other combat moves in addition to one or more sincere attempts to hit the opponent.


I know, but it looks silly in-game and feels confusing, at least to me.

A tweak to remove those cosmetic swings would be most welcome.

#12 Salk

Salk
  • Modder
  • 1411 posts

Donator

Posted 09 April 2012 - 04:40 AM

To me the cleanest solution looks like 1.

Second best, 3.

Surely not 2.

Edited by Salk, 09 April 2012 - 04:40 AM.


#13 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 09 April 2012 - 05:03 AM


Those many jabs serve a purpose: in PnP a combat round is meant to have several jabs, feints, and other combat moves in addition to one or more sincere attempts to hit the opponent.


I know, but it looks silly in-game and feels confusing, at least to me.

A tweak to remove those cosmetic swings would be most welcome.

#1 would definitely be a tweak, and probably won't be part of TobEx (since any old munchkin can make changes to the RNDBASE files). I find the "feints and jabs" very confusing, especially when I don't display attack roles. Makes me feel my character is so bad that he/she can only hit one out of 6 or 7 times (or more).

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#14 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 09 April 2012 - 05:25 AM

#1 would definitely be a tweak, and probably won't be part of TobEx (since any old munchkin can make changes to the RNDBASE files). I find the "feints and jabs" very confusing, especially when I don't display attack roles. Makes me feel my character is so bad that he/she can only hit one out of 6 or 7 times (or more).

yes, but the enemy is in the same boat too. as long as both sides behave the same and any adjustment is optional, doesn't really matter to me.

I do kinda find it odd when I SEE like 10 daggers thrown at me and the enemy only used 1 in actuality. Then again I think I'd feel even more odd with 'em just standing there waiting for that one swing they can take and do damage with..

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#15 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 10 April 2012 - 03:53 AM

Hence, cosmetic tweak...

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#16 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 10 April 2012 - 05:28 AM

I assume 2nd solution applies to both left and right hands, right? Go for it. We do have a d20 roll at the foundation of the DnD system to determine the success of an attack, fine with random determining whether it would launch at all.

I do kinda find it odd when I SEE like 10 daggers thrown at me and the enemy only used 1 in actuality.

I thought bonus swings only apply to melee headers? Because ranged attacks launch a projectile, and you can't just ignore it without additional coding to empty the PRO before sending it. Ingame observations show that too.

Edited by GeN1e, 10 April 2012 - 05:34 AM.

Retired from modding.


#17 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 10 April 2012 - 05:58 AM

re-read the thread GeN1e

There are actually TWO things being talked about

1) The off hand use
2) the animations between attacks

It's #2 that my post was talking about. Even ranged weapon users have 'fake attacks' just to make it look like they are fighting.
If #1 can be adjusted separately from #2 that would be great.

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#18 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 10 April 2012 - 10:12 AM

I've read and understood it fairly well :)

Even ranged weapon users have 'fake attacks' just to make it look like they are fighting.

And unless A64 proves me wrong, I'm saying it isn't true. Haven't you ever seen an archer to release a volley of arrows, then stand idle for the rest of the round?

In fact, years ago I was wondering why ranged attacks always hit, while melee ones miss half the time. Turned out to be due to fake melee swings.

Edited by GeN1e, 10 April 2012 - 10:17 AM.

Retired from modding.


#19 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 10 April 2012 - 12:09 PM

I mentioned THROWING DAGGERS specifically. Been testing a mod for Miloch and the creatures have throwing daggers. They're given a set of 10 throwing daggers. If I approach them and let them throw 'ten daggers' at me before killing them, when I loot their remains they typically have on average 8 daggers remaining.

A64 can delve further into it and determine which weapons are actually affected, if he so chooses. Could be all but launchers...

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#20 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 11 April 2012 - 01:07 AM

Launching ammo are all true attacks. Not sure about throwing daggers or things like throwing maces/axes that masquerade themselves as ranged weapons. I think the difference is that ammo needs a launcher, whereas throwing Xers are the ammo and the launchers themselves.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)