URL:
<http://gna.org/bugs/?10130>
Summary: Make alterations to units and sides direct
Project: Battle for Wesnoth
Submitted by: ken_oh
Submitted on: Wednesday 10/10/2007 at 13:38
Category: Feature Request
Severity: 1 - Wish
Priority: 5 - Normal
Item Group: WML
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: n/a
_______________________________________________________
Details:
Currently, mixing Direct Actions and making changes to sides/units by storing
and altering variables directly can cause some big problems.
For example, if you increase a unit's max hit points with AMLA tough, you
cannot simply set that unit's hitpoints to max_hitpoints, to achieve a full
heal. The max_hitpoints aren't its true in-game value, because of the way
that [modifications] are stored and effect the unit continually. Furthermore,
the current process to fully heal a unit is, in my opinion, not nearly as
intuitive as it could be.
If functions, like AMLA, simply altered unit variables instead of adding
[modifications] tags, I think it would be much easier to grasp for WML
coders. Common functions could then be macros. For example, this would
roughly be a better way to full heal:
#define FULL_HEAL FILTER_KEY FILTER_VALUE
[store_unit]
[filter]
{FILTER_KEY}={FILTER_ARGUMENT}
[/filter]
variable=healed
[/store_unit]
{FOREACH healed i}
[scroll_to]
x="$healed[i].x"
y="$healed[i].y"
[/scroll_to]
{VARIABLE healed[i].hitpoints $healed[i].max_hitpoints}
[unstore_unit]
variable=healed[i]
text="Healed"
{COLOR_WHITE}
[/unstore_unit]
[sound]
name=heal.wav
[/sound]
{NEXT i}
#enddef
Because it would just let WML coders use:
{FULL_HEAL type Bowman}
{FULL_HEAL x,y 23,35}
This doesn't stop at [object], but [modify_side], [set_recruit], [gold],
[store_gold], [teleport], [kill], [status] and I'm sure more could all be
handled via macros.
The important thing is this opens up directly altering sides and units
instead of trying to find the exact way you are "supposed" to do it. This is
all for flexibility, as more and more designers are trying to do what hasn't
been done before.
[modifications] might want to be stored anyway as a "this has been done to
this unit" note, in the case of temporary items and the general ability to
take away modifications.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?10130>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs