Page 1 of 1
Is ther a command to change a force explosive damage
Posted: Fri May 14, 2021 11:00 am
by bigmond
I noticed there is a command to change some of the force variables such as crafting speed.
/c game.player.force.manual_crafting_speed_modifier=1000
Is there a command to change the grenade damage, I cant seem to find it.
An extension of this can these apply to the enemy force too, although I know the enemy force wont be able to use grenades without mods.
Re: Is ther a command to change a force explosive damage
Posted: Fri May 14, 2021 10:28 pm
by Silari
Code: Select all
https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_ammo_damage_modifier
That call is how you set the damage modifier for an ammo category - grenades possibly use the "grenade" category.
You can call it separately for any force you need it for - the default force for players is the 'player' force, for biters it is the 'enemy' force.
Code: Select all
/c game.forces["player"].set_ammo_damage_modifier("grenade",2)
/c game.forces["enemy"].set_ammo_damage_modifier("grenade",2)
would triple damage for both the player and enemy forces. 0 is normal damage.
Re: Is ther a command to change a force explosive damage
Posted: Fri May 21, 2021 11:43 am
by bigmond
Hi thanks for the tip.
I have been trying at first i thought the command you gave me didnt work but after some experimentation I discovered that items created with surface.create_entity seem to ignore the damage modifier.
Since you have answered my question I will open a new issue for that. Thank you for your help.