[test] scenario

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
User avatar
db0
Posts: 400
Joined: January 3rd, 2006, 8:39 pm
Location: Somewhere Far Beyond...
Contact:

[test] scenario

Post by db0 »

Question: How do I use the [test] tag for a scenario when said scenario contains custom units?
When I start wesnoth in --test mode it always gives me an error that it can't find a unit.
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Which version are you using? What is the unit? It works fine for me in 1.0.2 and 1.1-svn. Perhaps you have modified the scenario file?

Edit: It's clearer now that you are probably trying to test a custom unit by modifying scenario-test.cfg, right? Well, where are you putting the custom unit? If you put it in the same place as the other units, then it's not custom anymore and the game should find it. I don't know if it's possible to register other file locations for the test scenario.
Hope springs eternal.
Wesnoth acronym guide.
User avatar
db0
Posts: 400
Joined: January 3rd, 2006, 8:39 pm
Location: Somewhere Far Beyond...
Contact:

Post by db0 »

That's the problem. I don't know where to put the unit cfg (it's for a campaign) and I don't want to put it with the default units (although I may try that in the end)
User avatar
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

Post by Ranger M »

put it in a file in campaign folder called units. Then in the .cfg file in the campaign folder you need to reference it outside of the [campaign] tag, It should look something like this.
[+units]
{@campaigns/Invasion_of_Arendia/units}
[/units]
except use your campaign folders name, not mine.
User avatar
db0
Posts: 400
Joined: January 3rd, 2006, 8:39 pm
Location: Somewhere Far Beyond...
Contact:

Post by db0 »

Did it.
I just took all the includes from the campaign file and put the after the [/test] tag. However units that were supposed to be recalled don't exist so I need to edit the .cfg to include them again.
Post Reply