Jump to content
subtledoctor

How does tooltip.2da work?

Recommended Posts

I want to add an item ability to scrolls.  They already have two headers - "cast spell" from a quickslot and "learn spell" from the inventory screen.  I am adding a 3rd header, which is an item ability to be used from the backpack button.  (Assuming that works with a scroll in a quickslot... I imagine it should, as the scroll is 'equipped,' and weapon abilities appear in the backpack button when they are in equipped slots, etc.)

I need to name the ability by appending to tooltip.2da; should the strref be in the 3rd column, since this is the item's 3rd header?  The IESDP is unclear on whether the columns correspond to headers, or there is just some kind of simple sequential reading of the entries.

EDIT - in other words, should I append “itemres     -1     -1     strref” to add a string for the third extended header? Because no other entries look like that...

Edited by subtledoctor

Share this post


Link to post
8 hours ago, subtledoctor said:

I want to add an item ability to scrolls.  They already have two headers - "cast spell" from a quickslot and "learn spell" from the inventory screen.  I am adding a 3rd header, which is an item ability to be used from the backpack button.  (Assuming that works with a scroll in a quickslot... I imagine it should, as the scroll is 'equipped,' and weapon abilities appear in the backpack button when they are in equipped slots, etc.)

Hm, apparently that doesn't work at all.  So, er, forget it.

Share this post


Link to post

No in this case, you should use something like:

APPEND ~tooltip.2da~ ~youritem @1 @2 @3~ UNLESS ~youritem~

with

@1 = "spell name"

@2 = "learn spell"

@3 = "name of your new ability"

 

EDIT: in fact, use RESOLVE_STR_REF (@n)

Edited by Gwendolyne

Share this post


Link to post

here is a dedicated function by Mike1072 for appending to tooltip.2da. If you use it you don't have to worry about missing columns in other rows.

 

tooltip.tpa

Share this post


Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...