The_Great_Sephiroth Posted June 13, 2023 Share Posted June 13, 2023 (edited) I'm trying to write a modlet for A21 that adds a few more options to the new game menu where you select the day length, which maxes at 120min by default. I want to modify those options and add three more to the end of the list but have never modded a file in a sub-folder of the configs folder. It's been two years since I touched this as well, and am rusty. How can I access that in a basic XML modlet? To be clear, I want to modify the following line in my mod. This line is in Data/Config/XUi_Menu/windows.xml on my A21 install. <gameoption name="DayNightLength" title="goDayLength" value_wrap="false" value_type="int" values="10, 20, 30, 40, 50, 60, 90, 120" display_names="" value_localization_prefix="goMinute" /> I just realized I posted this in the wrong section. I meant to post in discussion, not tutorials. I assume a mod can fix that? (= Edited June 13, 2023 by The_Great_Sephiroth Added code (see edit history) Link to comment Share on other sites More sharing options...
seven Posted June 16, 2023 Share Posted June 16, 2023 You can find a mod to do that here and then use that as a model to make your own version with the values you choose. 1 Link to comment Share on other sites More sharing options...
The_Great_Sephiroth Posted June 16, 2023 Author Share Posted June 16, 2023 Thank you. I don't mind looking at existing code but I don't like ripping. I'll check it out though and see if I can make heads or tails of it. I'm more of a C+ programmer here, so the way Unity does these mods is a bit alien to me! Link to comment Share on other sites More sharing options...
seven Posted June 16, 2023 Share Posted June 16, 2023 I totally understand about not copying someone else's code, but it's really not coding. It's 2 xpath statements and not really any other way to write them. It's just knowing how to form the xpath statement so it changes the right values. Link to comment Share on other sites More sharing options...
The_Great_Sephiroth Posted June 17, 2023 Author Share Posted June 17, 2023 Yeah, and I updated those lines and the mod works. We're using it now, so again, thank you! 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