"Local mexes" widget 1.0
Moderator: Moderators
"Local mexes" widget 1.0
Hi!
I finally created 1.0 version of my very first widget, "Local mexes". It's purpose is to (re-)build mexes inside the perimeter of your base (using idle air/water/ground constructors). The perimeter is calculated automatically as the base grows.
See the video:
http://www.youtube.com/watch?v=WtyR-42I ... e=youtu.be
Early version video: http://www.youtube.com/watch?v=muKukY6UIzM
Local mexes on github: https://github.com/jet-bird/local-mexes
Direct download link: https://github.com/jet-bird/local-mexes ... e/v1.0.zip
Installation: place localmexes.lua into your widgets directory.
I finally created 1.0 version of my very first widget, "Local mexes". It's purpose is to (re-)build mexes inside the perimeter of your base (using idle air/water/ground constructors). The perimeter is calculated automatically as the base grows.
See the video:
http://www.youtube.com/watch?v=WtyR-42I ... e=youtu.be
Early version video: http://www.youtube.com/watch?v=muKukY6UIzM
Local mexes on github: https://github.com/jet-bird/local-mexes
Direct download link: https://github.com/jet-bird/local-mexes ... e/v1.0.zip
Installation: place localmexes.lua into your widgets directory.
Re: "Local mexes" widget 1.0
In new version constructors operate in a whole "team" perimeter of your allies. For the clarity it's vizualized with transparent polygon:
https://github.com/jet-bird/local-mexes ... ag/v1.2.1b
https://github.com/jet-bird/local-mexes ... ag/v1.2.1b
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: "Local mexes" widget 1.0
Code: Select all
local armComUDId = UnitDefNames["armcom"].id
local coreComUDId = UnitDefNames["corcom"].id
Code: Select all
excludedUnits = {
ecommander, //evo's commander name
armcom, // *a commander name
corecom, // *a commander name
yomomma // because she's a big bitch
}
Code: Select all
-- exclude commanders
if ud == nil or udid == armComUDId or udid == coreComUDId then
return false
end
https://github.com/jet-bird/local-mexes/issues/8
Re: "Local mexes" widget 1.0
Thank you for this little code review. Is there a widget (for example) with all commander names for all games placed in array for exclusion?Forboding Angel wrote: Use an array instead. Far more robust and less prone to future failure.
https://github.com/jet-bird/local-mexes/issues/8
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: "Local mexes" widget 1.0
Honestly there is no need. in your array by default you can just have armcom and corecom, and the user/gamedev can add others as needed.
local excludedUnits = {} Is really pretty self explanatory, but you could leave a little comment next to it explaining the purpose of the array.
local excludedUnits = {} Is really pretty self explanatory, but you could leave a little comment next to it explaining the purpose of the array.
Re: "Local mexes" widget 1.0
Strange, but in new BA 8.18/Spring 100 I don't see my widget in the list of widgets. Does anybody know if there were some breaking changes?
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: "Local mexes" widget 1.0
You never made an excludedUnits array, Bad JetBird!
Re: "Local mexes" widget 1.0
I just tried.. and this widget is present in the list, all ok
Re: "Local mexes" widget 1.0
Sorry for that , but I was trying to fix the bug with perimeter: https://github.com/spike-spb/local-mexes/issues/9, it's not so easy as I thought.Forboding Angel wrote:You never made an excludedUnits array, Bad JetBird!
Re: "Local mexes" widget 1.0
v1.2.2 (bug fix release) demo:
https://youtu.be/AYycDfjPQ2k
https://youtu.be/AYycDfjPQ2k
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: "Local mexes" widget 1.0
It works differently in your demo than I thought. That's not a bad thing, but it begs the question, why not allow the player to set the perimeter manually as well? That would be a lot more useful than ONLY relying on your outer mexes not getting asploded/built.
Re: "Local mexes" widget 1.0
Maybe this will be implemented in future versions :)Forboding Angel wrote:It works differently in your demo than I thought. That's not a bad thing, but it begs the question, why not allow the player to set the perimeter manually as well? That would be a lot more useful than ONLY relying on your outer mexes not getting asploded/built.