PDA

View Full Version : LBM file info.



giskard
09-21-2002, 06:35
Hello.

I have been doing a little research into the campaign LBM files in paint shop pro. I have figured somethings out but have yet to get it working.

The LBM files used by MTW for the campaign use 235 colours. Compressed LBM's reduce the size of the LukMap2.Lbm to about 1.4meg but the original is roughly 700k.

Trying to use compressed LBM files just crashes the game out though. Uncompressed files dont but they are 12meg in size.

Also, whilst those files dont crash the game out they seem to loose boundry information and thus prevent the player from moving anywhere. Pressing shift doesnt bring up the owners of a regions colour nor anybody elses.

The game seems to load in anything from 16bit to 8bit uncompressed LBM's in without any problems. I dont know if PSP always saves the image as a 16bit image regardless of the colour settings I make in the problem.

If it does that would account for the extremely large LBM file that it creates (12meg instead of 700k).

I believe the file format MTW expects is 256 colour uncompressed LBM image. There may be some palette attributes I have yet to figure out.

First colour in the palette is used to determine the sea all boundies. In this case its a purpley Pink colour. The Sea regions do not seem to follow the same rules as land regions. They dont have any colours either side of them other than the regions own colour.

I dont believe there is any set pattern to the land/sea region colours. I think they just all have to be different so the game can pick out the regions. Only the first colour on the pallete is used more than once it would seem.

Now I just have to figure out why a simple load and save proceedure stops the LBM image from working.

It doesnt look like PSP's LBM plugin actually supports the correct LBM options for this game. I may be wrong but the file sizes are twice the size they should be when compressed and 200 times the size when uncompressed. So i believe its not saving them as 256 colours as it should be.

LBM and IFF between them support colour modes between 2 colours and 24bit. We dont seem to get the choice we usually get when saving off other image formats such as TGA.

Giskard

barocca
09-21-2002, 11:32
:-(
thats why i use the grafx tool,
a bit hard to begin with,
but once you figure out the 2 main bugs its fairly straight forward,
i rarely bother to edit anything in it,
(sometimes, but rarely)
i usually convert to bmp,
use MSpaint to tinker with the file,
then convert back to lbm.

====

the first bug is the screen resolution,

use a dos prompt, change to the gfx directory and type "gfx2 /?"
this will list all the video modes supported
remember your "preferred" mode,
open this file in notepad
"Gfx2.ini"
scroll down to the last line and enter your preferred mode
Default_video_mode = 58 ; (default 0)

58 is mine = 800x600

====

Second Bug is saving files to a new extension, GFX doesn't like doing this,

so :-
ensure you have view registered file extensions on in
view / folderoptions / view for the gfx directory,

then create a new text document image1.txt
then change the extension to the file type you want gfx to save to,
ie :- image1.bmp

open your origianl image in gfx, then choose save, scroll down the file format list to bmp and choose overwrite original!

then edit in a program that doesn't "fiddle" with the pallette, and use the same process to convert back to your chosen format...

:-)

giskard
09-21-2002, 13:09
Hello

grafx tool ?
Not sure I follow you. Is that a PSP tool or another program. I dont usually bother with PSP, especially since i got photoshop so please bear with me here http://www.totalwar.org/ubb/smile.gif

Btw i spent a few hours searching the net for something that supports LBM on the pc and I found a program called Pro Motion that saved IFF and ILBM images.

I downloaded the trail version and it does list those formats. Trouble is, they are disabled in the trial version so I cannot test them to see if they will work http://www.totalwar.org/ubb/frown.gif

I wont be buying it on the off chance it might work. Even if I could justify the paying money for a program for just one single task.

Looks like and interesting program though so I might explore its functions a bit and see if it is useful to me in other ways.

Heres the link for it incase anybody wants to try it out.
http://www.cosmigo.com/promotion/

There was very little else that would load and save LBM on the PC. On the miggy theres thousands. Might take a look at gimp for the PC. The linux version rox's so hopefully the PC version works just as well. Assuming there still is a PC version.

Giskard

