[Rseding91] [2.0.15] "Unknown entity name: <null>" error importing blueprint of turret with gaps in target priority list

This subforum contains all the issues which we already resolved.
jeff.s
Inserter
Inserter
Posts: 22
Joined: Thu Jan 10, 2019 10:49 pm
Contact:

[Rseding91] [2.0.15] "Unknown entity name: <null>" error importing blueprint of turret with gaps in target priority list

Post by jeff.s »

Steps to reproduce:

1. Place a turret, and configure it with 3 target priorities
11-06-2024, 19-43-32.png
11-06-2024, 19-43-32.png (82.56 KiB) Viewed 530 times


2. Right click the middle target priority to remove it, leaving a gap
11-06-2024, 19-43-57.png
11-06-2024, 19-43-57.png (27.63 KiB) Viewed 530 times


3. Take a blueprint of the turret, and export the blueprint string

Code: Select all

0eNptj9sKg0AMRP9lnlfoZRVdSn9EpGi7SGCNspdSEf+90Rb60rdJyJyZLOhcspMnjjAL6D5ygKkXBOq5dduO28HCoE+cxeS9jVgViB/2BXNcGwXLkSLZj28f5hunobNeDtQfv8I0BrGMvPEFUyrMMFkpYKkyeiFkjoJUqhGG1rmsoyg4hQsn564iOuq/y2brIGqQkN8zCk/rwx6RF6dKV1Wu9UGf82Jd31NHUZU=
4. Import this blueprint string.

You will see:
- "Error while importing string:" flying text next to cursor (no second line or more detail)
- "Unknown entity name: <null>" in the console
- The blueprint was not imported
11-06-2024, 19-45-15.png
11-06-2024, 19-45-15.png (125.09 KiB) Viewed 530 times


Decoding this blueprint to JSON the issue is clearly evident:

Code: Select all

{
  "blueprint": {
    "icons": [
      {
        "signal": {
          "name": "gun-turret"
        },
        "index": 1
      }
    ],
    "entities": [
      {
        "entity_number": 1,
        "name": "gun-turret",
        "position": {
          "x": 8,
          "y": -8
        },
        "priority-list": [
          "small-biter",
          "<null>",
          "big-biter"
        ]
      }
    ],
    "item": "blueprint",
    "version": 562949954404356
  }
}

paulstelian97
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Sep 14, 2020 11:22 pm
Contact:

Re: [2.0.15] "Unknown entity name: <null>" error importing blueprint of turret with one or more gaps in target priority

Post by paulstelian97 »

I've made a few attempts to find something else to put instead of that "<null>" and it seems like I cannot find an alternative. Nice find! At least the fix is simple (or should be simple), there must be added a name that can be a valid placeholder for empty slots in the serialization/deserialization.

Perhaps even the one the serializer is already doing, the "<null>"!

jeff.s
Inserter
Inserter
Posts: 22
Joined: Thu Jan 10, 2019 10:49 pm
Contact:

Re: [2.0.15] "Unknown entity name: <null>" error importing blueprint of turret with one or more gaps in target priority

Post by jeff.s »

> Perhaps even the one the serializer is already doing, the "<null>"

It would for sure be the most compatible for anybody who already made a blueprint in this way unknowingly

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

Re: [2.0.15] "Unknown entity name: <null>" error importing blueprint of turret with one or more gaps in target priority

Post by Rseding91 »

Thanks for the report. This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”