WML Inclusion Improvements
Moderator: Forum Moderators
WML Inclusion Improvements
Two little WML improvements:
- I have made it so that specifying a directory inside {} will recurse into subdirs. This makes it unnecessary to have a file that specifically includes campaign directories inside the scenarios/ directory. I have removed these files.
- I have made it so that specifying '~' in front of a filename inside {} will load that filename from the directory $HOME/.wesnoth/data (or equivalent paths on non-Unix systems). I have added specifications to game.cfg to include $HOME/.wesnoth/data/scenarios and $HOME/.wesnoth/data/units. This means that user-made campaigns can be installed without being root, and such installaction should be much easier.
Furthermore, images that are specified but don't exist in the normal images path will be loaded from $HOME/.wesnoth/images/
David
- I have made it so that specifying a directory inside {} will recurse into subdirs. This makes it unnecessary to have a file that specifically includes campaign directories inside the scenarios/ directory. I have removed these files.
- I have made it so that specifying '~' in front of a filename inside {} will load that filename from the directory $HOME/.wesnoth/data (or equivalent paths on non-Unix systems). I have added specifications to game.cfg to include $HOME/.wesnoth/data/scenarios and $HOME/.wesnoth/data/units. This means that user-made campaigns can be installed without being root, and such installaction should be much easier.
Furthermore, images that are specified but don't exist in the normal images path will be loaded from $HOME/.wesnoth/images/
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
-
- Posts: 87
- Joined: January 23rd, 2004, 9:30 pm
Re: WML Inclusion Improvements
Great feature. Does the search apply to other files (e.g. unit.cfg), too? Sorry to say this but, I'd like it to work the other way, if a file isn't found in $HOME/foobar then look in data/foobar, so players can override the default images/files.Dave wrote:Furthermore, images that are specified but don't exist in the normal images path will be loaded from $HOME/.wesnoth/images/
David