Opposite of Squeak Through

This is the place to request new mods or give ideas about what could be done.
000
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Dec 27, 2021 5:00 pm
Contact:

Opposite of Squeak Through

Post by 000 »

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.
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Opposite of Squeak Through

Post by FuryoftheStars »

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).
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
Pi-C
Smart Inserter
Smart Inserter
Posts: 1738
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Opposite of Squeak Through

Post by Pi-C »

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).
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:

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
Also, there is a mod IR3 Squeak Through which has been marked as incompatible by IR3 because it's messing with pipe connections. I guess changing collision boxes could mess with compound entities by other mods as well, so you'd better be careful! :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Opposite of Squeak Through

Post by FuryoftheStars »

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.
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
rhynex
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Tue Apr 17, 2018 9:55 am
Contact:

Re: Opposite of Squeak Through

Post by rhynex »

EDIT: never mind, owner of the mod is Pi-C and he answered already :D 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
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.
Pi-C
Smart Inserter
Smart Inserter
Posts: 1738
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Opposite of Squeak Through

Post by Pi-C »

rhynex wrote: ↑Wed Jun 12, 2024 5:28 pm EDIT: never mind, owner of the mod is Pi-C and he answered already :D 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
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.

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!
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Opposite of Squeak Through

Post by FuryoftheStars »

Pi-C wrote: ↑Thu Jun 13, 2024 3:14 pm
rhynex wrote: ↑Wed Jun 12, 2024 5:28 pm EDIT: never mind, owner of the mod is Pi-C and he answered already :D 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
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.

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? :-)
This would have to be a separate mod that in turn overrides miniMAXIme's character collision box size setting.

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
Pi-C
Smart Inserter
Smart Inserter
Posts: 1738
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Opposite of Squeak Through

Post by Pi-C »

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.
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:

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"
  },
})
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.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Opposite of Squeak Through

Post by FuryoftheStars »

Pi-C wrote: ↑Thu Jun 13, 2024 8:23 pm
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.
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:

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"
  },
})
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.
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. :)
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
Pi-C
Smart Inserter
Smart Inserter
Posts: 1738
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Opposite of Squeak Through

Post by Pi-C »

FuryoftheStars wrote: ↑Thu Jun 13, 2024 11:32 pm
Pi-C wrote: ↑Thu Jun 13, 2024 8:23 pm
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.
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 […] 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.
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. :)
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.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Opposite of Squeak Through

Post by FuryoftheStars »

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.
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
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Opposite of Squeak Through

Post by FuryoftheStars »

Pi-C wrote: ↑Thu Jun 13, 2024 3:14 pm
rhynex wrote: ↑Wed Jun 12, 2024 5:28 pm EDIT: never mind, owner of the mod is Pi-C and he answered already :D 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
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.
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.



Here's v0.0.3 of the mod. Should correctly load this time. :roll: 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. :P
Edit2: Removed old version
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
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Opposite of Squeak Through

Post by FuryoftheStars »

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:
  • 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
(I excluded the combinators because they don't actually need it, and that was the entity type the nixie tubes were using for the number displays.)

And of the following entities by name:
  • small-electric-pole
  • lab
  • assembling-machine-1
  • assembling-machine-2
  • assembling-machine-3
  • roboport
  • stone-furnace
(Labs were a toss up: when placed east <-> west, they look like the engineer should be unable or have difficulty passing, but when placed north <-> south, they look like the engineer should be able to pass with ease. I opted to allow passing.)

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
Pi-C
Smart Inserter
Smart Inserter
Posts: 1738
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Opposite of Squeak Through

Post by Pi-C »

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!
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:

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
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.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Pi-C
Smart Inserter
Smart Inserter
Posts: 1738
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Opposite of Squeak Through

Post by Pi-C »

FuryoftheStars wrote: ↑Tue Jun 18, 2024 1:52 am
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.
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.
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.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Opposite of Squeak Through

Post by FuryoftheStars »

Pi-C wrote: ↑Tue Jun 18, 2024 8:25 am
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!
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:

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
Hmm, I'll have to add some additional logic to check those, I guess.
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.
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.

Thanks for the testing!
Pi-C wrote: ↑Tue Jun 18, 2024 9:57 am
FuryoftheStars wrote: ↑Tue Jun 18, 2024 1:52 am
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.
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.
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.
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.
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
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Opposite of Squeak Through

Post by FuryoftheStars »

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. ;)
Attachments
NOTSqueakThrough_0.0.5.zip
(2.48 KiB) Downloaded 33 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
Post Reply

Return to β€œIdeas and Requests For Mods”