Opposite of Squeak Through
Opposite of Squeak Through
Squeak Through (and probably several similar mods) decrease the hitbox of entities so the player can walk between two entities that are visually touching.
I'm wondering if there's a mod that does the opposite of this: Increase the hitbox of vanilla entities so the player cannot walk between them.
As an example, the player can walk between two oil refineries even though it doesn't look like they should. Or, between two boilers that should be connected by a pipe, or between a medium electric pole and a solar panel.
I'm looking for a mod that will make fitting between entities harder than it is in vanilla, and thus encourage building with more space around things.
I'm wondering if there's a mod that does the opposite of this: Increase the hitbox of vanilla entities so the player cannot walk between them.
As an example, the player can walk between two oil refineries even though it doesn't look like they should. Or, between two boilers that should be connected by a pipe, or between a medium electric pole and a solar panel.
I'm looking for a mod that will make fitting between entities harder than it is in vanilla, and thus encourage building with more space around things.
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Opposite of Squeak Through
I haven't seen a mod like that yet, but I too would find such a mod interesting.
If nothing comes up by this weekend, I may tackle it myself. Should be relatively easy (I think), as it should only require running through (most) all entities and simply rounding their hitboxes up (with perhaps a small offset as otherwise the game may see two entities placed side by side as literally touching and be unplaceable).
If nothing comes up by this weekend, I may tackle it myself. Should be relatively easy (I think), as it should only require running through (most) all entities and simply rounding their hitboxes up (with perhaps a small offset as otherwise the game may see two entities placed side by side as literally touching and be unplaceable).
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Re: Opposite of Squeak Through
This approach would work with Squeak Through, but not with Squeak Through 2. The latter doesn't change the collision_box, but the collision_mask:FuryoftheStars wrote: βWed Jun 12, 2024 12:51 pm Should be relatively easy (I think), as it should only require running through (most) all entities and simply rounding their hitboxes up (with perhaps a small offset as otherwise the game may see two entities placed side by side as literally touching and be unplaceable).
Code: Select all
local function remove_player_collision(prototype)
prototype.collision_mask = cmu.get_mask(prototype)
cmu.remove_layer(prototype.collision_mask, "player-layer")
end
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Opposite of Squeak Through
Thanks, yeah, as it's the opposite of Squeak Through, it'd obviously be incompatible with them.
And yeah, I think that's why in part I'm thinking I need the offset (after rounding up, subtract 0.01 or something from it), but I'll test it with a few things and see what happens.
And yeah, I think that's why in part I'm thinking I need the offset (after rounding up, subtract 0.01 or something from it), but I'll test it with a few things and see what happens.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Re: Opposite of Squeak Through
EDIT: never mind, owner of the mod is Pi-C and he answered already for some reason I thought it was someone else
you might want to check out https://mods.factorio.com/mod/minime
it states in description that "The player's collision box will also be reduced, so you can easily get through obstacles in your path."
it might do the opposite too. maybe ask the mod maintainer about that. I use that mod for the minimizing function and it works, maybe it also does the maximizing which you want
you might want to check out https://mods.factorio.com/mod/minime
it states in description that "The player's collision box will also be reduced, so you can easily get through obstacles in your path."
it might do the opposite too. maybe ask the mod maintainer about that. I use that mod for the minimizing function and it works, maybe it also does the maximizing which you want
000 wrote: βWed Jun 12, 2024 10:02 am Squeak Through (and probably several similar mods) decrease the hitbox of entities so the player can walk between two entities that are visually touching.
I'm wondering if there's a mod that does the opposite of this: Increase the hitbox of vanilla entities so the player cannot walk between them.
Re: Opposite of Squeak Through
There is a startup setting in miniMAXIme to choose whether character collision_boxes will be reduced. Currently, this doesn't do any damage: If the setting is on and any of "Squeak Through" or "Squeak Through 2" is active, the result will be what the player wants: characters can squeeze through between entities.rhynex wrote: βWed Jun 12, 2024 5:28 pm EDIT: never mind, owner of the mod is Pi-C and he answered already for some reason I thought it was someone else
you might want to check out https://mods.factorio.com/mod/minime
it states in description that "The player's collision box will also be reduced, so you can easily get through obstacles in your path."
it might do the opposite too. maybe ask the mod maintainer about that. I use that mod for the minimizing function and it works, maybe it also does the maximizing which you want
If I were to add a setting to enlarge the collision_box of characters, I would have to revert the changes made by the other mods -- which seems a bit inefficient. However, I couldn't add a conditional conflict because mod dependencies can't be changed in response to a setting. What I could do is always conflicting with the other mods and replicating what they already do when my setting is used to reduce character collision_boxes.
Any suggestions how to deal with that?
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Opposite of Squeak Through
This would have to be a separate mod that in turn overrides miniMAXIme's character collision box size setting.Pi-C wrote: βThu Jun 13, 2024 3:14 pmThere is a startup setting in miniMAXIme to choose whether character collision_boxes will be reduced. Currently, this doesn't do any damage: If the setting is on and any of "Squeak Through" or "Squeak Through 2" is active, the result will be what the player wants: characters can squeeze through between entities.rhynex wrote: βWed Jun 12, 2024 5:28 pm EDIT: never mind, owner of the mod is Pi-C and he answered already for some reason I thought it was someone else
you might want to check out https://mods.factorio.com/mod/minime
it states in description that "The player's collision box will also be reduced, so you can easily get through obstacles in your path."
it might do the opposite too. maybe ask the mod maintainer about that. I use that mod for the minimizing function and it works, maybe it also does the maximizing which you want
If I were to add a setting to enlarge the collision_box of characters, I would have to revert the changes made by the other mods -- which seems a bit inefficient. However, I couldn't add a conditional conflict because mod dependencies can't be changed in response to a setting. What I could do is always conflicting with the other mods and replicating what they already do when my setting is used to reduce character collision_boxes.
Any suggestions how to deal with that?
It's ok... unless someone wants this very soon, I can probably work on it this weekend. My home computer had to be taken apart and moved into a different room this week for some work that was being done, so has been unavailable.
But that work is done, now, so I should be able to move it back and get it running again... provided my gf can break herself of her cleaning OCD and allow that room to be put back together....
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Re: Opposite of Squeak Through
Not quite: "This would have to be a separate mod" is sufficient. If your mod is active, this means the player doesn't want to have reduced collision_boxes, so I could change my setting definition like this:FuryoftheStars wrote: βThu Jun 13, 2024 4:33 pm This would have to be a separate mod that in turn overrides miniMAXIme's character collision box size setting.
Code: Select all
data:extend({
{ -- Scale collision box of characters?
type = "bool-setting",
name = "minime_small-character-collision-box",
setting_type = "startup",
hidden = mods["your_mod"] and true,
default_value = not mods["your_mod"] and true or false,
allowed_values = mods["your_mod"] and {false} or {false, true},
order = "[minime]-ba"
},
})
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Opposite of Squeak Through
True, but there's no need for you to update your mod to accommodate the one I'll develop when that mod can take care of it itself.Pi-C wrote: βThu Jun 13, 2024 8:23 pmNot quite: "This would have to be a separate mod" is sufficient. If your mod is active, this means the player doesn't want to have reduced collision_boxes, so I could change my setting definition like this:FuryoftheStars wrote: βThu Jun 13, 2024 4:33 pm This would have to be a separate mod that in turn overrides miniMAXIme's character collision box size setting.This way, my mod wouldn't change the collision boxes if your mod was active, and you'd have to deal with just the "Squeak Through" mods.Code: Select all
data:extend({ { -- Scale collision box of characters? type = "bool-setting", name = "minime_small-character-collision-box", setting_type = "startup", hidden = mods["your_mod"] and true, default_value = not mods["your_mod"] and true or false, allowed_values = mods["your_mod"] and {false} or {false, true}, order = "[minime]-ba" }, })
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Re: Opposite of Squeak Through
My point is, it's cheaper to prevent my mod from making changes in the first place than undoing the changes it has already done. But you're right: I wouldn't actually have to mess with the setting myself as you could add/modify the "hidden", "allowed_values", and "default_value" properties in settings-updates or settings-final-fixes from your end as well.FuryoftheStars wrote: βThu Jun 13, 2024 11:32 pmTrue, but there's no need for you to update your mod to accommodate the one I'll develop when that mod can take care of it itself.Pi-C wrote: βThu Jun 13, 2024 8:23 pmNot quite: "This would have to be a separate mod" is sufficient. If your mod is active, this means the player doesn't want to have reduced collision_boxes, so I could change my setting definition [β¦] This way, my mod wouldn't change the collision boxes if your mod was active, and you'd have to deal with just the "Squeak Through" mods.FuryoftheStars wrote: βThu Jun 13, 2024 4:33 pm This would have to be a separate mod that in turn overrides miniMAXIme's character collision box size setting.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Opposite of Squeak Through
I didn't have as much time to work on this over this weekend as I had hoped, so I have a rough beta ready atm. I still need to add the settings-update to override minime, and I'm sure there's gonna be a number of bugs (I haven't had the time to test with other mods, yet).
As such, I'm not going to upload this to the mod portal just yet, but I will attach a copy here (for now) so you can play with what I have so far.
Let me know of any issues you encounter.
Edit: 2nd version; simple logic adjustment.
Edit2: Removed zip as I apparently mucked up the version numbering so it would not load. I'm working on v0.0.3 right now.
As such, I'm not going to upload this to the mod portal just yet, but I will attach a copy here (for now) so you can play with what I have so far.
Let me know of any issues you encounter.
Edit: 2nd version; simple logic adjustment.
Edit2: Removed zip as I apparently mucked up the version numbering so it would not load. I'm working on v0.0.3 right now.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Opposite of Squeak Through
Is this setting supposed to have any affect if the Squeak Through mods are not loaded? Without them loaded, it seems like enabled or not, the character's collision_box remains the same.Pi-C wrote: βThu Jun 13, 2024 3:14 pmThere is a startup setting in miniMAXIme to choose whether character collision_boxes will be reduced. Currently, this doesn't do any damage: If the setting is on and any of "Squeak Through" or "Squeak Through 2" is active, the result will be what the player wants: characters can squeeze through between entities.rhynex wrote: βWed Jun 12, 2024 5:28 pm EDIT: never mind, owner of the mod is Pi-C and he answered already for some reason I thought it was someone else
you might want to check out https://mods.factorio.com/mod/minime
it states in description that "The player's collision box will also be reduced, so you can easily get through obstacles in your path."
it might do the opposite too. maybe ask the mod maintainer about that. I use that mod for the minimizing function and it works, maybe it also does the maximizing which you want
Here's v0.0.3 of the mod. Should correctly load this time. Only change from the previous versions is it includes the override for the above mentioned setting from minime.
Edit: Ok, doing some testing, now. Below are notes on what I've found and what I'll be doing to fix:
- Walls can't be placed next to each other. Should exclude or reduce affect.
- I excluded pipes already for the same above reason, but... should I actually have a reduced affect for them?
- Can't pass between inserters. Should exclude or reduce affect.
- From the nixie tube mods, the small nixie tube has a couple of hidden entities (probably what displays the numbers?) that now extend outside of the bounds of the tile the small nixie tube itself sits on and interfere with placing other entities next to it. I'll need to dig into that mod's code to see what these are. I may need to exclude these (or... why do these even cause collision? Should I blank their collision_mask? Would that screw anything else up?)
- Small power poles should probably be excluded.
Last edited by FuryoftheStars on Tue Jun 18, 2024 4:28 am, edited 1 time in total.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Opposite of Squeak Through
Final update for the night, v0.0.4.
I decided to handle the issues mentioned above (and others that I found) through exclusion.
The exclusions consist of the following entity types:
And of the following entities by name:
I'll probably not update further for now unless someone finds something breaking, so please test away!
Edit: Removed old version
I decided to handle the issues mentioned above (and others that I found) through exclusion.
The exclusions consist of the following entity types:
- spider-leg
- car
- locomotive
- cargo-wagon
- fluid-wagon
- artillery-wagon
- tree
- unit
- cliff
- simple-entity
- pipe
- character
- wall
- gate
- inserter
- arithmetic-combinator
- decider-combinator
- constant-combinator
And of the following entities by name:
- small-electric-pole
- lab
- assembling-machine-1
- assembling-machine-2
- assembling-machine-3
- roboport
- stone-furnace
I'll probably not update further for now unless someone finds something breaking, so please test away!
Edit: Removed old version
Last edited by FuryoftheStars on Wed Jun 19, 2024 2:58 am, edited 2 times in total.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Re: Opposite of Squeak Through
I've recently checked some issues of one of my mods with Nullius and didn't remove it before trying to load your mod. It seems Nullius will pose some problems:FuryoftheStars wrote: βTue Jun 18, 2024 4:28 am I'll probably not update further for now unless someone finds something breaking, so please test away!
Code: Select all
6.439 Error ModManager.cpp:1625: Error while loading entity prototype "nullius-turbine-closed-backup-1" (furnace): Invalid pipe connections specification for offset {1.0000000000, -2.0976562500}. The offset must be outside of the entity bounding-box
Modifications: Nullius βΊΒ NOT Squeak Through
Code: Select all
0.817 Loading mod settings NOTSqueakThrough 0.0.4 (settings-updates.lua)
0.820 Loading mod core 0.0.0 (data.lua)
0.883 Loading mod base 1.1.109 (data.lua)
1.111 Loading mod base 1.1.109 (data-updates.lua)
1.138 Loading mod NOTSqueakThrough 0.0.4 (data-final-fixes.lua)
1.287 Checksum for core: 607699937
1.287 Checksum of base: 1054619811
1.287 Checksum of NOTSqueakThrough: 2807550358
1.614 Error ModManager.cpp:1625: Error while running setup for entity prototype "stone-furnace" (furnace): next_upgrade target (steel-furnace) must have the same bounding box.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: Opposite of Squeak Through
The setting is an alternative to the Squeak Through mods. It's useful if the other mods are not active because it would achieve the same result (i.e., players can squeeze through entities), and it shouldn't do any damage if the other mods are active.FuryoftheStars wrote: βTue Jun 18, 2024 1:52 amIs this setting supposed to have any affect if the Squeak Through mods are not loaded? Without them loaded, it seems like enabled or not, the character's collision_box remains the same.Pi-C wrote: βThu Jun 13, 2024 3:14 pm There is a startup setting in miniMAXIme to choose whether character collision_boxes will be reduced. Currently, this doesn't do any damage: If the setting is on and any of "Squeak Through" or "Squeak Through 2" is active, the result will be what the player wants: characters can squeeze through between entities.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Opposite of Squeak Through
Hmm, I'll have to add some additional logic to check those, I guess.Pi-C wrote: βTue Jun 18, 2024 8:25 amI've recently checked some issues of one of my mods with Nullius and didn't remove it before trying to load your mod. It seems Nullius will pose some problems:FuryoftheStars wrote: βTue Jun 18, 2024 4:28 am I'll probably not update further for now unless someone finds something breaking, so please test away!
Code: Select all
6.439 Error ModManager.cpp:1625: Error while loading entity prototype "nullius-turbine-closed-backup-1" (furnace): Invalid pipe connections specification for offset {1.0000000000, -2.0976562500}. The offset must be outside of the entity bounding-box Modifications: Nullius βΊΒ NOT Squeak Through
Crap, could've sworn I restarted the game after making that change. And that sucks that they need the same bounding box, though I understand why. I guess there will have to be a tradeoff... either you can pass between both furnaces, or neither. But this also means something else I may have to put extra logic into checking, too.Pi-C wrote: βTue Jun 18, 2024 8:25 am Got another crash with just your mod active:Code: Select all
0.817 Loading mod settings NOTSqueakThrough 0.0.4 (settings-updates.lua) 0.820 Loading mod core 0.0.0 (data.lua) 0.883 Loading mod base 1.1.109 (data.lua) 1.111 Loading mod base 1.1.109 (data-updates.lua) 1.138 Loading mod NOTSqueakThrough 0.0.4 (data-final-fixes.lua) 1.287 Checksum for core: 607699937 1.287 Checksum of base: 1054619811 1.287 Checksum of NOTSqueakThrough: 2807550358 1.614 Error ModManager.cpp:1625: Error while running setup for entity prototype "stone-furnace" (furnace): next_upgrade target (steel-furnace) must have the same bounding box.
Thanks for the testing!
OK, well as I mentioned, it had no affect for me. Character collision_box remained the same size with the setting enabled as disabled, only your mod loaded.Pi-C wrote: βTue Jun 18, 2024 9:57 amThe setting is an alternative to the Squeak Through mods. It's useful if the other mods are not active because it would achieve the same result (i.e., players can squeeze through entities), and it shouldn't do any damage if the other mods are active.FuryoftheStars wrote: βTue Jun 18, 2024 1:52 amIs this setting supposed to have any affect if the Squeak Through mods are not loaded? Without them loaded, it seems like enabled or not, the character's collision_box remains the same.Pi-C wrote: βThu Jun 13, 2024 3:14 pm There is a startup setting in miniMAXIme to choose whether character collision_boxes will be reduced. Currently, this doesn't do any damage: If the setting is on and any of "Squeak Through" or "Squeak Through 2" is active, the result will be what the player wants: characters can squeeze through between entities.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Opposite of Squeak Through
v0.0.5. Added logic to check the next_upgrade field and if one in the series is found to be in the exclusion list, then it excludes the whole series. I've also restructured the exemption tables in prep for some user configurable settings.
I have not added logic to check for the fluid box connections, yet, though. I may need to do similar for inserters....
Believe it or not, I am testing this with mods. I have 177 other mods that I've been switching on & off to test with it, not counting Base and this mod itself. I just don't have any huge overhaul/TC mods.
I have not added logic to check for the fluid box connections, yet, though. I may need to do similar for inserters....
Believe it or not, I am testing this with mods. I have 177 other mods that I've been switching on & off to test with it, not counting Base and this mod itself. I just don't have any huge overhaul/TC mods.
- Attachments
-
- NOTSqueakThrough_0.0.5.zip
- (2.48 KiB) Downloaded 35 times
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics