In the Robot Army mod, I have integrated Klonan's Combat Units mod with the vanilla game style flying combat robot units.
The benefit of a flying unit is that the pathfinder doesn't need to worry about pathable areas/obstacles, and things like player's walls, transport belts (more on this later) and bodies of water become a non-issue. I want players who are frustrated with my ground-based combat droids to have a practical and useful alternative with these flying units.
Currently, I can simulate a flying unit 95% by making the collision box = {0,0}
The flying units will sometimes float over the top of walls, and pass through trees well, but the pathfinder still will not make valid paths over/through walls/trees/obstacles/bodies of water. This means that a squad of flying Defender robots will not be able to path to attack an enemy biter if the defender robot squad (aka, unit_group) is inside of an enclosed wall OR the enemy biter is located on an island with no land access.
Can we get a native way (access by a entity tag or dynamically detected when collision box = nil OR {0,0} ) to allow for an entity/unit with pathfinding capabilities to be treated as a simple unit (similar to the logistics/construction bots) for the purpose of movement?
As part of this request, a tag to disable the effects of transport belts on the unit/player would be amazing too. Thanks for your consideration!
flying units tag or collision box check for pathfinder/movement
flying units tag or collision box check for pathfinder/movement
Last edited by kyranzor on Mon Oct 17, 2016 9:58 pm, edited 1 time in total.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: flying units tag or collision box check for pathfinder/movement
Wait, collision boxes have a z-index?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: flying units tag or collision box check for pathfinder/movement
lol my bad, it's a two-corner table. doesn't have 3 fields. I shall fix my original post.
Re: flying units tag or collision box check for pathfinder/movement
bump - any ideas from devs?
Re: flying units tag or collision box check for pathfinder/movement
Have you tried
or
Types/CollisionMask
Code: Select all
collision_mask = {}
Code: Select all
collision_mask = { "ghost-layer"}
Re: flying units tag or collision box check for pathfinder/movement
I tried that just now, thanks for the suggestion. It didn't work. I think the issue is at a unit pathfinder request level of the API, not really an entity mask/option issue. The entire unit_group would need to be made up of the special "flying" type unit before it could make the "no collision checks needed" pathfinder request. Right now, a flying group of units gets stuck on islands, for example.
edit: just to clarify, the units themselves CAN travel over water and walls etc with a nil or zero collision box/mask, but they cannot receive orders from the unit command API to go somewhere from A to B where the path between them is not pathable by land units. The unit API was done hastily and was only meant for land-based biters, so the code just simply isn't there for dealing with this issue. That is why i've put the request in here for Oxyd or whoever gets around to it to implement.
edit: just to clarify, the units themselves CAN travel over water and walls etc with a nil or zero collision box/mask, but they cannot receive orders from the unit command API to go somewhere from A to B where the path between them is not pathable by land units. The unit API was done hastily and was only meant for land-based biters, so the code just simply isn't there for dealing with this issue. That is why i've put the request in here for Oxyd or whoever gets around to it to implement.
Re: flying units tag or collision box check for pathfinder/movement
Can the units be modified distractor capsules instead? The main advantage of using a 'unit' type is the access to pathfinding but you don't need that for a flier.
Re: flying units tag or collision box check for pathfinder/movement
The units work best for me because of their ability to be commanded and for then to form unit groups and be commanded as groups too. The API just can't handle flying groups that's all.