Jump to content

Setting names for item charge abilities and ranged/melee in Weidu?


Recommended Posts

As I am working on some new items for my mod, I am running into an issue I am hoping to get some guidance with:

For weapons that have a ranged and melee component, how do I set names for each? What I mean is take a throwing axe for instance: If you right click on it, there are two icons, one named "melee" the other "ranged" for their respective uses.

When I am making new items with these capabilities, they only show the name of the item, making it difficult to determine which is melee and which is ranged.

I get the same result for any charge abilities on new items.

I am sure there is a way to set these names using WeiDu using SAY NAME or SAY 0X##, but I cannot for the life of me find any examples of this to follow, or any documentation. I know I am probably overlooking something, but I'm just not seeing it and would appreciate some assistance. Thanks in advance!

Link to comment

These labels can be defined in tooltip.2da.

The WeiDU code could look like this:

COPY_EXISTING ~tooltip.2da~ ~override~
  COUNT_2DA_COLS num_cols
  COUNT_2DA_ROWS num_cols num_rows
  INSERT_2DA_ROW num_rows num_cols ~MY_ITEM  15527  15529  -1~
  PRETTY_PRINT_2DA
BUT_ONLY

This code snippet will apply the existing game strings "Thrown" and "Melee" to the item "MY_ITEM".

Alternatively, if you want to provide your own strings for "Thrown" and "Melee":

COPY_EXISTING ~tooltip.2da~ ~override~
  COUNT_2DA_COLS num_cols
  COUNT_2DA_ROWS num_cols num_rows
  SET thrown_strref = RESOLVE_STR_REF(~Ranged~)
  SET melee_strref = RESOLVE_STR_REF(~Close-combat~)
  INSERT_2DA_ROW num_rows num_cols ~MY_ITEM  %thrown_strref%  %melee_strref%  -1~
  PRETTY_PRINT_2DA
BUT_ONLY

This code snippet will apply the custom strings "Ranged" and "Close-combat" to the item's thrown and melee abilities.

Link to comment

Yes, replace MY_ITEM by the resref (filename without extension) of your item.

Installation order is irrelevant, since tooltip.2da doesn't really depend on any other resources. Entry position within the table is irrelevant, too.

Each column of tooltip.2da corresponds to their respective ability entry in the ITM resource (first column references first ability entry, and so on). And it doesn't matter whether the ability defines a combat mode (e.g. ranged, melee) or a charged ability via "Use Item" button. Up to three ability entries can be named. More named abilities are possible, but require additional effort.

Link to comment

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.

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...