[test] scenario

Discussion among members of the development team.

Moderator: Forum Moderators

Post Reply
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

[test] scenario

Post by Viliam »

The "test" scenario is a quick way to start game in one's own scenario, without having to click through the game menu.

IMHO, such file should be placed in the $userdata directory (not in the $gamedata). Because the user should edit it.


When I install Wesnoth under MS Windows, there is a file with test scenario in:
C:\Program Files\Wesnoth\data\scenario-test.cfg

If the computer were configured properly, I (as a player) would have read-only access to this file; so I could not use it for testing my own scenarios -- which is the purpose of the file. So I suggest moving this file to $userdata section.

I do not know if there is a similar situation in other OS's.
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

Do you mean, the "test" tags wraps around the scenario tag? Then you place the whole file into and save it as: userdata/preferences/wesnoth/data/scenario-test.cfg?


Like this??

Code: Select all

[test]
[scenario]
id=bla
mapdata="bla
bla
bla"
[/scenario]
[/test]
Why did the fish laugh? Because the sea weed.
Darth Fool
Retired Developer
Posts: 2633
Joined: March 22nd, 2004, 11:22 pm
Location: An Earl's Roadstead

Post by Darth Fool »

Personally, I think the right way to do this is to make a command line option that will allow you to load any save-game or scenario. something like "wesnoth --load my_save_game"
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Moved to ideas. Changing the purpose of the test scenario may or may not be appropriate, but with Darth Fool's modification there could be something here.
Hope springs eternal.
Wesnoth acronym guide.
Darth Fool
Retired Developer
Posts: 2633
Joined: March 22nd, 2004, 11:22 pm
Location: An Earl's Roadstead

Post by Darth Fool »

I have now implemented a new command line option: "--load FILE" will load FILE from your save game directory. To make this more useful for the first scenario of a campaign, I have also added an automatic save at the beginning of a campaign that should OVERWRITE the save file "Campaign_Start"

To load the last campaign you started from the beginning use:

Code: Select all

 ~/wesnoth/src/wesnoth --load Campaign_Start ~/wesnoth
To load the last autosave:

Code: Select all

 ~/wesnoth/src/wesnoth --load Auto-Save ~/wesnoth
edit: note that this only works with save games, not with scenarios.
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

What is the last argument for? It looks like you're specifying the game data location. Can it be omitted?
Hope springs eternal.
Wesnoth acronym guide.
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

Hey, would it be very hard if you make it so that when you double-click a .cfg scenario, Wesnoth opens and automatically loads the scenario and start playing? Currently, its like, you double click, and wesnoth loads, and you still have to go through the menus. It seems like its impossible, but I don't know anything about C++ so I am not quite sure.
Why did the fish laugh? Because the sea weed.
User avatar
Noyga
Inactive Developer
Posts: 1790
Joined: September 26th, 2005, 5:56 pm
Location: France

Post by Noyga »

For this you just associate the .cfg extension with wesnoth --load
(This would only work with SVN trunk trough)
Darth Fool
Retired Developer
Posts: 2633
Joined: March 22nd, 2004, 11:22 pm
Location: An Earl's Roadstead

Post by Darth Fool »

scott wrote:What is the last argument for? It looks like you're specifying the game data location. Can it be omitted?
Yes, it can be omitted. I end up using it since I often have more than one copy of wesnoth floating around and need to specify which data directory to use.
Post Reply