Topic: Copy Paste Script
Gilb Topic Opener |
Posted at: 2021-02-14, 19:13
This is the copy paste script i use to copy a map area x times to the right. It makes it much easier to create the same landmass and resources and for an arbitrary amount of players. Adjust the coordinates to your own case and give it some time for bigger maps. The editor might look frozen but it will work. Place in your main (widelands.exe) folder and open with a text editor. Top Quote |
Gilb Topic Opener |
Posted at: 2021-02-14, 19:17
Hm i could not attach the *.lua file, so you have to create it your own
Edited: 2021-02-15, 17:11
Top Quote |
kaputtnik |
Posted at: 2021-02-15, 15:09
Edit: Attaching lua scripts do work, see attachment. Does your the file have the extension Nice script You might want to get the maps width and height automatically and make a check if this doesn't fit:
Edited: 2021-02-15, 15:10
Fight simulator for Widelands: |
Gilb Topic Opener |
Posted at: 2021-02-15, 17:09
Yes, it's a .lua file. Error was something like "...looks like code, but we think it is text." I thought about map.width and so on too, but guess i made a mistake implementing it, so i just stood with the numbers. If you want to copy in a grid you need 2 runs with different area too. Top Quote |
Alasia |
Posted at: 2024-09-25, 07:41
Hi Glib (and Kaputtnik) Thank you very much for sharing this example - it's been really helpful for me to look at and use and learn from. Reading through some of your other posts Glib, I see the learning curve you went through to get this script working, which makes me appreciate it even more. I realise that this post is some years old now, but your script worked for me and so I wanted to say thank you for sharing. Edit: I just now discovered an add-on which I shall play with, but my point stands - I learned from this and am still glad you shared it! :o) Cheers, Alasia Edited: 2024-09-25, 07:50
github: Alasiax Top Quote |