Ryandor.com

Forums
It is currently Sat Jul 05, 2025 6:06 am

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Oct 19, 2002 4:38 pm 
Hey Ryandor, just a quick question...

Is there a reason you only included certain heights for the different terrains (like in the colortable, grass only goes up to 45)? Would it be difficult from a programming standpoint to include more options, or does the map/client get glitchy at higher/lower altitudes?

I love your program, I'm just curious about this :)


Top
  
 
 Post subject:
PostPosted: Mon Oct 21, 2002 7:52 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Sun Jun 02, 2002 8:01 pm
Posts: 1473
Location: CO, USA
There is actually a couple reasons. Originally it was to provide compatibility with the statndard distribution of Dragon (remember I am not the author of the program, only of the mod that goes with it). The original color table had the 0,2,5,10,12,15,etc. as kind of a standard step increment, and I kept with that.

The main reason for it however, is the limitations of Dragon in that it is limited to 256 colors. What you see in the color table (16 x 16 grid) is the max numbers of colors available to you. While there are a few colors left that can be used, it's getting pretty crowded. Granted some of them are pretty useless, but it a matter of reason one above that I didn't change them before, and it's a matter of me being lazy recently to change them recently.

That being said, it is easy to change them. The "heart" of Dragon resides in two files: groups.txt and maptrans.txt. Both of these files are in the /dragon/scripts directory. These two files control what colors (or more correctly, what index of the colors) correspond to what tile type on the map. If you look at the groups.txt file it gives what index belongs in each group. For example, group 00 is grass. "grass" is just a label you to remember what it is, however, it's not really important to Dragon. (note that it is only in a comment). Now if you go to the maptrans.txt file, you'll see the first group listed out (00) from 00 to 0e (in hex). This defines the altitude and tile (or group of tiles) of each index in the colortable:

Code:
 +---------------------------> What color (index) this is
 |  +------------------------> What altitude to draw the tile
 |  |    +----+----+----+----> What tile to actually draw on the map (picks randonly from these choices)
 |  |    |    |    |    |
00 000 0003 0004 0005 0006

The next step to understanding how Dragon creates the transitions is the betweentrans.txt file. This tells Dragon what groups should do when they are next to each other on the map.

An example out of the file:

Code:
00 01 grass2forest.txt
This tells you when group 00 (grass, from the comments in the groups.txt file) is next to group 01 (forest group) then use the file grass2forest.txt to calulate the transition tile that needs to go between them. the grass2forst.txt file is found in the /Dragon/scripts/map directory. I'm not going to go in depth about this. Refer to the Map Making Tutorial in the FAQs forum or in downloads. There is an appendix on how those files work.

As long as you have a good understanding of how these files work, you can change colors, altitudes, etc of every single color if you want. Just make sure you have a backup of the original files just in case. It actually doesn't matter what colors are in the colortable itself, but it's a good idea to match the color with what it does (grass is green, desert is tan, etc) so you don't get confused.

-Ryandor


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

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 5 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 Group