Misanthrope


Vastly improved biter AI behavior, tweaks biter expansion mechanics. Memento mori.

Content
8 years ago
0.13 - 0.14
13
Enemies

g Missing chunk_pos argument (with savefile, mods and screenshot)

8 years ago

This just popped up as I was wandering around in my base. There were no biters attacking, nor was I attacking any biters.

Savefile: https://www.dropbox.com/sh/jhzvf05b56vistr/AACcPK7EVPezZ_uqceKlXiDOa?dl=0
Mods: https://www.dropbox.com/sh/xr96sld6lbwlffn/AACsmEGiGVNGw9tlslae6ZfJa?dl=0
Screenshot: http://imgur.com/a/4G79S
Factorio version: 0.13.17
Misanthrope version: 0.6.8

Notes: While included amongst my mods, Toxic Jungle was not enabled for this save

8 years ago

As an additional note, the error has continued to pop up since I unpaused and resumed the game. I suspect that it's being caused because I have pollution fluctuating over the alien spawner to the north.

8 years ago
(updated 8 years ago)

Here are the mod logs. I haven't played since the error appeared (and spammed a bit) so presumably the last few entries are related to the error.

http://pastebin.com/7R4WnRp2

edit: the logs in question are from overmind.log

8 years ago

Now I'm still trying to figure out what is going on with the code so I could be completely off the wall, but based on the following log output:

14:37:00: Spawned 135 units at chunk {x = 9, y = -14}, to attack debug mode disable

As well as the code which produces that output in overmind.lua:

Log("Spawned %d units at chunk %s, to attack %s", unit_count, Chunk.to_string(chunk), string.line(chunk_data.best_target))

And the problem line in question (line 211 as per the error message):

local cmd = {type = defines.command.attack_area, destination = Area.center(Chunk.to_area(chunk_data.best_target.chunk)), radius = 12}

It looks like "chunk_data.best_target.chunk" may contain the value "debug mode disable" instead of the expected coordinates for the best target chunk.

8 years ago

Here is my overwatch log. Again, I haven't started factorio since initially reporting it.

http://pastebin.com/jPLTd18i

In case this is useful, here is the world log as well:

http://pastebin.com/JTCbrA0W

8 years ago

So from what I can tell, the issue is that at line 211 in overmind.lua, there is an attempt to create an attack command on the chunk defined by chunk_data.best_target.chunk.

Unfortunately, as shown by comparing the log message coded at line 205 with overmind.log (linked above), chunk_data.best_target seems to resolve to "debug mode disable" rather than the expected array.

I tried tracing it back, and found the following:

overmind.lua:162: local chunk_data = spawnable_chunks[1]
overmind.lua:154: local spawnable_chunks = table.filter(global.overwatch.valuable_chunks, function(data) return data.best_target ~= nil end)

overwatch.lua:119: table.insert(global.overwatch.valuable_chunks, { chunk = data.chunk, value = value, spawn = data.spawn, best_target = data.best })

Now it turns out that that line is used in a function defined on line 104: "Overwatch.stages.evaluate_base = function(data)"

So presumably whatever calls stages.evaluate_base isn't feeding it the data it needs to for best_target and I just need to find whatever is calling that function.

8 years ago

Looks like I've been haring after the wrong trail for a bit. Turns out that string.line (which feeds the logging) only outputs "debug mode disable" intentionally. Will need to enable debug mode and feed the logs again to see what's happening.

8 years ago

After enabling debug mode, I re-tested it and checked the logs immediately after the error message appeared. The only log that changed was overmind.log, and it held a single entry:

14:33:00: Attempting to spawn biters, total valuable chunks: 323

After waiting a while longer (several error messages later) I saw the following added at supposedly the same time:

14:33:00: Choose chunk {x = 11, y = -1} to spawn units on, remaining valuable chunks: 292
14:33:00: Spawned 142 units at chunk {x = 11, y = -1}, to attack {value = 0}

In addition, the overwatch.log file isn't being updated.

So it looks like for some reason, the functions in overwatch.lua aren't being called and hence this is leaving data.best uninitialized.

That also explains the huge mismatches in the log times between overwatch.log and overmind.log.

New response