Polls

Default Game Speed

Log in to vote!

Currently Online

Latest Posts

Topic: BMP -> Map

Holloweye
Avatar
Joined: 2013-01-26, 18:10
Posts: 17
Ranking
Pry about Widelands
Posted at: 2014-11-23, 17:38

Is there any utility program for converting a BMP -> a Widelands map? It would save me a lot of time as it takes forever to example make the whole map water. All I need is basically blue = water, green = grass.

Thanks in advance.


Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1267
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2014-11-23, 21:48

You are not the first to asking something like this.

If you are very skillfull with scripting you could program something like this, but it would be easier just do the thing manually.


Top Quote
hjd
Joined: 2011-06-12, 20:24
Posts: 164
Ranking
At home in WL-forums
Location: bugs.launchpad.net/widelands
Posted at: 2014-11-23, 22:36

Could you elaborate a bit more on the use case/problem you are trying to solve? There is no such utility, but there might be an easy way to provide the necessary tools.

It would save me a lot of time as it takes forever to example make the whole map water.

This particular case should be easy to fix. When creating a new map it should be possible to set a terrain the map should be created with, so you could pick between grass, water, mountain, snow etc. depending on what sort of map you wish to make. (I actually thought we had something like this in the new map dialog, but apparently not. And after we merged all worlds into one, we lost the little control we had over the base terrain when creating a new map.)

I think that's a small and reasonable feature request which would be possible to add, though without more details I don't know whether this solves your issue or not.

(There are also the different brush sizes to "draw" larger parts of the map, but I assume you are familiar with these already.)


Ships!

Top Quote
wl-zocker
Joined: 2011-12-30, 17:37
Posts: 494
Ranking
Tribe Member
Location: Germany
Posted at: 2014-11-23, 22:58

There is https://bugs.launchpad.net/widelands/+bug/536409. I think there is also another bug report about which steps should be taken when the editor is started, but I do not find it at the moment.


"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg

Top Quote
SirVer
Joined: 2009-02-19, 15:18
Posts: 1439
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2014-11-24, 07:08

There is nothing that works without a bit of coding, I am afraid. What I did in the past is write the bmp as a json array and the using the scripting editor (f6 in the editor) and dofile to run a Lua script that sets all fields to values. There is nothing ready made though I am afraid.

There should probably be a fill tool in the editor, but it is not implemented right now.


Top Quote
Holloweye
Avatar
Joined: 2013-01-26, 18:10
Posts: 17
Ranking
Pry about Widelands
Posted at: 2014-11-24, 11:57

SirVer wrote:

There is nothing that works without a bit of coding, I am afraid. What I did in the past is write the bmp as a json array and the using the scripting editor (f6 in the editor) and dofile to run a Lua script that sets all fields to values. There is nothing ready made though I am afraid.

There should probably be a fill tool in the editor, but it is not implemented right now.

That was exactly the information I needed. I will be writing a little program to generate a json to paste into the scripting editor. Thanks a lot!

Btw I will be using it to generate water and land to make create the map in a more exact way then using the editor. Then do finishing touches in the editor.


Top Quote
Holloweye
Avatar
Joined: 2013-01-26, 18:10
Posts: 17
Ranking
Pry about Widelands
Posted at: 2014-11-24, 12:03

Although F6 does not work for me. It only works with newer versions of the editor or something?


Top Quote
wl-zocker
Joined: 2011-12-30, 17:37
Posts: 494
Ranking
Tribe Member
Location: Germany
Posted at: 2014-11-24, 18:26

F6 only works in debug builds. If it does not work, you probably have a release build.


"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg

Top Quote
SirVer
Joined: 2009-02-19, 15:18
Posts: 1439
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2014-11-24, 21:35

That is maybe not ideal though. What do you guys think, should the scripting console be enabled also in release builds in the editor?


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3058
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2014-11-24, 21:56

I think it can't hurt - might also come in handy when developing scenario maps.


Busy indexing nil values

Top Quote