Jump to content

Adding Text: Display String [139] to a new item


Pol_Rupes

Recommended Posts

Hi, I'm creating an item and idk how to add the custom string in the effect Text: Display String I want to show from that item.

This is how I have in my tp2 file

SAY NAME1 @39 /*New Item*/
SAY NAME2 @39 /*New Item 2*/
SAY UNIDENTIFIED_DESC @40 /* Unidentified Description*/
SAY DESC @40 /*Description*/
 

I need to add something for the Effect= Text: Display String [139] ?

Based on DLTC, it took the text from a tagged entry (that already exists)

 

Thanks in advance.

Link to comment

SAY can be used directly with an offset. Since it's your item being copied from your mod folder, you don't have to worry about another mod changing where it is, so you can just directly use something like

SAY 0x7e ~Text for new effect~

Replace 0xae with whatever the actual offset is. I'm afraid I don't remember how DLTCEP shows offsets, so you'll need to work that out on your own.

Link to comment
35 minutes ago, CamDawg said:

SAY can be used directly with an offset. Since it's your item being copied from your mod folder, you don't have to worry about another mod changing where it is, so you can just directly use something like

SAY 0x7e ~Text for new effect~

Replace 0xae with whatever the actual offset is. I'm afraid I don't remember how DLTCEP shows offsets, so you'll need to work that out on your own.

Yes!!! It worked. I export the tp2 from the item's DLTC. In my case, I used '750'

SAY 750 @200005 /*Test*/ 

And the effect's string was written.

Thank you very much!

 

Link to comment
On 11/4/2021 at 3:07 AM, Grammarsalad said:

I think alter_effect works on items. You could also try:

LPF ALTER_EFFECT INT_VAR match_opcode = 139 parameter1 = RESOLVE_STR_REF (@68010) END

Nice! I didn't know I could alter an effect in the tp2 setup file. Maybe you can help me with this:

 

image.png.76762d6b8631a760876da538a76edf22.png

 

I'm trying to edit the usability of an item. I want the item to say "can only be used by JohnDoe". As you can see, the red square marks the string's number of the name to be put it. But the string of John Doe doesn't exist yet. Is there any way to set it up that in the setup file?

Link to comment
9 hours ago, Pol_Rupes said:

I'm trying to edit the usability of an item. I want the item to say "can only be used by JohnDoe". As you can see, the red square marks the string's number of the name to be put it. But the string of John Doe doesn't exist yet. Is there any way to set it up that in the setup file?

You can also do this with ALTER_EFFECT, changing the "special" field on op319. This what what I used for an item:

  LPF ALTER_EFFECT 
  INT_VAR 
  match_opcode = 319 
  special = RESOLVE_STR_REF (@311)
  END

Change @311 to ~John Doe~. In the actual description, it looks like:

Usable by:
 John Doe

I'd recommend looking at the ALTER_EFFECT (and other functions) section in the weidu readme.

Link to comment
On 11/19/2021 at 9:23 PM, Dan_P said:

You can also do this with ALTER_EFFECT, changing the "special" field on op319. This what what I used for an item:

  LPF ALTER_EFFECT 
  INT_VAR 
  match_opcode = 319 
  special = RESOLVE_STR_REF (@311)
  END

Change @311 to ~John Doe~. In the actual description, it looks like:

Usable by:
 John Doe

I'd recommend looking at the ALTER_EFFECT (and other functions) section in the weidu readme.

Yeah, you can use RESOLVE_STR_REF for any of these functions whenever you need to create a custom string reference and then reference it in an effect

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