LordGuyOfRome
09-21-2002, 21:47
About the LBMs files.. I can't test it cause GFX (nor the BIFreader) wants to cooperate with me, but what happens if one modify the LBM files in PSP, save them as BMPs, import them into GFX and save them into LBMs from there? Not like the old proggy does the magic of saving them in the size we need? anyone tried that yet?

regards

G

barocca
09-22-2002, 08:03
Grafx is available from the downloads section of the org,
shogun files / tools

====

i have not tried editng in photoshop, it is not a package that i use.

the lbm is an ancient format, that was way ahead of it's time, and in some ways is still unique.
I would imagine that any pure PC/windows based graphic editing software may cause similar errors to the ones Giskard is having.

MSpaint was developed when windows was nothing more than a dos shell, does anyone else remember windows 2.0?
- and yes i know windows it STILL a dos shell, MS just "hide" it a little better now...

scsscsfanfan
09-22-2002, 16:23
hi guys, I've found the unit icon folder and tryed to change the picture, but why it dosen't show up in the game - I mean, in the unit production panel and info panels?
Is there anything else I need to edit as well?
could any one tell me?

giskard
09-22-2002, 20:58
Thanks Barocca. I'll check that out.

I hope it works on XP http://www.totalwar.org/ubb/smile.gif

BTW Im an Ex Amiga user, never had to suffer windows 2.0 or 3.1. Hand a nice gui to work with and an excellent Shell back in those days http://www.totalwar.org/ubb/smile.gif

Giskard

LordGuyOfRome
09-23-2002, 01:15
Quote Originally posted by barocca:
i have not tried editng in photoshop, it is not a package that i use.
[/QUOTE]

You haven't lost much, cause Photoshop doesn't support LBM files at all. I do not know if there is any plugin that adds the feature either.

regards

G

Wellington
09-23-2002, 02:00
The best LBM editor i've found is Ultimate Paint (vers 2.82). The browse feature is particularly nice for displaying thumbnails of all LBM files in a directory. I've been using it for modding the units.


Download it here, and give it a try -
http://www.downseek.com/download/3373.asp

LordGuyOfRome
09-23-2002, 06:01
IT WORKS!!!!

I mean, I don't know if it does, but the .lbms saved with it have roughly the same size than teh original (5-8 Kbs more)... now, could someone (Giskard?) test them to see if they crash the game?

Regards

G

Quote Originally posted by Wellington:
The best LBM editor i've found is Ultimate Paint (vers 2.82). The browse feature is particularly nice for displaying thumbnails of all LBM files in a directory. I've been using it for modding the units.


Download it here, and give it a try -
http://www.downseek.com/download/3373.asp [/QUOTE]

Moorkh
09-23-2002, 21:07
I'd gladly test your .lbms if you could make them available to me (why don't you test them yourself?), just send them to moorkh@zworg.com. http://www.totalwar.org/ubb/smile.gif

I suppose you actually got that grafx program to work? I had some trouble running it under Win2k, but then I didn't have barocca's instructions http://www.totalwar.org/ubb/wink.gif

@giskard: the 12mb uncompressed are just how large an image of this size has to be. Consider: it's around 3000x4000 pixels, 12 million altogether, in 8bit color depth. That's 96m bits altogether, or 12Mbytes. If you save this as a 16bit uncompressed image, it should end up sized 24mb. Anyway, it's great to hear the engine technically accepts 16bit images - otherwise we'd be stuck at 127 regions at most. http://www.totalwar.org/ubb/smile.gif Still, I'm pretty sure we'll need this tool Target mentioned to get any new campaign maps don - either that or finding out how borders are encrypted into the file by this tool.

giskard
09-23-2002, 22:22
Wellington doesnt post much but when he does he certain posts useful info http://www.totalwar.org/ubb/smile.gif

Thanks mate.

Dont worry I'll be testing both programs out later today. I'll let you know what I find.

Fingers crossed this is what we have all been waiting for. Now all we need is ingame support for total coversions and I will be a happy man http://www.totalwar.org/ubb/smile.gif

Thanks for your help guys http://www.totalwar.org/ubb/smile.gif

Just for record, im simply saving the LBM files and testing them unmodified in the game (unmodified except for a the Gisk was ere text across the med http://www.totalwar.org/ubb/smile.gif.Well i needed to know if the new image was actually being used or not hehe.

Giskard

[This message has been edited by giskard (edited 09-23-2002).]

LordGuyOfRome
09-23-2002, 23:02
Quote Originally posted by Moorkh:
I'd gladly test your .lbms if you could make them available to me (why don't you test them yourself?), just send them to moorkh@zworg.com. http://www.totalwar.org/ubb/smile.gif[/QUOTE]

Er, basically, cause I thought Giskard has some already edited LBMs to test on it, which is not http://www.totalwar.org/ubb/smile.gif Nevermind... http://www.totalwar.org/ubb/smile.gif

G

giskard
09-23-2002, 23:49
No need to have premade ones to test. Just need to mess with the existing ones. TGAs work fine. The problem is what happens when you load and save the original. Which should mean a file that already works and is known to work still works. However we know thats not the case. So we know the saving of the image is the problem.

Ok GFX2.

This runs our memory with these LBM files. It is a dos exe (Barocca is insane lol) after all and needs all the himem stuff id guess. It prefers to load files from its own directory to. Couldnt get it to load files else where.

Wellingtons program achieved slightly better results but still didnt fix our little problem.

Basically its a shareware windows program and a very nice one too. The game loads when the newly saved LBM files. The problem is it screws up the regions. You can see some regions change colour just like you do when you hold down shift. Unfortunately i wasnt holding down shift. It also prevents you from moving pieced about so we still have the same problem.

On the plus side it seems to do better than PSP did so perhaps a setting some place may make it work for us. This program has a lot of settings for iff/ibm files too so all hope is not lost yet.

I will keep experiementing with it for now.

Giskard

[This message has been edited by giskard (edited 09-23-2002).]

giskard
09-24-2002, 00:17
Muhaaaa Wellington you God type person. I could kiss ya... but I wont http://www.totalwar.org/ubb/smile.gif

Wellingtons program does work. It just messes with the palette. I did a little test and painted the purpley/pink areas over using colour 0. Eg the first colour on the pallett and it worked. The game loaded, the units moved, the regions showed up when i pressed the shift key.

Even though i didnt bother repainting odd purple bits like islands, it still worked.

Anyway here are the details using program wellington posted in the forum.

Save the image as an 256 colour LBM.
All sea borders (the purpley/pink bits) have to be painted with the first colour on the palette or it wont work.

Dead easy http://www.totalwar.org/ubb/smile.gif

It also looks like the seaborder is not a thin line because my paint attempt was done using the fill tool and it covered move of the map first click.

Just watch for changes to your palett when loading into Ultimate paint.

Thank you all http://www.totalwar.org/ubb/smile.gif

Im off to put my old skills into use for MTW.

Giskard

Wellington
09-24-2002, 00:46
Glad you like it Giskard, but credit where credit's due - kiss the developers of Ultimate Paint - they deserve it.

Nice little package innit!

giskard
09-24-2002, 05:25
Yes, perhaps Barroca can finally rid him self of MS Paint now too http://www.totalwar.org/ubb/smile.gif

Got started on a new campaign map. The LBM colour maps are all painted, just need coverting to 256 colours and saving as LBM now (cannot wait to see how it messes up my colours hehe).

Got the terrain rendered, no names on the map yet though. Still trying to decide whether i should stick with the names for regions the developers used or go with some custom names. Sticking with the dev names has the advantage of using what I know already works.

giskard

giskard
09-26-2002, 03:30
I have made my own LBM file and im currently writing a campaign script to use it. Those of you that read the guide to making a campaign will have noticed that border regions require the coordinates of the border to be set. I believe I understand how this works now.

The LBM file is actually the most important file. I believe the TGA pic is just a background image to please the eye. If true then you could test your campaigns with a picture of darth vader just to see if it works.

