After RCL decrease, selection of disabled structure?
-
In the event of a RCL drop, how is the selection of which multi-level structure (where different numbers can be built at different levels such as towers and links) handled? Is it just the "alphabetical" ordering of the IDs or the structure's position within Game.structures and the last instance is disabled?
Additionally, is there a way to influence which structure is disabled other than destroying structures; such as setting a "disabled" or "off" value?
For instance, if at RCL 6 I built (in order) links A,B, and C where A is to transport from my source to B, which is next to my storage, and C is the drop-off point for remote miners and would transport energy to B as well. Due to layout issues I then needed to destroy B in order to relocate it. If my RCL then were to be reduced to 5 would it be possible to designate that C be disabled first?
Thanks!
-
@sonoftheflame said in After RCL decrease, selection of disabled structure?:
In the event of a RCL drop, how is the selection of which multi-level structure
This is done by comparing the distance from the controller: https://github.com/screeps/engine/blob/master/src/game/structures.js#L197
And the util method:
https://github.com/screeps/engine/blob/b52164089564d1dc8a7e894835258f9a954cd37f/src/utils.js#L855Additionally, is there a way to influence which structure is disabled other than destroying structures; such as setting a "disabled" or "off" value?
No. This is currently not possible.
It opens quite a lot of ways to abuse the system if we would allow this. (transfer & disable, enable other link immediately)I hope this answers your question
-
@dissi-mark said in [After RCL decrease, selection of disabled structure?]
This is done by comparing the distance from the controller: https://github.com/screeps/engine/blob/master/src/game/structures.js#L197
And the util method: https://github.com/screeps/engine/blob/b52164089564d1dc8a7e894835258f9a954cd37f/src/utils.js#L855Ah! Thank you for that clarification! Could that information be added to the available structures per RCL documentation?
It opens quite a lot of ways to abuse the system if we would allow this. (transfer & disable, enable other link immediately)
Chaining disables and re-enables would be unwanted behavior. Could those issues be negated with a "cool off" and "warm up" timers so that the disabled structure and then the enabled structure are unavailable to disincentive that kind of abuse, or that after a structure is disabled to re-enable another of it's kind, unless the RCL returns to the needed and previous level, the structure can not be re-enabled for a large number of ticks?
Understandably that behavior would likely not be a small thing to implement and the time needed to do so versus it's benefit to the game, when compared to some of the other features that may be working on, so my question is more of a hypothetical than an actual request.