Lower the minimum distance of push-back effect?
Lower the minimum distance of push-back effect?
Request: please make the new "push-back" effect to accept distances lower than 0.3, and lower its actual effective distance from 1 to the input value.
During my approach to make a proper push back effect for the discharge defense equipment by dividing the effect into multiple frames, I found out that the new "push-back" effect does not accept values lower than 0.3. No error was thrown, but it didn't do anything. Even if I input 0.3, the actual push back distance seems to be 1.
If this request is implemented, I can make a proper push back effect. (I would call the current effect as teleportation.)
During my approach to make a proper push back effect for the discharge defense equipment by dividing the effect into multiple frames, I found out that the new "push-back" effect does not accept values lower than 0.3. No error was thrown, but it didn't do anything. Even if I input 0.3, the actual push back distance seems to be 1.
If this request is implemented, I can make a proper push back effect. (I would call the current effect as teleportation.)
- Ranakastrasz
- Smart Inserter
- Posts: 2125
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Lower the minimum distance of push-back effect?
Absolutely do need this. Allowing sliding effects would be great.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Lower the minimum distance of push-back effect?
The distance isn't limited to any particular value code wise. It does however not work if you try to move the entity by less than half its bounding box size because it can't find a place that doesn't collide with itself and can't move the entity.
If you want to get ahold of me I'm almost always on Discord.
- Ranakastrasz
- Smart Inserter
- Posts: 2125
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Lower the minimum distance of push-back effect?
Ah. In that case, when a push effect occurs, ignore the entities own bounding box for checking.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Lower the minimum distance of push-back effect?
I think it can (partially) explain why this thing occurs:Rseding91 wrote:The distance isn't limited to any particular value code wise. It does however not work if you try to move the entity by less than half its bounding box size because it can't find a place that doesn't collide with itself and can't move the entity.
All targets are pushed to the same direction when I set distance = 0. Looks like a bug.
Yes, as Ranakastrasz said, each target should ignore itself when being pushed.
- Ranakastrasz
- Smart Inserter
- Posts: 2125
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Lower the minimum distance of push-back effect?
Huh. If the distance was zero, I would expect it to go due east, due to the whole Atan2 thinggy. Always happened when I messed with Angles.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Lower the minimum distance of push-back effect?
You can't expect how the aliens behave.
Yea, I tried a few more times. The direction is the same.
Yea, I tried a few more times. The direction is the same.
Re: Lower the minimum distance of push-back effect?
Hack tip ... you can teleport biters back and give them sticker with negative movement modifier. So when they try to run back toward you, they will actually move backwards
Re: Lower the minimum distance of push-back effect?
lol! Didn't think of it.posila wrote:Hack tip ... you can teleport biters back and give them sticker with negative movement modifier. So when they try to run back toward you, they will actually move backwards
But I think it is not very effective on spitters? Since they don't need to move before spitting on you.
- Ranakastrasz
- Smart Inserter
- Posts: 2125
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Lower the minimum distance of push-back effect?
Do those speed modification debuffs stack? If so, do they add or multiply? can you end up with negative speed if they add?
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Lower the minimum distance of push-back effect?
Based on my Supportive Weapons mod (pending update for 0.15), 2 different stickers with slow down effect can definitely make the enemies move slower than just one sticker. I think they multiply. Addition will easily produce negative movement speed, but I didn't see that happen in my mod.Ranakastrasz wrote:Do those speed modification debuffs stack? If so, do they add or multiply? can you end up with negative speed if they add?
- Ranakastrasz
- Smart Inserter
- Posts: 2125
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Lower the minimum distance of push-back effect?
Thing is, addition for modules could easily result in negative energy consumption if you stack 3 50% effectively modules. Instead, it caps at 20%. Just beccause it uses addition doesn't preclude a cap.Mooncat wrote:Based on my Supportive Weapons mod (pending update for 0.15), 2 different stickers with slow down effect can definitely make the enemies move slower than just one sticker. I think they multiply. Addition will easily produce negative movement speed, but I didn't see that happen in my mod.Ranakastrasz wrote:Do those speed modification debuffs stack? If so, do they add or multiply? can you end up with negative speed if they add?
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Lower the minimum distance of push-back effect?
But posila said that there is no cap on movement speed effect from stickers.Ranakastrasz wrote:Thing is, addition for modules could easily result in negative energy consumption if you stack 3 50% effectively modules. Instead, it caps at 20%. Just beccause it uses addition doesn't preclude a cap.Mooncat wrote:Based on my Supportive Weapons mod (pending update for 0.15), 2 different stickers with slow down effect can definitely make the enemies move slower than just one sticker. I think they multiply. Addition will easily produce negative movement speed, but I didn't see that happen in my mod.Ranakastrasz wrote:Do those speed modification debuffs stack? If so, do they add or multiply? can you end up with negative speed if they add?
Anyway, I did a small test: I changed the "target_movement_modifier" of "slowdown-sticker" to 2, and that of "stun-sticker" to -0.2
I bet the equation is something like
Code: Select all
local final_velocity = base_speed
for _, sticker in pairs(stickers) do
final_velocity = final_velocity * sticker.target_movement_modifier
end
return final_velocity
- Ranakastrasz
- Smart Inserter
- Posts: 2125
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Lower the minimum distance of push-back effect?
Ok, test this.
2x speed tag.
-1x tag
See if they move at double speed, normal speed backwards, and double speed backwarda
2x speed tag.
-1x tag
See if they move at double speed, normal speed backwards, and double speed backwarda
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Lower the minimum distance of push-back effect?
Actually you can test it yourself.Ranakastrasz wrote:Ok, test this.
2x speed tag.
-1x tag
See if they move at double speed, normal speed backwards, and double speed backwarda