Page 1 of 1

[1.1.88] Dump commands failing with Combat Mechanics Overhaul

Posted: Fri Aug 11, 2023 5:52 pm
by ilbJanissary
1. Attempting to use the --dump-data and --dump-prototype-locale commands with the mod "Combat Mechanics Overhaul" (combat-mechanics-overhaul), a dependency of "Space Exploration", to get icons from this mod for use in FactorioLab.
2. The commands fail with an error:

Error while loading entity prototype "se-gate-fragment-14-a" (simple-entity): Sprite height outside valid range (1-2048).

At ROOT.simple-entity.se-gate-fragment-14-a.picture.layers[0].hr_version
Modifications: Space Exploration › Combat Mechanics Overhaul

3. Since the game appears to still load without problems and presumably does not crash while the game is running, I would expect the icons to still dump as they appear in-game.
4. This always happens when dumping with this mod.
5. To reproduce, install and enable combat-mechanics-overhaul, and run factorio.exe --dump-data.

Re: [1.1.88] Dump commands failing with Combat Mechanics Overhaul

Posted: Fri Aug 11, 2023 9:36 pm
by Honktown
I am unable to reproduce on Windows and version 1.1.88, with normal graphics or 'high' set, and factorio.exe --dump-data in the bin/x64 directory. Mods are default settings, current SE + Combat Mechanics Overhaul (optional dependency). Alien Biomes puts the mods and version in the log:

Code: Select all

   2.432 Script @__alien-biomes__/data.lua:4: Log mods once: {
  ["aai-containers"] = "0.2.11",
  ["aai-industry"] = "0.5.20",
  ["aai-signal-transmission"] = "0.4.8",
  ["aai-signals"] = "0.6.1",
  ["alien-biomes"] = "0.6.8",
  base = "1.1.88",
  ["combat-mechanics-overhaul"] = "0.6.24",
  informatron = "0.3.4",
  jetpack = "0.3.13",
  robot_attrition = "0.5.15",
  ["shield-projector"] = "0.1.6",
  simhelper = "1.1.4",
  ["space-exploration"] = "0.6.112",
  ["space-exploration-graphics"] = "0.6.15",
  ["space-exploration-graphics-2"] = "0.6.1",
  ["space-exploration-graphics-3"] = "0.6.2",
  ["space-exploration-graphics-4"] = "0.6.2",
  ["space-exploration-graphics-5"] = "0.6.1",
  ["space-exploration-menu-simulations"] = "0.6.8",
  ["space-exploration-postprocess"] = "0.6.26"
}
And attached is my log, with "found duplicate mod" spam trimmed:
factorio-current-honktown.log
(448.99 KiB) Downloaded 36 times

Would you compare your mods and versions?

Re: [1.1.88] Dump commands failing with Combat Mechanics Overhaul

Posted: Fri Aug 11, 2023 10:11 pm
by ilbJanissary
Interesting! I am on Windows and I tried updating all mods to the latest version before I posted my issue but I'll have to try again and post my logs.

I will note that I was running with 248K, Krastorio 2, and Space Exploration. My guess now is that maybe it's something about those three combined, since I didn't actually bother to try Space Exploration by itself.

I will also note that I was able to get the dump commands to run with that set of mods in the past, I'm guessing something has changed in newer versions of something.

Re: [1.1.88] Dump commands failing with Combat Mechanics Overhaul

Posted: Fri Aug 11, 2023 11:07 pm
by Honktown
Fortunately had the mods downloaded, and in the json I see this:

Code: Select all

            "hr_version": 
            {
              "filename": "__space-exploration-graphics__/graphics/entity/gate/hr/fragment-14-a.png",
              "width": 832,
              "height": 2176,
One assumption later: (that since the game atlas size setting goes 2048, 4096, 8192, largest possible...), nothing to report...

normal/high enabled in-game, 2048 atlas size, no errors with game or dump-data. Turned off texture streaming, and still no error. I would expect if it weren't loaded until needed, maybe *that* is an extreme edge case of why it didn't error or something, but I just can't seem to trigger an error.

I believe I found why I don't get the error. It's not using 2048 atlas size?? Looking through the atlas with control-f3, I see my atlas is 4096x4096. Atlas 4, "the left side of a stargate" is fragment-14-a.png.

Re: [1.1.88] Dump commands failing with Combat Mechanics Overhaul

Posted: Fri Aug 11, 2023 11:16 pm
by Honktown
Strange. I am on a UHD screen, which I would not expect to matter but I don't know.

Attaching an image:
half-size-atlas-image.jpg
half-size-atlas-image.jpg (589.27 KiB) Viewed 1601 times

Re: [1.1.88] Dump commands failing with Combat Mechanics Overhaul

Posted: Sat Aug 12, 2023 12:22 am
by ilbJanissary
I definitely wouldn't expect the monitor to matter when I'm exporting data only, but I do have an ultrawide monitor. I can also try running the dump from one of my smaller monitors.

Re: [1.1.88] Dump commands failing with Combat Mechanics Overhaul

Posted: Sat Aug 12, 2023 9:29 pm
by Honktown
I was thinking, the graphics side could request the atlas canvas from the gpu but not care if it is larger than requested. I'm on an NVidia 1060 which is mildly dated, but by no means a "low-end" gpu. I may not be able to reproduce the error if it won't return a 2048 surface for the atlas. Id still expect HR mode to trigger the bug when a 2048 canvas is used... Logically it has to with the texture over 2048???

I see the dump runs in headless mode, but then that should extract gpu behavior from the equation and detect 2048 canvas is too small? [Edit: or ignored it entirely] Something is amiss, for sure

Re: [1.1.88] Dump commands failing with Combat Mechanics Overhaul

Posted: Sun Aug 13, 2023 6:14 am
by Honktown
It appears I never tested the last case when I noticed the atlas was using 4k despite set to 2k. I am able to reproduce the error.

Only SE is needed to reproduce it:
1) SE
2) HR mode and 2048 atlas size
3) factorio.exe --dump-data (mine seems to find the relative config correctly, but here it is anyway: -c .\..\..\config\config.ini )

Re: [1.1.88] Dump commands failing with Combat Mechanics Overhaul

Posted: Mon Aug 14, 2023 4:12 am
by ilbJanissary
Thanks for looking into this Honktown, I've been away from my PC for the weekend but sure looks like you've gotten to (or close to) the bottom of it.

Mods/devs, if this is a duplicate of the thread Honktown opened: viewtopic.php?f=7&t=104320, feel free to do what you wish with this thread.

Re: [1.1.88] Dump commands failing with Combat Mechanics Overhaul

Posted: Mon Aug 14, 2023 1:26 pm
by ilbJanissary
For what it's worth, I can confirm that setting "Sprite resolution" to "Normal" serves as a workaround for this issue.

EDIT: I had "Atlas texture size" set to the default "Largest possible", but setting it to "4096" while still using high resolution graphics also seems to work around the issue.

Re: [1.1.88] Dump commands failing with Combat Mechanics Overhaul

Posted: Mon Aug 14, 2023 2:33 pm
by ilbJanissary
After getting it to work, I reverted back to my original settings and now it continues to work.
I've no idea what's going on at this point.

Re: [1.1.88] Dump commands failing with Combat Mechanics Overhaul

Posted: Tue Aug 15, 2023 9:30 pm
by Honktown
ilbJanissary wrote:
Mon Aug 14, 2023 2:33 pm
After getting it to work, I reverted back to my original settings and now it continues to work.
I've no idea what's going on at this point.
Do you have a dual-gpu system with an integrated GPU perhaps?