Mon 25 Jan 2010 10:06:57 PM UTC, comment #10:
also,
--
shadowmaster: and, what do you think about "what should be the default behavior of [unit]x,y=1,1[/unit] when 1,1 is occupied by other unit" ? should it, by default, overwrite or find nearby vacant tile ? ( https://gna.org/bugs/?15113 ).
(11:51:09 PM) shadowmaster: find nearby vacant tile
(11:51:17 PM) Crab_: ok, thanks
(11:51:52 PM) shadowmaster: that has been the behavior since as far as I can recall (1.0)
...
(11:58:10 PM) shadowmaster: Crab_: confirmed that "find nearby vacant tile" was the normal behavior in 1.0 already with a [event]name=start in the test scenario spawning an Orcish Warrior and an Elvish Shaman at 10,10
(11:58:38 PM) shadowmaster: the shaman was spawned second and at 10,9
(01/26/2010 12:00:04 AM) shadowmaster: same behavior in 1.6's test scenario with the same sequence but in a prestart event
|
Mon 25 Jan 2010 09:48:29 PM UTC, comment #9:
Got some negative feedack on aforementioned kind of solution on forum [ http://forums.wesnoth.org/viewtopic.php?f=21&t=28616 ], and asked zookeeper about "what should be the default behavior of [unit]x,y=1,1[/unit] when 1,1 is occupied by other unit"
--
(11:31:43 PM) zookeeper: Crab_, i'd say the default should be not overwrite but to put on nearest vacant
(11:32:15 PM) zookeeper: that's the "safe" default...if someone wants to potentially erase existing units then they ought to specify it
--
|
Wed 20 Jan 2010 09:10:00 PM UTC, comment #8:
Making sure that [unit] spawns only on vacant hexes fully prevents 'accidential' overwrites such as https://gna.org/bugs/index.php?14384 , which are annoying bugs and are far more harder to spot than mis-placings and duplications. I would prefer [unit] to work this way, requiring explicit authorization before replacing the unit with another.
However, I agree with 'you are changing the behavior of a WML tag very late in the development cycle.' part and, therefore, propose 'I revert that part now, document, and reapply in 1.9' solution.
|
Wed 20 Jan 2010 06:41:47 AM UTC, comment #7:
No, it isn't a feature, it's a bug; you are changing the behavior of a WML tag very late in the development cycle. And it isn't just an obscure behavior: designers do use the [unit] tag to overwrite units in events without killing them first (and nothing in the documentation says they shouldn't). Please revert this part of your patch.
|
Tue 19 Jan 2010 09:47:57 PM UTC, comment #6:
yes, silene is right, 'the fact that unit cannot be created in the proper location' is a consequence of my change. but, IMO, it's not a bug, it's a feature - a consequence of the fact that the original unit is still not dead ('A unit isn't erased yet') at this time, so it's square is occupied, so the ghost is spawned at nearest free square.
|
Sun 17 Jan 2010 06:40:53 AM UTC, comment #5:
The filtering part can't be changed easily. However, the fact that unit cannot be created in the proper location may be a bug introduced by Crab_ when he rewrote the way units are created for 1.7.11.
|
Sat 16 Jan 2010 11:13:12 AM UTC, comment #4:
ai0867, you can go ahead and fix this before 1.8 without worrying about compatibility. wmllint has a test for units speaking in their die events and I have already used it to verify that mainline no longer has any of these cases in it. (I fixed several myself.)
|
Fri 15 Jan 2010 12:45:19 PM UTC, comment #3:
It sounds like this may be more trouble than its worth to change. Since the behavior seems counterintuitive, I added a note to the wiki.
|
Fri 15 Jan 2010 12:57:21 AM UTC, comment #2:
My previous guess was incorrect. The current method of firing events requires that the unit still exists in order for it to be filtered on.
I'll see if this can be changed, but this will almost certainly have to wait for 1.9, so I'm marking this bug postponed for now.
|
Fri 15 Jan 2010 12:48:39 AM UTC, comment #1:
A unit isn't erased yet at that point because the die event can be used to revive the unit.
This can also be done from the last breath event however and probably only exists for backwards compatibility reasons.
I'm not sure if it's a good idea to change it this late in 1.7 though.
|
Tue 12 Jan 2010 04:48:59 PM UTC, original submission:
A die event fires after the unit's death animation plays, and the unit disappears. However, in the following code, the unit that triggered the event can be the one who talks. Also, the ghost won't appear in the right place:
As a workaround, you can add a [kill] tag to the die event:
But that isn't obvious, and if it's necessary, it should happen internally.
|