Latest Posts

Topic: Debug-Script

MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2020-11-19, 18:49

Update with typo-fix.


Attachment:
debug.lua (14.8 KB)

My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-04, 19:16

Latest version.


Attachment:
debug.lua (16.0 KB)

My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-08, 15:33

New version with scripts to change warehouse ware/worker policies.


Attachment:
debug.lua (21.8 KB)

My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-19, 07:55

New version. Replaced "force_" with "place_". And there is a new function, with which one can replace all buildings of certain name or type with another building. So you can replace for example all "europeans_castle" on map from player 1 with "europeans_tower" or something like that. Or you can replace all conquered militarysites from player2 with a militarysite of your own tribe.

Edited: 2021-01-19, 07:56

Attachment:
debug.lua (18.8 KB)

My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-05-05, 02:21

I have an update for debug.lua. There is now a working connect_road_method, which connects two flags on map. But there are sill some bugs.

Edited: 2021-05-05, 02:21

Attachment:
debug.lua (21.6 KB)

My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-05-09, 03:15

New enhancement. Roads are now forced. The only case that does not work reproducibly is the connection of two points via the "date line". So as soon as you cross the zero meridian of the map, the function produces errors. Otherwise the script works pretty well. I recoded all possible cases (that I found) in directions of movement. Since the map consists of a grid of discrete coordinates, there are a few special cases where a diagonal connection does not work. I hope I caught them all.


Attachment:
debug.lua (26.4 KB)

My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-05-09, 12:18

Some fixes and print output in terminal for debugging.


Attachment:
debug.lua (26.6 KB)

My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-05-21, 18:22

"Dateline problem" in "connect_road" solved.

Edited: 2021-05-21, 18:22

Attachment:
debug.lua (20.6 KB)

My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-06-10, 22:21

Now as own addon -> https://github.com/widelands/wl_addons_server/tree/master/addons/enhanced_debug_scripts.wad


My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote