WML Inclusion Improvements

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

WML Inclusion Improvements

Post by Dave »

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
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Blackbeard
Posts: 87
Joined: January 23rd, 2004, 9:30 pm

Re: WML Inclusion Improvements

Post by Blackbeard »

Dave wrote:Furthermore, images that are specified but don't exist in the normal images path will be loaded from $HOME/.wesnoth/images/

David
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.
Post Reply