1.16: general problems caused by transport ships unloading their passengers
Opened this issue · 15 comments
This wose has been unloaded from this transport ship:
However, the image is still showing as being overlaid atop the ship that just unloaded it. This only started happening when porting to BfW 1.16; it worked fine on 1.14.
Edit: the original issue reported here with the unit image overlay is fixed; I'm keeping this issue open for other related issues I noted in follow-up comments...
The macro {TEG_SHIP_PASSENGERS}
is defined in utils/units.cfg
:
The_Earths_Gut/utils/units.cfg
Lines 187 to 404 in 516617b
ok it looks like it ought to get removed at line 326?
The_Earths_Gut/utils/units.cfg
Line 326 in 516617b
ok it looks like it ought to get removed at line 326?
The_Earths_Gut/utils/units.cfg
Line 326 in 516617b
So, no, that doesn't do it anymore; it looks like I'm going to have to use [remove_object]
instead, but to do that I'll need to figure out how to get the name of the object I want to remove...
ok so I think this is the last bug blocking a release on the BfW 1.16 add-on server...
The original issue may be fixed now, but there's still some glitchiness in this area with recruitment flags and stuff, so I'm going to reopen
...also, ships and passengers still have their events tied together even after unloading, meaning that if Hamel's transport dies after unloading him, it can still cause defeat.
...and now that I've reloaded to a previous save, all the passengers are gone? wtf
Maybe @CelticMinstrel has some more help for me after previously helping me in 9117fcc?
Maybe @CelticMinstrel has some more help for me after previously helping me in 9117fcc?
...or maybe @Toranks can help?
Overlays are converted to objects in 1.16. I presume that's the core issue here. You could inspect the resulting objects with :inspect to see if they have an ID, and use that with [remove_object]
. You could explicitly use objects for the overlays so you control what the ID is. Or if you don't have other overlays you could use Lua such as the following to remove all overlays:
the_unit:remove_modifications{
wml.tag.effect{
apply_to=overlay
}
}
Note: That'll remove any object that uses an overlay. It could easily remove a bunch of things you don't want it to.
Overlays are converted to objects in 1.16. I presume that's the core issue here. You could inspect the resulting objects with :inspect to see if they have an ID, and use that with
[remove_object]
.
OK, so I'm finally getting around to looking into this, and, this would be a lot easier if I could select the text from the inspector and copy it and paste it here... maybe I'll open a separate issue against upstream Wesnoth about that... anyways, for now, I guess a screenshot will have to do:
...I guess these are the relevant objects? One of them doesn't even have an ID...
You could explicitly use objects for the overlays so you control what the ID is. Or if you don't have other overlays you could use Lua such as the following to remove all overlays:
the_unit:remove_modifications{ wml.tag.effect{ apply_to=overlay } }Note: That'll remove any object that uses an overlay. It could easily remove a bunch of things you don't want it to.
...oh wait, I wonder if wesnoth/wesnoth#5190 might be something I need to look out for if I'm going to be using the [remove_object]
tag?
this would be a lot easier if I could select the text from the inspector and copy it and paste it here... maybe I'll open a separate issue against upstream Wesnoth about that...
(this is now wesnoth/wesnoth#8032 btw)
ok so actually upon further inspection, the issue of the overlays is actually already solved, it's just the part where the death of a ship that previously carried a hero can cause defeat (even after having unloaded that hero) that remains...
...oh, and one other thing that I'd like to slot under this issue (although it shouldn't be considered a blocker for 1.0 like the linked deaths part is), is that when a ship can unload a passenger to multiple hexes, the player should be able to choose the hex, rather than the game just choosing one for them.