Hi, I am working on a mod called MagneticFloor.
What I am trying to do is give the player bonus if he has a hoverboard in his inventory and that the tile he's working on is copper-floor.
Alas, there appears to be no way to modify the player's movement speed conditionally.
Changing Speed Based Conditionally
Re: Changing Speed Based Conditionally
There is a few things you could try (I didnt try any):
- Modify data.raw.entity["overboard"].movement_bonus on the fly (is not an option if you want to support multiplayer)
- Insert a dummy equipment in armor, I dont if it work when armor is full, maybe if you can set size to 0 (probably wont work well)
- Modify game.player.character.friction_modifier or speed, probably limited to having overboard being a "car"
Hope it will help you find a solution.
- Modify data.raw.entity["overboard"].movement_bonus on the fly (is not an option if you want to support multiplayer)
- Insert a dummy equipment in armor, I dont if it work when armor is full, maybe if you can set size to 0 (probably wont work well)
- Modify game.player.character.friction_modifier or speed, probably limited to having overboard being a "car"
Hope it will help you find a solution.
Re: Changing Speed Based Conditionally
Just got an idea while working on my mod.
Equipment has an energy field that is RW.
So i guess it would be possible to set it at 0 when not on copper-floor.
Equipment has an energy field that is RW.
So i guess it would be possible to set it at 0 when not on copper-floor.
Re: Changing Speed Based Conditionally
Thanks for the suggestion. I'll try them out.Phenix0cs wrote:There is a few things you could try (I didnt try any):
- Modify data.raw.entity["overboard"].movement_bonus on the fly (is not an option if you want to support multiplayer)
- Insert a dummy equipment in armor, I dont if it work when armor is full, maybe if you can set size to 0 (probably wont work well)
- Modify game.player.character.friction_modifier or speed, probably limited to having overboard being a "car"
Hope it will help you find a solution.
On second thought, I was thinking of using teleport. Probably won't work too well.
Re: Changing Speed Based Conditionally
I think the simplest approach is to make an equipment similar to exoskeleton.
You can copy the exosketon from your factorio folder and modify it in your mod.
/factorio/data/base/prototypes/equipment
You can copy the exosketon from your factorio folder and modify it in your mod.
/factorio/data/base/prototypes/equipment
Re: Changing Speed Based Conditionally
Because it modify ALL movement bonus of every hoverboard?Phenix0cs wrote:There is a few things you could try (I didnt try any):
- Modify data.raw.entity["overboard"].movement_bonus on the fly (is not an option if you want to support multiplayer)
As long as players can do all the things in a car, I won't care too much.- Modify game.player.character.friction_modifier or speed, probably limited to having overboard being a "car"
-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: Changing Speed Based Conditionally
I don't think players can use the right mouse button to remove structures while in a vehicle.kiba wrote:As long as players can do all the things in a car, I won't care too much.
Re: Changing Speed Based Conditionally
yeskiba wrote:Because it modify ALL movement bonus of every hoverboard?
Actions are limited in a car, this is why i suggested the exoskeleton approach.kiba wrote:As long as players can do all the things in a car, I won't care too much.
Re: Changing Speed Based Conditionally
Thanks!Phenix0cs wrote:yeskiba wrote:Because it modify ALL movement bonus of every hoverboard?
Actions are limited in a car, this is why i suggested the exoskeleton approach.kiba wrote:As long as players can do all the things in a car, I won't care too much.
Your lateral thinking saved my bacon!
I got my hoverboard to only work on copper surfaces.
This will be swell!