Author Topic: Handling of breaking of non-magical weapons in BG1?  (Read 3363 times)

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Handling of breaking of non-magical weapons in BG1?
« on: November 17, 2010, 03:28:07 PM »
How does the engine execute the breaking of non-magical weapons in BG1? I guess the chances are evaluated during every roll in a fight, and is probably hardcoded?

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Handling of breaking of non-magical weapons in BG1?
« Reply #1 on: November 17, 2010, 06:06:08 PM »
Yes. There's a flag in the melee ability of the weapon, and there's some small chance that an item so flagged will break (replace with used up item or disappear) on a successful hit, possibly only in the earlier chapters of the game (I don't remember if they keep breaking past Chapter 3?). All in hardcode, for BG/TotSC-only (it's disabled in all other games).

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Handling of breaking of non-magical weapons in BG1?
« Reply #2 on: November 18, 2010, 01:28:01 AM »
Thank you! -Disabled means hard-codedly disabled, I presume?

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Handling of breaking of non-magical weapons in BG1?
« Reply #3 on: November 18, 2010, 08:47:34 AM »
Correct, sorry.

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Handling of breaking of non-magical weapons in BG1?
« Reply #4 on: November 18, 2010, 01:39:09 PM »
Thank you!

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Handling of breaking of non-magical weapons in BG1?
« Reply #5 on: November 19, 2010, 02:27:19 AM »
Sorry, have to ask again. The flag means that the items could be un-flagged, so to say? And wasn't there a tweak that allowed the breaking for Tutu/BGII, as well?
Does any mod change this, especially BG1UB?

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Handling of breaking of non-magical weapons in BG1?
« Reply #6 on: November 19, 2010, 01:46:33 PM »
Yes. If you have a later version of Near Infinity, you can check the abilities (if you open sw1h04, the generic long sword, for instance, you'll see that the melee ability has the Breakable flag set) and adjust if desired. The item's magical flag has no effect on whether it will break or not.

IIRC, Cam did this for Tutu tweaks with scripts and maybe adding effects to weapons; the engine ignores the breakable bit (it's still there and even set on some items, but it does nothing).

BG1UB makes no changes, unless there was a bug fix (say a mundane metal item that didn't have the flag set); but nothing overarching.

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Handling of breaking of non-magical weapons in BG1?
« Reply #7 on: November 21, 2010, 12:19:36 AM »
Thank you, now it is clear.

Offline GeN1e

  • Planewalker
  • *****
  • Posts: 267
  • Gender: Male
Re: Handling of breaking of non-magical weapons in BG1?
« Reply #8 on: November 26, 2010, 09:34:07 AM »
On BG2 the breaking is hanfled by setting local variable on hit and checking for it in DPLAYER[23].

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: