Jump to content

Simple modlet to modify a menu entry?


Recommended Posts

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 by The_Great_Sephiroth
Added code (see edit history)
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...