Search found 1750 matches

by Pi-C
Sun Jun 15, 2025 7:25 am
Forum: Resolved for the next release
Topic: [boskid][2.0.55] LuaItemStack::transfer_stack() always true if LuaItemStack::can_set_stack() would succeed
Replies: 3
Views: 398

Re: LuaItemStack::transfer_stack() always true if LuaItemStack::can_set_stack() would succeed


When reporting bugs, please always include a game version.

Sorry, may mistake. It was late when I sent this, so I forgot to include the version number. But it happened with version 2.0.55.


I see the return value of the transfer_stack has changed between 2.0.47 and 2.0.55: in 2.0.55 it reports ...
by Pi-C
Sun Jun 15, 2025 1:31 am
Forum: Resolved for the next release
Topic: [boskid][2.0.55] LuaItemStack::transfer_stack() always true if LuaItemStack::can_set_stack() would succeed
Replies: 3
Views: 398

[boskid][2.0.55] LuaItemStack::transfer_stack() always true if LuaItemStack::can_set_stack() would succeed

TLDR
It seems LuaItemStack::transfer_stack() will always return true if LuaItemStack::can_set_stack() would succeed – even if no items have been transferred.

The problem:
LuaItemStack::can_set_stack() will succeed if the given stack can be used at all in the given inventory. For example, it ...
by Pi-C
Fri Jun 13, 2025 12:58 pm
Forum: Bob's mods
Topic: Updating Mods from 1.1 to 2.0
Replies: 3
Views: 393

Re: Updating Mods from 1.1 to 2.0



I have little programming experience and some essential mods have not been updated for 2.0. How difficult would it be for me to update these mods myself for use?
… Modding usually require expert knowledge about game engine, and upgrading someone elses obsolete mods require you to know even more ...
by Pi-C
Thu Jun 12, 2025 12:50 pm
Forum: Implemented mod requests
Topic: Add APIs to manage logistic groups
Replies: 10
Views: 1592

Re: Add APIs to manage logistic groups

Rseding91 wrote: Mon Jun 09, 2025 9:00 pm Ok. For the next release I added LuaForce::get_logistic_groups(), get_logistic_group(), create_logistic_group(), and delete_logistic_group().
Thank you, this looks very promising! :-)
by Pi-C
Wed Jun 11, 2025 9:08 am
Forum: Modding help
Topic: cannot read recipe subgroup from data.raw
Replies: 8
Views: 856

Re: cannot read recipe subgroup from data.raw


for example, if the original recipe had the "circuit-network" subgroup, i want the copied recipe to have the subgroup "circuit-network-rcomb". all of the rcomb recipes are going to sit in their own tab.

If you really want to create a new tab (next to the vanilla tabs "Logistics", "Production ...
by Pi-C
Sun Jun 08, 2025 2:09 pm
Forum: Modding help
Topic: How to delete a logistic group?
Replies: 2
Views: 299

Re: How to delete a logistic group?


Maybe set group to an empty string


That wouldn't work. Run the command from my first post, then enter the following:
/c requester.sections[1].group = ""
This will remove the group name from the section, but the group is still available in the "Change logistic group" GUI: vehicle_logistics ...
by Pi-C
Sat Jun 07, 2025 11:25 am
Forum: Modding help
Topic: How to delete a logistic group?
Replies: 2
Views: 299

How to delete a logistic group?

We can easily define logistic groups:

/c p = game.player
pos = p.position
v = p.surface.create_entity{name = "car", force = p.force, position = {pos.x + 5, pos.y}}
requester = v.get_logistic_point(defines.logistic_member_index.car_requester)
requester.sections[1].set_slot(1, {value = {type ...
by Pi-C
Wed Jun 04, 2025 8:06 am
Forum: Ideas and Suggestions
Topic: New mod dependency category to be downloaded by default
Replies: 9
Views: 945

Re: New mod dependency category to be downloaded by default


… So I want to heavily recommend it but not force players to keep it active. The workaround is to make it optional and check by script if it's installed and display a message if not. That's... ugly.

I'm in the same boat with my mods Autodrive and GCKI (both not yet updated for Factorio 2.0 ...
by Pi-C
Sat May 17, 2025 11:13 am
Forum: Not a bug
Topic: [2.0.50] "same-force" flag in SelectionModeData mode does not work
Replies: 2
Views: 253

Re: [2.0.50] "same-force" flag in SelectionModeData mode does not work

It seems you need to specify more than just "same-force" (either in flags or in entity_filters/entity_type_filters). I've added "any-entity" to flags:
Screenshot at 2025-05-17 13-06-32.png

I've started the game and built the stone-furnace. Then, I used /c p = game.player; p.force = "neutral" and ...
by Pi-C
Fri May 16, 2025 2:40 pm
Forum: Modding interface requests
Topic: [2.x] Rich Text img=class.name to support quality flag
Replies: 4
Views: 716

Re: [2.x] Rich Text img=class.name to support quality flag

I really could need this for rendering Shortwave radio channel names on vehicles in Autodrive ! Since the channel names can be comprised of comma-separated signal strings (each as "name.quality.count"), rendering the text directly is impractical (too long, not localized, not human-friendly ...
by Pi-C
Sun Apr 13, 2025 11:23 pm
Forum: Mod portal Discussion
Topic: Request for new tag/category
Replies: 6
Views: 1572

Re: Request for new tag/category

vinzenz wrote: Fri Apr 11, 2025 1:04 pm Added "Planet" and "Character" tags
Thanks a lot for these additions! :-)
by Pi-C
Mon Jan 27, 2025 10:14 am
Forum: Modding help
Topic: "Noob" prototype "type checking" question
Replies: 13
Views: 1183

Re: "Noob" prototype "type checking" question

You can define new prototypes in the data stage. They must be based on an existing type/class of things, where each type/class has certain properties that you can use (see here for a list of all prototype types).

There may be different prototypes of each prototype type/class. So the easiest way to ...
by Pi-C
Fri Dec 20, 2024 4:39 pm
Forum: Technical Help
Topic: No mods loaded. I
Replies: 2
Views: 305

Re: No mods loaded. I

Looks like this
by Pi-C
Thu Dec 19, 2024 3:38 pm
Forum: Modding help
Topic: Is it possible to get two resources when mining one?
Replies: 10
Views: 1047

Re: Is it possible to get two resources when mining one?


It seems there is no solution. When I wrote the following directly in the game file
__base___/prototypes/entity/resources.lua:

minable =
{
…,
results = {"uranium-ore", "stone"},
…,
},

I got an error:

Failed to load mods: Error while loading entity prototype "uranium-ore" (resource ...
by Pi-C
Thu Dec 19, 2024 8:28 am
Forum: Modding help
Topic: How to access inventory of a disconnected/editor player?
Replies: 3
Views: 535

Re: How to access inventory of a disconnected/editor player?

Data wrote: Thu Dec 19, 2024 7:05 am How to access inventory of a disconnected/in editor mode player character in any given situation?
I'd say you can't, you have to work around it. The events on_pre_player_left_game/on_player_joined_game and on_pre_player_toggled_map_editor are your friends …
by Pi-C
Wed Dec 18, 2024 8:26 am
Forum: Modding help
Topic: Is it possible to get two resources when mining one?
Replies: 10
Views: 1047

Re: Is it possible to get two resources when mining one?


I made a couple of edits:
table.insert(data.raw.resource["iron-ore"].minable.results, {type = "item", name = "stone", amount = 1})

But as a result, only the content of the error changed:

Failed to load mods: __My_add_pack_updated__/data-updates.lua:52: bad argument #1 of 3 to 'insert' (table ...
by Pi-C
Fri Dec 06, 2024 5:43 pm
Forum: Modding help
Topic: Detecting if player is standing on rails
Replies: 3
Views: 364

Re: Detecting if player is standing on rails


… I was wondering if there was a way to detect if the player was standing on top of rails. …



Idea2:
Check with surface filter around the player location every tick, but might be a bit resource intensive.


If you really only want to react to players standing on top of rails, it would be ...
by Pi-C
Tue Dec 03, 2024 12:13 am
Forum: Not a bug
Topic: Clicked GUIs are not brought to front
Replies: 2
Views: 353

Re: Clicked GUIs are not brought to front


Can you post a save file and steps to reproduce the issue as you're seeing it?


I started a new game without mods. Used SHIFT+CTRL+E to open the prototype browser, then clicked on the first visible link (which was to the prototype of the first custom-input, crash-site-skipped-cutscene; any other ...
by Pi-C
Sun Dec 01, 2024 2:38 pm
Forum: Modding help
Topic: [Fixed][Not an Issue][User Error] Updating
Replies: 4
Views: 511

Re: [2.0] Updating




Hi! When I try to add new features to my mod, nothing happens. I removed some logging and the logging still happens when I load the game up.




The save file was started with a zipped copy of the mod - but I removed that when I started developing. Yes, I restarted the game.

If you've ...
by Pi-C
Sun Dec 01, 2024 6:16 am
Forum: Modding help
Topic: [Fixed][Not an Issue][User Error] Updating
Replies: 4
Views: 511

Re: [2.0] Updating


Hi! When I try to add new features to my mod, nothing happens. I removed some logging and the logging still happens when I load the game up. I am using the correct version of the mod, I checked myself. The only thing that's different since I was last able to add mod features is that I installed ...

Go to advanced search