Each region in the LBM is painted a slightly different colour and the regions all have a border zone painted in too, again a slightly different colour. The way I think this works is that the coordinates required are simply away of choosing the colour that will represent the border. Probably by its location in the palette rather than the colour it self.

When playing the game and you move your pointer over the border some info pops up. I believe this is only possible because the computer is told in the campaign script that the colour at this position in the pallett matches the region info listed on the same line and displaces it.

A simple case of coordinates giving the location the computer needs to look to find the colour that represents a region or border. This means all regions and borders need to use a different colour. I still need to test is there is a set palette that needs to be used.

Giskard

Wellington
09-26-2002, 04:20
Giskard,

FYI - As the map defines 243 areas/provinces, each being a different colour on a 256 colour palette, I strongly suspect that colour number of these areas/provinces equate to the identifiers in the scripts (ID_SCOTLAND, ID_WALES etc http://www.totalwar.org/ubb/smile.gif.

EG: If Scotland has the colour number 6, the identifer ID_SCOTLAND also equates to 6.

Therefore, if you swopped the colours in the LBM for the areas Scotland and Wales (for example), all characteristics in the campaign scripts associated with Scotland would now be attributed to Wales, and visa-versa.

I suspect you know this already, but may be useful if you want to change region names in a future mod.

Kraellin
09-26-2002, 04:28
giskard,

i bumped the thread you need to read. it's this one: http://www.totalwar.org/ubb/Forum5/HTML/000655.html

K.


------------------
http://home.domaindlx.com/takiyama/kraellin/icons-1.gif

giskard
09-26-2002, 22:08
Thanks. That thread confirms most of my theories. Just a few smaller issues to clear up and Im happy http://www.totalwar.org/ubb/smile.gif

Giskard

USMCNJ
09-29-2002, 18:56
hey giskard can you post the number for that color. The one that is suppose to replace the sea borders. Cause for me that color is black, and needless to say the game is all meesed up.
Thanks

giskard
09-30-2002, 01:36
All my tests showed it had to be the first colour on the palette. It didnt matter what the colour was as long as it was the first colour. However, you are not allowed to use the same colour twice so if your first colour is the same as another colour used else where it will mess up your map.

Giskard

USMCNJ
10-01-2002, 01:13
ok, i'm making progras, the game loads and the shift key works (for most provinces).
All i did was open the LukMap files with Ultimate Paint and saved them. (no changes)

i'm not faced with two promblems.

1) some of the provinces shine threw. What i mean is that some of the provinces have shade of color from LukMap. And it's not a little shade it's so bad that i can barely see the name of the provinces.

2) all the provinces are messed up, and in no particular order. ex. The english provinces are now parts of France, Egypt, and Some of the Mediterania sea regions.
Now from the LukMap looks like that each fraction provinces are shaded in simular colors. (england red, france green, etc.)
so i thought that this would explain why england exchanged provinces with france. But after looking around through the whall map. I noticed that most of the see regions are now land, and there is no patern for these changes.

Does anyone know what i'm doing wrong and how to fix it. Or is it that if i want to make a new map i have to look through the whole in game map and write down new color/location to all 140 sea and land regions. (this would rely suck cause all my MOD requires is a couple additional province in africa, and asia, europe doesn't need much changing)

USMCNJ
10-01-2002, 01:15
*I'm NOW faced with two problems

giskard
10-01-2002, 06:06
When that happened in my tests it was because the sea region borders where not painted with colour 0.

Giskard

USMCNJ
10-01-2002, 17:16
Giskard can you post the map on website or email it to me. I've tried 40+ different colors and spend like 15 hours, and the same thing keeps on happening.

USMCArtilleryNUKE@yahoo.com

barocca
11-19-2002, 15:43
Going to Try and gather all the LukMap posts into this thread
Please Stand By

From Target
http://www.totalwar.org/forum/non-cgi/Custom/Creative_Assembly.gif
The lukmap.lbm files have 3 purposes. The first is to highlight the selected regions. The second is to display the borders between the land regions. The third is to act as a hotspot map for mouse interaction on the stratmap.

