I'm requesting that LuaTrain.kill_count and LuaTrain.killed_players be writable.
When rolling stock is added or removed from a train, the old LuaTrain is invalidated and a new LuaTrain created with kill_count successfully being carried over to the new train. However, I am teleporting trains across surfaces which necessitates the complete destruction of the old train with no way of copying the kill count over. I would like to be able to maintain the trains kill count on the newly created train by writing to the new train's kill_count attribute.
Similarly with killed_players though that may be complicated by needing the player id to be verified when written to. Also, killed_players doesn't appear to work as referenced here viewtopic.php?t=132269
Make LuaTrain.kill_count and LuaTrain.killed_players writable
Re: Make LuaTrain.kill_count and LuaTrain.killed_players writable
This interface request as stated right now is a "wont implement" due to implementation details since kill_count and killed_players is not a real thing on a train, it is an aggregate: those values are stored on each rolling stock individually and what LuaTrain provides is sum of those values of all rolling stocks it consists of. Only solution acceptable would be to have LuaEntity read/write for RollingStock's individual kill_count and killed_players.
Re: Make LuaTrain.kill_count and LuaTrain.killed_players writable
This seems like an XY problem anyway. The real request here is to make trains teleportable across surfaces, isn't it? I'm not sure how doable that is, though.
Re: Make LuaTrain.kill_count and LuaTrain.killed_players writable
Linked rails have been requested for years but the implementation is a nightmare (see viewtopic.php?p=527469#p527469). Even as a mod where certain amount of jank can be acceptable and performance isn't expected to be optimal, its still a nightmare.s6x wrote: Sun Jan 04, 2026 5:36 pm This seems like an XY problem anyway. The real request here is to make trains teleportable across surfaces, isn't it? I'm not sure how doable that is, though.
As a revised request, it would be that LuaEntity.kills be modified to also include all rolling stock types, not just artillery wagons. Also that LuaEntity includes a killed_players r/w for all rolling stock types as well.


