Cannot Modify Core Units.cfg

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
Samehada
Posts: 1
Joined: August 25th, 2021, 12:59 pm

Cannot Modify Core Units.cfg

Post by Samehada »

I'm stymied. In the past, on other BfW installations on other computers, I've been able to modify core files to customize my BfW. This time, this computer, "denied"!

BfW version is 1.12.5
Microsoft Windows 10 OS (should be fully up-to-date – I think it updates automatically these days)
Specific file I'm working on: core/units.cfg
App used for making the edits: WordPad

Things already tried: I did check the files Properties, went under the Security tab, and enabled "Full control," which is supposed to enable modifications and writing to the file, as well as "Read" and "Read & execute" (which were the only two options originally enabled). (Note: for my level of computer savvy, this qualifies as "elite hacking.")

Any advice on what my problem may be?

(Edit: fwiw, the specific edit I am trying to make is to add {TRAIT_HEALTHY} and {TRAIT_DEXTROUS} to the list of universal traits.)
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Cannot Modify Core Units.cfg

Post by Ravana »

You do not need to edit that file for this use case. You can add more traits to [units] from your own addon context.
User avatar
Atreides
Posts: 1074
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: Cannot Modify Core Units.cfg

Post by Atreides »

I suspect Sam wants to alter mainline wes to always have healthy and dex traits plus the 4 regular.

Can't assist with the Win10 problem though. I moved straight from Win98 to Linux 3 years back... Win98 never had any restrictions on file access. Like in DOS and the 8-bit computers you were always all-powerful (like root in Unix/Linux which Win apparently eventually copied). Oh, wait I've actually remembered something. You may need to be "administrator" or something in Win10 to be able to access some files. I've come across that a few times while searching for other stuff.
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Cannot Modify Core Units.cfg

Post by octalot »

Have you tried adding write access to the directory? That would be needed if your editor saves files by deleting the old one and then writing a new one (or tries to guard against problems by writing the new one to a temporary filename, then deleting the old one and renaming the new one).

Note: I don't have Win10 to test on.
User avatar
MoonyDragon
Posts: 149
Joined: November 29th, 2017, 5:46 pm

Re: Cannot Modify Core Units.cfg

Post by MoonyDragon »

I don't use Windows so I can't help you with the first issue. As far as editing core files is concerned, I recommend against it, since it breaks multiplayer compatibility and because it has to be set up anew after each install. As Ravana has mentioned, your problem can be solved effortlessly by a small add-on.
Example appended below:
Traits_Mod.zip
(279 Bytes) Downloaded 41 times
Default L0 Era - Level 1 leaders with level 0 recruits!
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Cannot Modify Core Units.cfg

Post by Ravana »

Opening poster turned into spammer, but this discussion could be useful for someone.
Post Reply