This is how the interaction works:

Each land region has two unique colours and each sea region has one unique colour. When the player uses the mouse on the stratmap, the x/y co-ordinates of the mouse on screen are translated to x/y coordinates on the lukmap.lbm file.

The game asks for the colour that's at that particular x/y position on the lukmap file and compares the answer with a table that then tells it which region is associated with that particular colour. In this way, the game can find out which region you've floated over or clicked or dropped pieces into, and so on.

The numbers in the SetBorderInfo:: lines in the startpos files aren't used for anything any more. Originally, there was a stratmap piece either side of each a border between countries, and right clicking on it would bring up info about that particular border's characteristics. Then, the whole border characteristics thingy was incorporated into the region border info parchment (where you select a border, rightclick to bring up the parchment and then float the mouse cursor over the border's neighbours to get information about what the terrain would be like if you crossed the border in that direction ).

These pieces were in the shape of arrows of 16 frames. The numbers you're asking about are the x/y placing coordinates on the map for these pieces, followed by the orientation. Pretty much exactly the same way the SetPort:: command works. The numbers are huge because they've been converted to the coordinates that the game uses, rather than those of either lukmap file. Oh, and most of the orientations are 0 because the whole process was abandoned before it was completed, thank God.

Edited to correct a whole slew of spelling mistakes.

(etc.) of GilJay, (etc.)

barocca
11-19-2002, 15:48
From Kraellin

target,

so, would it be correct to say that one could edit the shape of the map and that as long as the same colors were used, one could ..reconfigure.. europe? i'm assuming the table you're referring to is hardcoded, yes? ("The game asks for the colour that's at that particular x/y position on the lukmap file and compares the answer with a table that then tells it which region is associated with that particular colour.") and if we had access to the table, ..if.., we could edit things like the names of provinces and so on?

K.

barocca
11-19-2002, 15:49
From Target
http://www.totalwar.org/forum/non-cgi/Custom/Creative_Assembly.gif
I was probably a bit misleading because I was trying to keep it all in laymen's terms rather than get overly complicated.

Yep, you can change the shape of the countries and move their position around and whatnot so long as you stick to a few rules.

The lukmaps are in lbm format which is a file format that supports a 256 colour palette. This palette acts as our lookup table and it built into the picture file rather than the game itself.

So, you float over the map and the game goes to find out which colour corresponds with the mouse's current coordinates. Once it's found that it then searches through the palette, looking for the colour, and then returns with a palette index. The index is run through a quick calculation and end up with a region number, which is what tells the game which region the user is currently interested in.

It's very important that the palette is made up of 256 different colours, because the search will return the first index that matches the colour we've got and then stop. If the colour in palette slot 46 is the same as the colour in palette slot 22, the game won't be able to tell which region is which and invariably mess up.

The land regions get 2 colours each (one for the main body of land and one for the border) and the sea regions get one colour each. We allowed for a maximum of 40 sea regions, which left enough space for 108 land regions. We only use 100 land regions, and that's the limit for the game (and any mods you guys decide to make). Someone asked in a different thread why we didn't have more regions in the game and one of the reasons is the limiting factor of the 256 colour format of the lukmap file.

What else? Nothing's stopping you from editing the names of the provinces, since these are all found in the translation files. These can be found in the loc directory and are completely defenceless, allowing you to hack them to bits to your heart's content.

barocca
11-19-2002, 15:50
From Kraellin

ok. that's pretty cool. so i could edit the map any old way i wanted to as far as shape and locations of land and sea masses, then alter the 'neighbor' fields to set border crossing abilities, and voila, new continent and seas. sweet :) thanks target

one question though if: "We only use 100 land regions, and that's the limit for the game..." there are 108 alotted regions for land, why only 100 possible? 2x108=116+40=256. what happened to the other 8 regions?

K.

barocca
11-19-2002, 15:52
From Target
http://www.totalwar.org/forum/non-cgi/Custom/Creative_Assembly.gif

Yep, that's about the size of it. You'll need to find an application that'll output your adjusted lbm file in a compatible format. We've discovered that Paint SHop Pro says it will but it doesn't really - it tends to screw it up a little bit. You may get lucky and it may work OK. If I come up with anything really useful toolwise, I'll let you know but, as I've said before, all the tools we used for the Total War games are archaic and not exactly focused on user-friendliness.

It'll probably only be 107 land regions because we use the colour in palette index 0 (which I think is the tasteful neon pink colour) as the colour to indicate the dead spots on the map, such as the breaks between sea borders, lakes and bits of unplayable regions that intrude on the map.

There is a reason why there's only 100 regions available for modding. If I'm honest, it's probably down to short-sightedness by the programmer responsible, whoevert that was ... alright it was me.

We've only got 100 land regions in the game because thats all the land regions in the game. We went up to 100 regions, saw it was working, said "Sweet, that's all we need then" and stopped. By we, I mean me.

I'll check to see if anything gets affected if we fire up the last 8 regions and make them available even if we don't use them.
====
OK. Had a quick look at the code and unfortunately, adding the tags for additional land regions will break quite a lot of the game. The most obvious ones will be any files your've saved (config files, savegames, etc) and we've tried very hard to make sure the changes we've made so far in the patch don't require you to trash your existing saves. So it looks like it won't happen. Sorry.

If this will help you calculate your new port, castle and origin positions, screen co-ordinates are 16x bigger than those of lukmap.lbm and 8x bigger than those of lukmap2.lbm.
(referring to SetPort and SetCastle co-ords)
========
barocca
Thank You very much Target,

i had been puzzling over HOW did the game know which region was scotland...

Knowing those SETPORT:: co-ordinates are the games own co-ordinates is quite usefull,

barocca
11-19-2002, 15:54
from Target
http://www.totalwar.org/forum/non-cgi/Custom/Creative_Assembly.gif

You still have 100 land regions and 40 sea regions to play with, so there shouldn't be a problem with your 51 land region map - unless you're planning to do something particularly crazy.

barocca
11-19-2002, 15:56
From Giskard

Looks like most of the info you posted was as I had guessed it would but. The only thing you didnt mention that I noticed is colour zero.

I found in my tests that the sea/land border (that purple pink line) must use colour zero or the map doesnt work. Can you confirm this ? I also noticed that the actual colour doesnt matter which would seem to contradict the region rules you outlined above.

Can you clear this up for me please ?

Im currently half way through the setborder numbers on my own campaign having done exactly what you wrote above already. Is it save to simply paste in a lot of random numbers and know they will be ignored or even better leave them out entirely ?

As you know those numbers are a pain. I have 25 land regions and 15 sea regions. Each region has an average of 4 borders. Im sure everybody can work out how many entries that adds up to

barocca
11-19-2002, 15:59
From Wellingotn


Quote[/b] ]
Originally posted by Andersson:
It's certainly informative. Some of it is a bit confusing to me (such as how exactly a new region get recognised - just down to colours I think).

If your creating a new region then you have to create a new lukmap.lbm (literally the lookup map) and your new region will have to have 2 colours associated with it - region colour and region-border colour.

Scotland has number 2 in the 256 colour palette. Therefore the identifier ID_SCOTLAND can be associated with the number 2 (and the colour that represents number 2) - likewise ID_WALES equates to the number 8 etc:

The key thing with all this is to recognise there are 40 sea regions (that have 1 colour associated with them) and 100 land regions (that have 2 colours). Therefore don't make a map and try to create > 40 sea or > 100 land regions, else the hardcoded lookup table will fail for some. Also, don't use a sea region for a land region (or visa versa) - or the table lookup will similarly fail.



Quote[/b] ]Originally posted by Andersson:
Also not sure if you have to change an existing region into your own, but keep the original ID in the campaign txt eg. Change name of province in map to Andersson , but keep it's ID as ID_WESSEX).


Absolutely. You gave to retain the region Id's that the game provides - but these are only identifiers. If your buildinmg a map of the USA you may decide to use the colour 8 for the state of Utah. In that case, the game would associate your new province of Utah with the identifier ID_WALES.

barocca
11-19-2002, 15:59
OK
thats everything i could find,
go for your lives http://www.totalwar.org/forum/non-cgi/emoticons/biggrin.gif

