Results 1 to 7 of 7

Thread: Changing faction colors

  1. #1
    Guest 's Avatar

    Default

    Hello,

    Is it possible to change the colors of the unit bases on the strategic map? I ask because I would like to change England to be a 2-tone faction, like all the others, using the Egyptian yellow as the top color of the pedestal.

    I found the bif file for the unit base, but it obviously is in special colors. Thanks mucho for your help.



    ------------------
    Write, edit, I've got the pen,
    V'ger gone

  2. #2
    Senior Member Senior Member Wellington's Avatar
    Join Date
    Sep 2002
    Location
    Den Haag, Netherlands
    Posts
    1,442

    Default

    Not yet, as far as I'm aware. Changing the faction colours is a 'high priority' request at present.

    BTW - anyone know the exact RBG numbers for each of the 20 factions ? If so, please let me know (if we know this we can scan the files, possibly medieval.exe, so see if we can spot a table of these colours and see what happens if we mod it with a hex editor). Worth a try ?

  3. #3
    Member Member PanthaPower's Avatar
    Join Date
    Sep 2002
    Location
    The Netherlands
    Posts
    248

    Default

    Quote Originally Posted by [b
    Quote[/b] (Wellington @ Sep. 25 2002,18:20)]Not yet, as far as I'm aware. Changing the faction colours is a 'high priority' request at present.

    BTW - anyone know the exact RBG numbers for each of the 20 factions ? If so, please let me know (if we know this we can scan the files, possibly medieval.exe, so see if we can spot a table of these colours and see what happens if we mod it with a hex editor). Worth a try ?
    Wellington, I was going through some old posts about changing faction colours and I found this topic. Did you by any chance look into the exe?

  4. #4
    Senior Member Senior Member Wellington's Avatar
    Join Date
    Sep 2002
    Location
    Den Haag, Netherlands
    Posts
    1,442

    Default

    PanthaPower,

    Yes. I spent a couple of daus many months ago going through the .exe with a Hex Editor. I was looking for 2 tables -

    1) faction colours
    2) the sea/land provinces (Lukmap) table

    Could'nt find either I was specifially looking for RGB valuesd that I could 'recognise' as being either a faction colour or a province colour in the Lukmap.

    I formed the opinions (be they right or wrong&#33 that maybe -

    1) the faction colours table that is hardcoded may NOT be exactly the same RGB colours we see in the game. As we don't know exactly how the engine 'replaces' the pink/green colours in the BIF we can't assume the values in any such faction colour table are exactly as we see them (maybe there is a table of faction colours that are have RGB lower values than we expect - and such RGB values are merely added to the pink/green colours thus prodiuding the faction colour we see&#33. Hard to tell without knowing exactly how the engine performs RGB colour transformations.

    2) Looking for a lukmap table (of 240-256 entries) was also unsuccessful. I suspected the table may be built dynamically when MTW loads - it could easily build such a table from the palette in the Lukmap (thus making the engine more flexable for future amendments). I'm pretty sure that's how it does it although therte do appear to be certain unchangable considerations (colour 0 MUST always be the pink colour).

    So, sorry but no success in either of these areas ...

    Still, if anyone can add anything to either of the 2 comments above I'm willing to have a second look

  5. #5
    Member Member PanthaPower's Avatar
    Join Date
    Sep 2002
    Location
    The Netherlands
    Posts
    248

    Default

    Quote Originally Posted by [b
    Quote[/b] (Wellington @ Dec. 27 2002,03:59)]PanthaPower,

    Yes. I spent a couple of daus many months ago going through the .exe with a Hex Editor. I was looking for 2 tables -

    1) faction colours
    2) the sea/land provinces (Lukmap) table

    Could'nt find either I was specifially looking for RGB valuesd that I could 'recognise' as being either a faction colour or a province colour in the Lukmap.

    I formed the opinions (be they right or wrong&#33 that maybe -

    1) the faction colours table that is hardcoded may NOT be exactly the same RGB colours we see in the game. As we don't know exactly how the engine 'replaces' the pink/green colours in the BIF we can't assume the values in any such faction colour table are exactly as we see them (maybe there is a table of faction colours that are have RGB lower values than we expect - and such RGB values are merely added to the pink/green colours thus prodiuding the faction colour we see&#33. Hard to tell without knowing exactly how the engine performs RGB colour transformations.

    2) Looking for a lukmap table (of 240-256 entries) was also unsuccessful. I suspected the table may be built dynamically when MTW loads - it could easily build such a table from the palette in the Lukmap (thus making the engine more flexable for future amendments). I'm pretty sure that's how it does it although therte do appear to be certain unchangable considerations (colour 0 MUST always be the pink colour).

    So, sorry but no success in either of these areas ...

    Still, if anyone can add anything to either of the 2 comments above I'm willing to have a second look
    Wellington,

    thanks for the quick reply. Well for point 1 I guess you might be right that the pink/green color is just added on top of the faction colours we see. Well, I think we could test that. Can't we subtract the pink/green rgb value (hex) from the display value (e.g. red for uk) and see if that rgb value can be found in the exe?

    For point 2, yes I also agree that it looks like the lukmap table is dynamic except for the hard-coded pink value.

  6. #6
    Senior Member Senior Member Kraellin's Avatar
    Join Date
    Nov 2000
    Location
    Here
    Posts
    7,093

    Default

    read target's explanation of this in the 'lbm file info' thread. the palette from the lukmap IS the table. the colors you use dont actually matter. someone in one of the threads even said that he used the color black for the pink color and it worked fine. what IS important is the index value. those match up with the province id's and borders and sea zone id's. their order is important and what counts.

    the index value is simply the order that the rgb color comes in the palette. that's all it is. the specific colors dont matter as long as you dont use the same one twice. as you move your mouse over the campaign map the color is read and then that color's index value is looked up and THAT is what is compared to see what is what, the index value, not the rgb color. so, the index value of 0 is ALWAYS the 'dead' area of the map, the one that is currently neon pink, but it doesnt matter if the rgb value is neon pink at all; it DOES matter that the color you use for the dead areas is index value 0, and the same holds true for every province color, border and sea zone.

    that make sense? target actually does explain it in that thread and from what i've seen of others who have gotten any results with the lukmap, that's what they're doing right. they've realized that it's the index value that's important, not the actual rgb value of the color (as long as you dont use the same color twice).

    K.

  7. #7
    Member Member PanthaPower's Avatar
    Join Date
    Sep 2002
    Location
    The Netherlands
    Posts
    248

    Default

    Quote Originally Posted by [b
    Quote[/b] (Kraellin @ Dec. 27 2002,11:36)]read target's explanation of this in the 'lbm file info' thread. the palette from the lukmap IS the table. the colors you use dont actually matter. someone in one of the threads even said that he used the color black for the pink color and it worked fine. what IS important is the index value. those match up with the province id's and borders and sea zone id's. their order is important and what counts.

    the index value is simply the order that the rgb color comes in the palette. that's all it is. the specific colors dont matter as long as you dont use the same one twice. as you move your mouse over the campaign map the color is read and then that color's index value is looked up and THAT is what is compared to see what is what, the index value, not the rgb color. so, the index value of 0 is ALWAYS the 'dead' area of the map, the one that is currently neon pink, but it doesnt matter if the rgb value is neon pink at all; it DOES matter that the color you use for the dead areas is index value 0, and the same holds true for every province color, border and sea zone.

    that make sense? target actually does explain it in that thread and from what i've seen of others who have gotten any results with the lukmap, that's what they're doing right. they've realized that it's the index value that's important, not the actual rgb value of the color (as long as you dont use the same color twice).

    K.
    Kraellin,

    I didn't know yet that the pink color at 0 in the palette was dynamic. Thanks for clearing that up. But what we are speaking about here in this thread is the faction colors. Not the map itself. Because I'm busy with a mod, I was wondering if I could change faction colours.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO