Add force: all or similar to give-item modifier

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Berserker55
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sat Jan 31, 2015 7:36 am
Contact:

Add force: all or similar to give-item modifier

Post by Berserker55 »

The https://wiki.factorio.com/Types/GiveIte ... rPrototype can award items upon tech completion. It appears if you want that item to be awarded to each player you have to set up an on completion handler. It would be nice if there was an additional field to tell it to award the items to the whole force and show this in the tech tooltip.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13177
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Add force: all or similar to give-item modifier

Post by Rseding91 »

The give-item modifier does give to all players already.
If you want to get ahold of me I'm almost always on Discord.

Berserker55
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sat Jan 31, 2015 7:36 am
Contact:

Re: Add force: all or similar to give-item modifier

Post by Berserker55 »

Then there seems to be a bug with that, as I had players complain it would only give to one player chosen seemingly at random, but consistently the same. I then implemented a on event handler and players became happy about the problem fixed.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13177
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Add force: all or similar to give-item modifier

Post by Rseding91 »

Ah, my mistake. Looking over it again it will only give to all players if the amount is set to maximum (as in fill the inventory). A weird setup.
If you want to get ahold of me I'm almost always on Discord.

Berserker55
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sat Jan 31, 2015 7:36 am
Contact:

Re: Add force: all or similar to give-item modifier

Post by Berserker55 »

That ... is a bit odd, yeah. I like that it overflows into the rest of the team, but I think it should be documented better how it works then and the give to all as an option would still be neat. Right now, while my solution works, I lose the tooltip thing that tells the player they'll get X of Y items.

Post Reply

Return to “Modding interface requests”