Izayo Posted July 26, 2022 Share Posted July 26, 2022 I want to add my own guns in the "item_modifiers" without replace the original one in data/config especially reflexsight and smallscope (2xscope) , it's alway replace the original one I don't know what to do. Link to comment Share on other sites More sharing options...
Telric Posted July 26, 2022 Share Posted July 26, 2022 (edited) As xmls are read top down, if you have items named the same that come later, it will just replace what was before. You'd need to rename them to something different for them to be separate item modifiers than the vanilla ones. Otherwise, when the xml is read, since your names are exactly the same, it will just keep whichever was read last (since you're using append, it will always be yours as append puts code at the end of the xml, just before the last closing tag) Also, just to help you when you run into errors later, I see you have spaces in your weapon names. You'll one day encounter some issues if you do that. Some xmls do weird things when there is a space in an item name. You can use localization to add spaces and hyphens and what not. Just a tip for ya Edited July 26, 2022 by Telric (see edit history) Link to comment Share on other sites More sharing options...
Izayo Posted July 26, 2022 Author Share Posted July 26, 2022 5 minutes ago, Telric said: As xmls are read top down, if you have items named the same that come later, it will just replace what was before. You'd need to rename them to something different for them to be separate item modifiers than the vanilla ones. Otherwise, when the xml is read, since your names are exactly the same, it will just keep whichever was read last (since you're using append, it will always be yours as append puts code at the end of the xml, just before the last closing tag) Also, just to help you when you run into errors later, I see you have spaces in your weapon names. You'll one day encounter some issues if you do that. Some xmls do weird things when there is a space in an item name. You can use localization to add spaces and hyphens and what not. Just a tip for ya will this work? I try copying from Vanilla firearms extended a19 mod Link to comment Share on other sites More sharing options...
Izayo Posted July 26, 2022 Author Share Posted July 26, 2022 *Update* it's worked now, thanks anyway 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