has anyone else noticed destroyed items no longer make ghost entities? i tried validating game files with steam and i also removed all the mods (change the folder name). i even change the config file name so it was rebuilt.
i tried a brand new game and i still could not make ghost entity when i destroyed something.
ghost entitites on descrution
Re: ghost entitites on descrution
Pretty sure ghosts don't show up until construction robots tech is researched.
Re: ghost entitites on descrution
That is correct.Nexela wrote:Pretty sure ghosts don't show up until construction robots tech is researched.
Are you sure that you had the robot research activated?Iccor56 wrote:i tried a brand new game and i still could not make ghost entity when i destroyed something.
There is something called ghost time to live, which is 0 unless the tech is activated, so the ghosts don't appear, this is mainly to not confuse new players before it is relevant.
Re: ghost entitites on descrution
it was not researched
is there a way or setting or mod based setting that can increase that before research is done?
is there a way or setting or mod based setting that can increase that before research is done?
Re: ghost entitites on descrution
Making mod that enables it from the start would be trivial.Iccor56 wrote:it was not researched
is there a way or setting or mod based setting that can increase that before research is done?
Re: ghost entitites on descrution
Just change this:Iccor56 wrote:it was not researched
is there a way or setting or mod based setting that can increase that before research is done?
http://lua-api.factorio.com/latest/LuaF ... me_to_live
like:
Code: Select all
/c game.player.force.ghost_time_to_live = 60 * 60 * 60
Re: ghost entitites on descrution
i'm trying that via onload and it does not seem to work. i seem to be having great difficulty understanding the lua modding environment. any suggestions?
Code: Select all
local OnLoad=function() --define handler
game.player.force.ghost_time_to_live=60*60*60
end
script.on_load(OnLoad)--this will execute when the savegame is loaded and the mod was present during the save process
Re: ghost entitites on descrution
You want to use on_init and you ALSO should check and make sure it is at 0/nil before you change it in case it is set to something else.
Also game.player is only available when using the console, you will want to iterate all the forces directly
Also game.player is only available when using the console, you will want to iterate all the forces directly
Code: Select all
script.on_init(function()
for _, force in pairs(game.forces) do
if not (force.name == "enemy" or force.name == "neutral") then -- Don't bother changing enemy/neutral forces
if force.ghost_time_live == 0 then -- this will work if default is 0 (but it might be nil I dunno)
force.ghost_time_to_live = 60*60*60
end
end
end
end)
-
- Manual Inserter
- Posts: 2
- Joined: Thu Jan 11, 2018 4:37 am
- Contact:
Re: ghost entitites on descrution
This no longer works, anyone know why?
Re: ghost entitites on descrution
`LuaForce` doesn't have the `ghost_time_to_live` uint property anymore. Instead it has `create_ghost_on_entity_death` bool property.