Page 1 of 1

Allow custom modifiers

Posted: Fri Apr 29, 2016 12:20 pm
by Galacticruler
Similar to inserter stack size bonuses and lab speed bonuses, it'd be quite helpful to be able to custom build modifiers to edit things not currently allowed by the vanilla game.


An example of this would be part of a mod I'm trying to develop a bit more. I was attempting to add a tech that increases the speed of belts, inserters, and assembling machines across the board for all mods and vanilla content when I ran into this seemingly hard-coded wall.

Re: Allow custom modifiers

Posted: Wed May 11, 2016 9:51 am
by bobingabout
I think the one I'd like to see more than any is.... larger inventory size.

Re: Allow custom modifiers

Posted: Thu May 12, 2016 1:35 am
by Rseding91
That's not how any of this works :)

In order for something like that to work we would need to implement it for every entity that supported it along with saving and loading of the bonuses for every thing added. It's not likely to happen anytime soon.

As for the inventory bonus: that's already in 0.13.

Re: Allow custom modifiers

Posted: Mon May 16, 2016 8:03 am
by bobingabout
Rseding91 wrote:In order for something like that to work we would need to implement it for every entity that supported it along with saving and loading of the bonuses for every thing added. It's not likely to happen anytime soon.
I actually try to tell people this sort of thing quite often.
There was a joke in the Red Alert 2 (and earlier C&C games in general) to use the tag "canmakestuffup = true", because, well, you were very limited to what you could change.

Anyway, with respect to doing this in factorio, I'm often greeted with "But you can do it in X!", well, factorio isn't X! Factorio is already very versatile with LUA scripting, and everything that is scripting has been accounted for via a game variable, or an event hook, to do more would require more hooks and variables, and dynamic "can make stuff up" hooks aren't here yet.

And even after describing that, they still don't understand why you can't do it.

/rant.
Rseding91 wrote:As for the inventory bonus: that's already in 0.13.
Squee~

Re: Allow custom modifiers

Posted: Mon May 16, 2016 12:01 pm
by ratchetfreak
sounds like a dupe of: viewtopic.php?f=25&t=25235

And I'll add the same comment here, the devs could copy the prototypes per force so entities will use the values of the prototype stored in its force and a researched tech will modify the force's prototype.

You won't have more than a handful forces active in a typical game anyway (and only 1 in vanilla)

Re: Allow custom modifiers

Posted: Mon May 16, 2016 3:30 pm
by bobingabout
ratchetfreak wrote:You won't have more than a handful forces active in a typical game anyway (and only 1 in vanilla)
Actually, 3. player, enemies and neutral.

Re: Allow custom modifiers

Posted: Mon May 16, 2016 8:20 pm
by ratchetfreak
bobingabout wrote:
ratchetfreak wrote:You won't have more than a handful forces active in a typical game anyway (and only 1 in vanilla)
Actually, 3. player, enemies and neutral.
But only 1 with research actually happening/actually being relevant

Re: Allow custom modifiers

Posted: Mon May 16, 2016 8:39 pm
by Rseding91
Prototypes are immutable runtime - everything Factorio works on relies on that being true.

Re: Allow custom modifiers

Posted: Mon May 16, 2016 10:45 pm
by ratchetfreak
Rseding91 wrote:Prototypes are immutable runtime - everything Factorio works on relies on that being true.
It shouldn't be that hard to make the prototypes of force-owned entities duplicated per force or at least the parts that aren't stuff like bounding boxes, graphics and such. Then getting the value to use will be entity->force->prototypes->requestedValue instead of global->prototypes->requestedValue