Page 1 of 1

Procedural mod generation

Posted: Wed Aug 12, 2015 4:51 am
by Adil
Actually two suggestions but lets not clutter the board:

1) Make 'icon' token behave like rest of graphical tokens, i.e. accept a table of layers instead of filename. The game seems to already use overlaying for generating bullet upgrade icons for example.

2) Provide function to write files inside mod's root directory. To a limited extent data can be generated with lua already. However, locale for that data can not.
Also, generation of new data entities based on the game progress might be handy as well.

Re: Procedural mod generation

Posted: Sun Sep 13, 2015 11:54 pm
by vzybilly
Adil wrote:Actually two suggestions but lets not clutter the board:

1) Make 'icon' token behave like rest of graphical tokens, i.e. accept a table of layers instead of filename. The game seems to already use overlaying for generating bullet upgrade icons for example.

2) Provide function to write files inside mod's root directory. To a limited extent data can be generated with lua already. However, locale for that data can not.
Also, generation of new data entities based on the game progress might be handy as well.
The second one I love.

I have afew mods that pass in one item with the list of changes per level and outcome 20 entities, items, techs, and recipes! (can be anything like 100), being able to dynamically make locale and images for entities/icons would be amazing because my locale file looks something like:

Code: Select all

level1: thing x1
level2: thing x2
...
level20: thing x20
80 lines or 4 strings with lua concatenation, which sounds better? but that's also only for 20 levels, the code is just one variable to make it 100 (400 lines for locale) or even 1000 (4K)... get's stupid quick but being able to gen the locale inside of lua would be pretty nice, even if I have to write to the locale file from lua, it would still be amazing help.

Re: Procedural mod generation

Posted: Sat Mar 12, 2022 1:49 am
by Rseding91
For 1: you can already define "icons" for layered icons: see how barreling does it.

For 2: this isn't likely to ever happen. It breaks determinism since running code A, saving, and loading would not be the same as just keeping running A. This determinism is a requirement for Factorios multiplayer logic to function.