Pol_Rupes Posted November 3, 2021 Share Posted November 3, 2021 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. Quote Link to comment
CamDawg Posted November 3, 2021 Share Posted November 3, 2021 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. Quote Link to comment
Pol_Rupes Posted November 3, 2021 Author Share Posted November 3, 2021 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! Quote Link to comment
CamDawg Posted November 3, 2021 Share Posted November 3, 2021 Cheers! One thing to keep in mind is that, if you change the item, that offset may change. Quote Link to comment
Grammarsalad Posted November 4, 2021 Share Posted November 4, 2021 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 Quote Link to comment
Pol_Rupes Posted November 19, 2021 Author Share Posted November 19, 2021 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: 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? Quote Link to comment
Dan_P Posted November 20, 2021 Share Posted November 20, 2021 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. Quote Link to comment
Grammarsalad Posted November 22, 2021 Share Posted November 22, 2021 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 Quote Link to comment
Grammarsalad Posted November 22, 2021 Share Posted November 22, 2021 Even if you're protecting from a particular string created by another mod, it _should_ still work (it'll take the earliest strref if it's already in the engine) Quote Link to comment
Recommended Posts
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.