Janky quality (BETA)


Implements a janky version of Factorio Space Age quality

Content
a month ago
1.1
2.06K
Manufacturing

b [Fixed] "op" is nil

6 months ago

Mod load stacktrace paraphrased (since I can't copy out of it)

entity_mods.lua:29: in function ?
items_and_entities.lua:31: in main chunk
In require
data-updates.lua:30 in main chunk

Is this a "too many recipies" issue, or something fixable?

6 months ago

There's not enough information here to work with.

Mod version? Full mod list? Mod options you have modified or not?

6 months ago

It was exactly the list from the "Factorio 2.0" pack.

Turning off a few of them (I can't remember which) solved it.

6 months ago

I have all of them installed and there's no issue.

You might have had an old version of this mod.

6 months ago

Plausible. There has been an update since this happened.

Unfortunately, I now have a new bug on researching qual 3:


The mod Janky quality (0.1.10) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event janky-quality::on_research_finished (ID 18)
The mod Janky quality (0.1.10) caused a non-recoverable error.
Please report this error to the mod author.

[... many repeats...]

Error while running event janky-quality::on_research_finished (ID 18)
janky-quality/control.lua:99: C stack overflow
stack traceback:
janky-quality/control.lua:99: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
...
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>

[.. many repeats...]

stack traceback:
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
...
janky-quality/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>
[C]: in function 'newindex'
__janky-quality
/control.lua:111: in function <janky-quality/control.lua:98>


Complete mod list:

"Iondicators" (Sprite replacement)

Better Zero and Q (Sprite replacement)

Factorio Library

Honk

Janky Quality

Max Rate Calculator

Power Grid Comb

Power Pole 32

Simple Landfill Mining

Snap Mines

Walls do not attach to Water

6 months ago

Bug remains with just janky quality and power pole 32

6 months ago

And bug remains after removing quality mod, loading and saving game without quality mod, then reloading quality mod. Bug occours on researching Qual 1 in this case.

6 months ago
(updated 6 months ago)

It seems to be dependent on what other techs have been researched.

Also, the mk2 and mk3 techs do not show up in the tech list, but do show up in the tree. They only show up when the previous tech has been researched.

Also, to confirm: I am on 0.1.10

6 months ago
(updated 6 months ago)

And figured it out. You're causing calls to research_event() from inside research_event() because setting tech.researched = true triggers on_reseqarch_finished.

Now to see if I can figure out what you're doing in there enough to fix it.

6 months ago

And the fix:

Add this into control.lua in the obvious place:


local function research_event(event)
if event and event.research and event.research.name then
if string.match(event.research.name, "%-with%-quality%-") then
return
end
end
local technologies = (event.force or event.research.force).technologies


To test, research everything except the quality researches, then research one of the quality modules. Game will hang for half a second, then resume without crashing in a stack overflow! :D

I'm not sure if I like that you're cloning the tech tree 3 times to hide all the extra bits, but I understand why you are doing it.

6 months ago

In the past there were several checks, I did test this several times, and couldn't get a crash, so I preferred the simpler code.
Interesting. It does indeed happen when adding quality to a game. Fixed for next version.

I actually think this is not an infinite loop, but rather a very long chain of calls, as it only happens when the player has many technologies already unlocked.

Also, the mk2 and mk3 techs do not show up in the tech list, but do show up in the tree. They only show up when the previous tech has been researched.

This is standard. It happens with other modules, logistics, upgrades etc.

I'm not sure if I like that you're cloning the tech tree 3 times to hide all the extra bits, but I understand why you are doing it.

Trust me it's better than the previous solution, which was to unlock the recipes one by one.

6 months ago

I actually think this is not an infinite loop, but rather a very long chain of calls, as it only happens when the player has many technologies already unlocked.

I can believe that. I just assumed infinite.

This is standard. It happens with other modules, logistics, upgrades etc.

I didn't think this is standard with modules. Maybe I've just never noticed.

I'm not sure if I like that you're cloning the tech tree 3 times to hide all the extra bits, but I understand why you are doing it.

Trust me it's better than the previous solution, which was to unlock the recipes one by one.

I can believe that!

New response