eronoobos / BABAR-The-Shardifant

Balanced Annihilation & Balanced Annilhation Reloaded configuration for Shard
2 stars 1 forks source link

unnecessary cleaning #31

Closed eronoobos closed 8 years ago

eronoobos commented 8 years ago

Only things in the way should be cleaned. There's no need to reclaim potentially useful buildings that aren't obstructing anything. Simple way would be to only clean within a radius of a factory. Complicated way would be to look for nearby things to clean when a move order fails. (Complicated because I don't know if MoveOrderFailed even works.)

pandaro commented 8 years ago

if we need metal maybe reclaim all is usefull

pandaro commented 8 years ago

But keep some reserves of little production can save us if we take great damage in the center... add label 'question' please is a gameplay type

eronoobos commented 8 years ago

But keep some reserves of little production can save us if we take great damage in the center...

exactly

if we need metal maybe reclaim all is usefull

since reclaimers have cleanables as targets, maybe just let them deal with non-obstructing cleanables

eronoobos commented 8 years ago

about MoveOrderFailed: it only works in non-lua, because (from the wiki)

addon.UnitMoveFailed(???) ??? Not implemented in base handler

and indeed: [f=-000001] Error: UpdateCallIn: UnitMoveFailed is not implemented. why it's not implemented for spring's lua by default, i have no clue.

i could try to figure out how to implement it (aka prepare myself psychologically for a dev's irritation at being asked how to do so). or i could try to implement it myself, by keeping track of orders that have positions, and occasionally checking if the unit ever got to that position.

eronoobos commented 8 years ago

did my own custom implemtation by keeping track of orders https://github.com/eronoobos/ShardSpringLua/commit/ce4fc528ce0ec52faac14d06a3b6992ac51fec44

eronoobos commented 8 years ago

https://github.com/eronoobos/BABAR-The-Shardifant/commit/bcfe73076747dbdc80268d7a8c35c1c8e626369b

should probably allow mobile units to be cleaned, and clean them if their priority gets high enough (enough failed moves near them)

pandaro commented 8 years ago

noticed that now a builder reclaim wind after few minutes, but there was nothing of stuckked... i will be check better

eronoobos commented 8 years ago

Yeah, the unitmovefailed recognition system isn't perfect. If you're going to look into it, I suggest setting self.DebugEnabled = true in cleanhandler's init, it will show when UnitMoveFailed triggers, and the priorities of cleanable buildings

pandaro commented 8 years ago

i check the system and is ok, if no reason persist i suggest close and reopen if need