[engine] Automatically mirror message images
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
[engine] Automatically mirror message images
Several times (in different campaigns), I have found myself lost when trying to follow a conversation ([message]]s) between units. Why? Because I could not locate the speaking unit. While the game does conveniently scroll to the unit, there are times when the unit ends up underneath its own portrait (as displayed with the message), resulting in it not being visible.
What I would propose is having the game detect where on the screen the speaker of a [message] is (or will be, depending on whether this would be done before or after the scroll). If the unit is on the left half of the screen, the game should/would mirror the portrait for the message and display it on the right side of the screen. Probably, there should be an opt-out (or opt-in) for scenario builders who want to override this and explicitly control where the image appears.
Most of this functionality is already available, through the image path functions ~FL()~RIGHT(). The missing piece is determining where on the screen the unit will be. This puts it outside the realm of what can be reliably done in WML (and in Lua, according to some reliable sources). Plus, I think it would be nice for the image mirroring to be automatic/default since in my opinion, it is almost always the right thing to do.
What I would propose is having the game detect where on the screen the speaker of a [message] is (or will be, depending on whether this would be done before or after the scroll). If the unit is on the left half of the screen, the game should/would mirror the portrait for the message and display it on the right side of the screen. Probably, there should be an opt-out (or opt-in) for scenario builders who want to override this and explicitly control where the image appears.
Most of this functionality is already available, through the image path functions ~FL()~RIGHT(). The missing piece is determining where on the screen the unit will be. This puts it outside the realm of what can be reliably done in WML (and in Lua, according to some reliable sources). Plus, I think it would be nice for the image mirroring to be automatic/default since in my opinion, it is almost always the right thing to do.
Re: [engine] Automatically mirror message images
The mirroring of the images is already done depending depending on the units in question (some images are meant to only be shown left or right) and the scenario settings, to show in case of a dialogue between to characters one left and the other one right.
I think a better idea would be to automatically scroll the talking unit into the free space not covered by any porttrait or message.
I think a better idea would be to automatically scroll the talking unit into the free space not covered by any porttrait or message.
Re: [engine] Automatically mirror message images
I thought about this, but such scrolling might not be possible (e.g. units on the left edge of the map).pauxlo wrote:I think a better idea would be to automatically scroll the talking unit into the free space not covered by any porttrait or message.
What I was thinking of was not to prohibit a scenario from specifying "this image is on the left" and "that image is on the right", but to provide a more player-friendly default for when the scenario does not specify such things. Maybe add a ~LEFT() pseudo-function to specify an image that will always be on the left (analogous to the existing ~RIGHT()), and apply automatic side selection only to those images with neither ~LEFT() nor ~RIGHT() specified?
Edit: Actually, I would prefer a key in the [message] tag that could be used to specify "left", "right", or "auto" instead of these image functions. A key would have the advantage that you could more easily control the position of the image independent of which image is displayed.
Last edited by JaMiT on February 8th, 2012, 12:49 am, edited 1 time in total.
Re: [engine] Automatically mirror message images
Personally, I would like to have such an auto-mirror option available and I agree that there should be an option to turn it on or off. I have no strong opinion as to whether this should be the default or an 'opt-in' (although if it were just me, I'd make it the default) since, as we discussed in JaMiT's other thread, you can always redefine the default behavior of the
[message]
tag to be whichever way you like it.SP campaigns: Galuldur's First Journey (1.12 & 1.14) & Grnk the Mighty (1.10 & 1.12)
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on