Log in

View Full Version : Questions on LUKMAPS



barocca
11-25-2002, 01:54
Does anybody know IF the LukMap MUST have 256 colours?

if it will work with less, then there is an error in my province co-ordinates,

if it MUST have 256 colours - then i have to insertmore colours...

either way will take me hours to find the error, or insert the additional colours into the pallette,

so how many colours MUST the pallette have?

Lord Krazy
11-25-2002, 04:49
I'm not sure what you mean.
You must use the colours that are there already.
I coloured in Serbia the same as Byzantine
and it worked.
I didn't do anything to the pallete

LK http://www.totalwar.org/forum/non-cgi/emoticons/smokin.gif

Wellington
11-25-2002, 05:25
B,

How is your new Lukmap screwing up? Does the problem arise when MTW tries to load it?

I remember a thread some months back whereby Gil (from CA) stated there were 100 provinces and 40 sea areas. Each province had 2 colours, sea areas just 1. Hence there were a MAXIMUM 240 colours used (0-239 on the palette).

Gil said that even though you can in theory have 8 more provinces defined this DOES'NT work in practice as there is a hardcoded table in MTW with EXACTLY 240 entries. This table is used as a lookup for the province and sea area ID's in the scripts.

Therefore if modders can't use more than 240 colours ... can they use less? Maybe the engine expects all entries in this table to be filled?

PanthaPower
11-25-2002, 11:32
I'm not 100% sure but I don't think you can have less or more then 256b colors. And the colours have to be the ones which CA provided and they have to be in the corect slots Many editing tools screw up the colour palette so be careful with that. Mithel wrote an excellent tool for this. Go to his website and see for yourself how it works.

http://www.mnstarfire.com/download/ImageConverter.html

What you should do is this:
* Open the lukmap file in a editor of your choice.
* Draw a new map based on the palette used in the original file.
* Load original lukmap in Image converter tool
* save colour palette
* Open you new map based (made with the colors from original lukmap)
* load colour palette.
* save file and convert it to LBM.

I also heard that the border colours are not used anymore. I haven't checked this myself yet but it's should work like this.

barocca
11-25-2002, 11:56
PanthaPower,

the rror occurs when the game tries to load the map, it hangs
i may have made an error in the co-ordinates, but i doubt that, i think it is because my pallette is ONLY 19 colurs
- i have actually made a new lukmap,
a test piece cut from a very old lukmap...

what mithels tool does is allow you to re-order the pallette,

i don't recall reading that the pallette requires exactly the colours used by CA, simply that provinces and border had to be in the correct order,

HOWEVER you have provided very good instructions for the converter
i will try your instructions
if they work i will add your instructions to the org's copy of the download
(not uploaded yet - reason explained below)

you were going to post a full list of the colours and positions used by CA,
have you done so?
i am on a 28K modem this week,
it takes a while for pages to download * don't ask *
(so i have delayed uploading until i go to bed, then i will leave it run overnight)

btw - PanthaPower - you have mail...

barocca
11-25-2002, 13:46
My problems have nothing to do with the pallette it seems,
nor the co-ordinates,

following Pantha's instructions i edited my map to use the original colours,
loaded the full pallette using Mithels utility,
and still no joy,
next i reverted to the old maps and loaded my modified campaign,
here's the result
Amphibian Rebels
http://www.totalwar.org/barocca/marines.GIF

the amphibian rebels are where the "gather" points are set for their provinces, so if you get the co-ordinates wrong this is the error you will see,

the only thing left i can think of is the map needs to be the same size as the original?

i have the pallette correct, the co-ordinates don't matter to the game, what else is left?

PanthaPower
11-25-2002, 14:46
Hmmm, interesting. Well, i haven't tried using a smaller resolution yet. But it should be farely easy for you to save the TGA and LBM files to 4096x3072 and 2048x1536 for the smaller one right? Then you could run another quick test and compare your findings with your previous resolution.

barocca
11-25-2002, 15:27
done
and it worked

a hint for photoshop
save your lukmaps in png format - no corruption of the pallette and all works in mithels image converter

excellent

BUT - the minimap is still completely wrong,
even down to owned provinces,

obv. this is another set of files i will have to find,
not sure even where to look for them...

one problem i now have, game hangs on end first turn...

i am compiling a Test_patch of the test maps and new campaign and will upload asap,
maybe someone can decipher why the game hangs...

barocca
11-25-2002, 17:07
here are my test maps and campaign,
the patch is still compiling, so i uploaded zip fles instead,

if you can figure out why i always hang at the end of turn one please let me know

lukmaps and campaign file 32K (http://www.totalwar.org/barocca/LukMap.zip)
luktest.txt is the campaign file, it goes in campamp/startpos

maptex file 1.3MB (http://www.totalwar.org/barocca/MapTex.zip)

maptax 2 file - 4MB (http://www.totalwar.org/barocca/MapTex2.zip)

Lord Krazy
11-25-2002, 23:54
Is this all you changed?
I think you need to change
all the luk maps

minilukup.bif
minimap.bif


factions maplukmap.bif
info border 560x190.BIF
factions map.BIF

this is what I thought you were talking about
anyway, daa

LK http://www.totalwar.org/forum/non-cgi/emoticons/smokin.gif

barocca
11-26-2002, 00:32
Lord Krazy
http://www.totalwar.org/barocca/buig3.gifhttp://www.totalwar.org/barocca/buig3.gifhttp://www.totalwar.org/barocca/buig3.gifhttp://www.totalwar.org/barocca/buig3.gif

thank you,
that saved me hours of searching,

now to figure out why it hangs at the end of turn one...

Kraellin
11-26-2002, 20:45
bar,

i'm gonna guess that it's hanging because you're overwriting the setorigin:: in that sea zone with your land zone. just a guess from looking at your picture.

K.

barocca
11-27-2002, 07:46
Kraellin,
the map i made works, (download the zips and try)

the image displayed here is simply a demonstration of the fact the game cares not what the campaign file does with the provinces, the borders are ignored,

The working map features nine provinces, and all are displayed in the main map correctly, i have not had time to fix the extra files LK mentions above,

the hang is on the working map, not the image posted here.

Kraellin
11-27-2002, 21:28
bar,

yes, i understand that the maptex files are just window dressing for the operational file, the lukmap files. i've downloaded your files and will take a look. all i'm saying is that you also have to alter some of the other files, the text files, to work right with the lukmap files or yer gonna get errors when trying to play. that's my guess on why it's hanging. but that's without looking at your downloads yet, so i wont speculate any further till i've looked at them.

K.

Lord Krazy
11-29-2002, 18:02
I'm very busy right now I'v not had a chance to check this.
I'm not sure what your set up is but I would guess
you need to edit all file before it will work.
If the regions on the minimap do not match
this should crash the game for starters.

Keep all crash.txt on this one, they may be useful.

LK http://www.totalwar.org/forum/non-cgi/emoticons/smokin.gif

barocca
12-11-2002, 04:22
hmmm...
i made a matching campaign file,
but have not had time to make the minimap files...

Kraellin
12-11-2002, 17:43
bar, or anyone else,

what do these files do?


Quote[/b] ]factions maplukmap.bif
info border 560x190.BIF
factions map.BIF



lol. i sure wish they'd scrap that .bif format and go for something more common.

K.

Whitey
12-11-2002, 17:47
Krae, it would slow the game down somewhat if my understanding of the bif files is correct...

Kraellin
12-23-2002, 18:33
i'm bumping this thread up because a number of folks are still stumbling with the lukmaps and this thread seems relevant. i'm also including the message of mithel's web site about his palette import/export tool. this is what it says:

*********************************************

ImageConverter

This program is designed specifically for creating "LBM" graphics for games like "Medieval Total War" that use the index of a color palette entry to identify which part of the graphic was selected. Thus the primary feature is the ability to click on a color in the image and assign that color to a specific color palette position.

The concept of this program is that you can use your favorite powerful graphics program (Paintshop Pro, Photoshop, Fireworks, etc) to create the image and then our "ImageConverter" program can be used to assign the colors to specific location in the color table.

This program can read GIF, JPG, PNG and LBM formats and can write (export) PNG, JPG and LBM formats.

This program was developed with Java 1.4.1 and thus should run (and requires) the Java Runtime Environment (JRE) version 1.4.1 or higher. You can obtain the Java JRE from Sun at:
http://java.sun.com/j2se/downloads.html

The image is automatically scaled to make it easier to work with selecting a region(color) and assigning it a position in the color table.


When saving images the original file name will be used with the new extension. If saving as the same file type this file will already exist so to avoid overwriting the original file "NEW" will be appended to the filename. It is your responsibility to rename the files appropriately for actual usage.

Please note: this was just a quick programming job and lacks the frills of a full professional version. Specifically there are no progress dialog boxes while loading or saving a file. Large files like Medieval Total War uses can take several seconds to load or save even on a high end PC. Errors will mostly just crash out or silently occur, there is very little error reporting.

To work with large graphics sizes the Java Runtime Environment needs larger memory settings. I've provided "ImageConverter.bat" to run automatically with an allocation of 256 MB. For small graphics you can simply double click and run "ImageConverter.jar". (but the command line messages are handy to see if you run it from the batch file or a command line)

Author: John Wright
Contact E-mail: wright@mnstarfire.com
Website: http://www.StarfireResearch.com
Copyright 2002 by Starfire Research
License: This program is provided as a free service to the world. Use it freely and enjoy it. If you wish to make a contribution (to help fund further software developments or to add features to this) please send checks to:
Starfire Research
5235 West 139th Street
Savage, MN 55378

************************************************

K.

Alrowan
12-24-2002, 08:26
thanks for bumping this...

anway, as far as my map is coming along, its going well with the graphic stages, still am yet to try this monster, as its a total conversion from scratch

USMCNJ
12-26-2002, 01:41
this is of the subject, but you people would look like you would know

in the startops files how do you figure out the five digit numbers. I know they are the x y cordinates, but how do you find out where they are on the map.

and why is there three sets of numbers after the setport?

Kraellin
12-26-2002, 02:48
see target's explanation in the lukmap thread that is stickied here in the dungeon. i believe he answers all that there.

K.

USMCNJ
12-26-2002, 12:32
HAHAHA after f***en 4 hours of testing i got it

for the port, castle and all the other bs cordinates in the startops files all you have to do is shrink the LukMap to 80%. Then find the coardinates were you want to put something and times them by 10.

for ex:
If i want a castle to be all the way in the left bottom corner of Portugal I look at the shrunk map and see the cordinates X83; Y1836. So i got to my txt file and put

SetCastle:: ID_PORTUGAL 830 18360

(if some one already knew this. please don't tell me. It took me 4 hours to figure it out)

Kraellin
12-26-2002, 16:11
pretty damn clever there, usmc. remarkable even.

there is another way, if you're interested; peek at the 'LBM file info' thread on the 2nd page. and one can still admire your persistence and ingenouity in the face of another solution.

the thing with the 3 numbers in the setborderinfo:: is also explained there.

K.

USMCNJ
12-27-2002, 00:21
It works. My map works. True i didn't make a brand new map, but it works. (I made a map that is the same as europe but i added rivers. so vikings can do raid into central europe.)

the thing that i had trouble with first is. you have to make sure that all the SetBorderInfo are correct. (i know everyone already knew this, but just to make sure)

then make sure that SetCastle and SetOrigin cordinates are inside the province. (i think i saw some one who post that they had armies appear in the middle of the ocean, this would do it)

three, all provinces that face water must have SetPort.

Ok, good luck. (This game sucks, i gave up modding like three month ago, now i started again, and i'm hooked. I thought i would be done with the map, but units, here i come)

Alrowan
12-27-2002, 03:40
nice. Ill have to give it a shot when my mod is reay to go through that stage. When i get it that far, ill be sure to share it with you all.... im looking forward to my English map... but once i have engalnd sorted and the map sorted, then i have to move onto the factions

barocca
12-28-2002, 02:46
Quote[/b] (USMCNJ @ Dec. 26 2002,17:21)]It works. My map works. True i didn't make a brand new map, but it works. (I made a map that is the same as europe but i added rivers. so vikings can do raid into central europe.)
USMCNJ,
i'd love to have a look at your map and campaign file for it,

if it is all too big to upload in one hit can i ask you to use winzip (or similar) and break it down into chuncks of 2MB and upload those,
i will then apply my patchmaker to it and we should be able to shrink the total size down to a more manageable level,
Ta

UPLOAD HERE - link (http://www.totalwar.org/Downloads/Uploaders/MTWbeta.php3)