Currently Online

Latest Posts

Topic: Debug-Script

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

Update with typo-fix.


Attachment:
debug.lua (14.8 KB)

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

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

Latest version.


Attachment:
debug.lua (16.0 KB)

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

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

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


Attachment:
debug.lua (21.8 KB)

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 20:06
Posts: 324
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-19, 06: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, 06:56

Attachment:
debug.lua (18.8 KB)

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 20:06
Posts: 324
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-05-05, 01: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, 01:21

Attachment:
debug.lua (21.6 KB)

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 20:06
Posts: 324
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-05-09, 02: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 addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

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

Some fixes and print output in terminal for debugging.


Attachment:
debug.lua (26.6 KB)

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

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

"Dateline problem" in "connect_road" solved.

Edited: 2021-05-21, 17:22

Attachment:
debug.lua (20.6 KB)

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

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

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


My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote