[0.12.22][posila] vehicle coliding with decorative makes game crash

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
StanFear
Fast Inserter
Fast Inserter
Posts: 236
Joined: Sun Dec 15, 2013 2:49 pm
Contact:

[0.12.22][posila] vehicle coliding with decorative makes game crash

Post by StanFear »

when a vahicle colides with a decorative entity which have a collision mask the game crashes with nothing getting put in the log (Microsoft windows : Factorio stopped functionning ...)

the entity prototype concerned by the bug :

Code: Select all

  {
    type = "decorative",
    name = "air-vent",
    flags = {"placeable-neutral", "not-on-map"},
    collision_mask = { "item-layer", "object-layer", "player-layer", "water-tile"},
    icon = "__Subsurface__/graphics/icons/air_vent_11_icon.png",
    minable = {mining_time = 1, result = "air-vent"},
    selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
    collision_box = {{-0.4, -0.4}, {0.4, 0.4}},
    render_layer = "decorative",
    max_health = 350,
    order = "z",
    pictures =
    {
      {
        filename = "__Subsurface__/graphics/entities/air_vent_11.png",
        width = 64,
        height = 64,
      }
    },
  },
it seems to me that the problem comes from decorative entities not handling correctly collision masks or health
(player does not walk through the entity and does not crash the game)

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.12.22] vehicle coliding with decorative makes game crash

Post by Rseding91 »

Can you post a simple mod and save that reproduces the issue?
If you want to get ahold of me I'm almost always on Discord.

User avatar
StanFear
Fast Inserter
Fast Inserter
Posts: 236
Joined: Sun Dec 15, 2013 2:49 pm
Contact:

Re: [0.12.22] [Rseding91] vehicle coliding with decorative makes game crash

Post by StanFear »

sure,

there yo go :
Decorative_collision_debug_0.0.1.zip
the mini mod
(8.9 KiB) Downloaded 124 times
Bug_save.zip
the save
(111.62 KiB) Downloaded 128 times
steps to reproduce the bug :
  • enter the car
  • drive towards the air vent

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

Re: [0.12.22][posila] vehicle coliding with decorative makes game crash

Post by posila »

Thanks for the report. Fixed for 0.12.23

EDIT: Quick question. Why did you chose to use decorative instead of i.e. simple-entity? I am asking this because we are trying to decide if car should take impact damage or not.

User avatar
StanFear
Fast Inserter
Fast Inserter
Posts: 236
Joined: Sun Dec 15, 2013 2:49 pm
Contact:

Re: [0.12.22][posila] vehicle coliding with decorative makes game crash

Post by StanFear »

posila wrote:Why did you chose to use decorative instead of i.e. simple-entity? I am asking this because we are trying to decide if car should take impact damage or not.
before I used the collision mask, the entity was a simple decorative item (whith some code behind to move pollution), when yuoki made new gfx for it, I looked like it should colide with the player, so ... I added collision masks.
What I mainly wanted was an entity that could colide with the player bit not have side effects like the flashing no-power icon, or the multiple need for entries of graphics that wall need, etc.
I just didn't know that something like simple-entity existed (it does right ?) since when I searched, the only place I found a linsting of possible types for prototypes was here :https://forums.factorio.com/wiki/index.ph ... efinitions

is there another place that list entity types such as simple-entity ?

As to knowing if the car should take damage, I think it should, even if it is decorative, making it collide with the car should, imo, damage the car...
I just can't think of any case it wouldn't, if it colides, it should damage

hope that answered your question !

and I really found that funny how while I developped the mod, I found bugs that were not reported before, am I using functions noone ever used ?

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

Re: [0.12.22][posila] vehicle coliding with decorative makes game crash

Post by posila »

I don't think we keep updated prototype documentation anywhere, sorry. The best source of available prototypes is base mod, imho :).

"stone-rock" is simple-entity (those large rocks you have to shoot to get rid of).

I was thinking same thing - if it collides, it should cause impact damage. Thanks.

Post Reply

Return to “Resolved Problems and Bugs”