Stop character moving with belts

Place to get help with not working mods / modding interface.
Post Reply
Rens2Sea
Inserter
Inserter
Posts: 46
Joined: Tue Feb 04, 2014 4:04 pm
Contact:

Stop character moving with belts

Post by Rens2Sea »

Is it possible to mod so that the player doesn't move when standing on belts but instead just stands still? I find it to be pretty annoying. :?

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5153
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Stop character moving with belts

Post by Klonan »

If you don't like moving when standing on belts i suggest you stop standing on belts

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: Stop character moving with belts

Post by SirRichie »

Klonan wrote:If you don't like moving when standing on belts i suggest you stop standing on belts
Rarely have I ever encountered such a tremendously helpful contribution to a sincerely asked question.

Back to the topic:
I don't think that there is an easy way to do this.
You could of course check if the player is on a belt and then depending on the belt type move the player in on_tick, but I'd suspect this to appear more laggy than really useful.

Another option I could think of is working with surfaces. Maybe move the player to a different surface, but I am unsure if the player can then still interact with the "normal" buildings.

It might also be possible to adjust the collision boxes of the belts, but that probably also makes them stop transporting other stuff.

So no definite answer, but some directions to explore.

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2133
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Stop character moving with belts

Post by Ranakastrasz »

The first idea that comes to mind is an on-tick loop that takes the player's location from last tick and teleports them there each tick. This won't work since it will prevent all movement. You would need to differentiate between movement types.
The next is to figure out if you can preven belts from moving non-item entities. I have no idea what would happen if you reduced it's collision size, or if any filters are supported. notably, this would prevent it from effecting any entity, not just the player.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Stop character moving with belts

Post by bobingabout »

Code: Select all

    flags = {"pushable", "placeable-off-grid", "breaths-air", "not-repairable", "not-on-map"},
I'm fairly sure it is the "pushable" entry that makes the player move by belts.

