polytope Posted October 16, 2022 Share Posted October 16, 2022 Or possibly those with only 1HD/level? In my most recent playthrough Xzar in BG2 got struck by lightning shortly after he appeared in the docks, until now I've only seen party members and enemies struck by lightning in outdoor maps (perhaps summons would be too, but they're usually not around for long). Xzar is the first neutral I've seen hit by it, but it got me thinking that most neutrals in maps are either small animals with 1 hd or are classed as innocents (who usually are also lvl 1 equivalent). Quote Link to comment
jmerry Posted October 16, 2022 Share Posted October 16, 2022 (edited) No, they are not. I've seen Drizzt get killed by lightning. (In that BG1 wilderness encounter) Edited October 16, 2022 by jmerry Quote Link to comment
polytope Posted October 17, 2022 Author Share Posted October 17, 2022 Drizzt in BG1 is classed as an innocent, but he's also high-level, which supports the idea of there being a HD cutoff or possibly even an animation restriction (as some are immune to knockback). Also, he shouldn't be killed by lightning unless he was already badly injured, usually from the party attacking him. Was he hostile when he was struck by lightning? Quote Link to comment
Quester Posted October 17, 2022 Share Posted October 17, 2022 14 hours ago, jmerry said: No, they are not. I've seen Drizzt get killed by lightning. (In that BG1 wilderness encounter) That's hilarious. He must have offended Talos or something. Quote Link to comment
jmerry Posted October 17, 2022 Share Posted October 17, 2022 6 hours ago, polytope said: Also, he shouldn't be killed by lightning unless he was already badly injured, usually from the party attacking him. Was he hostile when he was struck by lightning? No, but this was 2.5. I was in the process of killing him the slow way by activating a gnoll without activating him, and then it suddenly came to an end. Quote Link to comment
Bubb Posted October 17, 2022 Share Posted October 17, 2022 Areas have a 2% chance each tick (default 30tps) to attempt a lightning strike, (approximately 1 strike attempt every ~2.2 seconds). It randomly selects a creature from m_lVertSort, which includes all the non-flying living creatures. If the selected creature is currently on-screen, the chance to strike it is determined by their armor's animation: (Anything) => 30% Chain mail => 65% Plate mail => 100% So lightning can pretty much hit any creature as long as it's on-screen. Quote Link to comment
polytope Posted October 18, 2022 Author Share Posted October 18, 2022 (edited) 3 hours ago, Bubb said: If the selected creature is currently on-screen, the chance to strike it is determined by their armor's animation: (Anything) => 30% Chain mail => 65% Plate mail => 100% Ah, an interesting level of detail that the armor type actually matters: Looking at the unused MAGNET.bcs it checks for metal armor by filename rather than animation. It does make sense considering that I've noticed neither animals nor peasants seem to get struck, or they could, but the armored are more likely. 3 hours ago, Bubb said: Areas have a 2% chance each tick (default 30tps) to attempt a lightning strike, (approximately 1 strike attempt every ~2.2 seconds). This is multiplicative with the probability of a storm in the first place right? Some areas like the forest of Tethir have guaranteed bad weather, low lightning probability coded into the area file. Most outdoor city areas are the opposite, low chance of a storm, high chance of a lightning strike if there is one. Edited October 18, 2022 by polytope Quote Link to comment
Bubb Posted October 18, 2022 Share Posted October 18, 2022 (edited) 1 hour ago, polytope said: This is multiplicative with the probability of a storm in the first place right? You're right, it's modified by [+0x50] of the area header, "Lightning probability." This field only observes four different tiers: 0 => Disabled. [1, 32] => 2% chance to attempt a lightning strike every 150 + [0, 999] ticks. [33, 65] => 2% chance to attempt a lightning strike every 100 + [0, 699] ticks. [65, +] => 2% chance to attempt a lightning strike every 45 + [0, 199] ticks. There's also some randomness in how intense the storm is and how loud the thunder sound is. The engine only attempts a lightning strike when it decides the thunder's volume should be above 85%. So, realistically, it's a lot rarer than I initially thought. Edited October 18, 2022 by Bubb Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.