[posila][0.17.66][Modding] Different types of walls do not connect to each other

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

[posila][0.17.66][Modding] Different types of walls do not connect to each other

Post by lovely_santa »

Hi,

I am working on making my forcefield mod compatible with 0.17 when I noticed different types of wall do not connect to each other.
I am making a duplicate of the stone wall and adding a tint to them, other than changing graphics, they are identical.

When I connect the walls up to themselves, they connect:
pic1.PNG
pic1.PNG (803.76 KiB) Viewed 2298 times
When trying to connect different types of walls to each other it doesn't work, however different types of gates will act as one:
pic2.PNG
pic2.PNG (499.95 KiB) Viewed 2298 times
And as last, gates do connect to other types of walls:
pic3.PNG
pic3.PNG (303.15 KiB) Viewed 2298 times
:arrow: So it seems only a wall-wall connection between different types doesn't seem to work. However Klonan thought it had something to do with the collision box, but I'm not changing them from vanilla walls:

Code: Select all

-- __ForceFields2__/prototypes/entity/forcefield-builder.lua

function forceFieldWallEntity(color)

  local settings = require("prototypes/settings")[color]
  local forceFieldWall = util.table.deepcopy(data.raw["wall"]["stone-wall"])

  forceFieldWall.name                   = string.format(settings.name, "wall", color)

  forceFieldWall.icon_size              = nil
  forceFieldWall.icon                   = nil
  forceFieldWall.icons                  = LSlib.entity.getIcons("wall", "stone-wall", nil, nil, settings.colorTint)

  forceFieldWall.flags = forceFieldWall.flags or {}
  table.insert(forceFieldWall.flags, "not-repairable")

  forceFieldWall.minable                = {hardness = 0.2, mining_time = 1,
                                           result = (settings.manualPlaceable and forceFieldWall.name or nil),}
  forceFieldWall.mined_sound            = nil
  forceFieldWall.fast_replaceable_group = nil

  forceFieldWall.order                  = "a[items]-f[forcefields]"
  forceFieldWall.subgroup               = "forcefield"

  forceFieldWall.max_health             = settings.properties.maxHealth
  forceFieldWall.resistances            = settings.resistances


  local tint = settings.colorTint   -- add tint to wall
  for pictureName,picture in pairs(forceFieldWall.pictures) do
    -- https://wiki.factorio.com/Prototype/Wall#pictures
    if pictureName == "water_connection_patch" or pictureName == "gate_connection_patch" then
      local tempPicture                    = LSlib.entity.addTintToSprite4Way(picture, tint)
      forceFieldWall.pictures[pictureName] = LSlib.entity.removeShadowFromSprite4Way(tempPicture)
    else
      local tempPicture                    = LSlib.entity.addTintToSpriteVariation(picture, tint)
      forceFieldWall.pictures[pictureName] = LSlib.entity.removeShadowsFromSpriteVariation(tempPicture)
    end
  end

  data:extend{forceFieldWall}

end
I've also attached my save file and the mods used as they are not available on the portal yet.

Kind regards
lovely_santa
Attachments
WallConnectionBug.zip
Save file
(3.16 MiB) Downloaded 95 times
LSlib_2019.8.17.zip
Mod required by ForceFields
(210.55 KiB) Downloaded 98 times
ForceFields2_2.2.0.zip
Mod that introduces the walls
(939.96 KiB) Downloaded 100 times
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image

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

Re: [0.17.66][Modding] Different types of walls do not connect to each other

Post by posila »

They do connect, but they are not drawn as connected. I believe it was changed to work this way when we were making HD wall graphics for 0.17, and there was an idea of having stone wall that would look like it was actually made of stone, and concrete walls, and we didn't like how the connection between them looked so we changed it to not draw the connection.

User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

Re: [posila][0.17.66][Modding] Different types of walls do not connect to each other

Post by lovely_santa »

posila wrote:
Sun Aug 18, 2019 4:54 pm
They do connect, but they are not drawn as connected. I believe it was changed to work this way when we were making HD wall graphics for 0.17, and there was an idea of having stone wall that would look like it was actually made of stone, and concrete walls, and we didn't like how the connection between them looked so we changed it to not draw the connection.
So what about an optional sprite piece to connect inbetween walls that is interchangeable depending on what adjacent wall is present? For example the stone wall to draw a sprite on his tile when connecting to a concrete wall and the concrete wall that draws a piece on his tile when connecting to that stone wall? Call it some sort of wall transition? (like we have tile transitions)

Or a prototype setting so we can tell it to always connect to it's neighours, or a list of neighbours to connect to?

Or do you already have another idea in mind?
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image

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

Re: [posila][0.17.66][Modding] Different types of walls do not connect to each other

Post by posila »

lovely_santa wrote:
Sun Aug 18, 2019 6:06 pm
Or do you already have another idea in mind?
So Ernestas said it is ok to undo, we don't need it anymore and that the original idea was to have some "layer_id" that would need to be the same for two types of walls to draw the connection ... so I might do that. Transition logic is too big of a project.

User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

Re: [posila][0.17.66][Modding] Different types of walls do not connect to each other

Post by lovely_santa »

posila wrote:
Sun Aug 18, 2019 6:25 pm
the original idea was to have some "layer_id" that would need to be the same for two types of walls to draw the connection ... so I might do that.
I understand, I can work with layer_id, hopefully it accepts also a table of layer_id's for multiple mod compatibilities...
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image

Post Reply

Return to “Resolved Problems and Bugs”