Wesnoth 1.13.7
Moderator: Forum Moderators
- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Wesnoth 1.13.7
Oh, my bad. I didn't realize that scons and cmake put the executable in different places, so I loaded 1.13.6+dev by mistake and didn't notice. You're right, this is fixed in 1.13.7. Nevermind.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
Re: Wesnoth 1.13.7
My thoughts after a bit more time with 13.7:
- [heal_unit] with animate=yes seems to be broken? The unit gets healed but I get no animation, and this error message: (or one with a longer stack traceback, when there were [fire_event]s used before the [heal_unit]).
Code: Select all
error scripting/lua: lua/wml-tags.lua:692: attempt to call a nil value (field 'animate_unit') stack traceback: lua/wml-tags.lua:692: in local 'cmd' lua/wml-utils.lua:145: in field 'handle_event_commands' lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
I tried adding a second_unit, but the same thing happened. Also, [heal_unit] works correctly with animate=no. - The improvements to fake-map-edge are great! I use it quite a bit, so even though I had to spend some time adapting to the changes, it is much better overall now.
- Idk if this was in earlier 1.13.x, but I just now noticed that resistances and movement costs show up when hovering over the hp and moves on the right side bar. This is a wonderful idea, sincere thank you to anyone involved in this!
The last few months have been nothing but one big, painful reminder that TIMTLTW.
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
- Celtic_Minstrel
- Developer
- Posts: 2207
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Wesnoth 1.13.7
I think that heal_unit bug is recently fixed in master. Without looking at the code, I'm guessing you may be able to fix it locally for yourself by editing the wml-tags.lua file to replace "wesnoth.animate_unit" with "wesnoth.wml_actions.animate_unit".
(Or you could copy the fix from master; the API that the fix uses is in 1.13.7 already.)
(Or you could copy the fix from master; the API that the fix uses is in 1.13.7 already.)
Re: Wesnoth 1.13.7
Making that one line change sort of works... it at least isn't an error, but it doesn't animate either. Then I tried copying in these lines, but that resulted in this error:Celtic_Minstrel wrote:I think that heal_unit bug is recently fixed in master. Without looking at the code, I'm guessing you may be able to fix it locally for yourself by editing the wml-tags.lua file to replace "wesnoth.animate_unit" with "wesnoth.wml_actions.animate_unit".
(Or you could copy the fix from master; the API that the fix uses is in 1.13.7 already.)
error scripting/lua: lua/wml-tags.lua:694: bad argument #1 to 'add' (unit expected, got nil)
with the stack trace of course. Next I tried copying the entire file from github, but got the same error.
Of course, I'm just saying all this in case it's helpful; it wouldn't be a problem to turn off all my healing animations until the next version. I wasn't planning on publishing anything for a while anyway.
The last few months have been nothing but one big, painful reminder that TIMTLTW.
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
- Celtic_Minstrel
- Developer
- Posts: 2207
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Wesnoth 1.13.7
Oh, I think I understand why the first method didn't work (since healers is now a list of units rather than the filter config that was used to match those units). Not sure why the second method failed though, since
healers[1]
should undoubtedly be non-nil if... oh wait! I forgot that zero is truthy in Lua! It should be if #healers > 0
. The error of it being nil should indicate that the filter didn't match any units, I think.Re: Wesnoth 1.13.7
It would not help my complaints, but it would help remove one of the sources of my complaints. That would be definitely a very handy feature.Celtic_Minstrel wrote:Dugi: I've considered adding a "addon developer mode" option in Advanced Preferences which will enable the showing of deprecated messages (and possibly other things) which currently are just dumped to chat for everyone. Would that help with your complaints?
Re: Wesnoth 1.13.7
Ok with that change it is the best yet, but after the healer animates, it doesn't get its ellipse, hp bar, etc back. Also, the unit being healed doesn't animate, which means there is no animation if there is no healer (no [filter_second]). Which isn't really a surprise, since (even though I know nothing about lua) I don't see anything that looks like it's adding the unit from [filter] to the animator.Celtic_Minstrel wrote:Oh, I think I understand why the first method didn't work (since healers is now a list of units rather than the filter config that was used to match those units). Not sure why the second method failed though, sincehealers[1]
should undoubtedly be non-nil if... oh wait! I forgot that zero is truthy in Lua! It should beif #healers > 0
. The error of it being nil should indicate that the filter didn't match any units, I think.
The last few months have been nothing but one big, painful reminder that TIMTLTW.
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Re: Wesnoth 1.13.7
Glad to see a new mainline campaign finally being added, I have actually wanted to play Secrets of the Ancients for a while now, but just couldn't find the time.
So now that it is in mainline, I will simply have to find the time to play it.
So now that it is in mainline, I will simply have to find the time to play it.
- Celtic_Minstrel
- Developer
- Posts: 2207
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Wesnoth 1.13.7
This is a known bug that (if I recall correctly) was already fixed in master.Samonella wrote:after the healer animates, it doesn't get its ellipse, hp bar, etc back.
Was that not the case in 1.12.x? I don't remember. It's possible that I forgot something when reimplementingSamonella wrote:Also, the unit being healed doesn't animate, which means there is no animation if there is no healer (no [filter_second]).
[animate_unit]
.Re: Wesnoth 1.13.7
Yeah, [heal_unit] with animate=yes always played the "healed" animation, so if there's no [filter_second] it looks the same as if the unit rest-healed. Otherwise you don't get the healing sound effect, even if there is a [filter_second].Celtic_Minstrel wrote:Was that not the case in 1.12.x? I don't remember. It's possible that I forgot something when reimplementingSamonella wrote:Also, the unit being healed doesn't animate, which means there is no animation if there is no healer (no [filter_second]).[animate_unit]
.
The last few months have been nothing but one big, painful reminder that TIMTLTW.
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
- Celtic_Minstrel
- Developer
- Posts: 2207
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Wesnoth 1.13.7
Alright, I've fixed it up now on master. If you copy that code, it should work on 1.13.7 too apart from the ellipse/bars bug.
Re: Wesnoth 1.13.7
Looks good, thanks a ton!Celtic_Minstrel wrote:Alright, I've fixed it up now on master. If you copy that code, it should work on 1.13.7 too apart from the ellipse/bars bug.
The last few months have been nothing but one big, painful reminder that TIMTLTW.
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Re: Wesnoth 1.13.7
I think there's a bug in [animate_unit] too. It has the same problem with the ellipse/bars, but if that's fixed in [heal_unit] it probably already is here too. However, [facing] seems to have no effect? Here's my code in case something is wrong with it, but I'm pretty sure this worked in 13.6 (in 13.7 the unit attacks in whichever direction it happens to be facing).
Code: Select all
[animate_unit]
flag=attack
[filter]
id=Derek
[/filter]
[primary_attack]
range=melee
[/primary_attack]
hits=yes
[facing]
[filter]
id=Voadar
[/filter]
[/facing]
[/animate_unit]
The last few months have been nothing but one big, painful reminder that TIMTLTW.
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
- Celtic_Minstrel
- Developer
- Posts: 2207
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Wesnoth 1.13.7
It's quite possible. The underlying (undocumented) API used for the Lua implementation of
It looks like I just forgot to actually set the unit's facing to the calculated direction though. On the other hand, looking into this has made me realize that I improperly conflated two related-but-not-quite-the-same things in the API...
[facing]
changed a little after the 1.13.7 release if I recall correctly, so this might not be a case where you can copy code from master and have it just work.It looks like I just forgot to actually set the unit's facing to the calculated direction though. On the other hand, looking into this has made me realize that I improperly conflated two related-but-not-quite-the-same things in the API...
Re: Wesnoth 1.13.7
There seems to be another bug in [heal_unit]. The following code restores 1 HP, where it should do none:
I also tried a few variations, for example setting animate=yes or not touching moves, but it seems to always heal at least 1 HP.
Code: Select all
[heal_unit]
[filter]
id=Voadar
[/filter]
amount=0
moves=full
restore_attacks=yes
restore_statuses=no
[/heal_unit]
The last few months have been nothing but one big, painful reminder that TIMTLTW.
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG