Search found 82 matches

by BurninSun
Thu Feb 05, 2026 8:07 am
Forum: Not a bug
Topic: [2.0.73] on_train_changed_state fires twice with incorrect info
Replies: 1
Views: 137

[2.0.73] on_train_changed_state fires twice with incorrect info

Create train. Add schedule to train. Switch train from manual mode to automatic mode.

on_train_changed_state will now fire twice. The first will correctly include event.old_state == defines.train_state.manual_control and correctly changes the trains current state to on_the_path (or no_path or ...
by BurninSun
Tue Feb 03, 2026 10:56 pm
Forum: Fixed for 2.1
Topic: [2.0.73] on_train_schedule_changed is triggered when schedule entry is dragged but not changed
Replies: 1
Views: 248

[2.0.73] on_train_schedule_changed is triggered when schedule entry is dragged but not changed

If a train's schedule entry is dragged without actually changing the schedule, on_train_schedule_changed event gets fired. Dragging can be as little as one pixel during a misclick.

Minor issue, but I'd expect the event to only be fired when something in the schedule actually changes.
by BurninSun
Fri Jan 30, 2026 8:53 am
Forum: Resolved Requests
Topic: [2.0.73] EntityWithHealthPrototype.resistances.percent vs Resistance::percent
Replies: 1
Views: 234

[2.0.73] EntityWithHealthPrototype.resistances.percent vs Resistance::percent

In prototype stage, resistances.percent are on a percentage scale, 0-100.
In runtime stage, resistances.percent are decimal fractions, 0-1.
This either needs to be changed (which obviously may break things) or at least be clarified in the docs that runtime resistance percent values are not actually ...
by BurninSun
Tue Jan 27, 2026 8:58 am
Forum: Modding interface requests
Topic: Expose entity graphics within LuaEntityPrototype
Replies: 1
Views: 180

Expose entity graphics within LuaEntityPrototype

I want to use rendering.draw_animation or rendering.draw_sprite to draw my own copies of entities. Currently, the only way to get those graphics is by iterating entities and copying their graphic information into an animation/sprite prototype during data stage.

I would like LuaEntityPrototype to ...
by BurninSun
Thu Jan 08, 2026 8:16 am
Forum: Documentation Improvement Requests
Topic: [2.0.72] braking_force and friction_force aren't searchable
Replies: 0
Views: 149

[2.0.72] braking_force and friction_force aren't searchable

Searching the prototype docs for braking_force ( braking_power ) or friction_force ( friction ) do not give any results since those properties are listed as an "either/or" property and are not the primary.
Those should still show up in the search results and lead to the same link as the primary ...
by BurninSun
Wed Jan 07, 2026 9:15 pm
Forum: Modding interface requests
Topic: Make LuaTrain.kill_count and LuaTrain.killed_players writable
Replies: 3
Views: 419

Re: Make LuaTrain.kill_count and LuaTrain.killed_players writable


This seems like an XY problem anyway. The real request here is to make trains teleportable across surfaces, isn't it? I'm not sure how doable that is, though.

Linked rails have been requested for years but the implementation is a nightmare (see https://forums.factorio.com/viewtopic.php?p=527469 ...
by BurninSun
Tue Jan 06, 2026 1:00 pm
Forum: Minor issues
Topic: [2.0.72] can_place_entity can be incorrect due to train pushback after collision
Replies: 1
Views: 231

[2.0.72] can_place_entity can be incorrect due to train pushback after collision

Load save, run:
/c script.on_event(defines.events.on_entity_died, function(e) local entity_info = {force="player", name="car", position = {x=storage.loco.position.x, y = storage.loco.bounding_box.right_bottom.y+1.05}} if game.surfaces[1].can_place_entity(entity_info) then game.surfaces[1].create ...
by BurninSun
Sat Jan 03, 2026 2:14 am
Forum: Modding interface requests
Topic: Make LuaTrain.kill_count and LuaTrain.killed_players writable
Replies: 3
Views: 419

Make LuaTrain.kill_count and LuaTrain.killed_players writable

I'm requesting that LuaTrain.kill_count and LuaTrain.killed_players be writable.

When rolling stock is added or removed from a train, the old LuaTrain is invalidated and a new LuaTrain created with kill_count successfully being carried over to the new train. However, I am teleporting trains across ...
by BurninSun
Sat Jan 03, 2026 2:03 am
Forum: Fixed for 2.1
Topic: [2.0.72] LuaTrain.killed_players doesn't appear to work.
Replies: 1
Views: 300

[2.0.72] LuaTrain.killed_players doesn't appear to work.

https://lua-api.factorio.com/stable/classes/LuaTrain.html#killed_players
killed_players.png

New single player, no mods game. Setup an automatic train running in a circle. Get run over by the train.
After respawn:
/c game.print(serpent.block(game.player.selected.train.killed_players)) prints ...
by BurninSun
Mon Dec 08, 2025 10:00 am
Forum: Not a bug
Topic: [2.0.72] profiler within on_tick giving inconsistent results based on game.speed
Replies: 1
Views: 211

[2.0.72] profiler within on_tick giving inconsistent results based on game.speed

I'm getting inconsistent results from the in game profiler depending on the game.speed setting when using the profiler within an on_tick event. Running with game.speed = 1 is resulting in profile times 2x higher than when using game.speed = 1000. The profiler is .restart() and .stop() within the on ...
by BurninSun
Sun Dec 07, 2025 10:42 am
Forum: Documentation Improvement Requests
Topic: [2.0.72] Event script_raised_built doesn't list mod_name as a property
Replies: 0
Views: 198

[2.0.72] Event script_raised_built doesn't list mod_name as a property

Event script_raised_built can have an event property of `mod_name` when calling `script.raise_script_built` from a mod. This doesn't seem to be documented anywhere and at least should be listed under `script_raised_built`
https://lua-api.factorio.com/stable/events.html#script_raised_built
Screen ...
by BurninSun
Sat Sep 27, 2025 7:18 am
Forum: Resolved Requests
Topic: [2.0.68] draw_sprite example with `$field` reference
Replies: 2
Views: 445

[2.0.68] draw_sprite example with `$field` reference

https://lua-api.factorio.com/latest/cla ... raw_sprite
09-27-2025, 00-16-18.png
09-27-2025, 00-16-18.png (36.95 KiB) Viewed 445 times
The example under draw_sprite has a documentation markup shown `$field(render_mode, ScriptRenderMode, $optional)`
by BurninSun
Fri May 02, 2025 1:17 pm
Forum: Resolved Problems and Bugs
Topic: [Genhis][2.0.45] Black horizontal line drawn intermittently
Replies: 10
Views: 3229

Re: [2.0.45] Black horizontal line drawn intermittently

I tried all 4 combos of enabled/disabled cache-sprite-atlas and compress-sprite-atlas-cache, including restarting the client after changing the settings each time. All results were the same, the black line remained.
by BurninSun
Sat Apr 26, 2025 5:21 am
Forum: Resolved Problems and Bugs
Topic: [Genhis][2.0.45] Black horizontal line drawn intermittently
Replies: 10
Views: 3229

Re: [2.0.45] Black horizontal line intermittently at night

Looks like a mod changed the thread title but I need to clarify - this line appears day and night regardless.

Also there is 1 chunk boundary that always has a line while an adjacent chunk never has a line while the others only appear when I'm moving south.
by BurninSun
Fri Apr 25, 2025 4:32 am
Forum: Resolved Problems and Bugs
Topic: [Genhis][2.0.45] Black horizontal line drawn intermittently
Replies: 10
Views: 3229

[Genhis][2.0.45] Black horizontal line drawn intermittently

Video and save file attached. Line is appearing at the chunk boundary just a few tiles south of the starting position.
https://forums.factorio.com/download/file.php?mode=view&id=103298

This game was started with space exploration (and the same graphics glitch existed there) but I've stripped it ...
by BurninSun
Fri Apr 25, 2025 12:49 am
Forum: Minor issues
Topic: [2.0.45] UndoRedoStack is not updated until after on_player_mined_entity
Replies: 1
Views: 611

[2.0.45] UndoRedoStack is not updated until after on_player_mined_entity

When a player mines an entity, on_player_mined_entity event is triggered but the undo/redo stack is not updated yet with the newly mined entity. This causes a problem if the entity being mined has custom tags.

I would like to collect those tags within the on_player_mined_entity event and use ...
by BurninSun
Mon Apr 21, 2025 3:48 am
Forum: Resolved Requests
Topic: [2.0.45] LuaSchedule::add_record undocumented created_by_interrupt
Replies: 1
Views: 471

[2.0.45] LuaSchedule::add_record undocumented created_by_interrupt

https://lua-api.factorio.com/latest/con ... dData.html
does not include `created_by_interrupt` as `boolean?`
The created_by_interrupt parameter is allowed to be set via the add_record method.
by BurninSun
Sun Apr 20, 2025 5:56 am
Forum: Resolved Problems and Bugs
Topic: [Genhis][2.0.41] Crash setting train schedule of moving train (RollingStock::checkConsistency) (speed == 0 || closing)
Replies: 5
Views: 3023

Re: [Genhis][2.0.41] Crash setting train schedule of moving train (RollingStock::checkConsistency) (speed == 0 || closin

Stripped down, simple save and reproduction in vanilla. Base mod only, no SA.

Load the attached save and run the following:
/c storage.FRONT.train.schedule = nil storage.FRONT.destroy() storage.BACK.train.speed = 1

storage.FRONT is the front locomotive entity. storage.BACK is the back locomotive ...
by BurninSun
Sat Apr 19, 2025 1:18 am
Forum: Resolved Problems and Bugs
Topic: [Genhis][2.0.41] Crash setting train schedule of moving train (RollingStock::checkConsistency) (speed == 0 || closing)
Replies: 5
Views: 3023

Re: [2.0.41] Crash setting train schedule of moving train (RollingStock::checkConsistency) (speed == 0 || closing)

I found the crash can be avoided by setting the trains speed to 0 before setting the train to its intended speed, even if doing so is done in the line previous to setting its actual speed. eg.
This will crash in Space Exploration's code:

...
train_a.speed = -1
...


This will not crash ...

Go to advanced search