Jump to content


Equipment shattering


  • Please log in to reply
86 replies to this topic

#41 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 31 August 2005 - 07:17 AM

Flame me for wasting my time (well, don't actually, because its against forum rules, but you can say so anyway), but here are some preliminary results for SHORT SWORD shattering in BG1. This was prepared by starting a new game, getting to Gorion's death, making a quicksave after Imoen joined, editing Player1 to have 10000 HP, making Imoen have THAC0=0, haste, and number of attacks=5, spawning lots of short swords (SW1H07), quick-saving for a later load, and literally counting while hitting away until the weapon shattered. The upper limit was 501 hits, counted as 501+, and this was accompanied with loading the quick-save.

Currently, 50 weapon shatterings have been recorded.

n=50 attempts
sum of frequencies=8377 hits
mean=167.54 (although the really high counts greatly distort this figure)
median=133 (a much better statistic to use)
stddev=134.4765 (that is huge variation)

The median currently gives a weapon shattering probability of 0.75%, which means 5% is extremely likely to be way too high (good news?).

Accompanied are some graphs in which hits are grouped into classes of 100, 50, and 80. Class80 is the best graph, as it avoids too much distribution and too much clumping together. A cumulative histogram has also been constructed that illustrated where the median lies, i.e. between 81 and 160. Finally, a chronological graph of each attempt to shatter the short sword is shown. A line of best fit is included to check for consistency, which slightly increases in the number of hits at the moment. Gawk away!

First50.jpg

More to come.

Edited by Ascension64, 31 August 2005 - 07:23 AM.

--------------
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)


#42 Arturcic

Arturcic
  • Member
  • 119 posts

Posted 31 August 2005 - 07:27 AM

This reminds me how much I hated "statistics and probability" in high school....
Anyway, great job, man. :coolthumb: That's the way to uncover David Geider's deepest secrets... :bi:

Edited by Arturcic, 31 August 2005 - 07:29 AM.


#43 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 31 August 2005 - 08:14 AM

Ascension64, on Aug 31 2005, 06:07 PM, said:

Flame me for wasting my time (well, don't actually, because its against forum rules, but you can say so anyway), but here are some preliminary results for SHORT SWORD shattering in BG1


:coolthumb:

So, I believe in science... :P 5% is too high. And I guess you know what to do... :)
Currently all those items (weapons) have their 'Set local variable' effect working witgh Probability 1 = 5, and Prob.2 = 0. I suggest to try some combination somewhere in the middle of 100% range.
For example - from 33 to 35 (triggering 2% hole)... That could help even with a poor random generator....

Btw, there's a 3% shattering threshold for armor (DPLAYER2,3.BCS)...

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#44 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 31 August 2005 - 08:17 AM

King Diamond, on Aug 31 2005, 07:04 PM, said:

Ascension64, on Aug 31 2005, 06:07 PM, said:

Flame me for wasting my time (well, don't actually, because its against forum rules, but you can say so anyway), but here are some preliminary results for SHORT SWORD shattering in BG1


:coolthumb:

So, I believe in science... :P 5% is too high. And I guess you know what to do... :)
Currently all those items (weapons) have their 'Set local variable' effect working witgh Probability 1 = 5, and Prob.2 = 0. I suggest to try some combination somewhere in the middle of 100% range.
For example - from 33 to 35 (triggering 2% hole)... That could help even with a poor random generator....

Btw, there's a 3% shattering threshold for armor (DPLAYER2,3.BCS)...

View Post



[ADDED] :) I forgot that ppl here still use a script-based shattering system... Is there any chance that anybody will try another one (LOCALs based)?

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#45 Promilus

Promilus
  • Member
  • 378 posts

Posted 31 August 2005 - 09:45 AM

Uhm....linear regresion is not my strong side :P
About tests: great job Ascension
About new system...do what u can, no one is forcing anyone to do it at script or locals...u are the modders-do what u want (but keep on mind us-players and do it good :P )
About all job u had done since I registered (and before)-Thank You!!!

#46 -Nihil-

-Nihil-
  • Guest

Posted 31 August 2005 - 01:20 PM

Ascension64, on Aug 31 2005, 07:07 AM, said:

The median currently gives a weapon shattering probability of 0.75%, which means 5% is extremely likely to be way too high (good news?).


Hah! Told so! great news!

About the test: Man... You're a througly mofo that has won forever my admiration :clap: Well done!

#47 Marupal

Marupal
  • Member
  • 41 posts

Posted 31 August 2005 - 03:11 PM

Odd man out here. Played plain BG1 many times and never had anything break on me. Picked up a few items that were broken, but that was it. It always seemed cheesy with plows breaking, but never my weapons.
*Here poor little farmer guy, take my unbreakable sword and make a new plow out if it.*
5% is getting a little harsh. No sooner do you put a shield on Will Scarlet, than it breaks. Breakability should definately be there though, and on the annoying side. :P

#48 Sir BillyBob

Sir BillyBob
  • Modder
  • 5315 posts

Posted 31 August 2005 - 03:26 PM

Some of you people have way too much free time. Good job.

Tired of Bhaal? Try some classics mods instead:
Classic Adventures
Official Classic Adventures Website


#49 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 31 August 2005 - 05:25 PM

King Diamond, on Sep 1 2005, 03:07 AM, said:

King Diamond, on Aug 31 2005, 07:04 PM, said:

Ascension64, on Aug 31 2005, 06:07 PM, said:

Flame me for wasting my time (well, don't actually, because its against forum rules, but you can say so anyway), but here are some preliminary results for SHORT SWORD shattering in BG1


:coolthumb:

So, I believe in science... :P 5% is too high. And I guess you know what to do... :)
Currently all those items (weapons) have their 'Set local variable' effect working witgh Probability 1 = 5, and Prob.2 = 0. I suggest to try some combination somewhere in the middle of 100% range.
For example - from 33 to 35 (triggering 2% hole)... That could help even with a poor random generator....

Btw, there's a 3% shattering threshold for armor (DPLAYER2,3.BCS)...

View Post



[ADDED] :) I forgot that ppl here still use a script-based shattering system... Is there any chance that anybody will try another one (LOCALs based)?

View Post

Well yes, BETA 4 will use the LOCAL system, although I'm reluctant for an ETA as of yet. Will 'soon' suffice?

Quote

Some of you people have way too much free time. Good job.

More time hitting, less time modding... Done for the people SBB. Else I would have fixed some more bugs... :lol:

--------------
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)


#50 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 02 September 2005 - 04:35 AM

OK, it seems like I have been looking at the weapon shattering statistics in BG1 in a slightly incorrect way. The reason is, assuming that BG1 assigns a percentage chance per hit that the weapon will shatter, the statistic is governed by a binomial distribution of two conditions: shatter/not shatter. Therefore, the use of the mean, median, and standard deviation is invalid because they refer to the central tendency and the variance involved in a normal distribution (that is, a bell-shaped curve). For those of you unfamiliar with what a binomial distribution looks like, it is shown below (NB. here, n is the probability of the thing happening, unlike what is actually described below, so don't get confused by the use of n and x below):
Binomial.jpg
Basically, the highest percentage chance that a weapon will shatter is actually on the very first hit. This gradually reduces over time. When you group things into classes, like I have done with the SHORT SWORD shattering (because I just don't have enough attempts), you get columns decreasing in size. Therefore, all I need to do is sum up the probability of 1 to x, where x is my class size (e.g. if my class size is 60, then I sum up all the binomial probabilities from the weapon shattering in 1 to 60 hits) to get the first column, then the next class size for the second column, and so on till my limit, which is 500+. Then, I need to adjust the probability of the weapon shattering per hit so that they match the results I obtained while testing.

The formula for binomial probability is P(x)=x*(1-x)^(n-1). Basically this means the weapon shatters on the nth hit (x) AND (*) the weapon does not shatter on all previous (n-1) hits ((1-x)^(n-1)). Adjusting x to give probabilities similar to my results gives the probability that the weapon will shatter. Bingo!

So, I have done 150 weapon shatterings, and here are the results...*drumroll*...

number of attempts (n) = 150
total number of hits (sum of frequencies) =26058 :o
150.jpg
Class60 is actually the best graph, with the columns gradually getting smaller. Again, consistency was checked for with the chronological graph, and there isn't much of a gradient (m=0.122), meaning that we are getting pretty spot on with the results.

Now...to fit the class60 graph with a binomial distribution (the maths which I will not show here), you need a probability of the weapon shattering equal to 0.46%, or roughly...

0.5%.

So, BGT-WeiDU BETA 4 and onwards will attempt to implement an 0.5% weapon/armour/shield shattering probability. Case closed.

Edited by Ascension64, 02 September 2005 - 04:36 AM.

--------------
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)


#51 Promilus

Promilus
  • Member
  • 378 posts

Posted 02 September 2005 - 04:46 AM

Ascension64, on Sep 2 2005, 01:25 PM, said:

So, BGT-WeiDU BETA 4 and onwards will attempt to implement an 0.5% weapon/armour/shield shattering probability.  Case closed.

View Post

So close the topic too...

#52 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 02 September 2005 - 05:06 AM

Promilus, on Sep 2 2005, 11:36 PM, said:

Ascension64, on Sep 2 2005, 01:25 PM, said:



So, BGT-WeiDU BETA 4 and onwards will attempt to implement an 0.5% weapon/armour/shield shattering probability.  Case closed.

View Post

So close the topic too...

View Post

Well, no. If people want to ask questions or discuss, they can do it here. And I did say ATTEMPT, so I won't really close the topic until it is done.

--------------
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)


