[v1.7.0+] Staff of Bones Fix

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
Zizzo
Sher'Tul Godslayer
Posts: 2521
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

[v1.7.0+] Staff of Bones Fix

#1 Post by Zizzo »

So at least some of the bugs being reported on the Steam page for Command Multiple Staffs turn out to be that really nasty bug with the Staff of Bones. As I described in the bug report, part of the problem is that the bug leaves detritus behind that keep breaking the Command Staff talent. I don't think that's something I can fix in Command Multiple Staffs, but I hate not being to help the bug reporters, so I'm trying out a new Staff of Bones Fix addon.

This is a simple cleanup patch; basically, it detects the case that the Command Staff talent is trying to go to the bone-horror chat stage that doesn't exist, cleans up the stuck flags that are causing the problem, and redirects the Command Staff dialog to somewhere safer. If I've done this right, it should also provide a measure of preemptive protection — you'll still get sent to the Command Staff dialog when the Staff of Bones absorbs its hundredth soul, but it should be just the regular version that doesn't break.

And since this is obviously a bugfix addon, I'm reluctant to include it in ZOmnibus.

[Implementation notes:]

Code: Select all

Hooks:
  Chat:invoke [to detect and clean up behind the bone-horror bug]
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2521
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.7.0+] Staff of Bones Fix

#2 Post by Zizzo »

Frequently Asked Questions:

How do I know whether I need this addon?

The circumstances that trigger this bug are as follows:
  • You know the Soul Leech talent, but do not know both the Aura of Undeath and Call of the Crypt talents (knowing one but not both of these talents is not enough to avoid the bug).
  • You are wielding the Staff of Bones from the Forbidden Cults DLC in your mainhand, and have killed 100 opponents while doing so.
When you kill the hundredth enemy, an error dialog will pop up; afterward, any attempt to use the Command Staff talent, with the Staff of Bones or any other staff, will fail with the same error.

Yes, that's the error I'm having! Can your addon fix it?

It should, but you'll need to do a bit of savefile surgery to add the addon to your character retroactively. After installing this addon in the usual manner, proceed as follows:
  • First, find where your ToME savefiles live:
    • On Linux, this is the directory $HOME/.t-engine/4.0/tome/save/.
    • On Windows, this is the directory %userprofile%\T-Engine\4.0\tome\save. [h/t Moasseman]
    • On Mac, in the Finder, select "Go to" ⇒ Library ⇒ Application Support ⇒ T-engine ⇒ 4.0 ⇒ tome ⇒ save. [h/t Lakeere]
  • In this directory, there should be a folder named for your character, and in that folder there should be a file named "desc.lua". Open that file with your favorite text editor.
  • The file will have a line of the form "addons = { … }", listing the ID tags for all addons that are enabled for this character. You'll want to add this addon's tag, "bonestaff_fix", to that line; the necessary syntax should be clear.
  • Save this change and re-run ToME. In the Load Game dialog, check that the "bonestaff_fix" tag you just added is present and green in your character's addons list (if it's red, either you misspelled the tag or you haven't actually installed the addon).
  • Load the game and use the Command Staff talent. You should get both the usual Command Staff chat dialog and a popup dialog reporting that the problem has been fixed. (If you don't get that, there must be another bug somewhere; this thread would be an excellent place to report that.)
Will this addon protect me from getting the bug in the first place?

It should. There will be one side effect, as described in the next question.

Hey! The Command Staff dialog just popped up when I killed an enemy!

That's this addon protecting you from the Staff of Bones bug. You just killed 100 enemies while wielding the Staff of Bones, and it is now trying to offer you the ability to summon bone horrors. If you had learned the Aura of Undeath and Call of the Crypt talents, the Command Staff dialog would have gone to a special section making that offer; since you haven't, that section isn't present (which is the cause of the bug), and this addon has diverted the dialog to its regular entry point to avoid the bug. You should be able to exit the Command Staff dialog with no ill effects.
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply