Search found 174 matches

by PennyJim
Fri Jul 03, 2026 3:15 am
Forum: Implemented mod requests
Topic: New TriggerEffectItem for Creating Pollution
Replies: 5
Views: 653

Re: New TriggerEffectItem for Creating Pollution

That sounds like you should be defining the entity . Since the trigger fires from a tile, there is no entity to use by default.

The failure to create pollution when it fails to find an entity does sound like a bug, which you should be reporting over in Bug Reports . Although I can see an argument ...
by PennyJim
Tue Jun 30, 2026 6:04 am
Forum: Documentation Improvement Requests
Topic: Describe order of ItemProductPrototype quality operations
Replies: 0
Views: 77

Describe order of ItemProductPrototype quality operations

In what order the quality change and quality roll apply affect the odds of the quality being output.

When I asked the discord, the conversation said that as of 2.1.8 it's

get recipe quality
apply quality_change
apply quality_min/quality_max
if affected_by_quality, apply quality effect
if ...
by PennyJim
Fri Jun 05, 2026 5:35 pm
Forum: Resolved Requests
Topic: New example on Mods page
Replies: 3
Views: 262

New example on Mods page

I know LuaHelpers is one of those objects that you could easily miss it being available in data stage. The only link I'm aware of is on the index page, and, in my experience, you're usually skipping it entirely when you feel more comfortable with the api.

So I suggest we add a snippet to Mods to ...
by PennyJim
Sun May 31, 2026 1:51 am
Forum: Duplicates
Topic: [2.0.77] extra_count_fraction is incorrectly applied to product estimation
Replies: 1
Views: 206

[2.0.77] extra_count_fraction is incorrectly applied to product estimation

I was going to report that util.product_amount does not account for ItemProductPrototype::extra_count_fraction , but then I noticed the description on probability .
This made me go investigate if it really does match the amount on the tooltip and then various other ways it's estimated across the ...
by PennyJim
Sat May 30, 2026 10:44 pm
Forum: Not a bug
Topic: [2.0.77] util.add_shift only supports array format
Replies: 2
Views: 395

Re: [2.0.77] util.add_shift only supports array format

I'll add that util.sprite_load also only supports the array format for shift. Although, considering that it isn't expected to work on arbitrary prototype data, but instead special file inputs, I think that one's not that much of an issue. Would prefer the consistency though
by PennyJim
Sat May 30, 2026 10:38 pm
Forum: Bug Reports
Topic: [2.0.77] util.combine_icons has shift and scale issues
Replies: 0
Views: 205

[2.0.77] util.combine_icons has shift and scale issues

Similar to https://forums.factorio.com/133724, I was going through util.lua and spotted a couple problems with combine_icons .

1. It only seems to support the array format of shift. This can be fixed by doing this (after https://forums.factorio.com/133724 is resolved):

icon.shift = util.add_shift ...
by PennyJim
Sat May 30, 2026 2:17 am
Forum: Not a bug
Topic: [2.0.77] util.add_shift only supports array format
Replies: 2
Views: 395

[2.0.77] util.add_shift only supports array format

I was going through FMTK's annotations for util.lua and was comparing them to the actual functions.
I noticed the util.add_shift seems to only take the array form of the Vector type or Vector concept. It can only be assumed it was intended on being used in the shift of graphics definitions, and can ...
by PennyJim
Thu May 28, 2026 4:58 pm
Forum: Modding interface requests
Topic: Add more information to on_research_moved
Replies: 2
Views: 288

Re: Add more information to on_research_moved

To recreate the messages in the chat log that report that a user has moved a research.

Besides my janky recreation of chat, I can see it being nice for server logging tools. If someone repeatedly moves a specific (useful) research to the back of the queue, that can be considered trolling.
by PennyJim
Thu May 28, 2026 7:32 am
Forum: Modding interface requests
Topic: Add more information to on_research_moved
Replies: 2
Views: 288

Add more information to on_research_moved

I recently went to use the on_research_moved event for the first time, and was surprised to find practically no useful information in the event data.

A touch of testing seems to prove that it fires once for every technology that is moved in the queue, so I'm shocked it doesn't, at a minimum ...
by PennyJim
Thu May 28, 2026 7:23 am
Forum: Documentation Improvement Requests
Topic: Writing to force::research_queue doesn't raise on_research_queued?
Replies: 2
Views: 224

Re: Writing to force::research_queue doesn't raise on_research_queued?


The index is always the last in the queue so there's no point in including it [in on_research_queued].

Sounds like on_research_queued is not meant to fire when writing to LuaForce::research_queue..
Not sure if that fires an event then.

Also off to go find/make a request for more information in ...
by PennyJim
Thu May 28, 2026 7:14 am
Forum: Documentation Improvement Requests
Topic: Writing to force::research_queue doesn't raise on_research_queued?
Replies: 2
Views: 224

Re: Writing to force::research_queue doesn't raise on_research_queued?

Hah found an old improvement request of mine while searching for another one. https://forums.factorio.com/111745
Seems like this one is semi-related in that LuaForce::add_research() should be raising the `on_research_queued` event as well instead of the one it currently does. I haven't done any ...
by PennyJim
Thu May 28, 2026 6:56 am
Forum: Documentation Improvement Requests
Topic: Writing to force::research_queue doesn't raise on_research_queued?
Replies: 2
Views: 224

Writing to force::research_queue doesn't raise on_research_queued?

Considering `player_index` is listed as optional for on_research_queued , I'm going to assume that writing to LuaForce::research_queue would raise that event.

Also can the research queue even be disabled anymore? I feel like I remember that no longer being a thing. I'm writing code when I should be ...
by PennyJim
Sun May 17, 2026 8:22 pm
Forum: Resolved Requests
Topic: Recipe ingredient count limitation
Replies: 2
Views: 360

Re: Recipe ingredient count limitation

After some sleuthing (and someone actually looking at the rest of the documentation), we found the two smoking guns

1. The wiki edit that added this field that's clearly about individual ingredient amounts:
https://wiki.factorio.com/index.php?title=Prototype%2FRecipe&diff=151568&oldid=150595
Credit ...
by PennyJim
Sun May 17, 2026 8:04 pm
Forum: Resolved Requests
Topic: Recipe ingredient count limitation
Replies: 2
Views: 360

Recipe ingredient count limitation

The ingredients list the limitation for the "amount" of ingredients.

This is confusing because the ItemIngredientPrototype themselves list that limitation by value of their types being listed as uint16. So I assumed it was referring to the number of *different* ingredients (albeit a little poorly ...
by PennyJim
Mon Apr 06, 2026 3:24 am
Forum: Implemented mod requests
Topic: Force-based alert creation
Replies: 4
Views: 523

Re: Force-based alert creation

Theoretically having the engine iterate over the force players would be faster than a mod asking the engine to build a list of connected players and iterating it in Lua.

But this would also save from developers forgetting that they can pass the same table to each call and accidentally recreating it ...
by PennyJim
Mon Mar 16, 2026 3:58 am
Forum: Resolved Requests
Topic: EventData "tick" field should be uint64 type
Replies: 5
Views: 1014

Re: EventData "tick" field should be uint64 type

quyxkh wrote: Sun Mar 15, 2026 5:48 pm Maybe they've got a special prize in the code for anybody who gets a map that far? That'd be funny anyway.
There is in fact a reason they upped the tick to uint64 (even though Lua would have problems with it after enough time)
https://www.factorio.com/blog/post/fff-388
by PennyJim
Fri Mar 06, 2026 2:20 am
Forum: Modding interface requests
Topic: [2.0.76] Could sprite and animation prototypes be added to prototypes?
Replies: 2
Views: 573

Re: [2.0.76] Could sprite and animation prototypes be added to prototypes?

What fields would even be on the LuaPrototypes? Graphics definitions aren't readable an other other prototype.

On the other hand, we need a is_valid_animation_path to match the is_valid_sprite_path because we can't currently validate random strings as valid animations. (Validating data from ModData)
by PennyJim
Tue Feb 17, 2026 12:07 am
Forum: Modding interface requests
Topic: Add item_stack to on_mod_item_opened
Replies: 6
Views: 853

Re: Add item_stack to on_mod_item_opened

Wouldn't it make sense to pass the item_number, if one exists? It wouldn't perfectly get the item that was opened since not all have them, but wouldn't it cover most cases where people actually care about the item, since it's usually those that have data tied to them?
by PennyJim
Sun Jan 25, 2026 7:50 pm
Forum: Resolved Requests
Topic: ProgressBarStyleSpecification::bar_width is confusingly named
Replies: 1
Views: 444

ProgressBarStyleSpecification::bar_width is confusingly named

So please at least add a description to it (and the LuaStyle) to indicate that it's the progress bar's "thickness" instead.

I only figured it out after looking at the base game's code comments. I spent too long not looking at the base progress bar style because I was trying to make it mimic another ...
by PennyJim
Sat Jan 10, 2026 9:26 pm
Forum: Implemented mod requests
Topic: New TriggerEffectItem for Creating Pollution
Replies: 5
Views: 653

Re: New TriggerEffectItem for Creating Pollution

Affecting pollution via triggers just seems to make sense to me +1

Though I'd type it as "pollute" to keep the possibility of it absorbing pollution instead

Go to advanced search