Search found 1055 matches
- Wed Jul 05, 2023 10:38 pm
- Forum: Modding interface requests
- Topic: Using LuaSurface.find_nearest_enemy* with min_distance
- Replies: 6
- Views: 1529
Re: Using LuaSurface.find_nearest_enemy* with min_distance
I did not see shooting_state before, thanks. Strange. I see it's in the bottom of a LuaEntity, and I searched for many different terms...
- Mon Jul 03, 2023 12:03 am
- Forum: Modding interface requests
- Topic: Using LuaSurface.find_nearest_enemy* with min_distance
- Replies: 6
- Views: 1529
Re: Using LuaSurface.find_nearest_enemy* with min_distance
The vehicle having equipment grids with lasers would work for detecting nearby enemies... And ironically might make sense in context (equipping the vehicle with an auto-attack sensor). However many equipments it takes to attack only on min-range on some weapon, swapping out as needed.
*Can ...
*Can ...
- Sun Jul 02, 2023 5:13 pm
- Forum: Modding interface requests
- Topic: Using LuaSurface.find_nearest_enemy* with min_distance
- Replies: 6
- Views: 1529
Re: Using LuaSurface.find_nearest_enemy* with min_distance
For the "find within circular radius" part, find_entities_filtered can take only a radius and position, and the enemies of the force can be gotten by using force.is_enemy() against game.forces, and is_military_target ... and more logic for minimum, supposing
An alternative is a turret. They do all ...
An alternative is a turret. They do all ...
- Sun Jun 25, 2023 9:33 pm
- Forum: Documentation Improvement Requests
- Topic: Documentation Improvement Requests
- Replies: 316
- Views: 117206
Re: Documentation Improvement Requests
https://lua-api.factorio.com/1.1.83/LuaEntityPrototype.html#LuaEntityPrototype.running_speed
[code]
running_speed :: double? Read
The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
Can only be used if this is Character
[/code]
This ...
[code]
running_speed :: double? Read
The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
Can only be used if this is Character
[/code]
This ...
- Tue May 30, 2023 2:58 am
- Forum: Technical Help
- Topic: Render in native screen resolution
- Replies: 1
- Views: 956
Render in native screen resolution
Does render-in-native-resolution=false do anything? I was hoping to get to choose a rendering resolution but nope.
- Sat May 20, 2023 4:57 pm
- Forum: Resolved Problems and Bugs
- Topic: [1.1.80] "Open character logistics" key not working properly in multiplayer
- Replies: 2
- Views: 1301
Re: [1.1.80] "Open character logistics" key not working properly in multiplayer
Adding: this doesn't happen in multiplayer if you're hosting the game, but does if you join a game.
- Sat May 20, 2023 4:43 pm
- Forum: Documentation Improvement Requests
- Topic: Documentation Improvement Requests
- Replies: 316
- Views: 117206
Re: Documentation Improvement Requests
LogisticParameters is missing the nil interpretations. min is 0 by default, and max is infinite
-> Thanks, added to the docs with 1.1.102.
- Sat May 20, 2023 4:39 pm
- Forum: Resolved Problems and Bugs
- Topic: [1.1.80] set_request_slot does not allow a count of 0
- Replies: 3
- Views: 1499
Re: [1.1.80] set_request_slot does not allow a count of 0
set_request_slot is for requester chests, which can't auto-trash. It's more of a bug that the function works on non-requesters, though it's probably there for legacy reasons.
https://lua-api.factorio.com/1.1.80/LuaControl.html#LuaControl.set_vehicle_logistic_slot
-->
LogisticParameters :: table ...
https://lua-api.factorio.com/1.1.80/LuaControl.html#LuaControl.set_vehicle_logistic_slot
-->
LogisticParameters :: table ...
- Sat May 20, 2023 4:30 pm
- Forum: Not a bug
- Topic: Slight offsetting of resource graphics for no reason
- Replies: 1
- Views: 726
Slight offsetting of resource graphics for no reason
Having a resource without shift or anything results in graphically shifted autoplace entities
Example:
local stages = data.raw.resource["crude-oil"].stages
stages.sheet = {
width = 124,
height = 132,
filename = "__base__/graphics/entity/crash-site-spaceship/spaceship-wreck-big-2.png ...
Example:
local stages = data.raw.resource["crude-oil"].stages
stages.sheet = {
width = 124,
height = 132,
filename = "__base__/graphics/entity/crash-site-spaceship/spaceship-wreck-big-2.png ...
- Fri May 19, 2023 12:10 am
- Forum: Documentation Improvement Requests
- Topic: Documentation Improvement Requests
- Replies: 316
- Views: 117206
Re: Documentation Improvement Requests
LuaGameScript.get_entity_by_tag - what does it do?
That's for getting a tag set by clicking an entity and entering a tag while in `/editor` or Map Editor. Related, from Discord discussions:
[code]boskid — 06/24/2022 2:14 AM
value from "entity tag" inside of AdditionalEntityInfoGui will be ...
- Sun Apr 23, 2023 5:56 pm
- Forum: Documentation Improvement Requests
- Topic: LuaSurface.find_tiles_filtered needs more detail
- Replies: 1
- Views: 559
Re: Documentation Improvement Requests
find_tiles_filtered
A small request for clarification on "force". Tiles don't have forces, and a tile ghost is a LuaEntity (as well as a decon proxy). Is force used in the context of returning tile ghosts, tiles with deconstruction proxies?
-- edit (boskid):
Note: `force` parameter is only used ...
A small request for clarification on "force". Tiles don't have forces, and a tile ghost is a LuaEntity (as well as a decon proxy). Is force used in the context of returning tile ghosts, tiles with deconstruction proxies?
-- edit (boskid):
Note: `force` parameter is only used ...
- Sat Apr 15, 2023 6:40 am
- Forum: Modding interface requests
- Topic: Request: module_specification.allowed_module_categories
- Replies: 12
- Views: 5343
Re: Request: module_specification.allowed_module_categories
Clever use of already existing module information... Came to request an "allowed_on" type table/flags, but this is more consistent with how the API already works (module category already exists, and comparing crafting_categories, that is *categorical*, not a list of machines_that_can_craft in the ...
- Sat Apr 01, 2023 9:29 am
- Forum: Modding discussion
- Topic: Gears for achievement graphics, please
- Replies: 4
- Views: 1890
Re: Gears for achievement graphics, please
Hi,
I've stumbled over More Achievements which adds achievement graphics. Credit to Bilka for some of the art and keeping the mod up to date for 0.17. A folder called graphic bases exists in the source repository but maybe you should ask Bilka for permission if you want to use them?
They are ...
- Sat Mar 25, 2023 2:40 am
- Forum: Documentation Improvement Requests
- Topic: Documentation Improvement Requests
- Replies: 316
- Views: 117206
Re: Documentation Improvement Requests
-> Thanks, noted in 1.1.110.
- Sat Mar 25, 2023 1:44 am
- Forum: Resolved Problems and Bugs
- Topic: [1.1.78] inserting regular items [via code] into a blueprintbook LuaInventory crashes the game
- Replies: 1
- Views: 1808
[1.1.78] inserting regular items [via code] into a blueprintbook LuaInventory crashes the game
What happened: Game crash upon inserting 'regular' item into Blueprint Book inventory
Reproduction:
/c
local player = game.player
local cursor = player.cursor_stack
cursor.set_stack("blueprint-book")
local inv = cursor.get_inventory(defines.inventory.item_main)
local inserted = inv.insert("iron ...
Reproduction:
/c
local player = game.player
local cursor = player.cursor_stack
cursor.set_stack("blueprint-book")
local inv = cursor.get_inventory(defines.inventory.item_main)
local inserted = inv.insert("iron ...
- Sat Mar 25, 2023 12:45 am
- Forum: Resolved Problems and Bugs
- Topic: [boskid][1.1.78] using a force_index for surface.find_entities_filtered is an error
- Replies: 1
- Views: 1870
[boskid][1.1.78] using a force_index for surface.find_entities_filtered is an error
Subject says it all: using a force_index for surface.find_entities_filtered is an error: "bad argument #3 of 3 to 'find_entities_filtered' (string expected, got number)"
These do not work:
surface.find_entities_filtered{force = 3}
surface.find_entities_filtered{force = {player.force, 3}}
These ...
These do not work:
surface.find_entities_filtered{force = 3}
surface.find_entities_filtered{force = {player.force, 3}}
These ...
- Fri Mar 24, 2023 10:03 am
- Forum: Modding discussion
- Topic: The player.opened/on_gui_closed mechanism is unreliable
- Replies: 2
- Views: 1311
Re: The player.opened/on_gui_closed mechanism is unreliable
One way to prevent this is to check the player controller before making the GUI to open. Another option is to check if player.opened == the element which was just assigned. Theoretically, there is no "perfect" way to detect an element closes, or is even *destroyed*, considering any mod can interact ...
- Fri Mar 24, 2023 9:53 am
- Forum: Modding discussion
- Topic: Gears for achievement graphics, please
- Replies: 4
- Views: 1890
Gears for achievement graphics, please
I'd like to request "official" versions of the gears used in achievements, for modders to use. They're baked into game graphics, so as far as it seems, the only way to "get them" would be to compose pieces from different achievements and hope.
If modders could just have some graphics, preferably ...
If modders could just have some graphics, preferably ...
- Wed Mar 22, 2023 1:35 am
- Forum: Resolved Problems and Bugs
- Topic: [1.1.78] Minor bug with GUI Inspector + Undo button
- Replies: 1
- Views: 988
[1.1.78] Minor bug with GUI Inspector + Undo button
Expectation:
1) turn on GUI inspector, do anything that can be undone
2) Inspect the Undo button
3) shows button style
What happens:
3) shows Undo tooltip, without background frame
If all the undo's are undone, the inspector works
1) turn on GUI inspector, do anything that can be undone
2) Inspect the Undo button
3) shows button style
What happens:
3) shows Undo tooltip, without background frame
If all the undo's are undone, the inspector works
- Wed Mar 22, 2023 1:16 am
- Forum: Resolved Problems and Bugs
- Topic: [Twinsen] [1.1.78] excessive intermediate recipe counts as "crafted"
- Replies: 2
- Views: 2515
[Twinsen] [1.1.78] excessive intermediate recipe counts as "crafted"
Expectation:
If I don't have enough of an intermediate craft, orange is shown (unsatisfied but craftable)
What happens:
If the *excess* of an intermediate craft satisfies the requirement, it counts as crafted?
data.raw.recipe["iron-gear-wheel"].normal.result_count = 2
mod:
crafting_overflow ...
If I don't have enough of an intermediate craft, orange is shown (unsatisfied but craftable)
What happens:
If the *excess* of an intermediate craft satisfies the requirement, it counts as crafted?
data.raw.recipe["iron-gear-wheel"].normal.result_count = 2
mod:
crafting_overflow ...