ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Wed Jun 26, 2019 6:39 pm

All times are UTC




Post new topic Reply to topic  [ 344 posts ]  Go to page Previous  1 ... 19, 20, 21, 22, 23
Author Message
PostPosted: Wed Feb 06, 2019 5:09 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1618
Location: A shallow water area south of Bree
Pushing out v15i.7 for both ZOmnibus and ZOmnibus Lite, with a small but surprisingly effective improvement to Go to Landmark.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Fri Feb 22, 2019 1:56 am 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2390
Location: Ambush!
I think this isn't your fault, but I see zOmnibus in this stack trace: viewtopic.php?p=234121#p234121

Might be an interaction between the two addons?

Or might not be.

_________________
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.


Top
 Profile  
 
PostPosted: Tue Feb 26, 2019 3:07 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1618
Location: A shallow water area south of Bree
Doctornull wrote:
I think this isn't your fault, but I see zOmnibus in this stack trace: viewtopic.php?p=234121#p234121

Might be an interaction between the two addons?

Or might not be.

[sound F/X: source diving] Preliminary assessment: probably not. The two places ZOmnibus appears in the stack trace are simple pass-throughs (respectively, checking in the character creation dialog that ZOmnibus and any of its component addons aren't simultaneously enabled and temporarily suspending store wish list notifications during Game:changeLevel() so that auto-transmo on level change doesn't repeatedly tickle it), and AFAICT both of them are passing through all the parameters they're supposed to be (which has tripped me up more than once… :oops: ) and neither are anywhere near any of the places where Custom Difficulties manipulates the specified 'rek_dif_zone_mul' field.

Best guess: the report specifies that the bug happens "when I tried "Restart with Same Character"", which probably means that the 'rek_dif_zone_mul' field isn't being propagated properly across the die/restart transition. I remember there being some deep wizardry going on in that area.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Tue Mar 05, 2019 9:09 pm 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2390
Location: Ambush!
New question:

I'm writing a talent tree which replaces the Stone Alchemy (gem creation / imbue) tree.

I'd like for my replacement talents to hook into the convenient zOmnibus right-click menu improvements, specifically I'd like to enable the "(x) Convert to Gem" option.

Is there something in my talents that I could define to let zOmnibus know? Ideally in a way such that if some silly person knew both the original extract gems and the new version, she wouldn't get two "(x)" options.

_________________
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.


Top
 Profile  
 
PostPosted: Wed Mar 06, 2019 4:27 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1618
Location: A shallow water area south of Bree
Doctornull wrote:
New question:

I'm writing a talent tree which replaces the Stone Alchemy (gem creation / imbue) tree.

I'd like for my replacement talents to hook into the convenient zOmnibus right-click menu improvements, specifically I'd like to enable the "(x) Convert to Gem" option.

Is there something in my talents that I could define to let zOmnibus know? Ideally in a way such that if some silly person knew both the original extract gems and the new version, she wouldn't get two "(x)" options.

[sound F/X: source diving] Hmm, not as easily as I assumed I would have made it, but doable. I assume you're going for the use-item dialog that you can get from the inventory dialog; for that, you'll be using the "UseItemMenu:generate" and "UseItemMenu:use" hooks, and you'll generally want to follow the pattern used by Use Item Shortcuts. So you'll have something like:

Code:
class:bindHook('UseItemMenu:generate', function(self, data)
  local a, o = data.actor, data.object
  -- If the player knows Convert to Gem and doesn't know Extract Gems,
  -- and if the object can be converted to a gem [we assume the presence of
  -- an .isConvertible() talent method akin to Extract Gems' .filterGem()],
  -- add our action to the list.
  if a:knowTalent(a.T_CONVERT_TO_GEM) and
     not a:knowTalent(a.T_EXTRACT_GEMS) and
     a:callTalent(a.T_CONVERT_TO_GEM, 'isConvertible', o)
  then
    data.menu[#data.menu+1] = {
      name = 'Convert to gem',
      -- Used by the UseItemMenu:use hook below.
      action = 'convert_to_gem',
      -- The Inventory Keys addon, if present (directly or via ZOmnibus),
      -- will use this to add a mnemonic key to the action.
      mnemonic = 'x',
    }
  end
end)

class:bindHook('UseItemMenu:use', function(self, data)
  if data.act == 'convert_to_gem' then
    local a, o = data.actor, data.object
    -- For talents that use targeting, parts of this will need to be
    -- wrapped in a coroutine context; see the talent_wrapper() method in
    -- Use Item Shortcuts' hooks/load.lua for details.
    local t = a:getTalentFromId(a.T_CONVERT_TO_GEM)
    if a:preUseTalent(t) then
      -- We assume the presence of a .convertToGem() talent method akin to
      -- Extract Gems' .extractGem() method.
      a:callTalent(a.T_CONVERT_TO_GEM, 'convertToGem', o)
      if a:postUseTalent(t, true) then
   a:startTalentCooldown(t)
      end
    end
  end
end)


In retrospect, I'm kind of disappointed that I didn't have it scrape the talent definitions looking for special fields, like I did in the T2 module's use-item dialog. (I imagine that's more what you were expecting, too; We Apologize for the Inconvenience.™ :oops: )

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Wed Mar 06, 2019 8:27 pm 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2390
Location: Ambush!
Zizzo wrote:
Doctornull wrote:
New question:

I'm writing a talent tree which replaces the Stone Alchemy (gem creation / imbue) tree.

I'd like for my replacement talents to hook into the convenient zOmnibus right-click menu improvements, specifically I'd like to enable the "(x) Convert to Gem" option.

Is there something in my talents that I could define to let zOmnibus know? Ideally in a way such that if some silly person knew both the original extract gems and the new version, she wouldn't get two "(x)" options.

[sound F/X: source diving] Hmm, not as easily as I assumed I would have made it, but doable. I assume you're going for the use-item dialog that you can get from the inventory dialog; for that, you'll be using the "UseItemMenu:generate" and "UseItemMenu:use" hooks, and you'll generally want to follow the pattern used by Use Item Shortcuts. So you'll have something like:

Code:
class:bindHook('UseItemMenu:generate', function(self, data)
  local a, o = data.actor, data.object
  -- If the player knows Convert to Gem and doesn't know Extract Gems,
  -- and if the object can be converted to a gem [we assume the presence of
  -- an .isConvertible() talent method akin to Extract Gems' .filterGem()],
  -- add our action to the list.
  if a:knowTalent(a.T_CONVERT_TO_GEM) and
     not a:knowTalent(a.T_EXTRACT_GEMS) and
     a:callTalent(a.T_CONVERT_TO_GEM, 'isConvertible', o)
  then
    data.menu[#data.menu+1] = {
      name = 'Convert to gem',
      -- Used by the UseItemMenu:use hook below.
      action = 'convert_to_gem',
      -- The Inventory Keys addon, if present (directly or via ZOmnibus),
      -- will use this to add a mnemonic key to the action.
      mnemonic = 'x',
    }
  end
end)

class:bindHook('UseItemMenu:use', function(self, data)
  if data.act == 'convert_to_gem' then
    local a, o = data.actor, data.object
    -- For talents that use targeting, parts of this will need to be
    -- wrapped in a coroutine context; see the talent_wrapper() method in
    -- Use Item Shortcuts' hooks/load.lua for details.
    local t = a:getTalentFromId(a.T_CONVERT_TO_GEM)
    if a:preUseTalent(t) then
      -- We assume the presence of a .convertToGem() talent method akin to
      -- Extract Gems' .extractGem() method.
      a:callTalent(a.T_CONVERT_TO_GEM, 'convertToGem', o)
      if a:postUseTalent(t, true) then
   a:startTalentCooldown(t)
      end
    end
  end
end)


In retrospect, I'm kind of disappointed that I didn't have it scrape the talent definitions looking for special fields, like I did in the T2 module's use-item dialog. (I imagine that's more what you were expecting, too; We Apologize for the Inconvenience.™ :oops: )

Oh, that's amazingly helpful. Thank you!

I was thinking of somehow setting flags so your hook would find addon talents, but this seems very usable at a different layer, and your way is probably more extensible -- e.g. if I wanted to add inventory menu access for stuff like Sentient Crystal self-imbuing with a gemstone, which the base game will never need a menu option for.

_________________
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.


Top
 Profile  
 
PostPosted: Thu Mar 07, 2019 4:16 pm 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2390
Location: Ambush!
EDIT: nevermind, figured it out.

I needed to call

Code:
data.onuse(data.inven, data.item, o, false)


Anyway, thank you for zOmnibus and the help here!

_________________
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.


Top
 Profile  
 
PostPosted: Sat Mar 16, 2019 1:13 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1618
Location: A shallow water area south of Bree
Pushing out v15i.8 for both, with some small improvements to Store Wish List and Go to Landmark.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Mon Apr 01, 2019 1:43 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1618
Location: A shallow water area south of Bree
Pushing out v15j for both, with a small but nice improvement to Passive Cooldowns.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Thu Apr 04, 2019 10:51 pm 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1618
Location: A shallow water area south of Bree
Well, that was embarrassing… :oops: Pushing out v15j.1 for both to fix a bug in the preceding.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Thu Apr 18, 2019 5:36 pm 
Offline
Archmage

Joined: Wed Jan 22, 2014 1:46 pm
Posts: 444
Hey Zizzo, this happened after exiting the fearscape (from Tannen's quest) :
Image

after closing it i tried to autoexplore and instantly got patrolled at the other end of the map :?

recalled from the patrol, same bug

autoexplore, again, instantly patrolled. Cleared it, tried to exit, game started loading forever and had to force close the game.

_________________
I write guides and make addons too now, apparently

You can go here for a compilation of everything I wrote, plus some other important stuff!

Includes general guides (inscriptions, zone, prodigies), and class guides (Demo, Anorithil, Bulwark, Zerker, Sblade)


Top
 Profile  
 
PostPosted: Sun Apr 21, 2019 1:50 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1618
Location: A shallow water area south of Bree
Cathbald wrote:
Hey Zizzo, this happened after exiting the fearscape (from Tannen's quest) :

[sound F/X: source diving] That's… odd. I don't think ZOmnibus is the culprit on this one; it doesn't touch any code in that area AFAICT, and the line in the stack trace is a passthrough to Game:changeLevel() [and I've double-checked that I am passing through all the expected arguments… :oops: :wink: ]

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Wed Apr 24, 2019 7:07 am 
Offline
Archmage

Joined: Wed Jan 22, 2014 1:46 pm
Posts: 444
Damn, Shibari had no clue either and no way to fix it. Apparently should be very rare no matter the culprit since it's an upvalue error.
Well, thanks anyway

_________________
I write guides and make addons too now, apparently

You can go here for a compilation of everything I wrote, plus some other important stuff!

Includes general guides (inscriptions, zone, prodigies), and class guides (Demo, Anorithil, Bulwark, Zerker, Sblade)


Top
 Profile  
 
PostPosted: Thu May 02, 2019 1:49 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1618
Location: A shallow water area south of Bree
Quick release 15j.2 for ZOmnibus only, with a small typo correction in Restart Sustains. :oops:

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 344 posts ]  Go to page Previous  1 ... 19, 20, 21, 22, 23

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group