Minimap and extra Banner sets

Post Reply
Paul59
Sr. Colonel - Wirbelwind
Sr. Colonel - Wirbelwind
Posts: 1722
Joined: Tue Jul 21, 2015 11:26 pm

Minimap and extra Banner sets

Post by Paul59 » Thu Nov 15, 2018 10:28 am

I have been working on adding extra nation specific banners sets to the TT Mod, but I have run into a problem with the Minimap.

When I add extra banner sets beyond the current 7 sets, the Minimap just displays red units for the nations that have the extra banners, making the Minimap pretty useless.

Is there any way to make the Minimap show the correct colours?
Scenario Designer - Age of Belisarius, Rise of Persia, and Wolves at the Gate.

TT Mod Creator

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 21809
Joined: Sun Dec 04, 2005 6:25 pm

Re: Minimap and extra Banner sets

Post by rbodleyscott » Thu Nov 15, 2018 2:30 pm

I think the minimap is fairly useless anyway, but each to their own.

The minimap colours are defined in global.bsf line 123.

Code: Select all

int gBannerColour[14] = {16716849, 13158425, 15715694, 6020302, 15715694, 8307183, 16716849, 11393272, 12999292, 6023374, 16746145, 8841400, 14666290, 3646975};
(These are RGB hexadecimal colour codes converted to decimal)

You could obviously add to this list, but if you do it would mean that your Mod is unlikely to work after a game update, until you can redo your modded global.bsf file to match any changes in the updated vanilla version.

As we have discovered previously, it is easier to avoid this issue by not having modded scripts in your mod.

However, if you are willing to update the script each time the game is updated, you can set the minimap colours to fit your new banners.

If you prefer, what I could do in the next update is to make the minimap use one of the existing colour sets if gBannerIndex[side] is outside the range 0-13. Then at least the minimap would be usable even if it does not show the same colours as the banners, and you would not have to mod global.bsf.
Richard Bodley Scott

Image

Paul59
Sr. Colonel - Wirbelwind
Sr. Colonel - Wirbelwind
Posts: 1722
Joined: Tue Jul 21, 2015 11:26 pm

Re: Minimap and extra Banner sets

Post by Paul59 » Thu Nov 15, 2018 6:30 pm

rbodleyscott wrote:
Thu Nov 15, 2018 2:30 pm
I think the minimap is fairly useless anyway, but each to their own.

The minimap colours are defined in global.bsf line 123.

Code: Select all

int gBannerColour[14] = {16716849, 13158425, 15715694, 6020302, 15715694, 8307183, 16716849, 11393272, 12999292, 6023374, 16746145, 8841400, 14666290, 3646975};
(These are RGB hexadecimal colour codes converted to decimal)

You could obviously add to this list, but if you do it would mean that your Mod is unlikely to work after a game update, until you can redo your modded global.bsf file to match any changes in the updated vanilla version.

As we have discovered previously, it is easier to avoid this issue by not having modded scripts in your mod.

However, if you are willing to update the script each time the game is updated, you can set the minimap colours to fit your new banners.

If you prefer, what I could do in the next update is to make the minimap use one of the existing colour sets if gBannerIndex[side] is outside the range 0-13. Then at least the minimap would be usable even if it does not show the same colours as the banners, and you would not have to mod global.bsf.
Thanks Richard,

I have a policy with the TT Mod to modify as few scripts as possible, for exactly the reasons that you mention.

I was hoping that adding the minimap colours would be a matter of adding some .dds files, but as it involves the scripts I will not bother. Like you, I have not much use for the Minimap, I only wanted to get it right for others who may use it.

If you can make the Minimap use another colour for Side1, other than Red, that would be great. Side0 can continue with Red, and then the map will still be useable.
Scenario Designer - Age of Belisarius, Rise of Persia, and Wolves at the Gate.

TT Mod Creator

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 21809
Joined: Sun Dec 04, 2005 6:25 pm

Re: Minimap and extra Banner sets

Post by rbodleyscott » Fri Nov 16, 2018 9:09 am

Assuming that your (unreversed) "side0" banner colour will never be blue, and that your (unreversed) "side1" banner colour will never be red or yellow, I can use yellow for side0 and blue for side1 if both banners are outside the normal range, but use the vanilla colour if either banner is within the standard range.

This would mean that if both banners are outside the range, the minimap would use yellow and blue respectively. (And reverse them if for some reason the banners colours are reversed - e.g. in a campaign involving Romans/Spartans but in a battle which does not involve them).

if side0 is outside the normal range, and side1 is Roman or Spartan in the standard range, the minimap will use blue and red respectively, otherwise

if side0 is outside the normal range, and side1 is in the normal range, side0 will use yellow and side1 will use its normal side1 colour.

if side0 is in the normal range, and side1 is outside the normal range, side0 will use its normal side0 colour and side1 will use blue.

Does that work for you?
Richard Bodley Scott

Image

Paul59
Sr. Colonel - Wirbelwind
Sr. Colonel - Wirbelwind
Posts: 1722
Joined: Tue Jul 21, 2015 11:26 pm

Re: Minimap and extra Banner sets

Post by Paul59 » Fri Nov 16, 2018 12:40 pm

rbodleyscott wrote:
Fri Nov 16, 2018 9:09 am
Assuming that your (unreversed) "side0" banner colour will never be blue, and that your (unreversed) "side1" banner colour will never be red or yellow, I can use yellow for side0 and blue for side1 if both banners are outside the normal range, but use the vanilla colour if either banner is within the standard range.

This would mean that if both banners are outside the range, the minimap would use yellow and blue respectively. (And reverse them if for some reason the banners colours are reversed - e.g. in a campaign involving Romans/Spartans but in a battle which does not involve them).

if side0 is outside the normal range, and side1 is Roman or Spartan in the standard range, the minimap will use blue and red respectively, otherwise

if side0 is outside the normal range, and side1 is in the normal range, side0 will use yellow and side1 will use its normal side1 colour.

if side0 is in the normal range, and side1 is outside the normal range, side0 will use its normal side0 colour and side1 will use blue.

Does that work for you?
Yes that should work well. None of my Side0 banners are blue, and no Side1 is Red or Yellow.
Scenario Designer - Age of Belisarius, Rise of Persia, and Wolves at the Gate.

TT Mod Creator

Post Reply

Return to “Field of Glory II: Modding”