Option in prototype for units to be immune to belt movement
Option in prototype for units to be immune to belt movement
Request a simple true/false flag for a unit prototype, to be able to ignore/resist being moved by belts.
I have issues with my robot army units being shifted around by player's factory belts and this change would go a long way to enhancing user experience. Because right now it's just frustrating and causes unit_groups to have members splintered away from the group, carried away by belts and getting stuck in the middle of complex factories.
I can't remember if my flying units had this issue too, but this ability to ignore belt interaction and combined with no collision box + a new simple pathing request option that goes over walls/water will fix a lot of issues for me and my mod users.
Appreciate anything you can do!
I have issues with my robot army units being shifted around by player's factory belts and this change would go a long way to enhancing user experience. Because right now it's just frustrating and causes unit_groups to have members splintered away from the group, carried away by belts and getting stuck in the middle of complex factories.
I can't remember if my flying units had this issue too, but this ability to ignore belt interaction and combined with no collision box + a new simple pathing request option that goes over walls/water will fix a lot of issues for me and my mod users.
Appreciate anything you can do!
Re: Option in prototype for units to be immune to belt movement
This would be really great for the Aircraft mod. Aircraft being affected by belts feels really silly, but it's unavoidable currently since they have to use the standard ground vehicle prototype.
Re: Option in prototype for units to be immune to belt movement
So perhaps all LuaEntities should be able to access this particular property then? Or at least the Vehicle and Unit LuaEntity subclasses..
Re: Option in prototype for units to be immune to belt movement
There is already an equipment in the game called "belt-immunity-equipment". It's disabled by default but if you put it in your power armour you are immune to belt movement.
I guess you could add an 1x1 equipment grid to your entities and insert this equipment into it.
From base/prototypes/equipment/equipment.lua:
I guess you could add an 1x1 equipment grid to your entities and insert this equipment into it.
From base/prototypes/equipment/equipment.lua:
Code: Select all
{
type = "belt-immunity-equipment",
name = "belt-immunity-equipment",
sprite =
{
filename = "__base__/graphics/equipment/belt-immunity-equipment.png",
width = 32,
height = 32,
priority = "medium"
},
shape =
{
width = 1,
height = 1,
type = "full"
},
energy_source =
{
type = "electric",
buffer_capacity = "100kJ",
input_flow_limit = "240kW",
drain = "100kW",
usage_priority = "primary-input"
},
categories = {"armor"},
order = "b-i-c"
}
My mods:
Re: Option in prototype for units to be immune to belt movement
I wish! That's one of my other API requests, is being able to enable an inventory or equipment grid for any unit type entity. looks like a hack would be to use the equipment grid to put a custom belt immunity item (with no power requirement) in the unit.321freddy wrote:you could add an 1x1 equipment grid to your entities and insert this equipment into it.
Re: Option in prototype for units to be immune to belt movement
That would be awesome but it sadly doesn't really make much sense. Why would a biter need an equipment grid?kyranzor wrote:being able to enable an inventory or equipment grid for any unit type entity
You can add equipment grids to cars, tanks and locomotives already, maybe you can utilise this somehow?
On the other hand you can use on_tick to detect if a unit has been moved by a belt and teleport it back but that would probably cost too much performance.
My mods:
Re: Option in prototype for units to be immune to belt movement
A major use case is my Robot Army units which are essentially reskinned spitters with custom projectiles.
Re: Option in prototype for units to be immune to belt movement
Hello Engineers!
Has this been implemented? I would also like access to this, either via prototype, or API run-time flag.
Thanks!
Has this been implemented? I would also like access to this, either via prototype, or API run-time flag.
Thanks!
Re: Option in prototype for units to be immune to belt movement
Please check the documentation before posting. This was implemented a long time ago.
https://wiki.factorio.com/Prototype/Car ... t_immunity
My Mods: mods.factorio.com
Re: Option in prototype for units to be immune to belt movement
Maybe I missed "unit" vs "player". I see that "cars" and "units" (Entity that attacks players.) can have has_belt_immunity [If the unit is immune to movement by belts]. What I'm looking for is for the player/character.
My apologies for the misinterpretation. Has something like this been implemented for player/characters that I have also overlooked? If not, should I make a separate Modding Interface Request?
My apologies for the misinterpretation. Has something like this been implemented for player/characters that I have also overlooked? If not, should I make a separate Modding Interface Request?
Re: Option in prototype for units to be immune to belt movement
For players there's only https://wiki.factorio.com/Prototype/Bel ... yEquipment.
My Mods: mods.factorio.com