Creep death: more than just a delete


  • Dev Team

    @arcath

    I think suicide() and recycle() should stay as is. Some players move creeps to die on a specific RoomPoisition where they expect resources to drop into a container etc...

    If a creep dies on a spot with a container, then resources go to the container, and the tombstone is created with empty store.

    FIND_TOMBSTONES would be a good idea. Are they going to show up for FIND_STRUCTURES etc... as well?

    No, tombstones aren't structures.

    Should they decay instantly if they reach 0 stored resources?

    No.

    👍


  • Should resources in tombstones decay like when on the ground ?



  • @hiryus To my understand only the tombstone decays and drops the resources on the ground afterwards, then they'll decay normally.



  • That's what I understand too. But I raise the question for game balance as resources will now decay slower. In my opinion, the proposed change is fine.


  • YP

    so who is designing the nicest tombstone svg ? 🙂



  • @artch Excellent, I'm really glad you agree. Very excited to see it appear. The creepId field will be great. Eventually having a kill credit/actions leading to death will be a huge boon but this definitely helps as is.

    @PostCrafter Thanks for picking this up! Go get them sub tokens 😄 Mind linking your PR here when its ready?


  • Culture

    First part of PRs for Tombstones! https://github.com/screeps/engine/pull/74



  • @artch We should consider adding a .remove() for tombstones (and construction sites). It might be important to allow people to deny vision, and adding a .remove() for cosntruction sites would prevent the extractor site issues.


  • Culture


  • Culture

    A thought I had, can I add creep name also? On my codebases I don't save creep IDs and instead use names, it would be easier to say, lookup the creep's memory with a name than it would with a non-existant ID.



  • @artch

    It would be awesome to add a killerCreepId and killerCreepOwner field to the tombstone as well.

    Tracking this right now is fairly tricky.


  • YP

    Not sure if it should be possible to control (remove) tombstones in any way.

    As for the visual it could be some icon that does not makes it possible to use it to hide stuff. Maybe it could be a bit colored depending if it was a own or a hostile creep and look different depending if it's empty or not 😉


  • Culture

    Hiryus: Is it possible to add something like killerId for the creep/tower which did the last blow (or all creeps/tower having attacked it the tick it died) ? It is probably hard to do, but I'm asking :).

    artch: No, it's out of scope of this functionality. Tracking actions is a whole another story.

    @shedletsky Its outside the scope of this feature, tracking something like that in the server is almost as tricky too, maybe in the future though!



  • Would it be eventually possible to add a hook to the attack function wich returns for example KILL_DAMAGE instead of simply OK? Should be greater than Zero so you could change your code to >= 0 for any successful operation.

    This would still not be very precise but a start.


  • Dev Team

    @ags131 Makes sense, let's instead make a tombstone.creep property as a Creep instance which is a stub created similarly to here but without adding to Game.creeps. In order to reconstruct this object, you have to store some creep's properties to the tombstone DB object when it gets killed.

    On a sidenote, please take note here, is it implemented?

    @artch said in Creep death: more than just a delete:

    If a creep dies on a spot with a container, then resources go to the container, and the tombstone is created with empty store.


  • Culture

    @ags131 Makes sense, let's instead make a tombstone.creep property as a Creep instance which is a stub created similarly to here but without adding to Game.creeps. In order to reconstruct this object, you have to store some creep's properties to the tombstone DB object when it gets killed.

    Added

    If a creep dies on a spot with a container, then resources go to the container, and the tombstone is created with empty store.

    Is in now.



  • As they provide vision, should we also add Game.tombestones like for structures and creeps ?


  • Dev Team

    @ags131's pull request got merged to the PTR branch, and he receives 5 Subscription Tokens. Thanks for contribution!

    🤙