Search found 1652 matches

by Pi-C
Mon Jan 22, 2024 2:34 pm
Forum: Gameplay Help
Topic: Logic network long(ish) expressions
Replies: 33
Views: 2683

Re: Logic network long(ish) expressions

Hi All I am trying to control the unloading of a train at one of my stations. The expression I want to evaluate is something like this (where T = train count and B = base count) (Bammo > 500 || Tammo == 0 ) && (BOil > 20000 || TOil == 0) && (BRobot > 50 || TRobot == 0) && (B...
by Pi-C
Thu Jan 18, 2024 8:13 am
Forum: Modding help
Topic: Large Mining Drill Not Enlarged
Replies: 8
Views: 756

Re: Large Mining Drill Not Enlarged

BraveCaperCat wrote:
Wed Jan 17, 2024 6:44 pm
Or maybe it won't work:
Could you post data.lua?
by Pi-C
Wed Jan 17, 2024 6:25 pm
Forum: Modding help
Topic: Large Mining Drill Not Enlarged
Replies: 8
Views: 756

Re: Large Mining Drill Not Enlarged

How do i enlarge the texture with code so that it fits the collision box (4 by 4) Take a look at MiningDrillPrototype.animations . This is an array of 4 animations (one for each direction), and you can set the scale factor for each one of those. So something like this should work: local large_drill...
by Pi-C
Tue Jan 16, 2024 7:26 pm
Forum: Modding help
Topic: Large Mining Drill Not Enlarged
Replies: 8
Views: 756

Re: Large Mining Drill Not Enlarged

How do i enlarge the texture with code so that it fits the collision box (4 by 4) Take a look at MiningDrillPrototype.animations . This is an array of 4 animations (one for each direction), and you can set the scale factor for each one of those. So something like this should work: local large_drill...
by Pi-C
Tue Jan 16, 2024 11:11 am
Forum: Modding interface requests
Topic: Ammo range modification
Replies: 11
Views: 824

Re: Ammo range modification

The only reason I can think of regarding other mods overriding the behavior of mine is, my attempt to ensure my mod loads last by appending 'zzzzzz' was futile. It doesn't really make sense to use prefixes like "zzz" for making your mod load last. Other modders may also want to load last,...
by Pi-C
Mon Jan 15, 2024 10:59 pm
Forum: Modding help
Topic: Error! (Fixed)
Replies: 2
Views: 242

Re: Error!

Failed to load mods: Error while loading technology prototype "bmd:computing" (Technology): Difficulty normal: Key "recipe" not found in property tree at ROOT.technology.bmd:computing.effects[0] Modifications: Bigger Mining Drills The error message means that the "effects&q...
by Pi-C
Mon Jan 15, 2024 2:42 pm
Forum: Modding interface requests
Topic: Ammo range modification
Replies: 11
Views: 824

Re: Ammo range modification

… I've noticed there's no way to change an individual ammo item's set range, despite the fact that other ranges throughout the game can be configured with mods. Enabling ammo ranges to be tweaked alongside other ranges (turrets, guns, etc.), via mod config settings, technology upgrades, etc. … You ...
by Pi-C
Fri Jan 12, 2024 5:36 pm
Forum: Modding help
Topic: How to set a modded entity to a force that is untargetable
Replies: 9
Views: 892

Re: How to set a modded entity to a force that is untargetable

Barerock wrote:
Fri Jan 12, 2024 4:20 pm
… what I need is a hand to guide where I go from there …
Did you find the Modding tutorial section of the wiki?
by Pi-C
Fri Jan 12, 2024 2:32 am
Forum: Modding help
Topic: How to set a modded entity to a force that is untargetable
Replies: 9
Views: 892

Re: How to set a modded entity to a force that is untargetable

I'm attempting to make IR3's Big Wooden Pole entity untargetable for Rampant's AI. Previous discussions show that making [entity] invulnerable is not an option that works well; however, that same discussion failed to note how they made [entity] neutral, which fixed the issue to an acceptable degree...
by Pi-C
Wed Jan 10, 2024 1:43 pm
Forum: Technical Help
Topic: [1.101] frequent crashing ending log with mod "AutoDeconstruct control.lua"
Replies: 3
Views: 452

Re: [1.101] frequent crashing ending log with mod "AutoDeconstruct control.lua"

This is the crashing line: player.print("You built "event.created_entity.name) This should work: player.print("You built "..event.created_entity.name) The '..' is the operator for concatenating strings. Alternatively, you could use this: player.print( {"", "You bui...
by Pi-C
Sun Jan 07, 2024 7:05 am
Forum: Modding interface requests
Topic: LuaInventory::get_filtered_slots()
Replies: 11
Views: 938

Re: LuaInventory::get_filtered_slots()

The beauty of this is that this will also give you the number of filtered slots if you use '#returned_list'. What would you want it for? Cf. the last sentence of my original post: It would also be easy to choose other approaches based depending on the number of filtered slots returned (e.g. don't l...
by Pi-C
Sun Jan 07, 2024 12:21 am
Forum: Modding interface requests
Topic: LuaInventory::get_filtered_slots()
Replies: 11
Views: 938

Re: LuaInventory::get_filtered_slots()

Just back in from a nightly winter walk, where I thought about it some more. Getting a list like { {filter = string, slot = uint}, {filter = string, slot = uint}, … } should be easy to implement (the code in my explanations is the Lua equivalent of what should be done in C): -- Returns for example: ...
by Pi-C
Sat Jan 06, 2024 10:47 pm
Forum: Modding interface requests
Topic: LuaInventory::get_filtered_slots()
Replies: 11
Views: 938

Re: LuaInventory::get_filtered_slots()

So perhaps the method should return an array of "{ filter = string, index = uint }", or even simply an array of "{ string, uint }" instead? Why do you want it to be an array so much? Sorry if I didn't get that across correctly: just like LuaSurface::find_entities() returns an ar...
by Pi-C
Sat Jan 06, 2024 7:51 pm
Forum: Modding interface requests
Topic: LuaInventory::get_filtered_slots()
Replies: 11
Views: 938

Re: LuaInventory::get_filtered_slots()

That's a good idea! But I've a question regarding the bots' job queue: Do they get assigned to pick up items from a certain logistic chest, or from a particular slot in the its inventory? In the first case, they'd still get the item if there are several stacks of it, but in the other one, they'd re...
by Pi-C
Sat Jan 06, 2024 8:01 am
Forum: Modding interface requests
Topic: LuaInventory::get_filtered_slots()
Replies: 11
Views: 938

Re: LuaInventory::get_filtered_slots()

FWIW, you can still do your thing in one pass. You just have to check the chests and manually move the trashed items if they can satisfy your request. E.g. in your example you would trash 200 copper in one tick, then in the next you would bring them back into the filtered slots and request 100 more...
by Pi-C
Fri Jan 05, 2024 10:40 pm
Forum: Modding interface requests
Topic: LuaInventory::get_filtered_slots()
Replies: 11
Views: 938

Re: LuaInventory::get_filtered_slots()

https://lua-api.factorio.com/latest/classes/LuaInventory.html#sort_and_merge This has the disadvantage that it will sort and merge the complete inventory, which may be a bit obtrusive. For example, as items are provided from left to right, beginning at the first and ending at the last line, players...
by Pi-C
Fri Jan 05, 2024 8:42 pm
Forum: Modding interface requests
Topic: LuaInventory::get_filtered_slots()
Replies: 11
Views: 938

LuaInventory::get_filtered_slots()

What? I'd like to get a method to get the indices of all filtered slots in an inventory: LuaInventory::get_filtered_slots() --> Array of uint Why? We already have LuaInventory::is_filtered() , which returns true if the inventory supports filters and has at least one filter set, and LuaInventory:get...
by Pi-C
Fri Jan 05, 2024 10:02 am
Forum: General discussion
Topic: That feeling when you overwrote a save
Replies: 13
Views: 1785

Re: That feeling when you overwrote a save

In such moment i feel like: "why the hell devs cannot add two lines of the code, whyyyyyyyyyyyyyy" Because someone else would come and complain that they overwrote rescued.zip and spent 300h on this save and now 10k spm megabase is goneeeee. Halp please!!11 Adding a variable prefix/suffix...
by Pi-C
Wed Jan 03, 2024 10:21 am
Forum: Mods
Topic: [>= 0.17.73] GCKI -- Gizmos Car Keys (improved)
Replies: 18
Views: 4657

Re: [>= 0.17.73] GCKI -- Gizmos Car Keys (improved)

Again, there are some minor versions I've skipped so far: --------------------------------------------------------------------------------------------------- Version: 1.1.9 Date: 2023-10-18T18:32:00+02:00 Bugfixes: - Fixed crash when trying to enter/leave a vehicle of a prototype not supported by GC...

Go to advanced search