request: renewCreep noobie guide?
-
Just stumbled upon Spawn.renewCreep() today, I don't immediately understand the tradeoffs or the intended use. If I'm reading it right, seems like it becomes less effective for larger creeps, but has the benefit of allowing multiple renewals at once (vs spawning which locks the spawn).
Do any pros use this? Can anyone tell me what situations it should be used for?Thanks.
-
I currently don't use renewCreep, Comparing the costs of spawning a new creep and renewing it are the same, but the creeps still have to travel to these spawns, which might cause extra cpu usage, extra blockages if a lot of creeps have to be renewed.
Taken all those things into account, I ultimately chose not to use this recently introduced feature. If it would be cheaper to renew creeps than it is to re-spawn them I'd probably start using it.
-
@Dissi Even worse, as long as it's not perfectly set up, it takes longer and is costlier due to the floor/ceil. On top of all that, the creep has to travel back to the spawn (time lost + CPU overhead ) and you have to controll the renewing process which requires more effort than a simple spawning.
All in all I see absolutely no good reason to use this feature until it offers a real benefit in some kind of way.
p.s. I would be interested if anybody actually uses this new functionality?
-
I do use renewCreep and I love it.
Actually, I can see the only case, it worth using: to renew the group of creeps up to the max age, before sending it somewhere.
I do it before sending a group of creeps to attack a powerBank: all of them start a journey with 1490+ ticks to live.Update: there are 2 more cases found:
- to renew the 'fat' WORK-CARY-MOVE creeps in a new room with a low controller level.
- To renew a creep that spends it's lifetime nearby a spawn without movement.
Both cases make the creeps immortal.
-
>'...renewCreep...has the benefit of allowing multiple renewals at once..'
Well... no. A spawn can renew a single creep each tick.
-
This was some interesting input @neomatrix! Using `renew` in low RCL rooms is indeed a viable use case!
Actually, i could see another real benefit: When having 3 spawns next to each other, they can renew a creep in 1/3 of the time necessary for regular spawning... (of course all spawn are occupied this way).
Trying this in simulation revealed a bug though: All 3 spawns are tapping into the energy supply of Spawn1 instead of using their own supply.
-
@Chris: here is an example of how it works (renew in a low RCL room)
http://screeps.com/s/qR3juY (this room history link may expire in a few days)
-
It seems to be reasonable to renew boosted creeps: boost once -- renew forever.
-
@neomatrix: Not even. The docs say "Renewing a creep removes all of its boosts.".