Hi devs!
Is it possible to make a beacon with "hardcoded" modules inside? The player cannot change them, remove them or install another type or amount.
Beacon with defined modules
- planetmaker
- Fast Inserter
- Posts: 188
- Joined: Mon Jan 21, 2019 9:30 am
- Contact:
Re: Beacon with defined modules
That seems like possible:
https://wiki.factorio.com/Prototype/Beacon lists as one property
allowed_effects :: EffectTypeLimitation (optional)
https://wiki.factorio.com/Prototype/Beacon lists as one property
allowed_effects :: EffectTypeLimitation (optional)
Re: Beacon with defined modules
Almost that, but on placing they are already here, by beacon removing they are gone.
-
- Inserter
- Posts: 35
- Joined: Fri Aug 24, 2018 7:42 pm
- Contact:
Re: Beacon with defined modules
i would also like to see that. preferably split into three fields:
a proposed array like module_specification.module_slot_specification = {
{locked=true,fixed_module="speed-module-1",mining_yields_result=false},
{locked=true,fixed_module="productivity-module-1",mining_yields_result=false},
{} --defaults: locked=false,fixed_module=nil,mining_yields_result=true
}
if module_specification.module_slot_specification is present, module_specification.module_slots is ignored.
locked defines the players ability to change the slot content.
fixed_module defines the slot content
mining_yields_result defines if mining the entity adds the slots content to the mining result
in my tests i worked around limitations by having an additional invisible, non-selectable beacon spawned behind whatever entity/area i wanted to apply effects to, which i would control only from within scripts. It guess it worked fine but doubles the amount of entities if used extensively.
a proposed array like module_specification.module_slot_specification = {
{locked=true,fixed_module="speed-module-1",mining_yields_result=false},
{locked=true,fixed_module="productivity-module-1",mining_yields_result=false},
{} --defaults: locked=false,fixed_module=nil,mining_yields_result=true
}
if module_specification.module_slot_specification is present, module_specification.module_slots is ignored.
locked defines the players ability to change the slot content.
fixed_module defines the slot content
mining_yields_result defines if mining the entity adds the slots content to the mining result
in my tests i worked around limitations by having an additional invisible, non-selectable beacon spawned behind whatever entity/area i wanted to apply effects to, which i would control only from within scripts. It guess it worked fine but doubles the amount of entities if used extensively.
Re: Beacon with defined modules
You can get that behavior with composite entities.
Have a representation entity without module slots and power consumption.
Then create a hidden beacon underneath it, set operable = false and insert whatever modules you want.
Have a representation entity without module slots and power consumption.
Then create a hidden beacon underneath it, set operable = false and insert whatever modules you want.
My Mods: mods.factorio.com
Re: Beacon with defined modules
This could be handled differently. It would be preferable to instead permit giving the building itself the transmission effects of each category, versus requiring items to be virtually installed. If there were a function to get the values from modules you could use that instead of hard-coding them so they match other mod changes, but technically, having the entity own certain transmission effects would be the "right" way to do it. Like a "transmission_specification = " table, which can take the same categories modules use.
I have mods! I guess!
Link
Link