Creep death: more than just a delete
-
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.
-
It would be awesome to add a killerCreepId and killerCreepOwner field to the tombstone as well.
Tracking this right now is fairly tricky.
-
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
-
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.
-
@ags131 Makes sense, let's instead make a
tombstone.creep
property as aCreep
instance which is a stub created similarly to here but without adding toGame.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.
-
@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 ?
-
@ags131's pull request got merged to the PTR branch, and he receives 5 Subscription Tokens. Thanks for contribution!