Hazardous mine explosions solved, at least for BA 9* and BA11.

Spring EngineLua Scripts

Images



File Information

Title / Version Hazardous mine explosions solved, at least for BA 9* and BA11. 1
License Freeware / Free
Filename cmd_auto_selfd_the_mines.lua
Filesize 4.59 KB
Date 08/17/2020 - 10:35
Changed 09/17/2020 - 17:29
Publisher / Author tulipe (Uploaded by tulipe)
Keywords

Description

Hazardous mine explosions solved, at least for BA 9* and BA11.

For months, or rather years I saw some mines sometimes did not explode with BA 9* (or 11). This widget should resolve this.

This widget give a self-d command for the mines when an enemy is near a mine, except if enemy speed > 120, (for example the jeffys, fleas or planes have speed > 120) or except if enemy speed <120 and the mine has a wait command.

The mine should still explode if :
-an enemy is just upon the mine, the mine uncloak and the enemy fire on the mine.
-an enemy is really near the mine, the mine uncloak and the enemy fire on the mine.
-a projectile collides with the mine whether the mine was uncloacked or not
(If an enemy has an hold fire command and this enemy is just above an allie uncloked mine, and nothing fire on the mine, the mine should not explode.)

Widget not really needed to fix mines for BA 10.24 or BA test (BA test = beyond all reason mod) cause it seemed the mines were already fixed for ba10.24 and byar. And I didn't saw an option to put mines on wait for BA 10.24 (while it was possible for ba 9* or 11), so this widget should not completly work for BA 10.24.

Widget tested for a few weeks. No bug found.

(A link to springrts forum topic about mines bug : https://springrts.com/phpbb/viewtopic.php?f=44&t=41088&p=593857#p593857 )

(I tested impact of this widget for fps and didn't saw significative impact. According to widget profiler widget, percent was about 0 for total percentage of running time spent in luaui callins, and about 1kB/s for 300 armmine3 total rate of mem allocation by luaui callins. Defense range was something like 300kB/s at start.)

Download of this widget:
Click on "DOWNLOAD" button. Then on the new page which should appear after clicking on the button, right click on the link "CMD_AUTO_SELFD_THE_MINES.LUA" (and not just "Click the link to start your download:", as I saw written), and choose "save link as..." (or something like this, eventually wrote in your language) and choose a folder where to download the file.

Installation of this widget:
-for windows, you should put it in C:\Users\your_current_account_name\Documents\My Games\Spring\LuaUI\Widgets. Or maybe another folder (eventualy, see https://springrts.com/wiki/Lua_Widgets)
-for linux (at least some linux distributions (for example ubuntu)), I'm unsure, but I think you should put it in ~./spring/LuaUI/Widgets
After placing the file in the folder, you should see the widget ingame in the list after pressed the F11 key. Widget should appears after the widgets wrote with an asterisk at the end. The name of this widget should be "Auto self-d the mines except with fast units".