Welcome to the HeavyMetalPro Forums

It is currently Fri Mar 29, 2024 2:05 am

All times are UTC-04:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Sep 05, 2015 3:59 pm 
Offline
Private First Class
Private First Class

Joined: Sat Sep 05, 2015 3:03 pm
Posts: 17
Location: Colorado, USA
I'd like to understand how palette files work. What exactly is stored within them? I know the graphic files are not, but is graphic file size or other uniquely identifying graphic information stored there, beyond the file path (ex: file size, crc32 value, md5 hash)?

I'd like to know so that I can understand how HMMap behaves when you change map palettes, whether that be in the middle of map design or loading a map with a palette other than what it was designed with (even if the difference is only one or two Hex Item entries).

I'd like to know why my water Hexes get switched out for Sand even though I made no modifications (file name, file path, or HMMap group) to Water or Sand. Modifications were made in other groups to other files, but it seems the map goes a bit haywire and any palette entries can be affected.

I'm in the middle of designing a 100% new/custom palette and every time I make a small change to the palette, I have to redesign my map from scratch. I understand there isn't likely anything I can do about it, but understanding why and how this works would ease my curiosity.


Top
   
PostPosted: Sat Sep 12, 2015 6:32 pm 
Offline
MechMeister
MechMeister

Joined: Thu Sep 13, 2001 8:00 pm
Posts: 13482
Location: RCW Enterprises, SC, USA
Just remember: Palette first, Map second. If you modify any palette, any map made with that palette will also change.

To keep map files, and palettes, as small as possible, very little information is kept in each.

A map file simply contains what palette(s) is used, and what number graphic is contained on each level of each hex, plus various other general settings, background graphic file, add-on graphic files, etc. The main thing is the palette information. Like hex 0101 has decorative Grass 2, no lake, no natural path, Heavy Woods Feature, Urban Road going North-South, no Upper path, no Detail, no wall and Elevation 2. But it does that strictly with numbers. So the data file hex 0101 might look like 5, 0, 0, 3, xx, 0, 0, etc. only in hexidecimal. Anyhow, say the 5 refers to the Decorative Grass 2. If you change the palette, or modify the palette, such that the 5th graphic is sand, or rocks, it will change what is displayed in that hex, and any others with that Terrain. So choosing a different palette, with an existing map, will almost definitely change things. And deleting one hex graphic in the palette will move every Terrain or whatever you're working with down as well, changing their numbers, and all the graphics associated with them.

Now, the palette save file is similar: For each number of each type of hex contents (say Terrain), it knows the hex text, modifiers, what graphic is used, etc. All but numbers and text, except that a filename for the graphic used, which must be in the palette's file structure. Keeping them all in a file structure makes copying a palette easy: just copy the palette folder, along with its .pal file and associated subfolders, to a new name, and you have a copy to modify. Under each palette subfolder (like \Terrain) are all of the graphics used by the palette.

If you only want to change what the graphics look like (you can draw better trees, etc. than I can), you can simply change the graphic used. "Woods, Heavy.gif" for example. You can do that without changing the palette at all; you're just changing what graphic is going to be used. It will still be called HVY WOODS, etc. It's best to do this after copying the Basic palette, so you can always go back to the standard ones if you like. If you want to change the text, to-hit mod, descriptions, etc. you'll have to do that within the palette tools in HMMap.

You can spend a BUNCH of time, working with the graphics and construction of palettes. I'd take it slow, make copies, work with them, change what you think you want, confirm it works right, etc. Things like Roads, Rivers and other paths become /extremely/ complex. You wouldn't believe the hours I've spent constructing the palettes, the graphics, and working with them. Change or add what you need to, leave the rest along, might be the best way to go.

And again, do ALL of this, within the program or when handling the files, as an ADMIN!

Again, hope this helps.

_________________
Rick
~~~~~
[email]rick@heavymetalpro.com[/email] [img]http://www.heavymetalpro.com/countries/flag-us.gif[/img] [img]http://www.heavymetalpro.com/countries/ ... rolina.gif[/img]

* There are 10 types of people in this world. Those who understand binary and those who don't. *


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC-04:00


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited
American English Language Pack © MaĆ«l Soucaze