Quality Seeds


Provides a way to use those quality seeds, allowing Gleba to be a late-game source of quality materials. For each cultivatable plant (included those added by mods) adds a cultivator building, which can grow those plants using a seed and water as the recipe. Additionally, adds late game options to grow plants in space!

Content
4 months ago
2.0 - 2.1
4.29K
Factorio: Space Age Icon Space Age Mod
Manufacturing

b Crash when starting the game

2 months ago

Hi there! Big fan of yours here (got most of your mods on my save, gotta love some planting ammiright?).
Welp, idk what the hell I messed up with (big modlist...), but I'm getting this crash :c
I'll try to test some stuff with my modlist in order to find wtf is messing with your mod, but let me know If you'd like me to upload my factorio-current, a crashlog, or whatever, I'll all ears. Ty for your time and all of your crazy good mods!

Crash log:
Failed to load mods: quality-seeds/prototypes/qualitytreesystem.lua:187: attempt to index field 'shift' (a nil value)
stack traceback:
quality-seeds/prototypes/qualitytreesystem.lua:187: in function 'create_quality_plant'
quality-seeds/prototypes/qualitytreesystem.lua:590: in main chunk
[C]: in function 'require'
quality-seeds/data-final-fixes.lua:1: in main chunk

2 months ago

Ah, I see, There is a mod somewhere that has a plant/seed combo, and everything is in place except they don't have shift defined (I think this is related to grabbing the picture of the tree and putting it in the cultivator building), and I like an idiot, have assumed its default existence.

This is so typical, and I really need to give Quality Seeds some more / better/ catches on when stuff doesn't exist and ignore it correctly. This concept is the same for another issue I am also currently tracking. Thanks for the heads up, look for an update in the near future.

2 months ago

Yeah, saw that post too! (sorry for not lurking a bit before making my post, It was pretty late for me haha).
I could try to kinda guess which mods are being problematic, but the problem is that I got a lot, and AFAIK there's no easy way to handpick which one is the problem, or leave some kind of debug code to see which mods are ok vs bad for your current code, right? Man I hate that I Factorio ugh.
I'll be around if you want me to try whatever! TY for your time and hard work.

a month ago
(updated 15 days ago)

hacked this into qualitytreesystem.lua#187:

local shift = {0.1, 0.0}
if variation_trunk.shift then
  local variation_trunk_x=variation_trunk.shift.x or variation_trunk.shift[1] or 0
  local variation_trunk_y=variation_trunk.shift.y or variation_trunk.shift[2] or 0
  shift = {variation_trunk_x+0.1, variation_trunk_y+0.0}
end if

similiar to what I thought here: https://mods.factorio.com/mod/Long_Range_Delivery_Drones/discussion/6ae4c144bdb1275ebe1ff0b0

no idea whether this is ok or there are other side effects - for me, Factorio loads again with this change.

EDIT:

although here it's probably https://lua-api.factorio.com/latest/prototypes/AnimationPrototype.html#shift, but it's the same problem with a Vector being allowed to have x,y properties set.

there was another catch after I inserted my code above:
Error while loading entity prototype "pyrite-farm-tree-greenhouse" (assembling-machine): Key "width" not found in property tree at ROOT.assembling-machine.pyrite-farm-tree-greenhouse.graphics_set.animation.layers[1]

seems to me that width is not set for some data.raw["plant"].variations[1].trunk which seems to be this https://lua-api.factorio.com/latest/types/SpriteSource.html#width (trunk is of type Animation).

that's because the trunk is not a single Animation, but layers of animations: https://lua-api.factorio.com/latest/types/Animation.html#layers.

Thus, I replaced this into qualitytreesystem.lua around line 200 +/-:

local variation_trunk_animation_data=variation_trunk
if variation_trunk.layers then
variation_trunk_animation_data=variation_trunk.layers[1]
end

  table.insert(agricultural_graphics.animation.layers, {
    filename = variation_trunk_animation_data.filename,
    width = variation_trunk_animation_data.width,
    height = variation_trunk_animation_data.height,
    x = 0,
    y = 0,
    frame_count = 1,
    repeat_count = 64,
    shift = shift,
    scale = variation_trunk_animation_data.scale
  })

I don't know what to do with the second layer in the Animation's layers - all the plants I had in my mod pack had two layers, first trunk, then something else, so it seemed logical to me to use the first layer, e.g. pyrite-farm-tree:

   layers = {
    {
      filename = "__cr-commons__/graphics/common/pyrite/plant/trunk-1.png",
//...
    },
    {
      filename = "__cr-commons__/graphics/common/pyrite/plant/harvest-1.png",
//...
    }

seems to work, at least Factorio starts...

13 days ago

This is exactly the kind of finicky work that I have been meaning to do, thank you, I really am revisiting this and will use your fixes as a base too and incorperate into the mod. Fortunately, if it loads its almost certainly fine with the potential for some minor graphical artefacts on the cultivators for that particular plant - which is often quite bearable in the mean time. I think I would like to have an alterantive graphic that is a fallback when the tree graphic is not found and/or to small to even be seen in the cultivator.

New response