Page 1 of 1
Module in mod-factory
Posted: Sat Aug 27, 2016 8:39 am
by SeelenJaegerTee
Hi for some reason I can't use modules in my factory.
Speed module can't be used in FOO
Right now I have:
Code: Select all
module_specification =
{
module_slots = 2
},
allowed_effects = {"productivity", "speed", "pollution"},
What else do I need to be able to put the modules in the entity?
Re: Module in mod-factory
Posted: Sat Aug 27, 2016 11:27 am
by aubergine18
You've made sure the module item is type = 'module' ?
here's a rough template I use when defining modules:
Code: Select all
data:extend {{
type = 'module',
name = id,
icon = '__mymod__/graphics/item/'..name..'.png',
flags = { 'goes-to-main-inventory' },
subgroup = 'module',
category = category,
tier = 1,
order = order,
stack_size = stack,
default_request_amount = 10,
effect = { [ name ] = { bonus = 1.0 } }
}}
EDIT: Or are you making a custom factory and it's the factory that won't accept the module?
Re: Module in mod-factory
Posted: Sat Aug 27, 2016 1:27 pm
by SeelenJaegerTee
aubergine18 wrote:
[...]
EDIT: Or are you making a custom factory and it's the factory that won't accept the module?
This.
Sorry I should have been more precise. My custom factories don't take the Vanilla modules.
This ist the full code for the factory
Code: Select all
{
type = "assembling-machine",
localised_name = "FOO",
name = "FOO",
icon = "__BAR__/graphics/icons/FOO.png",
flags = {"placeable-neutral","player-creation"},
minable = {mining_time = 1, result = "FOO"},
fast_replaceable_group = "FOO",
max_health = 300,
corpse = "big-remnants",
dying_explosion = "medium-explosion",
collision_box = {{-2.4, -2.4}, {2.4, 2.4}},
selection_box = {{-2.5, -2.5}, {2.5, 2.5}},
module_specification =
{
module_slots = 2
},
allowed_effects = {"productivity", "speed", "pollution"},
crafting_categories = {"FooManFoo"},
crafting_speed = 0.75,
energy_source =
{
type = "electric",
usage_priority = "secondary-input",
emissions = 0.02 / 2
},
energy_usage = "200kW",
ingredient_count = 3,
animation ={
filename = "__BAR__/graphics/entity/FOO.png",
priority = "extra-high",
width = 192,
height = 192,
frame_count = 16,
line_length = 4,
shift = {0.45, 0.7},
animation_speed = 0.5
},
vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
working_sound =
{
{
[...]--Soundstuff
}
},
fluid_boxes =
{
[...]--FLuidboxstuff
}
},
pipe_covers = pipecoverspictures()
},
Am I missing something?
Re: Module in mod-factory
Posted: Sat Aug 27, 2016 11:01 pm
by aubergine18
Ah, I've not tried creating a custom factory so not ran in to this problem. I'm actually having the exact opposite problem - I've made some custom modules and can't figure out a reliable way to prevent them being installed on vanilla factories (I can limit them a bit based on recipe, but that doesn't work for things like mines and radar).