Topic: Editor Extensions
Gilb Topic Opener |
Posted at: 2020-12-01, 16:10
Hello, first of all thanks for such a great game!! I've known and looked at Widelands for about the last 10 years now and was always happy to get a quick nostalgia fix. However now with more friends staying at home and playing online games at night we are staying longer than just for 5 games. I got curious about creating my own maps then and spent some hours "painting" in the editor. It really felt like that and after i had 1 players area to my liking i could not go through with repeating the process for the others. I looked everywhere for some copy/paste capabilities but got nowhere. Well not nowhere, but to those threads that talk about map symmetry since about 2013. And boy those maps that 'gnarfk' made are REALLY hitting a nerv with me. I desperately want to play his hilbert curve map (the others too), but as soon as a geologist hammers at the >20 resource nodes the game crashes. I would love to repair it (it seems so easy) and adapt it for personal use but i cant see myself doing that 2 hours in the editor switching resource tools and sizes like a maniac. So could anyone of you that know how to create a map by script share his/her knowledge or code here? May be release an editor extension or something like that? I would already be happy with a "repeat east" feature for X players. We are regularly between 3 to 7 so it would really help us if we could extend a map to the number of players that show up to play. Edited: 2020-12-01, 16:24
Top Quote |
Tibor |
Posted at: 2020-12-01, 17:14
Well, this is not that simple. Bottom line is that you can use LUA scripts to edit maps. Basically would create new empty map of expected size and using console (F6 button) you can execute your script. Top Quote |
Gilb Topic Opener |
Posted at: 2020-12-01, 18:24
thx for the advice i already tried F6 but nothing happened. i guess i need a development version? then write my own script from scratch? i am not a programmer, just always edited scripts to my own liking in other games, but i might manage. something like 1)extend map dimensions 2) go to first new point and set everything to the same as "50" points before, repeat 3) end when you reach 0,0 ?? Edited: 2020-12-01, 18:24
Top Quote |
Tibor |
Posted at: 2020-12-01, 20:39
Yes, you would need development build Syntax of LUA script is like:
With this you can read and write, but what you probably cannot is to resize the map - but let others say Also there should be some wiki about LUA somewhere. Top Quote |
Tibor |
Posted at: 2020-12-01, 20:39
Yes, you would need development build Syntax of LUA script is like:
With this you can read and write, but what you probably cannot is to resize the map - but let others say Also there should be some wiki about LUA somewhere. Top Quote |
GunChleoc |
Posted at: 2020-12-02, 10:49
The editor has a tool for map resizing, so you wouldn't need Lua for that. For our scripting commands, see https://www.widelands.org/documentation/index.html Busy indexing nil values Top Quote |
Gilb Topic Opener |
Posted at: 2020-12-21, 12:37
So i played around a little and got a simple print command to run from the console in mapeditor. (cant see it though because i dont know how to turn off the FPS counter)
Edited: 2020-12-21, 12:38
Top Quote |
kaputtnik |
Posted at: 2020-12-21, 12:56
You have to use Best is to take a look at some scenarios which are shipped with the game. You may find them in the subfolder If you want to execute a script saved in a file from the debug console, you can do that by typing Top Quote |
Nordfriese |
Posted at: 2020-12-21, 13:15
In the editor, Top Quote |
Gilb Topic Opener |
Posted at: 2020-12-21, 13:54
Yeah i learned that "dofile" from another post here, however i didnt care about any path, i just put it in the main dir. After all i am just trying to create a "simple" copy/paste script for map editing.
Edited: 2020-12-21, 13:55
Top Quote |