Search found 1652 matches

by Pi-C
Wed Sep 14, 2022 4:33 pm
Forum: General discussion
Topic: Factorio confessions
Replies: 34
Views: 10704

Re: Factorio confessions

Another confession, I struggle to escape and lure logistics bots away when they try to steal from those extra rows of inventory that magically appear when I get the logistics technology. It's handy having more space to stash stuff, but sadly the log bots become a bunch of stalking little thieves th...
by Pi-C
Wed Sep 14, 2022 11:08 am
Forum: Modding help
Topic: How do I move characters that don't have a player (and never will)?
Replies: 7
Views: 1740

Re: How do I move characters that don't have a player (and never will)?

Probably more finesse required (e.g. path gets obstructed by something else that can move) but that's the very basic idea I think. Checking whether a vehicle's path is obstructed is easy -- just listen to on_entity_damaged, filtered by damage type "impact". However, a character bumping in...
by Pi-C
Wed Sep 14, 2022 10:53 am
Forum: Modding help
Topic: Spider-vehicle: How do I set "Request from buffer chests?"
Replies: 7
Views: 839

Re: Spider-vehicle: How do I set "Request from buffer chests?"

Too bad we can't auto-update the display. Closing and reopening the GUI has no effect when it's done on the same tick, and reopening the GUI on the next tick comes with a bit of overhead: store open GUI of player, then check all players in on_tick if they have a GUI to reopen. You can register an e...
by Pi-C
Wed Sep 14, 2022 9:20 am
Forum: Modding help
Topic: How do I move characters that don't have a player (and never will)?
Replies: 7
Views: 1740

Re: How do I move characters that don't have a player (and never will)?

Example mods: AAI Programmable Vehicles AAI is nuts. :-) It actually uses biters for navigation, so it takes advantage of the biters' pathing algorithm. But there's a lot more going on there, and I wouldn't say the code is easy to understand. Anyway, I'm just working on Autodrive again, which takes...
by Pi-C
Tue Sep 13, 2022 9:35 pm
Forum: Modding help
Topic: Spider-vehicle: How do I set "Request from buffer chests?"
Replies: 7
Views: 839

Re: Spider-vehicle: How do I set "Request from buffer chests?"

Ah, sorry. I was confused because you already had the only other thing related to the logistic requests in the spidertron in the question. No problem! But you might be right that you actually just have to close and reopen the GUI to see any changes made by scripts. That worked! Too bad we can't aut...
by Pi-C
Mon Sep 12, 2022 10:18 pm
Forum: Modding help
Topic: Spider-vehicle: How do I set "Request from buffer chests?"
Replies: 7
Views: 839

Re: Spider-vehicle: How do I set "Request from buffer chests?"

From https://lua-api.factorio.com/latest/Classes.html: vehicle_logistic_requests_enabled :: boolean [RW] If personal logistic requests are enabled for this vehicle (spidertron). Thanks, I know that, this actually works. I was interested in the other setting (the one marked with red). However, it oc...
by Pi-C
Mon Sep 12, 2022 8:45 pm
Forum: Modding help
Topic: Spider-vehicle: How do I set "Request from buffer chests?"
Replies: 7
Views: 839

Spider-vehicle: How do I set "Request from buffer chests?"

Using vehicle.vehicle_logistic_requests_enabled allows me to change the state of a spider-vehicles "Personal logistics and auto-trash" checkbox, but I can't figure out how to modify the "Request from buffer chests" checkbox. Apparently, vehicle.request_from_buffers works for requ...
by Pi-C
Mon Sep 12, 2022 4:21 am
Forum: Modding help
Topic: Event for Deconstruction an Entity
Replies: 4
Views: 850

Re: Event for Deconstruction an Entity

I read the docs and tried some trigger but nothing happens :) Are you sure that the event handler is really active? Add this to your control.lua: local c_name = "show-active-events" if not commands.commands[c_name] then commands.add_command(c_name, c_name, function(command) local player =...
by Pi-C
Thu Sep 08, 2022 11:49 am
Forum: Documentation Improvement Requests
Topic: Documentation Improvement Requests
Replies: 316
Views: 87090

Re: Small documentation improvement requests

LuaControl.riding_state currently has this description: [code] riding_state :: RidingState [Read/Write] Current riding state of this car or the vehicle this player is riding in. [/code] According to the Prototype definitions , spider-vehicles are vehicles. However, a function containing the line [c...
by Pi-C
Wed Aug 31, 2022 6:16 pm
Forum: Questions, reviews and ratings
Topic: Powerless Lamps
Replies: 2
Views: 846

Re: Powerless Lamps

Is there a mod that provides lights that don't use power (for more convenient path lighting)? I've made you one. It's really just a quick and dirty hack, merely a modified copy of the vanilla entity/item/recipe that will be unlocked by the same tech as the vanilla lamp. It even has a localised name...
by Pi-C
Tue Aug 30, 2022 6:31 am
Forum: Modding help
Topic: Get an error with attempting to read a setting
Replies: 3
Views: 905

Re: Get an error with attempting to read a setting

I have been trying to make a mod to either move all effects from the logistic system tech to logistic robotics, or simply remove utility science pack as both a prerequisite and needed pack, and change the count from 500 to 150, with these modes interchangeable via settings. What type of settings ar...
by Pi-C
Mon Aug 29, 2022 1:47 pm
Forum: Modding help
Topic: How do you create a common gui if possible ?
Replies: 3
Views: 953

Re: How do you create a common gui if possible ?

Hello everyone, I'm developing on a mod and I've an issue in my scenario, sometimes in the server I get like 40 players that are playing, the issue is that the GUI is updated frequently which generates a lot of calls because you need to the update of gui to same value 40 times (bad for perf late ga...
by Pi-C
Sat Aug 27, 2022 7:27 pm
Forum: Documentation Improvement Requests
Topic: Documentation Improvement Requests
Replies: 316
Views: 87090

Re: Small documentation improvement requests

LuaEntity.selected_gun_index : selected_gun_index :: uint? [Read/Write] Index of the currently selected weapon slot of this character, car, or spidertron. nil if this entity doesn't have guns. Can only be used if this is Character or Car The last sentence should be changed to Can only be used if th...
by Pi-C
Fri Aug 26, 2022 3:23 am
Forum: Modding help
Topic: How to prevent an existing resource from spawning?
Replies: 3
Views: 734

Re: How to prevent an existing resource from spawning [SOLVED?]

I don't know how to see the internal name of an autoplace control short of searching through another mod's code (debug mode doesn't help here). Open the game and press CTRL+SHIFT+E to get at the list of prototypes: autoplace_control.png Also, hovering the cursor over an entity and pressing CTRL+SHI...
by Pi-C
Thu Aug 25, 2022 11:31 am
Forum: Modding help
Topic: Problems with debug.getinfo()
Replies: 0
Views: 384

Problems with debug.getinfo()

Suppose I have a table of functions indexed by name: get_name = function() print("Entered function "..debug.getinfo(2).name) end a = { test_a = function(x) get_name() print(x) end, test_b = function(x) get_name() print(2*x) end, } It seems that debug.getinfo will have different results dep...
by Pi-C
Wed Aug 17, 2022 5:38 am
Forum: Questions, reviews and ratings
Topic: Mod list sharing for the purpose of reporting issues with a mod
Replies: 10
Views: 2002

Re: Mod list sharing for the purpose of reporting issues with a mod

I was confused at first because I kinda expected it to print something in the console too You can do that by using game.print() instead of log(). This will print just the mod names and versions, without prepending each line of output with the command. Then again, you can't copy/paste text from the ...
by Pi-C
Tue Aug 16, 2022 9:27 pm
Forum: Questions, reviews and ratings
Topic: Mod list sharing for the purpose of reporting issues with a mod
Replies: 10
Views: 2002

Re: Mod list sharing for the purpose of reporting issues with a mod

Just need to loop over the mods variable - it is a dictionary with all the loaded mods in it. for name, version in pairs(mods) do log(name .. " version " .. version) end Awesome! Thank you very much for that code snippet! I'd put it to good use, if I can, next time the need arises. I'd as...
by Pi-C
Sat Aug 13, 2022 6:05 pm
Forum: Won't fix.
Topic: Player can still manipulate enemy entities after changing forces
Replies: 2
Views: 1142

Re: Player can still manipulate enemy entities after changing forces

Thanks for the report however I don't consider this worth changing. If a mod changes the force of something it can eject the player; or change the players vehicle force as well. Thanks for the reply! Actually, I've already made a map setting for that: When players change forces, they will either be...
by Pi-C
Sat Aug 13, 2022 6:47 am
Forum: Won't fix.
Topic: Player can still manipulate enemy entities after changing forces
Replies: 2
Views: 1142

Player can still manipulate enemy entities after changing forces

Usually, when you click on an entity that belongs to another force that is an enemy of your own force, you'll see a flying text "Cannot open enemy structure". Also, if you try to enter a vehicle belonging to an enemy force, you'll usually get "Cannot enter enemy vehicles". But th...
by Pi-C
Mon Aug 01, 2022 1:44 pm
Forum: Modding help
Topic: Selection tool shows no icon for selected entity
Replies: 2
Views: 694

Re: Selection tool shows no icon for selected entity

Am I correct in supposing that no icon is shown for the selection because there is no item that can place the entity? That is indeed exactly what that is checked. (And if there are items to place it, it only takes the first item for the icon.) Thanks for your answer! Currently, I use this workaroun...

Go to advanced search