not tested, try this code. (In a mod's data.lua file, or other mod data file)

Code: Select all

for i, flag in pairs(data.raw.player["player"].flags) do
	if flag == "pushable" then table.remove(data.raw.player["player"].flags, i) end
end
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Sander_Bouwhuis
Filter Inserter
Filter Inserter
Posts: 292
Joined: Mon Dec 07, 2015 10:45 pm
Contact:

Re: Stop character moving with belts

Post by Sander_Bouwhuis »

I tried literally what you said, but it doesn't work.

Do you have any other ideas?

PS
I LOOOOOOOOOOOOOOOOOOOOOVE your Bob's mods!!!

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Stop character moving with belts

Post by posila »

Pushable flag doesn't do anything in 0.16.

It is possible to create mod that enables belt-immunity-equipment for armor grid.

Sander_Bouwhuis
Filter Inserter
Filter Inserter
Posts: 292
Joined: Mon Dec 07, 2015 10:45 pm
Contact:

Re: Stop character moving with belts

Post by Sander_Bouwhuis »

1. What does armor grid mean?
2. Could you please post the code like Bobingabout so I can put it in the mods directory?

User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Stop character moving with belts

Post by 5thHorseman »

Sander_Bouwhuis wrote:1. What does armor grid mean?
2. Could you please post the code like Bobingabout so I can put it in the mods directory?
I'll post something better than that.

https://mods.factorio.com/mod/BeltImmunity

Sander_Bouwhuis
Filter Inserter
Filter Inserter
Posts: 292
Joined: Mon Dec 07, 2015 10:45 pm
Contact:

Re: Stop character moving with belts

Post by Sander_Bouwhuis »

5thHorseman wrote:
Sander_Bouwhuis wrote:1. What does armor grid mean?
2. Could you please post the code like Bobingabout so I can put it in the mods directory?
I'll post something better than that.

https://mods.factorio.com/mod/BeltImmunity
The mod doesn't work.
The mod is red in the Mods screen. It says it is "incompatible with current version of the game".

I have the Steam version of Factorio. Is there another version of the game? Or is this DLC I need to buy first?

User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Stop character moving with belts

Post by 5thHorseman »

Sander_Bouwhuis wrote:
5thHorseman wrote:
Sander_Bouwhuis wrote:1. What does armor grid mean?
2. Could you please post the code like Bobingabout so I can put it in the mods directory?
I'll post something better than that.

https://mods.factorio.com/mod/BeltImmunity
The mod doesn't work.
The mod is red in the Mods screen. It says it is "incompatible with current version of the game".

I have the Steam version of Factorio. Is there another version of the game? Or is this DLC I need to buy first?
No it works for me. Or at least something works for me that has that icon. I'm on mobile right now but I'll check later tonight when I'm on my PC.

User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Stop character moving with belts

Post by 5thHorseman »

Aha, I see the problem. Seems my Belt Immunity Equipment is baked into Power Armor Mk 3.

https://mods.factorio.com/mod/Power%20Armor%20MK3

Sander_Bouwhuis
Filter Inserter
Filter Inserter
Posts: 292
Joined: Mon Dec 07, 2015 10:45 pm
Contact:

Re: Stop character moving with belts

Post by Sander_Bouwhuis »

Could you please tell me how to simply have it without an armor? (I never used armor before).
I just want it from the start of the game. It's a tweak, not a gameplay item.

Armors aren't available easily and I see it requires blue boards, which is WAAAAAAAYYYY late in the game. With Bob's mods it's in fact so late that it is totally useless.

Other convenience tweaks I use : far reach, larger inventory, teleport gun, walk through buildings and pipes.
I'm more of a sim city style casual gamer.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Stop character moving with belts

Post by darkfrei »

Why not God mode?

Sander_Bouwhuis
Filter Inserter
Filter Inserter
Posts: 292
Joined: Mon Dec 07, 2015 10:45 pm
Contact:

Re: Stop character moving with belts

Post by Sander_Bouwhuis »

What is God mode? I don't play with enemies, so I don't need to be invincible (although it would help with dying from being hit by trains every couple of hours LOL).

Edit:
I see you can remove your character. That is very useful!!
The only problem I have now is that I can't scroll the screen at high speed. When I go to the map I can scroll very quickly, but when I'm in 'normal' mode scrolling with the shortcut keys is way too slow to be useful.

Can I change the scrolling (panning) speed? Or, preferably, zoom out and zoom in quickly just like the map so that I can build things around my bases nearly instantly?

PS
If this works out, I'm going to tell some of my friends to also buy this game. Like me, they like city builders but don't like the useless walking around part. Up till now, I couldn't convince them because of that.
Last edited by Sander_Bouwhuis on Tue Apr 10, 2018 11:07 am, edited 1 time in total.

User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Stop character moving with belts

Post by 5thHorseman »

Sander_Bouwhuis wrote:Could you please tell me how to simply have it without an armor? (I never used armor before).
No, I can't. I don't know that much about modding.
Sander_Bouwhuis wrote:Armors aren't available easily and I see it requires blue boards, which is WAAAAAAAYYYY late in the game. With Bob's mods it's in fact so late that it is totally useless.
Modular Armor takes only red boards which aren't burner phase or anything but aren't THAT hard to make.[/quote]

Sander_Bouwhuis
Filter Inserter
Filter Inserter
Posts: 292
Joined: Mon Dec 07, 2015 10:45 pm
Contact:

Re: Stop character moving with belts

Post by Sander_Bouwhuis »

As you can see in the screenshot, this item cannot be made at the start of the game. It requires at minimum blue science and a lot of (sub-)components.

Anyway, tonight I'll check out the sim city mode. Hopefully that will solve all the problems in one fell swoop.
Attachments
Belt immunity.png
Belt immunity.png (382 KiB) Viewed 6032 times

mrvn
Smart Inserter
Smart Inserter
Posts: 5710
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Stop character moving with belts

Post by mrvn »

Sander_Bouwhuis wrote:As you can see in the screenshot, this item cannot be made at the start of the game. It requires at minimum blue science and a lot of (sub-)components.

Anyway, tonight I'll check out the sim city mode. Hopefully that will solve all the problems in one fell swoop.
You can easily unzip the mod and edit the recipe to make it easier to built.

Post Reply

Return to “Modding help”