Kraellin
11-19-2002, 16:06
thanks bar,

very nice :)

K.

PanthaPower
11-20-2002, 11:48
Thanks That really helps I want to start modding my own map and I am reading through all the documentation but I have have one question though. What are the two LukMap.lbm and lukmap2.lbm for? I know that it's for the borders but I don't understand why there is a compressed version and a large version. Is the small map for resolution till 800x600 for instance and the larger resolutions for the big lukmap2.lbm?

Kraellin
11-21-2002, 05:21
target,

when you take the palette as your table and do that calculation, are you taking the rgb values and adding them up or something or just taking them like wellington said and assigning values to the colors in the palette on the basis of first come, first serve?

if you're taking them first come, first serve, and assigning them that value in the order that they come, they wouldnt it be possible to use ANY rgb's as the values and not just the values of the original lukmap palette for one's colors?

also, are there any restrictions on the size of the lukmaps? do they have to be a fixed X by Y as the originals or can we use other values for the size, providing, of course, that we maintain the other rules for provinces?

K.

PanthaPower
11-21-2002, 08:57
Kraellin,

I started nmodding yesterday but I found the exact colour table that is used by CA. I have to test it still but can only do that this evening. The colour table looks very organised and yes, the table is fixed. I will upload a screenshot in a few hours. I also started writing down the RGB code for every country, border and sea. Here's a part which I've done till now:

Slot Description R G B
0 Sea Border 255 0 255
1 NOT USED 143 63 63
2 Scotland Main 147 67 67
3 Scotland Border 155 71 71
4 Northumbria Main 163 79 79
5 Northumbria Border 171 83 83
6 Mercia Main 179 91 91
7 Mercia Border 187 99 99
8 Wales Main 195 103 103
9 Wales Border 199 111 111
10 Wessex Main 207 119 119
11 Wessex Border 215 123 123
12 Ireland Main 223 131 131
13 Ireland Border 231 139 139
14 Norway Main 239 147 147
15 Norway Border 247 155 155
16 Sweden Main 123 111 91
17 Sweden Border 127 115 95
18 Denmark Main 135 123 103
19 Denmark Border 143 131 111
20 Finland Main 151 139 119
21 Finland Border 159 143 123
22 Novgorod Main 167 151 131
23 Novgorod Border 175 159 139
24 Muscovy Main 183 167 147
25 Muscovy Border 187 171 155
26 Livonia Main 195 179 163
27 Livonia Border 203 187 167

I will upload the full table plus graphic image of the colour table this evening.

PanthaPower
11-21-2002, 10:47
Hmmm, I did some more checking and I now know that Ultimate Paint totally screws up the pallette which CA uses. As stated in earlier posts, the pink color HAS to be in slot 0. So I kept looking for a tool which has the pink color in slot 0. I bumped into a tool called Irfanview and then the palette which is in the original LukMap.lbm makes any sense. I attached a picture in the link below so that you can see it for yourself. On the left is the original palette from the LBM file that CA ships. On the right is how the palette looks like after just loading and saving the lukmap.lbm in Ultimate Paint. As you can see, it totally screws up the order defined by CA just by loading and saving WITHOUT modding.

Palette colors:
http://www.motor-forum.nl/forum/misc/9140

I haven't figured out yet how to use the correct palette but I'm on the right track I think. I already have the correct palette exported and I tried to import in into Ultimate Paint which unfortunately didn't work.

I'll keep you posted about my progress.

PanthaPower
11-21-2002, 13:19
Hmmm, I did some more investigation and my guess is that MTW only looks at the colour in the current Slot and compares that colour to it's hardcoded region_id. In other words, if you put a black colour in slot 0 and replace all Sea borders with the black colour, everything will work fine as long as you don't use that same colour elswhere on the map.