#53 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 02 September 2005 - 05:32 AM

Ascension64, on Sep 2 2005, 03:56 PM, said:

Well, no.  If people want to ask questions or discuss, they can do it here.  And I did say ATTEMPT, so I won't really close the topic until it is done.

View Post


Set it to 1%. It's simplier and it will keep some nice annoying difficulty too.....

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#54 Arturcic

Arturcic
  • Member
  • 119 posts

Posted 02 September 2005 - 10:51 AM

I don't remember armors breaking in original BG1...

#55 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 02 September 2005 - 11:57 AM

Arturcic, on Sep 2 2005, 02:41 PM, said:

I don't remember armors breaking in original BG1...

View Post


They didn't.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#56 Arturcic

Arturcic
  • Member
  • 119 posts

Posted 03 September 2005 - 01:00 AM

Then, IMHO, the armor shattering should be seen as a tweak and implemented as "optional".

#57 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 03 September 2005 - 02:05 AM

Arturcic, on Sep 3 2005, 11:50 AM, said:

Then, IMHO, the armor shattering should be seen as a tweak and implemented as "optional".

View Post


Not agree. This is not BG1 game, this is BGT for BG2. It contains some additional features, changes etc. So plz consider armor shattering as one of them....

If iron is a sh&t why shouldn't armor be breakable if weapon is?

Edited by King Diamond, 03 September 2005 - 02:07 AM.

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#58 lodgey

lodgey
  • Member
  • 18 posts

Posted 03 September 2005 - 03:43 AM

Quote

If iron is a sh&t why shouldn't armor be breakable if weapon is?


A couple of reasons I can think of.

I'm not an expert in such things, but I believe that both armour and sheilds contain materials other than just iron or steel. A shield could be re-inforced with other metals (such as bronze) or wood, and I would expect to find something such as leather even in full plate armour (metal to prevent the blade going through and distribute the impact, and leather to cushion the impact on the wearer). By the way, how many shields are considered wooden? Due to an iron crisis, wooden shields should become more common, especially if their iron counterparts have to be made from such poor material.

When a sword breaks, it would be largely useless (unless you use the hilt as a very small club). If a suit of armour cracks, it doesn't become useless, just less efficient - especially when you consider the other materials mentioned above. You could make a case for more armor with -1 or -2 AC due to the iron crisis, but to destroy it altogether after a random number of hits seems too drastic.

Most importantly you have to weigh up the impact on gameplay. A sword or axe can be replaced during battle, and spares can be caried by the group. Even if you have no spares, weapons can be swaped between the group so a weaker fighter pulls out a bow and gives his sword to a better fighter who has just lost one. Losing a weapon is definitely irritating, but hardly fatal - which is as it should be.

If your armour shatters during battle, however, you have more of a problem. Baisc non-magical armour is heavy and more expensive than basic non-magical weapons, and so does not lend itself so easily to carying spares. Even if you do happen to have spares, you cant put on armour during the current battle. If your lead fighter looses his plate mail at the beginning of a particularly large battle, he has to either face the rest of the battle unarmored or your entire party has to turn tail and run, just so your fighter can get something to wear.

This makes the impact of shattering armour much greater than shattering weapons. While I understand you wanting to implement it, at the very least it should be optional. Of course, reducing the chance of shattering reduces the impact on armour as well, so this may not be too much of a problem in the next version.


This has been much longer than I expected it to be. I don't want to come across as overly critical (you guys have done very well), I am just trying to answer a point.

#59 -Nihil-

-Nihil-
  • Guest

Posted 03 September 2005 - 04:14 AM

Nice explained, and i couldnt agree more. I even said said something similar before, tough not so well. (and, yeah, medieval shields were made basicaly of wood)

#60 NiGHTMARE

NiGHTMARE
  • Member
  • 2328 posts

Posted 03 September 2005 - 04:32 AM

Simple solution: wear non-metal and/or magical armor :). Seriously though, Leather Armor +1, Leather Armor +2, Studded Leather +1, Studded Leather +2, Shadow Armor, Chainmail +1, Chainmail +2, not to mention various magical shields, items of protection, etc are all available relatively early in the game.

Having said that, as I hinted in a previous post, it might be an idea to implement things like bronze armor, leather helmets, and indeed wooden shields. BTW it should be noted that Baldur's Gate is fantasy fiction, not medieval history.