Changing leader type=
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.
Changing leader type=
My main character has grown up in the campaign so much that it is aobut time to change the unit. Same character, but another unit (as if it had advance, just that it advances when I want it, not when reaching a certaing amount of XP).
So, the main character must begin the scenario being a new type of unit, and so I wrote type=NewType in the [side] tag.
But, when I start the scenario, the leader doesn't change his type.
How can I change the type of the leader unit?
Thank you.
So, the main character must begin the scenario being a new type of unit, and so I wrote type=NewType in the [side] tag.
But, when I start the scenario, the leader doesn't change his type.
How can I change the type of the leader unit?
Thank you.
That's ridiculous, dragons have no windows...
Re: Changing leader type=
The leader definition inside the [side] tag works like this:
-save_id is checked, if not present, description is used (the leader's name that is) instead.
-if there is such a side, the first unit with canrecruit=yes on the recall list is selected as your leader and the rest of the definition is completely ignored
-if there isn't, the leader is created according to your specifications
So, you can either use MODIFY_UNIT or you can bump up the experience so she levels normally.
-save_id is checked, if not present, description is used (the leader's name that is) instead.
-if there is such a side, the first unit with canrecruit=yes on the recall list is selected as your leader and the rest of the definition is completely ignored
-if there isn't, the leader is created according to your specifications
So, you can either use MODIFY_UNIT or you can bump up the experience so she levels normally.
Re: Changing leader type=
That sound good, just... couldn't find MODIFY_UNIT in the Reference WML. Is that a 1.5 feature? If it is available in 1.4, how does it work? Would I need to store/unstore unit to make it work?
That's ridiculous, dragons have no windows...
Re: Changing leader type=
It's a macro, it's in core/macros/utils.cfg
It works like this:
{MODIFY_UNIT FILTER VAR VALUE}
so:
{MODIFY_UNIT (canrecruit=yes) type (Battle Princess)}
or something.
It works like this:
{MODIFY_UNIT FILTER VAR VALUE}
so:
{MODIFY_UNIT (canrecruit=yes) type (Battle Princess)}
or something.
Re: Changing leader type=
Worked pretty good, except for something that could be a bug. For some reason, the alignment doesn't change even if it is different between both units
That's ridiculous, dragons have no windows...
Re: Changing leader type=
Yes, there are problems with changing unit-type that way, sometimes animations are also mixed up.
So that leaves you with
-handing her 100000000000 XP so she levels
-just removing the previous unit and throwing in a new one with the same name
So that leaves you with
-handing her 100000000000 XP so she levels
-just removing the previous unit and throwing in a new one with the same name