Currently Online

Latest Posts

Topic: More Variety of Landscapes

kolober
Avatar
Joined: 2009-03-10, 03:57
Posts: 12
Ranking
Pry about Widelands
Location: Roseville, California, US
Posted at: 2009-03-10, 04:04

I have really enjoyed making maps with the map editor, but I'm a little disappointed with the landscape colors. For example, Greenland has 4 different shades of gray for mountains. Why not have 1 gray (for granite, etc.), 1 black (for extrusive igneous rock), 1 red (for rocks with lots of oxydized iron), and one white (for limestone/marble)? I'm not a computer programmer, but it seems like this would be a simple, superficial change that would increase the variety of maps we can make.


I hied to Kolob and all I got was this lousy planet.

Top Quote
madtumat
Joined: 2009-02-27, 02:59
Posts: 39
Ranking
Pry about Widelands
Posted at: 2009-03-10, 05:20

Hey Kolober,

You can make your own worlds. I am working on my own tribes and I created a few worlds by combining items from the four already existing tribes. To do this, you will need to make sure you can see, read, and edit hidden files in your Widelands folder. I had to figure this out the hard way, and I don't remember the details to get things to work well. In Windows, you can click on View or Tools once in Widelands folder and click the "show hidden files" box or line. Make sure to apply this to all subfolders and files. Just play with the buttons until you get things to work!

I copied the Greenlands file as a basis. Rename the copy whatever you want. Then cut and paste the items from the other worlds you wish to use in your world. You will need to rename them so they will compile. Don't forget to change the name in the config file in "YourWorld" or Greenland will pop up twice in your editor. open config files with your favorite text editor; NotePad or Wordpad will work fine.

A word of caution: The first time I tried this, I simply opened three of the boring grey granites and changed them using one of the image editors on my puter. Unfortunately, the color scheme (whatever it is called) used more colors than Widelands calls for, and this required using more memory for processing. The computer was not happy! I made some pretty cool pink and striated rock files, but they were not very practical in the long run.

You can also edit the config files for buildings and workers in the same manner. Just remember to keep the same format as they have already. Take a look at special workers like forestors, fishers, lumberjacks, and hunters to see how to code special functions. Perhaps I will put up a few hints I have learned by digging through the source code I downloaded long ago. You have to look pretty hard to find these, and a few, easy, specific examples might serve well for those who spend play time against the computer. I am still trying to find ways around the limitations on building and training soldiers. I can build wares that the computer warehouses and headquarters will turn into soldiers, which they will not do with a carrier and axe as currently programmed to do.

My goodness. I tend to write a lot!

Have fun!

Maddy


Top Quote
kolober
Avatar
Joined: 2009-03-10, 03:57
Posts: 12
Ranking
Pry about Widelands
Location: Roseville, California, US
Posted at: 2009-03-11, 05:02

Thank you so much for your suggestions! I assumed making the landscape changes would require some sort of computer programming skills, but what you describe seems to be fairly straightforward. I will try it. If it works, I will definitely write about it on this forum.


I hied to Kolob and all I got was this lousy planet.

Top Quote
kolober
Avatar
Joined: 2009-03-10, 03:57
Posts: 12
Ranking
Pry about Widelands
Location: Roseville, California, US
Posted at: 2009-03-11, 05:56

It worked! I have been able to copy terrains from other worlds into my new one. But I tried to rename my world in the "conf" file so that it would appear under the new name in the game, but for some reason I wasn't allowed to save the change. I tried notepad, wordpad, and word, but none of them allowed me to save the change. But otherwise, you were right!


I hied to Kolob and all I got was this lousy planet.

Top Quote
madtumat
Joined: 2009-02-27, 02:59
Posts: 39
Ranking
Pry about Widelands
Posted at: 2009-03-11, 15:27

This is one of those issues I have to fight over and over again. Right click on your NewWorld folder to get the Properties box. Click the ReadOnly box, and then Apply. Click advanced. Change with the Permissions. YOu will want to change some of them to FullControl, thought I don't know what exactly is needed here. I have much more trouble with this in Vista than in XP. When you first download the files, they are read-only, and many folders are hidden. You just have to play hide and seek until you can tag them!

Maddy


Top Quote
kolober
Avatar
Joined: 2009-03-10, 03:57
Posts: 12
Ranking
Pry about Widelands
Location: Roseville, California, US
Posted at: 2009-03-12, 03:12

I followed the instructions, but I still can't seem to get it to save. Oh well, not a big deal. Thanks for your help. I really enjoy making maps in my new world.


I hied to Kolob and all I got was this lousy planet.

Top Quote
madtumat
Joined: 2009-02-27, 02:59
Posts: 39
Ranking
Pry about Widelands
Posted at: 2009-03-12, 23:50

Try this...Make a copy of the conf file when you save it...keep the same format! You might have something like conf-Copy or conf(2). Make the change in your copy and see if you can save that. If so, change the names. Change conf to something else first, and then change conf-copy to conf. I have had to do this when I edited some of the graphics. I have no idea if this is because of permissions or something to do with my security software.

I do trial-by-error-until-it-works method! One of these days I will know what it is that works.

Maddy


Top Quote
RWise
Joined: 2009-02-22, 02:19
Posts: 27
Ranking
Pry about Widelands
Posted at: 2009-03-29, 17:53

looks like we are limited to 16

[src/world.cc:171] Error loading world allterain: [src/world.cc:278] worlds/allterain/terraincon /allterain/terrainconf: too many terrain types, can not be more than 16

You are using build build-13.

or maybe I did somthin wrong,,,,,


Top Quote
Nasenbaer
Avatar
Joined: 2009-02-21, 18:17
Posts: 829
Ranking
One Elder of Players
Location: Germany
Posted at: 2009-03-30, 20:58

That's right, currently the Widelands doesn't support more than 16 terrain types per world. This is simply to avoid big map files -> for every triangle two Bytes are used for saving the terraintype as small integer.


Top Quote
sigra
Joined: 2009-03-05, 19:02
Posts: 130
Ranking
At home in WL-forums
Location: Orsa
Posted at: 2009-03-30, 21:30

Well it is not the size of the files that matters, but the memory usage of the running game. Ordinary CPUs only have a few MiB of cache, and the more of the dataset that fits into it, the faster the program will run. With 16 terrain types, the terrain type of 2 triangles can be saved in a byte. Currently such a byte is saved for the main map, and for each players's version of the map (the engine keeps track of which terrain type each player has seen on each triangle, so that the terrain could change in a place that is fogged for a player, without letting the player know it.

But I think it would be possible to find 2 unused bits that could be used for storing the terrain type of a triangle pair. Then we could have 32 terrain types without increasing memory usage.


Top Quote