B Tutorial Other How to change the back color of a banner/heraldic armor

Users who are viewing this thread

Lord Kinlar

Master Knight
How to change the back color of heraldic armors.

This is not saved-game compatible, you have to start a new game!(1)

(1) But you can always find the hex/decimal number in your saved game file and change it to whatever you like using a HEX editor if you really want to. I've tried it myself and it worked. See the bottom of the message for more info. :wink:

The back colors for banners are all assigned at the beginning of a new game and they are in game_start script in scripts.txt.

Here's my banner, the one with yellow dragon thingy on a reddish background. The hex value of this reddish background is approximately 701918.



The original banner underneath it (banner #118 in the pic below) has a whitish back color as you can see in the list below which is incompatible with my reddish banner. The hexadecimal color value for it is DEDBD6. Note that this color representation is exactly the same as the one used in web design.

bannersallgx8.jpg


Now, all I need to do is to replace dedbd6 with 701918.

You can find all the hex values for banner back colors in module_scripts.py which comes with 1.010 module system, but here is a short list for the ones who don't have it (ignore the 0xFF bit).

0 0xFF8f4531
1 0xFF315458
2 0xFF373736
3 0xFFa48b28
4 0xFF497735
5 0xFF82362d
6 0xFF793329
7 0xFF262521
8 0xFFd9dad1
9 0xFF524563
10 0xFF91312c
11 0xFFafa231
12 0xFF706d3c
13 0xFFd6d3ce
14 0xFF912929
15 0xFF394584
16 0xFF42662e
17 0xFFdfded6
18 0xFF292724
19 0xFF58611b
20 0xFF313a67
21 0xFFb5a231
22 0xFFbdb629
23 0xFF6e7929
24 0xFFd6d3ce
25 0xFF94a642
26 0xFF944131
27 0xFF893b34
28 0xFF425510
29 0xFF94452e
30 0xFF475a94
31 0xFFd1b231
32 0xFFe1e2df
33 0xFF4a4942
34 0xFFc6b74d
35 0xFF7b5184
36 0xFF212421
37 0xFF3c5d9a
38 0xFF4d7136
39 0xFFdfdfd6
40 0xFF527539
41 0xFF9c3c39
42 0xFF42518c
43 0xFFa46a2c
44 0xFF843829
45 0xFF2c6189
46 0xFF556421
47 0xFF9d621e
48 0xFFdeded6
49 0xFF6e4891
50 0xFF865a29
51 0xFFdedfd9
52 0xFF524273
53 0xFF8c3821
54 0xFF948403
55 0xFF313031
56 0xFF47620d
57 0xFFdfded6
58 0xFFd6d7d6
59 0xFF2e2f2c
60 0xFF604283
61 0xFF395584
62 0xFF313031
63 0xFF7e3f2e
64 0xFF343434
65 0xFF3c496b
66 0xFFd9d8d1
67 0xFF99823c
68 0xFF9f822e
69 0xFF393839
70 0xFFa54931
71 0xFFdfdcd6
72 0xFF9f4a36
73 0xFF8c7521
74 0xFF9f4631
75 0xFF793324
76 0xFF395076
77 0xFF2c2b2c
78 0xFF657121
79 0xFF7e3121
80 0xFF76512e
81 0xFFe7e3de
82 0xFF947921
83 0xFF4d7b7c
84 0xFF343331
85 0xFFa74d36
86 0xFFe7e3de
87 0xFFd6d8ce
88 0xFF3e4d67
89 0xFF913331
90 0xFF4d6994
91 0xFF4a6118
92 0xFFd9d8d3
93 0xFF394479
94 0xFF343331
95 0xFF3f4d5d
96 0xFF4a6489
97 0xFF313031
98 0xFFd6d7ce
99 0xFFc69e00
100 0xFF638e52
101 0xFFdcdbd3
102 0xFFdbdcd3
103 0xFF843831
104 0xFFcecfc6
105 0xFF8f4431
106 0xFF602926
107 0xFFd3d4cb
108 0xFFdcdbd3
109 0xFF556024
110 0xFF602d2c
111 0xFF315184
112 0xFF313031
113 0xFFe7e7e7
114 0xFF526d47
115 0xFFdedbd6
116 0xFFb2a631
117 0xFF76713f
118 0xFFdedbd6
119 0xFFe9eae7
120 0xFF6b5131
121 0xFF31557b
122 0xFF703324
123 0xFFe7e3de
124 0xFFd6d7ce
125 0xFF3f6e39

As you can see above, the original back color for banner #118 is 0xFFdedbd6 which is 4292795350 as decimal. Now, I need to find this decimal number in game_start script in scripts.txt and replace it with 4285536536 for 0xFF701918 which is my reddish color. You can use the Windows Calculator in 'scientific mode' for HEX/DEC conversion.

This is the piece of code in scripts.txt that I'm talking about...

500 3 360287970189640282 118 4292795350 500 3 360287970189640282 119

Now I can save it and start a new game.  :wink:

Here's a screenshot

mb4wx5.jpg


Tips for editing the saved game:

Open your saved game using a hex editor and search for the hex value (FFDEDBD6) or the reversed hex value (D6DBDEFF) or the integer value (4292795350) as integer or string/text and when you find the right value simply replace/overwrite it with your color. If you do it right, the file size will remain unchanged.

 
So why change the script? why not change the original storage space (banner_background_color_array), allowing you to change multiple banners at one go? or does it not work?

Just trying to understand how this is working, unfortunatly im 50 miles from my comp... doesnt the script pull the data it needs from banner_background_color_array?
 
mfa_uk said:
So why change the script? why not change the original storage space (banner_background_color_array), allowing you to change multiple banners at one go?

banner_background_color_array or the storage space as you call it, is actually a troop. :smile: And no, that troop doesn't have a pre-assigned color values stored in troops.txt. The game assigns them on the fly at the beginning of your game and I think it then stores them in the saved game file.

mfa_uk said:
doesnt the script pull the data it needs from banner_background_color_array?

Yes, it seems so. The script stores the hex color values in it at the beginning of the game.
 
Ah that was the other thought that the script dumps to banner_background_color_array instead of calling from. Sorry if this is a pain had the game for 2-3 weeks now, really enjoying it and kinda getting into the changing banners which has its follow on of more modding, though never really modded before but have dabbled in coding.

I would have thought that the script would pull the variable from somewhere... if you in your devlopment had to change all the banners, is easier to do in an array then keep changing your code, IMHO based on personal experience, not to mention it makes the code longer then it needs to be. Perhaps.

Having thoughts but have questions, does banner_background_color_array change if you say changed banner #1 background in the script and started a new game. Ok its prolly all a lil redundent, use to code on a game and really enjoyed it; not done it now for couple of years sooooo, i get excited and carried away with myself lol for which i apologise.

Thanks for posting the results at least now there is no real restriction into what colour your banner can be.
 
Prepared a color palette for Photoshop for all the back colors of banners in the game.



Download:

http://rapidshare.com/files/165049735/Mount___Blade.aco
 
Great guide!

I am having a bit of trouble editing my save game however.

in my game I used your new 21 custom banners from the other thread. I replaced the banners_f.dds file with yours and it worked in game. I selected the black and gold banner in game, but it has a white back and looks a bit odd.

for the black and gold banner with the 4 birds, would that be 108? Because I can't seem to find FFdcdbd3, reversed or decimal in my saved game file with that banner selected.

Thanks for any help! I hope this all made sense :razz:
 
Hellebore said:
Great guide!

I am having a bit of trouble editing my save game however.

in my game I used your new 21 custom banners from the other thread. I replaced the banners_f.dds file with yours and it worked in game. I selected the black and gold banner in game, but it has a white back and looks a bit odd.

for the black and gold banner with the 4 birds, would that be 108? Because I can't seem to find FFdcdbd3, reversed or decimal in my saved game file with that banner selected.

The banner you mentioned indeed becomes #108, if you use my texture instead of banners_f.dds. Its default back color is dcdbd3 like you said. Ignore the 0xFF bit, I think the FF is used to make the value 32 bit and it probably has no other use. You need to find & replace this value (DCDBD3) with 2E2F2C which is the back color for the black and gold banner. Here's what you need to do to change the back color of your current banner, step by step...

1. Open your saved game file (e.g. sg01.sav) with a HEX editor.[1]

2. Search for the hex value D3DBDC (reversed DCDBD3).




3. You'll find 2 instances of the same color for banner #101 and #108. The one you need to replace is the second one.



4. Select and highlight the second D3DBDC and replace it with 2C2F2E (instead of 2E2F2C, because it's reversed).



5. Save the file.

That's all you need to do.

[1] The screenshots are taken from HxD v1.6.1.0.


 
This is wonderful information even if you use the Module system.  Just the color palettes and general layout will help.  My mod is extremely tied into Heraldry, and it will all be custom so anything helps.

Thank you sir.
 
Hallo,

your Tip Works in my savegame. But later in game I want to change the colour of my Banner from white to black. I have modify first in this way:

1. from yellow to white:

  -2848a4
to
  -d6dedf

2. now i want to chose the colour from white to black

  -d6dedf
to
  -363737

But the colour of my backsite allways is white. What have I make false?

Thanks for help.

Vaelius Noctu
 
Thanks for this but I have a question. How do I find out what the decimal values of a colour is? I tried to figure it out in paint but couldn't see anything. I also wonder if anyone know where the decimal code for the frontside background colours lay, I do intend to change most banners into having the same front and back colours.
 
King Yngvar said:
Thanks for this but I have a question. How do I find out what the decimal values of a colour is? I tried to figure it out in paint but couldn't see anything. I also wonder if anyone know where the decimal code for the frontside background colours lay, I do intend to change most banners into having the same front and back colours.

I'm pretty sure there is a guide in the Library, wait one minute and I'll find it.
 
What I do is pick a color, then stick with the same color hexadecimal number for both my custom banner AND for editing my save game so then they both match up.

Earlier, I would create a custom banner with one color and then try to match it up when I'm editing my save game. The result is close, but much more of a guessing game.

So this way, I just use any online site like the one below to choose a color, find out its hexadecimal enumeration and then just stick with it for BOTH my custom banner color AND my Editing my save game, so they both agree.

Any color picker site like this works wonders: http://www.colorpicker.com/
 
Back
Top Bottom