Topic: Map analyse script
kaputtnik![]() Topic Opener |
Posted at:
2023-12-02, 21:29 UTC+1.0
This topic can also be made in Coding and Scripting but since my new script is probably most important for map designers, i put it in this forum. I am working on a map analysis tool which gathers some information about a map. The information it provides are:
Currently this script can only be used with debug builds, but it is planned to make it accessible via the UI as addon. But i want to ask if you think if this script is useful at all. So if you want to test it:
Then you have three possibilities:
Attached is the script. A screenshot will be attached to the next post. ![]() ![]() |
||||||||||||
kaputtnik![]() Topic Opener |
Posted at:
2023-12-02, 21:31 UTC+1.0
A screenshot for statistics of a whole map. The map was a 160x160 map and running
Edited:
2023-12-02, 21:31 UTC+1.0
![]() ![]() |
||||||||||||
kaputtnik![]() Topic Opener |
Posted at:
2023-12-21, 17:04 UTC+1.0
I gave the script some more love and now it shows also the vicinity of a player: The player analysis shows which resources are nearby the players starting position (as defined in the map), which amount of this resource is available and how far away this resource deposit is. I was also able to make it incredible fast and shrunk drastically the memory consumption. For comparison: If i ran this script on the map Europe 1.2 ( with a dimension of 512x512 the biggest map) and examining the whole map:
For smaller maps this script runs without any noticeable delay. Attached a screenshot of the current state. For a comparison i made also a screenshot with the default widelands theme. ![]() ![]() |
||||||||||||
kaputtnik![]() Topic Opener |
Posted at:
2023-12-21, 17:14 UTC+1.0
Here is the updated version of the script. Edit: The script contains currently some memory statements which prints the used memory to stdout (or the console). If you are interested you can compare the output and the corresponding places inside the script to get an impression of memory usage and which statement is clearing memory.
Edited:
2023-12-21, 17:24 UTC+1.0
![]() ![]() |
||||||||||||
kaputtnik![]() Topic Opener |
Posted at:
2023-12-21, 17:35 UTC+1.0
The table of "Players and their vicinity" and an explanation:
The icons below the players table are self explaining, imho.
Edited:
2024-01-24, 10:29 UTC+1.0
![]() ![]() |
||||||||||||
Alasia![]() |
Posted at:
2024-09-25, 05:48 UTC+2.0
Hey Kaputtnik - Thank you for this - it's enormously helpful and really useful to determine if a map is balanced!
Is there a way to output this information to a text file or the initiating console screen? My screen isn't huge and it would be helpful to be able to switch between the output and editor while I make changes rather than re-running the script each time.
Edited:
2024-09-25, 05:49 UTC+2.0
github: Alasiax ![]() ![]() |
||||||||||||
kaputtnik![]() Topic Opener |
Posted at:
2024-09-25, 08:18 UTC+2.0
It seems i forgot to add a post to this thread This script is available as an add-on (needs at least widelands version 1.2) and you will find it the UI_Plugin category. After installing this as an add-on you will find the script(s) in the folder
When writing this scripts i also thought about writing the result to the console. But in the end i was happy it runs smooth and didn't spend much time on this idea If you want to add some One remark: If you edit scripts you should use a plain text editor. ![]() ![]() |
||||||||||||
Ron_of_Nord![]() |
Posted at:
2025-02-10, 02:07 UTC+1.0
This script is A1 Brilliant ! I have found it excellent when Balancing my maps. Admittedly it took me a moment to figure out what to do with it but now I couldnt do without it. Could we PLEASE have this script as part of the map editor in the next release. It really helps. The aussies are coming, ya ho! ya ho! ![]() ![]() |
||||||||||||
OIPUN![]() |
Posted at:
2025-02-10, 09:55 UTC+1.0
Where can I find your maps, please, share. ![]() ![]() |
||||||||||||
kaputtnik![]() Topic Opener |
Posted at:
2025-02-10, 18:28 UTC+1.0
Thanks
Do you have any suggestions how to improve the description? Maybe a better explanation in the screenshots? ![]() ![]() |