Currently I'm writing down every slot, region_id and it's current palette colour. After I finished this, I can start testing making a new LukMap.lbm. I will do this in Ultimate Paint and I'll just fill in the colours in the according slots for that region. I hope my tests will go fine because I just started modding and the txt files are still not 100% clear to me.

For changing the current LukMap.lbm, that will be harder because the moment you load the LukMap, the palette changes and the colours don't match the place in the slot anymore. So it would probably require to set all 256 colours manually in the palette used by Ultimate Paint and then everything should work fine when modding the map. The information sheet that I'm currently making with slot, region_id and RGB should make this work quite easy.

I hope I can run a few tests this evening and see how it goes.

PanthaPower
11-22-2002, 11:25
Well, my test didn't work out. But to keep all the LBM info in this post I would like to give note of a new tool which was made by Mithel. It gives a possibility to change the colors in the palette slots.

Check it out:
http://www.mnstarfire.com/download/ImageConverter.html

The full post is at:
http://www.totalwar.org/cgi-bin....;t=2641 (http://www.totalwar.org/cgi-bin/forum/ikonboard.cgi?act=ST;f=5;t=2641)

giskard
11-22-2002, 21:14
On my campaign map i simple painted the sea borders with colour zero. The map worked then. The exact colour doesnt seem important. Colour zero seemed to be used to mark out where the land meets the sea.

Giskard

Lion King
12-23-2002, 00:21
same thing from my experiments...
we need someone who is not busy or lazy like me to find out which province corresponds to each pallete slot
e.g:
1- sea border
2- scotland
3...
and so on, as giving RGB values is no good

Alrowan
12-23-2002, 13:04
im tempted to make a list very soon, im nearly all the way through making my new map, so i will have to change a lot of names and such in the text files.

just out of curiosity, im going to need to know how to place the castle locations and the gathering points in proviences

Lion King
12-24-2002, 04:49
easy as a pie, boring as hell...
ok, if you have photoshop or something like that, you put your mouse over the place you want your castle/port/origin to be, then you get the coordinates IN PIXELS and then multiply this number by 8 in the Hi-res map, or 16 in the Low-res one.

Alrowan
12-24-2002, 08:22
thanks... looks like my chrissy holidays will be over in a flash

Grell
07-10-2003, 13:45
OK I am having a go at editing the existing Europe LukMap. I want to add in Achea, and some of the crusader cities as regions. When i use the ImageConverter the Colour Table is empty, i dont have to manually go through and assign each one do i?

And is it possible to add in 8 more regions (which is the limit given the 256 color limit) to my understanding there is a hardcoded table somewhere that assigns which region uses which colour in the palette. i.e. Scotland uses the colour in poistion 2 of the palette. So any new colours/regions will not be recognisable by the game. Thus making it impossible to go beyond the current 100 regions. I am considering using ID_AFRICA as Achea, but am still faced with the empty colour table problem in the ImageConverter any help would be appreciated

Grell
07-10-2003, 14:08
OK I figured out the missing colour table problem (I just had to load an exisiting one and save it).

In paintshop I edited the palette adding in 2 new colours and used these (0 211 211 and 0 222 222) to colour in the island of Achea and its border, assuming that all of the information (such as declare region, border info, origin, port co ords, etc) in the campaign startpos file are correct, there is no way that the game can recognise these new colours and assign them to the new region ID_ACHEA, is there?? If someone knows that this is hardcoded please tell me and save me hours/days of experitmenting and testing.

Grell
07-10-2003, 15:27
Success Horrahh

I successfully removed Peraslsvyl and used its colours (n36 and n37) edited the LukMaps and startpos info and made Dalmatia (off the coast of Croatia and Venice). I will take ID_AFRICA and its colours and also make Achea (Greek island) and make Venice and Genoa into small towns as the where historically, this will allow HRE to play more of an active role in the area as they did historically.

I still havent managed to add in competely new land regions - if anyone can tell me how to do this (and what colours they used for the border and main area) i would appreciate it. As technically there is room for another 7 or 8 land regions.