Search found 283 matches
- Sun Jul 10, 2022 8:39 pm
- Forum: Modding discussion
- Topic: New API Docs website
- Replies: 68
- Views: 28173
Re: New API Docs website
Edit: Moved to right thread
- Sat Jul 09, 2022 11:34 pm
- Forum: Resolved Problems and Bugs
- Topic: [1.1.61] API Docs for LuaPlayer.remove_alert wrong parameter type for "prototype" filter field
- Replies: 1
- Views: 2433
[1.1.61] API Docs for LuaPlayer.remove_alert wrong parameter type for "prototype" filter field
The function LuaPlayer.remove_alert takes a table of fields, including one named "prototype". In the API docs its listed as type "LuaEntityPrototype?", however, if you provide an entity prototype object (LuaEntity.prototype) you get back the error message: 'prototype': string expected, got table
If ...
If ...
- Sat Jul 09, 2022 10:49 pm
- Forum: Resolved Problems and Bugs
- Topic: [Therenas][1.1.61] LuaInventory.set_filter() API Doc param error
- Replies: 1
- Views: 1043
[Therenas][1.1.61] LuaInventory.set_filter() API Doc param error
In the API Docs the function LuaInventory.set_filter has the param filter of type string . However I believe it should be string? based on its description for setting a nil value to clear the filter.
Page: https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.set_filter
Param ...
Page: https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.set_filter
Param ...
- Fri Jul 08, 2022 9:54 pm
- Forum: Resolved Problems and Bugs
- Topic: [boskid][1.1.61] Selection box doesn't handle 8 way rotations correctly when set in a custom entity prototype
- Replies: 2
- Views: 1790
[boskid][1.1.61] Selection box doesn't handle 8 way rotations correctly when set in a custom entity prototype
When a prototype has a selection_box (possibly also collision_box ?) set to be non centered, this is placed based on the entities 4 main directions (N, E, S, W) cleanly, but for the extra rotations (NE, SE, SW, NW) in an 8 way rotatable entity the offsets are always as if the rotation is north ...
- Sun Jul 03, 2022 7:26 pm
- Forum: Implemented mod requests
- Topic: Flag to force prototype placement on rail grid
- Replies: 6
- Views: 3485
Re: Flag to force prototype placement on rail grid
Yea I hit this as well.
Had to do a whole process to; catch build, review validity, if bad refund and show to player valid placement positions.
Was a bunch of code and added complexity to work around this issue.
Had to do a whole process to; catch build, review validity, if bad refund and show to player valid placement positions.
Was a bunch of code and added complexity to work around this issue.
- Thu Jun 30, 2022 10:59 pm
- Forum: Modding interface requests
- Topic: LuaSurface.find_non_colliding_position() and LuaSurface.can_place_entity() to support direction and orientation
- Replies: 1
- Views: 1057
LuaSurface.find_non_colliding_position() and LuaSurface.can_place_entity() to support direction and orientation
At present there is no way to find a placement location for either a non north direction or a non 0 orientated entity.
Also you can't check buildability of a non 0 orientated entity.
My example is trying to teleport a player's car at its current orientation. However, I can see finding a placement ...
Also you can't check buildability of a non 0 orientated entity.
My example is trying to teleport a player's car at its current orientation. However, I can see finding a placement ...
- Sun May 08, 2022 6:02 pm
- Forum: Resolved Problems and Bugs
- Topic: [1.1.58] LuaControl.cancel_crafting gives wrong error message for missing argument
- Replies: 1
- Views: 1100
[1.1.58] LuaControl.cancel_crafting gives wrong error message for missing argument
The below code snippet is invalid as it doesn't have the `count` field in the table argument.
/c
local player = game.player
if player.crafting_queue_size > 0 then
player.cancel_crafting {index =1}
end
However it gives the error message:
Error: 'index': real number expected got nil.
Tested ...
/c
local player = game.player
if player.crafting_queue_size > 0 then
player.cancel_crafting {index =1}
end
However it gives the error message:
Error: 'index': real number expected got nil.
Tested ...
- Sat Mar 12, 2022 12:19 pm
- Forum: Resolved Problems and Bugs
- Topic: [1.1.56] Removal/Error of autoplace_specification field from tree LuaEntityPrototype's
- Replies: 1
- Views: 1387
[1.1.56] Removal/Error of autoplace_specification field from tree LuaEntityPrototype's
In 1.1.55 and before you could obtain the the autoplace_specification from a tree LuaEntityPrototype, but in 1.1.56 this isn't obtainable and it isn't listed as an intentional loss in the 1.1.56 changelog. its also still in current documentation.
https://lua-api.factorio.com/latest ...
https://lua-api.factorio.com/latest ...
- Sun Feb 27, 2022 7:47 pm
- Forum: Resolved Problems and Bugs
- Topic: [1.1.55] Can't change artillery wagon's force
- Replies: 1
- Views: 2613
[1.1.55] Can't change artillery wagon's force
You can't change an artillery wagons force via Lua API script. It accepts the request, but the force doesn't change.
1: Load save: arty wagon force test.zip
2: script to change the force of the player selected entity:
/c
local carriage = game.player.selected
game.print("pre: " .. carriage.force ...
1: Load save: arty wagon force test.zip
2: script to change the force of the player selected entity:
/c
local carriage = game.player.selected
game.print("pre: " .. carriage.force ...
- Wed Feb 23, 2022 2:30 pm
- Forum: Resolved Problems and Bugs
- Topic: [1.1.53] Corpse TTL set to uint max vanishes instantly
- Replies: 1
- Views: 1175
[1.1.53] Corpse TTL set to uint max vanishes instantly
The time_to_live for a character-corpse is listed as uint32. However if you put a max uint32 value the corpse vanishes instantly.
https://wiki.factorio.com/Prototype/CharacterCorpse#time_to_live
Assume the same issue exists for regular corpse.
In my testing I found that the vanishing is somewhere ...
https://wiki.factorio.com/Prototype/CharacterCorpse#time_to_live
Assume the same issue exists for regular corpse.
In my testing I found that the vanishing is somewhere ...
- Wed Feb 09, 2022 8:26 pm
- Forum: Modding discussion
- Topic: New API Docs website
- Replies: 68
- Views: 28173
Re: New API Docs website
On the main page (https://lua-api.factorio.com/latest/index.html) the Classes header isn't clickable, but the Events header further down the page is.
There is the Classes page that I assume the header should link to: https://lua-api.factorio.com/latest/Classes.html
- Thu Jan 27, 2022 5:10 pm
- Forum: Resolved Problems and Bugs
- Topic: [boskid][1.1.53] Crash connecting rolling stock to neighbour while its being removed (on_train_created)
- Replies: 2
- Views: 3009
[boskid][1.1.53] Crash connecting rolling stock to neighbour while its being removed (on_train_created)
If you interact with a train carriage that is mid removal and get it to re-connect to another carriage you can crash the game. The on_train_created event gives you access to this mid removal stage.
Logic:
remove a locomotive from a 2 entity train. The game has to disconnect the loco first before ...
Logic:
remove a locomotive from a 2 entity train. The game has to disconnect the loco first before ...
- Mon Jan 03, 2022 8:12 pm
- Forum: Resolved Problems and Bugs
- Topic: [boskid][1.1.50] Restarting save game crashes Factorio on specific scenario and mods
- Replies: 6
- Views: 4603
Re: [boskid][1.1.50] Restarting save game crashes Factorio on specific scenario and mods
thanks Boskid
raised to the Comfy scenario devs in case there is anything odd on their side this flags

raised to the Comfy scenario devs in case there is anything odd on their side this flags

- Mon Jan 03, 2022 2:34 pm
- Forum: Resolved Problems and Bugs
- Topic: [boskid][1.1.50] Restarting save game crashes Factorio on specific scenario and mods
- Replies: 6
- Views: 4603
Re: [boskid][1.1.50] Restarting save game crashes Factorio on specific scenario and mods
reproduction steps from a clean copy of the scenario following the usage path the server hosting player did in my previous error case.
Please note I am not the owner of the scenario, Comfy is.
This looks to be related to downloading a scenario from an MP game is somehow getting in to the weird map ...
Please note I am not the owner of the scenario, Comfy is.
This looks to be related to downloading a scenario from an MP game is somehow getting in to the weird map ...
- Mon Jan 03, 2022 11:55 am
- Forum: Resolved Problems and Bugs
- Topic: [boskid][1.1.50] Restarting save game crashes Factorio on specific scenario and mods
- Replies: 6
- Views: 4603
Re: [boskid][1.1.50] Restarting save game crashes Factorio on specific scenario and mods
Ignore this post - see 3rd post with new simpler reproduction steps.
edit: this occurs with just starting the scenario, no mods required it seems.
scenarios.zip
New Game > User scenarios > Chronosphere
Didn't want to edit original post as I see Boskid has claimed it in title.
factorio ...
edit: this occurs with just starting the scenario, no mods required it seems.
scenarios.zip
New Game > User scenarios > Chronosphere
Didn't want to edit original post as I see Boskid has claimed it in title.
factorio ...
- Mon Jan 03, 2022 11:40 am
- Forum: Resolved Problems and Bugs
- Topic: [boskid][1.1.50] Restarting save game crashes Factorio on specific scenario and mods
- Replies: 6
- Views: 4603
[boskid][1.1.50] Restarting save game crashes Factorio on specific scenario and mods
Ignore this post - see 3rd post with new simpler reproduction steps.
When I load the below save based on a scenario and mods everything is fine, however, when I click to Restart the map Factorio hard crashes.
30.413 Error RollingStock.cpp:996: Internal error in RollingStock ...
When I load the below save based on a scenario and mods everything is fine, however, when I click to Restart the map Factorio hard crashes.
30.413 Error RollingStock.cpp:996: Internal error in RollingStock ...
- Sat Dec 18, 2021 1:33 pm
- Forum: Resolved Problems and Bugs
- Topic: [Lou][1.1.48] Ghost fast replace rotation oddness
- Replies: 2
- Views: 2849
[Lou][1.1.48] Ghost fast replace rotation oddness
Issue: a player can fast replace an entity over itself with a different rotation, but a ghost placed over an entity with fast replace and a different rotation is set back to the original rotation.
https://gfycat.com/diligentblackandwhitehoiho
1: place steam engine facing north.
2: hold steam ...
https://gfycat.com/diligentblackandwhitehoiho
1: place steam engine facing north.
2: hold steam ...
- Mon Dec 13, 2021 2:29 pm
- Forum: Modding discussion
- Topic: New API Docs website
- Replies: 68
- Views: 28173
Re: New API Docs website
The process that a mod makes a request via the API (either function or to get/set a field) would be helpful. I got the below answer via Discord from Bilka that all LuaObject instances returned to my mod from the API have 0 field data. So for UPS optimised mods we should really be caching every field ...
- Wed Sep 01, 2021 7:30 pm
- Forum: Modding discussion
- Topic: New API Docs website
- Replies: 68
- Views: 28173
Re: New API Docs website
For some reason loading the factorio website and the new API docs web pages on my phone is really slow. Even when loaded scrolling is really slow.
It's not the newest phone I will admit, but it's fine on other websites like the old Api docs, BBC news, Twitter, etc.
It's not the newest phone I will admit, but it's fine on other websites like the old Api docs, BBC news, Twitter, etc.
- Tue Jun 29, 2021 10:00 am
- Forum: Modding interface requests
- Topic: LuaTrain kill_count and killed_players be writable
- Replies: 0
- Views: 994
LuaTrain kill_count and killed_players be writable
It would be helpful if the LuaTrain.kill_count and LuaTrain.killed_players attributes were writable like LuaEntity.kills is.
I have a mod that manipulates trains and this can lead to the "older" train being removed and losing the kills details with it. I would like to be able to cache these details ...
I have a mod that manipulates trains and this can lead to the "older" train being removed and losing the kills details with it. I would like to be able to cache these details ...