type= in a [side] tag

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
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

type= in a [side] tag

Post by Ranger M »

I tried looking on the wiki for this info, and couldn't find anything, so I'm asking here (and will probably add it to the wiki afterwards, unless somebody else does)

I'm currently trying to find a workaround for the change of the leader unit in my campaign. Currently, in the next release of it, everyone will have to start again because I have changed Reth's unit type to suit a new feature in the campaign. However, I have a way of getting around this, if something is true about WML.

in the [side] tag you have to (as far as I know) specify what type of unit the leader will be. What I want to know is if this is necessary in later scenarios, as the unit description should contain this info stored in the save file. Or is a save_id required (I get the impression that the default of this is whatever you put in the description= field, but I'm not sure).


I would just test this to try it out, but I would prefer a fuller explanation so that I can add it to the wiki, and not make any mistakes about it.
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Re: type= in a [side] tag

Post by Dacyn »

Ranger M wrote:What I want to know is if this is necessary in later scenarios, as the unit description should contain this info stored in the save file.
The 'type' key is necessary, even though it has no in-game effect (1.1.2)
Ranger M wrote:Or is a save_id required (I get the impression that the default of this is whatever you put in the description= field, but I'm not sure)
That's right:
save_id default description
I edited the Side WML page somewhat, but I don't know what the best way to describe the way the 'type' key works (maybe it should be considered a bug)...
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Re: type= in a [side] tag

Post by scott »

Ranger M wrote:I tried looking on the wiki for this info, and couldn't find anything, so I'm asking here (and will probably add it to the wiki afterwards, unless somebody else does)

I'm currently trying to find a workaround for the change of the leader unit in my campaign. Currently, in the next release of it, everyone will have to start again because I have changed Reth's unit type to suit a new feature in the campaign. However, I have a way of getting around this, if something is true about WML.

in the [side] tag you have to (as far as I know) specify what type of unit the leader will be. What I want to know is if this is necessary in later scenarios, as the unit description should contain this info stored in the save file. Or is a save_id required (I get the impression that the default of this is whatever you put in the description= field, but I'm not sure).


I would just test this to try it out, but I would prefer a fuller explanation so that I can add it to the wiki, and not make any mistakes about it.

As I understand it, type is only looked at if there is no leader in the recall list.
Hope springs eternal.
Wesnoth acronym guide.
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Post by Dacyn »

No, it is used to create a temporary leader which is then replaced by the real leader. The only way this can affect the game is if "type" does not exist or is not a valid unit, in which case the game will crash.
Hagow
Posts: 14
Joined: April 4th, 2006, 7:58 pm
Location: Canada

Post by Hagow »

Also, if you're editing/testing a campaign scenario and don't want to start from the beginning, type= defines the leader you get. I think it's the same thing for the player starting gold value for each scenario, which has no effect if playing the campaign straight through.
Fool, you almost owwwed in a confined space! Do you realize one more "ow" and the whole place'll go up in flames?
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Post by Dacyn »

(If gold is carried over from a previous scenario, this value is the minimum starting gold.)
Also the 'gold' key has a default (100), which means it doesn't need to be mentioned explicitly as 'type' does.
Post Reply