Morksel Posted April 27 Share Posted April 27 Hello, I am currently editing a mod for my server and I wanted to give a Sniper Perk Book vol. 6 a new description so it can reflect the edits that I made. But for some reason I cannot get it to change no matter what I do. Does anybody know if this can be done? If it can be done could you tell me how, or help me with it? Bit more information: - What I'm trying to do is change a description for a vanila Sniper Perk Book, not directly in a game localization.txt but through mod's items.xml using xpath. I know that xpath cannot interact with localization.txt file, so I've tried every possible way I could have found on here and elsewhere to change value of property DescriptionKey to one that will lead to a new description. - last line I tried (so you know what I'm doing if my explanation is not good): Quote <set xpath="/items/item[@name='bookSniperAPAmmo']/property[@name='DescriptionKey' and @value='perkSniperAPAmmoLongDesc']/@value">bookSniperNEWAPAmmoLongDesc</set> This line provided no change to an item's description, neither did: Quote <set xpath="/items/item[@name='bookSniperAPAmmo']/property[@name='DescriptionKey']/@value">bookSniperNEWAPAmmoLongDesc</set> I'm kinda at my wits end, so if anybody could help I would be very very grateful ☺️ Link to comment Share on other sites More sharing options...
bdubyah Posted April 27 Share Posted April 27 That second line looks okay to me. And you do have a proper localization.txt file in your mod with bookSniperNEWAPAmmoLongDesc defined in it? Really though, you could just have a modlet with just a localization.txt file that has perkSniperAPAmmoLongDesc defined in it, with your new description, as any mod with vanilla entries in localization will override the vanilla entry if there is an exact match. 1 Link to comment Share on other sites More sharing options...
Morksel Posted April 27 Author Share Posted April 27 (edited) 25 minutes ago, bdubyah said: That second line looks okay to me. And you do have a proper localization.txt file in your mod with bookSniperNEWAPAmmoLongDesc defined in it? Yes yes, I do. Quote Really though, you could just have a modlet with just a localization.txt file that has perkSniperAPAmmoLongDesc defined in it, with your new description, as any mod with vanilla entries in localization will override the vanilla entry if there is an exact match. Hmm, I didn't know that. I will try it and report back. Thank you! EDIT: It worked! Thank you so so much! Now if only I knew this before it would have saved me hours of searching and reading. I guess it wasn't for waste as I learned more about how modding works. Edited April 27 by Morksel (see edit history) Link to comment Share on other sites More sharing options...
bdubyah Posted April 27 Share Posted April 27 And obviously, you have your modlet setup properly with a modinfo.xml, Config folder and all that jazz? Link to comment Share on other sites More sharing options...
Morksel Posted April 27 Author Share Posted April 27 5 minutes ago, bdubyah said: And obviously, you have your modlet setup properly with a modinfo.xml, Config folder and all that jazz? Yup, everything is there 😊 Link to comment Share on other sites More sharing options...
bdubyah Posted April 27 Share Posted April 27 26 minutes ago, Morksel said: Yup, everything is there 😊 Well, just out of curiosity I tried that second line and it worked fine. So your issue was likely with your localization.txt file. People usually mess up the header so that might be the issue. Link to comment Share on other sites More sharing options...
Morksel Posted April 27 Author Share Posted April 27 (edited) 6 hours ago, bdubyah said: Well, just out of curiosity I tried that second line and it worked fine. So your issue was likely with your localization.txt file. People usually mess up the header so that might be the issue. I'm really not sure why it didn't work, as I even have a line in progression.xml Quote <set xpath="/progression/perks/perk[@name='perkSniperAPAmmo']/@long_desc_key">perkSniperNEWAPAmmoLongDesc</set> that works fine and does what I want - it changes the description of a Perk in a Skill Menu. Also, every other description that is in that localization.txt works fine. Making a new modlet did work, but I'll test around more and see if I can reproduce your result. I do have a question: What would be the prefered way of doing this? What you suggested or what I tried to do? EDIT: Okay, I figured out why it wasn't working, I put the line in <append xpath="/items"> instead of outside... Talk about a beginner's mistake 😥 Edited April 27 by Morksel (see edit history) Link to comment Share on other sites More sharing options...
bdubyah Posted April 27 Share Posted April 27 10 hours ago, Morksel said: I'm really not sure why it didn't work, as I even have a line in progression.xml that works fine and does what I want - it changes the description of a Perk in a Skill Menu. Also, every other description that is in that localization.txt works fine. Making a new modlet did work, but I'll test around more and see if I can reproduce your result. I do have a question: What would be the prefered way of doing this? What you suggested or what I tried to do? EDIT: Okay, I figured out why it wasn't working, I put the line in <append xpath="/items"> instead of outside... Talk about a beginner's mistake 😥 Haha. We've all been there before. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now