Page 1 of 1

[Rseding91] [0.17.65] LuaForce double limits

Posted: Wed Aug 14, 2019 9:05 pm
by boskid
character_running_speed_modifier
  1. Code: Select all

    /c game.forces["player"].character_running_speed_modifier=1e308
  2. Move left
  3. Crash
    log
----
character_health_bonus
  1. Code: Select all

    /c game.forces["player"].character_health_bonus=1e308
  2. Get hit by biter
  3. Total factorio freeze, no crash, no log update, cannot close with "X"
----
character_logistic_slot_count
  1. Code: Select all

    /c game.forces["player"].character_logistic_slot_count=1e10
  2. Crash
    log
----
character_trash_slot_count
If set to 1e10, moderate UPS/FPS drop when looking into inventory
----
manual_crafting_speed_modifier
  1. Code: Select all

    /c game.forces["player"].manual_crafting_speed_modifier = -2
  2. 74542-negative-crafting-speed.gif
    74542-negative-crafting-speed.gif (30.25 KiB) Viewed 1875 times
----
character_inventory_slots_bonus (uint, not double)
  1. Code: Select all

    /c game.forces["player"].character_inventory_slots_bonus = 1e10
  2. Player with total of 0 inventory slots
character_inventory_slots_bonus of 65457 (2^16 - 79) gives 1 total slot of player inventory
----
mining_drill_productivity_bonus
  • Code: Select all

    /c game.forces["player"].mining_drill_productivity_bonus = 1e100
  • Place miner and power it
  • Crash
    log
---- Not LuaForce, but also limit cases:
player.zoom:
  1. Code: Select all

    /c game.player.zoom = 1e-3
  2. Huge FPS/UPS drop

Re: [Rseding91] [0.17.65] LuaForce double limits

Posted: Thu Aug 15, 2019 6:20 pm
by Rseding91
I can "fix" some of these. Others aren't bugs or are "play stupid games, win stupid prizes" :P

Re: [Rseding91] [0.17.65] LuaForce double limits

Posted: Thu Aug 15, 2019 6:39 pm
by Rseding91
I've fixed the health crash and the rest are fine to leave as is. The other 2 crashes are running out of memory and it failing to allocate what i tneeds to do what you told it to do - which is fine. Just don't tell it you want a 10,000,000,000 logistic slots if you don't have the RAM for them.

Re: [Rseding91] [0.17.65] LuaForce double limits

Posted: Thu Aug 15, 2019 6:42 pm
by boskid
Rseding91 wrote: Thu Aug 15, 2019 6:20 pm I can "fix" some of these. Others aren't bugs or are "play stupid games, win stupid prizes" :P
Garbage in garbage out. Lets remove all limits. What if malformed mod starts writing bad values? Everyone on multiplayer should crash because of bad_alloc?

Re: [Rseding91] [0.17.65] LuaForce double limits

Posted: Thu Aug 15, 2019 6:58 pm
by someone1337
the solution would be to not use buggy mods :P

Re: [Rseding91] [0.17.65] LuaForce double limits

Posted: Thu Aug 15, 2019 7:35 pm
by Rseding91
boskid wrote: Thu Aug 15, 2019 6:42 pm
Rseding91 wrote: Thu Aug 15, 2019 6:20 pm I can "fix" some of these. Others aren't bugs or are "play stupid games, win stupid prizes" :P
Garbage in garbage out. Lets remove all limits. What if malformed mod starts writing bad values? Everyone on multiplayer should crash because of bad_alloc?
Either that, or they all get booted back to the main menu due to mod errors.