Unitmarkers [SP/MP modification for 1.14]

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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.
josteph
Developer
Posts: 276
Joined: August 19th, 2017, 6:58 pm

Re: Unitmarkers [SP/MP modification for 1.12/1.13]

Post by josteph » December 20th, 2017, 12:46 am

I've just installed this add-on for the first time.

Using Wesnoth v1.13.10+dev (38e31aa61f-Clean), when I enable the mod in SP mode, I get:
User Interaction Required

The currently chosen era is not compatible with your setup. Please select a compatible one.

[default]
That doesn't happen with 1.13.8.

Edit: I see there are separate sets of markers for leaders/loyals/others.

Edit2: This is https://github.com/wesnoth/wesnoth/issues/2229

User avatar
Paulomat4
Moderator
Posts: 715
Joined: October 16th, 2012, 3:32 pm
Location: Wesmere library, probably summoning Zhangor

Re: Unitmarkers [SP/MP modification for 1.12/1.13]

Post by Paulomat4 » January 8th, 2018, 3:27 pm

Even though this seems to be a wesnoth issue, thank you for reporting :)
Creator of Dawn of Thunder and Global Unitmarkers

"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl

User avatar
Paulomat4
Moderator
Posts: 715
Joined: October 16th, 2012, 3:32 pm
Location: Wesmere library, probably summoning Zhangor

Re: Unitmarkers [SP/MP modification for 1.14]

Post by Paulomat4 » June 13th, 2018, 9:19 pm

Unitmarkers has now been uploaded to the 1.14 add-on server. There has also been a bugfix that prevented heroes and leaders to go back to normal.
Changelog (also for the previous version for completeness sake):

Code: Select all

Version 1.4.2
-Fixed the bug of Hero and Leader units getting the loyal Icon after "revert all changes"
-upload to 1.14

Version 1.4.1
-Manually reshaded every pixel of the flag icon (finally happy with it)
-complete macro-rewrite to use objects for filtering (hopefully unlocking overlay storing)
-recoloring of leader crowns
Creator of Dawn of Thunder and Global Unitmarkers

"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl

josteph
Developer
Posts: 276
Joined: August 19th, 2017, 6:58 pm

Re: Unitmarkers [SP/MP modification for 1.14]

Post by josteph » July 4th, 2018, 9:05 am

On 1.14, when a unit marked with crossed flaming swords stands on shallow water (Ww) and the Animate water wesnoth preference is enabled, the top-left end of the swords blinks:
Screenshot_2018-07-04_08-58-48.png
Screenshot_2018-07-04_08-58-48.png (14.33 KiB) Viewed 6343 times
The surrounding hexes are all shallow and deep water. Blinking stops if I place a Sky Drake in the adjacent hex to the NE, but not if I place a Peasant in that hex.

User avatar
Paulomat4
Moderator
Posts: 715
Joined: October 16th, 2012, 3:32 pm
Location: Wesmere library, probably summoning Zhangor

Re: Unitmarkers [SP/MP modification for 1.14]

Post by Paulomat4 » July 5th, 2018, 7:40 am

Hello Josteph,

Thanks for reporting first of all. I think the problem you're having is due to the way that wesnoth renders overlays. Maybe I could place the swords a few pixels farther down so it won't be cut off from the hex?
Creator of Dawn of Thunder and Global Unitmarkers

"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl

josteph
Developer
Posts: 276
Joined: August 19th, 2017, 6:58 pm

Re: Unitmarkers [SP/MP modification for 1.14]

Post by josteph » July 5th, 2018, 3:14 pm

Hi Paulomat, you're welcome. Placing the overlay a bit farther down should work, but I wonder if this isn't a wesnoth bug, in that the water animation shouldn't be rendered over the overlay.

Shiki
Developer
Posts: 241
Joined: July 13th, 2015, 9:53 pm
Location: Germany

Re: Unitmarkers [SP/MP modification for 1.14]

Post by Shiki » July 6th, 2018, 12:22 pm

josteph wrote:
July 4th, 2018, 9:05 am
On 1.14, when a unit marked with crossed flaming swords stands on shallow water (Ww) and the Animate water wesnoth preference is enabled, the top-left end of the swords blinks:

Screenshot_2018-07-04_08-58-48.png

The surrounding hexes are all shallow and deep water. Blinking stops if I place a Sky Drake in the adjacent hex to the NE, but not if I place a Peasant in that hex.
Does it fit into https://github.com/wesnoth/wesnoth/blob ... /alpha.png ?

If not, then it is not an issue specific to water, I saw it with caves. It has an impact when you move the mouse over certain adjacent hexes.
Introduction to WML filtering and WML variables.
Active until mid-January.

josteph
Developer
Posts: 276
Joined: August 19th, 2017, 6:58 pm

Re: Unitmarkers [SP/MP modification for 1.14]

Post by josteph » July 7th, 2018, 7:17 am

Thanks Shiki. The chopped part starts a few pixels outside the yellow frame that marks the hex under the cursor. I can reproduce the issue in caves too as you describe. Is there anything I can do to help fix this?

josteph
Developer
Posts: 276
Joined: August 19th, 2017, 6:58 pm

Re: Unitmarkers [SP/MP modification for 1.14]

Post by josteph » October 16th, 2018, 9:59 pm

Commit https://github.com/wesnoth/wesnoth/comm ... 59d6da560c in master causes the markers to disappear when a unit advances.

(That commit had a syntax error that was fixed by the next commit, https://github.com/wesnoth/wesnoth/comm ... a2c2688627)

User avatar
Paulomat4
Moderator
Posts: 715
Joined: October 16th, 2012, 3:32 pm
Location: Wesmere library, probably summoning Zhangor

Re: Unitmarkers [SP/MP modification for 1.14]

Post by Paulomat4 » October 17th, 2018, 9:40 am

thanks for informing me josteph! I'll see if I can get around to create a fix.
Creator of Dawn of Thunder and Global Unitmarkers

"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl

josteph
Developer
Posts: 276
Joined: August 19th, 2017, 6:58 pm

Re: Unitmarkers [SP/MP modification for 1.14]

Post by josteph » October 17th, 2018, 7:43 pm

Thanks Paulomat. I'm not sure if Unitmarkers should be changed or if wesnoth upstream should come up with a backwards compatible solution. If the former, then the change should certainly be mentioned in changelog.

josteph
Developer
Posts: 276
Joined: August 19th, 2017, 6:58 pm

Re: Unitmarkers [SP/MP modification for 1.14]

Post by josteph » November 6th, 2018, 6:29 am

Hi again Paulomat. When a unit has a marker, removing the marker also removes all other objects the unit has (for example, if the unit had picked up a storm trident, removing the marker also removes the storm trident attack from the unit). This is because the [remove_object] on event_macros.cfg:138 does not specify an object_id.

The following patch fixes it in my testing (I had unit1 pick up a storm trident, gave unit1 a marker, gave unit2 a marker, and reverted unit1's marker), but it leaves the unit with both the name=normal_unit object and with two copies of the _last_last_overlays object. I'm not sure if that's the correct outcome.
Spoiler:
I discovered this the hard way - I removed the marker from a unit that had picked up an item, and had to replay a few turns when I found out...

josteph
Developer
Posts: 276
Joined: August 19th, 2017, 6:58 pm

Re: Unitmarkers [SP/MP modification for 1.14]

Post by josteph » January 3rd, 2019, 3:30 pm

Hi Paulomat, any news on the regression in master (4 posts up)?

gfgtdf
Developer
Posts: 1132
Joined: February 10th, 2013, 2:25 pm

Re: Unitmarkers [SP/MP modification for 1.14]

Post by gfgtdf » January 3rd, 2019, 6:59 pm

I just updated the unitmarker part of the addon world conquest II to 1.15 which does basicially the same thing as this addon, maybe it'll help you: https://github.com/gfgtdf/World_Conques ... marker.lua . (it currently only supports 2 images, but you can easily add more images to the list at the top of that file), it required the wc2_utils.menu_item function that you'll also find in that addon. The code won't work in 1.14 though, only in 1.15+
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.

Post Reply