[engine] Automatically mirror message images

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
JaMiT
Inactive Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

[engine] Automatically mirror message images

Post by JaMiT »

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.
User avatar
pauxlo
Posts: 1049
Joined: September 19th, 2006, 8:54 pm

Re: [engine] Automatically mirror message images

Post by pauxlo »

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.
JaMiT
Inactive Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: [engine] Automatically mirror message images

Post by JaMiT »

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.
I thought about this, but such scrolling might not be possible (e.g. units on the left edge of the map).

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.
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: [engine] Automatically mirror message images

Post by mattsc »

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.
Post Reply