Page 1 of 1

Add force: all or similar to give-item modifier

Posted: Tue Apr 06, 2021 9:15 pm
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.

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

Posted: Thu Apr 08, 2021 1:57 am
by Rseding91
The give-item modifier does give to all players already.

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

Posted: Fri Apr 09, 2021 12:04 pm
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.

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

Posted: Fri Apr 09, 2021 3:22 pm
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.

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

Posted: Fri Apr 09, 2021 6:44 pm
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.