Infinite Repair Pack


This mod adds an infinite repair pack, the Sonic Screwdriver.

Content
14 days ago
0.17 - 2.1
2.56K
Cheats

b Loading error

2 years ago

te_Repair_Pack__/prototypes/item/infiniterepairpack.lua:10: attempt to index global 'item_sounds' (a nil value)
...ite_Repair_Pack__/prototypes/item/infiniterepairpack.lua:10: in main chunk
Infinite_Repair_Pack/data.lua:1: in main chunk

since the last mini update (v2.0.20)i get this error while loading the mod

2 years ago
(updated 2 years ago)

The following line needs to be added to the top of /prototypes/item/infiniterepairpack.lua

local item_sounds = require("__base__.prototypes.item_sounds")

2 years ago

same that Error. need updated 2.0.20

2 years ago

+1. Thank you

2 years ago

The following line needs to be added to the top of /prototypes/item/infiniterepairpack.lua

local item_sounds = require("__base__.prototypes.item_sounds")

This worked great for me! Thank you.

2 years ago

This isn't working for me

2 years ago

This isn't working for me

For me, I had to:
1. copy the file out of the zip but kept it zipped
2. Edit the file outside of the zip
3. Add the line "local item_sounds = require("base.prototypes.item_sounds" (without quotes) to the very top of the file before anything else
4. Save the file (make sure it does not add an additional .txt extension on the filename)
5. Replace the file in the zip

I am sure the author will update soon, if that does not work you may have to wait a few days.

2 years ago

Same issue here
Failed to load mods: ...ite_Repair_Pack__/prototypes/item/infiniterepairpack.lua:10: attempt to index global 'item_sounds' (a nil value)
stack traceback:
...ite_Repair_Pack__/prototypes/item/infiniterepairpack.lua:10: in main chunk
[C]: in function 'require'
Infinite_Repair_Pack/data.lua:1: in main chunk

Mods to be disabled:
• Infinite_Repair_Pack (0.2.0)

2 years ago

It still doesn't accept it. You are putting it in the file under the item folder correct?

2 years ago
(updated 2 years ago)

It still doesn't accept it. You are putting it in the file under the item folder correct?

/prototypes/item/infiniterepairpack.lua

very top of the file:

local item_sounds = require("base.prototypes.item_sounds")
data:extend({

{
type = "repair-tool",
name = "infinite-repair-pack",
icon = "__Infinite_Repair_Pack__/graphics/not_a_personal_messager_32.png",
icon_size = 32,
subgroup = "tool",
order = "b[repair]-b[repair-pack]",
inventory_move_sound = item_sounds.repair_pack_inventory_move,
pick_sound = item_sounds.repair_pack_inventory_pickup,
drop_sound = item_sounds.repair_pack_inventory_move,
speed = 2,
durability = 1000000000,
infinite = true,
stack_size = 100
}

})

2 years ago

Still errored out after doing that >_>

2 years ago

Same, that's what I tried and it still gives me errors.

2 years ago

data:extend({

{
local item_sounds = require("__base__.prototypes.item_sounds")
type = "repair-tool",
name = "infinite-repair-pack",
icon = "__Infinite_Repair_Pack__/graphics/not_a_personal_messager_32.png",
icon_size = 32,
subgroup = "tool",
order = "b[repair]-b[repair-pack]",
inventory_move_sound = item_sounds.repair_pack_inventory_move,
pick_sound = item_sounds.repair_pack_inventory_pickup,
drop_sound = item_sounds.repair_pack_inventory_move,
speed = 2,
durability = 1000000000,
infinite = true,
stack_size = 100
}

})

Just copy paste this and it should work again

2 years ago

Still not working

2 years ago

Fixed. Thanks DrWifi.

New response