how can i make belts not to move movable entities?

Place to get help with not working mods / modding interface.
/odosk/
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Oct 04, 2016 2:25 pm
Contact:

how can i make belts not to move movable entities?

Post by /odosk/ »

In default, transport belt can make 'movable entities(player,car,tank,etc...)' to move, but I want to disable that.
How can I do it? (modding)
Rseding91
Factorio Staff
Factorio Staff
Posts: 15998
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: how can i make belts not to move movable entities?

Post by Rseding91 »

There is no way.
If you want to get ahold of me I'm almost always on Discord.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: how can i make belts not to move movable entities?

Post by darkfrei »

Rseding91 wrote:There is no way.
Which collision masks have vehicles?
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: how can i make belts not to move movable entities?

Post by Adil »

Even the planes which don't have collision mask are affected by belts.
You'd have to implement complex on_tick logic to detect the vehicles being moved by belts and restore their position and I don't even know how to discern that from player driving the car along the belt.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: how can i make belts not to move movable entities?

Post by bobingabout »

I've not played with it much but.... Doesn't the movable tag just means "I can be moved by belts"?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: how can i make belts not to move movable entities?

Post by Adil »

I can't find this flag neither in raws nor in api documentation. Where did you see that?
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: how can i make belts not to move movable entities?

Post by Ranakastrasz »

Adil wrote:Even the planes which don't have collision mask are affected by belts.
You'd have to implement complex on_tick logic to detect the vehicles being moved by belts and restore their position and I don't even know how to discern that from player driving the car along the belt.
Well, I don't know exact mechanics, but I think this is how to do it.

Determine exactly what situations cause the belt to move the entity, and how to detect that the entity is on a belt. Determine belt speed and vector. Apply inverted vector to entity position.


Essentially, detect when the entity is on a belt, then apply exactly the same movement in inverse that the belt does. All other sources of movement should be uneffected.

Main issue is determining exactly how fast a belt moves an entity, and making sure your detection is correct (otherwise it would cause the entity to move in the opposite direction of the belt while uneffected by the belt, or else move with the belt as it currently does)

Complex, but should be feasible.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
/odosk/
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Oct 04, 2016 2:25 pm
Contact:

Re: how can i make belts not to move movable entities?

Post by /odosk/ »

what about just disabling enemies and player moving?
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: how can i make belts not to move movable entities?

Post by Optera »

bobingabout wrote:I've not played with it much but.... Doesn't the movable tag just means "I can be moved by belts"?
That flag mislead me too. If I recall correctly it means entity can be moved by pushing against it with a car.

Having a flag, can be moved by belts would be really nice.
Post Reply

Return to “Modding help”