Not logged inOpenClonk Forum
- - Date 2014-08-05 21:57
Parent - - By Sven2 [de] Date 2014-08-01 17:12
I don't know. Isilkor mentioned some problems with Gtk I think.

mape isn't that useful at the moment as long as it doesn't support map scripts (when it does, it will be insanely useful again).
Parent - - By Clonk-Karl [us] Date 2014-08-04 21:40
Should be insanely useful again, now :)
Parent - - By Sven2 [at] Date 2014-08-04 23:38

> Should be insanely useful again, now :)

I couldn't use it at all :(

See bugtracker:
Parent - - By Clonk-Karl [us] Date 2014-08-05 03:50
Should work now!
Parent - - By Sven2 [at] Date 2014-08-05 12:58
The .zip file of the Win64 bit build seems to be broken - both OC snapshot and mape. The 32 bit build works :o
Parent - - By Clonk-Karl [us] Date 2014-08-05 14:04
Do you mean you cannot open the zip archive at This works for me, I can extract its contents...
Parent - - By ala [at] Date 2014-08-05 18:20
Seems we had unstable internet, the files were probably alright.
Parent - - By Newton [de] Date 2014-08-09 00:17
Cool, a clonk meeting in Austria?
Parent - By ala [at] Date 2014-08-09 13:07
Yes, although productivity was not so prominent some OC Stuff was done: pluto / Zapper were working on some buildings, Sven did some scripting and I finished another composition :)
Parent - - By Maikel Date 2014-08-05 08:10
Great news!

It could not locate a syntax highlighting for Map.c for me though, and also the preview size for the map could not be increased :(
Parent - - By Clonk-Karl [us] Date 2014-08-05 14:00
Are you using the Linux version? The syntax highlighting files are stored in the mape-syntax folder, and it is searched for in these directories: ~/.mape-syntax, ./mape-syntax, ./src/mape/mape-syntax. So if you are running mape not from the repository or from the same directory where the mape-syntax folder is, it might not find it. An easy solution would be to copy the mape-syntax directory from the snapshot or from src/mape/mape-syntax to ~/.mape-syntax.

For Map.c scripts that resize the map themselves (for example Goldrush), mape will always take the size specified in Map.c, and ignore its own settings. Otherwise the preview size should work; if not maybe you can show me a script for which it doesn't and I'll take a look.
Parent - By Maikel Date 2014-08-05 14:36
Thanks, I was doing an out-of-source build indeed
Parent - - By Maikel Date 2014-08-05 14:43
One of maps now does not work since it depends on some System.ocg script functions in the global System.ocg folder, do you include those?
Parent - By Clonk-Karl [us] Date 2014-08-05 15:01
No, System.ocg scripts are not included. I can probably add it, maybe you can create a bugtracker entry for it? At the moment, only Objects.ocd/Libraries.ocd/Library_Map.ocd is loaded (hardcoded).
Parent - - By Clonk-Karl [us] Date 2014-08-05 21:57
I gave this a try; however loading most System.ocg scripts causes script errors at link time since they use identifiers that are not defined in the limited script context that mape uses, for example everything that has to do with C4Object:

ERROR: unknown identifier: SetVertex (in SetVertexXY, /home/ck/devel/openclonk/planet/System.ocg/Vertices.c:12:9)

Now, in principle, errors at link time could be ignored. They would not even show up when typing around in mape because these scripts are untouched. However, when actually trying to call a function which has such an unknown identifier in it, one only obtains an unhelpful "see above for details" error message.

Furthermore, linking all the System.ocg scripts seems to take quite some time (1-2s on my computer), which would basically add to the startup time of mape. Maybe not such a big deal.

The only System.ocg scripts which do not produce link time errors (and, therefore, I suppose are useful for Map.c scripts), are: Array.c, ClonkControl.c, Colors.c, Proplists.c.

Unfortunately there is no straightforward way to find out which scripts can be loaded in which cannot that comes to my mind. Which System.ocg scripts do you actually need? Maybe we can simply hardcode a few? Do you have a suggestion how to proceed?
Parent - By Sven2 [at] Date 2014-08-06 00:25
It wouldn't need to be hardcoded, but could be an option in the preferences.

Or we could move everything that depends on objects from System.ocg into Objects.ocd.
Parent - - By Maikel Date 2017-03-23 09:32
Still not working unfortunately. I would propose only loading Array.c and Math.c for now. We need to clean up Math.c for this, but there are many functions which do not belong there. I can do this.

It would be good to have a function to export the create MapFg.bmp and MapBg.bmp's as well as a command line option like: ./mape foo.c --export bar (creating barFg.bmp and barBg.bmp). I can use this for my tower of despair script.
Parent - By Luchs Date 2017-03-26 19:00

>It would be good to have a function to export the create MapFg.bmp and MapBg.bmp's as well as a command line option like: ./mape foo.c --export bar (creating barFg.bmp and barBg.bmp). I can use this for my tower of despair script.

I built a tool like this. (Well, I wanted to experiment with Rust FFI and ended up with command-line mape.) It currently doesn't export the background but that's easy to add.

I uploaded binaries for Windows and Linux here. Unfortunately, it's dynamically linked only, so it probably won't work on most distributions. The binary only depends on zlib without any GTK stuff, so it should be usable on Windows as a poor mape substitute while mape doesn't run there (is that actually still an issue?). (There's also a zoo of libstdc++ dlls because I couldn't figure out how to link that statically.)
Parent - By Luchs Date 2017-03-31 17:16
I managed to load System.ocg now (in ocmapgen). It involves loading a hackily created compatibility script file before any System.ocg scripts. With these changes, the tool can now render most Map.c in the repository as well as the tower without changes! Those failing call GetStartupPlayerCount() or need some function or constant from the scenario script. Providing GetStartupPlayerCount() shouldn't be an issue.
Parent - - By Maikel Date 2014-08-24 13:48
Could you implement a zoom factor for the map preview, now it is just too small with typical maps around 200 x 200 pixels, with that preview size I can't see anything.
Parent - - By Clonk-Karl [us] Date 2014-08-24 18:22
Done... at the moment it uses bilinear scaling, but that could possibly be improved.
Parent - By Maikel Date 2014-08-24 18:32
Cool, thanks!
Parent - By Maikel Date 2014-08-25 21:36
I found another bug if I type something like this:

Draw("Tunnel-", algo);

The "-" causes mape to crash and telling me to email you :) The command line leaves me with this trace:

(mape:3490): GLib-CRITICAL **: Source ID 7500 was not found when attempting to remove it

(mape:3490): GLib-CRITICAL **: Source ID 7664 was not found when attempting to remove it
mape: /home/maikel/openclonk/repos/src/script/C4Aul.cpp:316: C4AulFuncMap::~C4AulFuncMap(): Assertion `!FuncCnt' failed.
Aborted (core dumped)
maikel@maikel:~/openclonk/repos/build$ ./mape
mape: /home/maikel/openclonk/repos/src/script/C4Aul.cpp:316: C4AulFuncMap::~C4AulFuncMap(): Assertion `!FuncCnt' failed.
Aborted (core dumped)
maikel@maikel:~/openclonk/repos/build$ ./mape
mape: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
mape: /home/maikel/openclonk/repos/src/script/C4Aul.cpp:316: C4AulFuncMap::~C4AulFuncMap(): Assertion `!FuncCnt' failed.
Aborted (core dumped)
Parent - - By Nachtfalter Date 2016-02-08 23:59
Doesnt launch on windows (best bug report ever). Could you please fix it? :(
Parent - By Clonk-Karl [us] Date 2016-02-09 02:07
I don't have a Windows dev machine... Isilkor said it has to do with the GTK icon theme he's (not?) packaging with the autobuild.
Parent - - By Isilkor Date 2016-02-14 14:00
Does it work when you unzip next to mape.exe?
Parent - - By Nachtfalter Date 2016-02-16 16:17
Sort of! :|

Program ist starting up, but selecting a folder on the left side is impossible. Error Message: "Could not open [path]: OpenRealGrpFile: Cannot open standard file".
Parent - - By Marky [de] Date 2016-02-16 21:45
Works for me, though. However, Loading Map.c does not work, because I have no idea how to tell Mape where to find Library_Map.
Parent - By Clonk-Karl [us] Date 2016-02-17 04:29
It's supposed to be in Objects.ocd/Libraries.ocd/Map.ocd, with the Objects.ocd expected at the same location as the loaded Material.ocg.
Parent - By Pyrit Date 2016-04-04 21:11
It starts with the icons!

But some map script error messages are not very useful. For example, when you open a map from the Worlds folder, it will just say syntax error: see above for details. But there are no details.
Turns out, this an error you get when you refer to a variable that is not defined. In the case of the official maps, you have to define the SCENPAR_MapSize variable, before it can be rendered. But Mape doesn't tell you that, so I was puzzled art first.
Parent - - By Pyrit Date 2014-08-06 23:17
Mape now works with S2 map scripts? Can I post this to /r/clonk?
Parent - - By Maikel Date 2014-08-07 08:33
Yes! And even better a blog post?
Parent - - By Pyrit Date 2014-08-07 21:53
I posted the news to reddit.

Should I write the blog post? Don't expect too much details on it from my side, as I don't have too much knowledge about the matter.
Parent - - By Newton [de] Date 2014-08-08 06:43
Parent - - By Pyrit Date 2014-08-09 19:29
I made a draft, this is my first time using wordpress.

I think adding a full landscape screenshot would be cool. What would be a suitable scenario for that? Spiral was already posted on the blog. Maybe maze, but would that spoil the scenario?
Parent - - By Newton [de] Date 2014-08-10 17:54
Naw, that's okay. After all, it is a dynamic map!

I reviewed the post, added some links and changed the formulation of a few sentences a bit.
Parent - By Pyrit Date 2014-08-10 21:04
Okay, thanks! :) Published it now!

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill