GazCBG Posted March 13, 2019 Share Posted March 13, 2019 Hi, I am just creating game config and am currently doing the .xml config files but would like to know how to exclude a section from the config when it is written, if a setting is picked. So let say the config is like { "sessions": [ { "hour": 18, "day": 29, "Type": "P", "Minutes": 15 }, { "hour": 18, "day": 29, "Type": "Q", "Minutes": 15 }, { "hour": 18, "day": 29, "Type": "R", "Minutes": 15 } ] } If I don't want to include the below in the config for example, how would I tell TCAdmin to not add it? { "hour": 18, "day": 29, "Type": "P", "Minutes": 15 }, Link to comment Share on other sites More sharing options...
Dennis Posted March 14, 2019 Share Posted March 14, 2019 Are you building the config using the Configuration Editor? Link to comment Share on other sites More sharing options...
GazCBG Posted March 14, 2019 Author Share Posted March 14, 2019 Hi, Yes I am, but can change if need be. Link to comment Share on other sites More sharing options...
Dennis Posted March 14, 2019 Share Posted March 14, 2019 If you use the configuration editor, you can setup a variable. Add this variable to the editor as a checkbox. Enter this in the 'On' field: { "hour": 18, "day": 29, "Type": "P", "Minutes": 15 }, Leave the Off value blank. It will be incorrectly formatted, but that shouldn't mean anything. Use this as your template for the file: { "sessions": [ ![MyVariable] { "hour": 18, "day": 29, "Type": "Q", "Minutes": 15 }, { "hour": 18, "day": 29, "Type": "R", "Minutes": 15 } ] } 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