Search found 5 matches

by OilyMac
Thu Jul 24, 2025 4:10 pm
Forum: Won't implement
Topic: Quality Ore Patch Support
Replies: 3
Views: 494

Re: Quality Ore Patch Support

Thanks for the response.

To clarify, my thinking was that the quality on minable results would serve as the baseline, and then whatever quality chance for better would apply from there. Similar to how using uncommon ingredients gets you at least uncommon output, but you could get rare, etc. So I'd ...
by OilyMac
Tue Jul 22, 2025 3:11 am
Forum: Won't implement
Topic: Quality Ore Patch Support
Replies: 3
Views: 494

Quality Ore Patch Support

I'd like to create quality ore patches, but I haven't been able to make it work. I can think of two ways that would let me accomplish this.

1. Quality in ResourceEntityPrototype

local quality_iron_ore_resource = table.deepcopy(data.raw.resource["iron-ore"])
quality_iron_ore_resource.quality ...
by OilyMac
Fri Jul 04, 2025 2:48 pm
Forum: Resolved Problems and Bugs
Topic: [2.0.58] surface.create_entity() crashes with "quality is zero"
Replies: 1
Views: 908

[2.0.58] surface.create_entity() crashes with "quality is zero"

Trying to create an item-on-ground via surface.create_entity() crashes if the stack item has quality. E.g.,

game.surfaces[event.surface_index].create_entity({name="item-on-ground", position=event.source_position, stack={name="iron-ore", count=1, quality="uncommon"}})

results in a crash:

Error ...
by OilyMac
Fri Jun 27, 2025 8:09 pm
Forum: Modding help
Topic: Quality Ore Patch?
Replies: 2
Views: 316

Re: Quality Ore Patch?

Sadly, passing quality into create_entity for a resource patch doesn't seem to do anything, probably because the prototype doesn't have quality. There's also result_quality, but it's available only for crafiting machines, which apparently doesn't include mining drills.

The spoilage idea is very ...
by OilyMac
Fri Jun 27, 2025 12:03 am
Forum: Modding help
Topic: Quality Ore Patch?
Replies: 2
Views: 316

Quality Ore Patch?

I'm trying to create quality ore patches. So for example, if you mined from an uncommon iron ore patch, you'd always get uncommon iron ore (ignoring quality modifiers from the mining drill). But I haven't been able to find a way to make it work. The closest I've gotten is to make my own "uncommon ...

Go to advanced search