Is movement_type inextricably married to 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.
Is movement_type inextricably married to type?
This doesn't work:
But this does:
So I know I wasn't taking crazy pills when I thought the general concept of overriding a key in the unit should work...just not movement_type? The only thing I can think of is there is some unbreakable bond between type and movement_type which is a shame if true. I even tried storing the unit, clearing stored_unit.movement_type and then assigning it a new value. Am I missing something obvious here?
Code: Select all
[unit]
side=6
type=Yeti
x=5
y=17
movement_type=smallfoot
[/unit]
Code: Select all
[unit]
side=6
type=Yeti
x=5
y=17
level=0
[/unit]
Re: Is movement_type inextricably married to type?
Yes you are. It's called [modifications], [object] and [effect]. The concept of overriding [unit_type] keys directly never worked, some of them could be changed via storing-unstoring, but preffered approach was and still is [object] [effect] pair inside an [event] or [modifications] tag.
Somewhere, between the sacred silence and sleep.
Disorder.
Disorder.
- Ken_Oh
- Moderator Emeritus
- Posts: 2178
- Joined: February 6th, 2006, 4:03 am
- Location: Baltimore, Maryland, USA
Re: Is movement_type inextricably married to type?
You made up "movement_type." According to http://www.wesnoth.org/wiki/UnitWML , it's "movetype."
Storing and unstoring also wouldn't work. At that point you'd have to alter the [resistance]s and [movement_cost]s directly.
Storing and unstoring also wouldn't work. At that point you'd have to alter the [resistance]s and [movement_cost]s directly.
Re: Is movement_type inextricably married to type?
So it does. That's odd, though, considering it's stored as movement_type in the save file and it's movement_type that i set when defining a unit using the unit_type tag.Ken_Oh wrote:You made up "movement_type." According to http://www.wesnoth.org/wiki/UnitWML , it's "movetype."
Re: Is movement_type inextricably married to type?
Well I know about that but there is no way to modify the movement_type value using that from what I can tell.Mist wrote:Yes you are. It's called [modifications], [object] and [effect]. The concept of overriding [unit_type] keys directly never worked, some of them could be changed via storing-unstoring, but preffered approach was and still is [object] [effect] pair inside an [event] or [modifications] tag.
- Ken_Oh
- Moderator Emeritus
- Posts: 2178
- Joined: February 6th, 2006, 4:03 am
- Location: Baltimore, Maryland, USA
Re: Is movement_type inextricably married to type?
Hah, so maybe you didn't grab the term out of thin air.voris wrote:So it does. That's odd, though, considering it's stored as movement_type in the save file and it's movement_type that i set when defining a unit using the unit_type tag.Ken_Oh wrote:You made up "movement_type." According to http://www.wesnoth.org/wiki/UnitWML , it's "movetype."
Just another irregularity in Wesnoth system of not directly modifying units.