factorio-draftsman icon indicating copy to clipboard operation
factorio-draftsman copied to clipboard

Framework for version differences as the expansion draws near

Open redruin1 opened this issue 8 months ago • 6 comments

With the advent of the Factorio DLC expansion coming out later next year, there is highly likely to be a difference in blueprint string format for Factorio version 2.0, as well as for versions of the game with and without the expansion. Just based on the current few FFFs that they've released, a number of obvious changes from Factorio 1.x are already present:

  • New entities, items, recipes of all types
  • Quality items: how will blueprints request a legendary assembler? Will there be quality ranges for entities in blueprint strings?
  • Big electric pole range increased from 30 to 32
  • Blueprint ghosts can now be put on ghost tiles, presumably also including ghost concrete and similar
  • A rework of wire connections (perhaps in blueprint string format as well) and an increase in the number of power pole connections (at least 8, perhaps more or perhaps even configurable dependent on entity)
  • Red and Green circuit wires becoming abstract items instead of traditional recipes
  • Equipment ghosts (for spidertrons, and perhaps more)
  • New keys and parameters for rocket silos, likely with blueprint string counterparts

This exposes a more overall problem with Draftsman, in which Draftsman is only really designed to create/validate the latest version of Factorio's blueprint string... but this becomes difficult to maintain when there are now 2 latest versions. This issues a number of questions: how should Draftsman handle a blueprint string from with the expansion contents when loading in a configuration that doesn't have the expansion, and vice-versa? How even is Factorio itself going to remedy these distinctions between game versions? Is the factorio-data git repo going to handle having two similar but distinct versions of the game?

Ideally Draftsman should implement a versioning system that could create and validate valid blueprint strings for the detected Factorio version and configuration. Presumably, this also means that the user might want to be able to manually specify a version of Factorio to create blueprint strings for, which currently would require modifying the factorio-data submodule included with the module in order to probably work. Currently, this is only circumstantially possible (and not easily or straightforward to boot), and only true for versions of Factorio greater than 1.0; previous versions are not supported.

Doing this would not only allow for the expansion to be accepted seamlessly when it releases, but also opens up the possibility to read old blueprint strings from older versions of Factorio. This would probably be less prioritized than the expansion, but these could be worked on as desired as PRs from interested parties, provided a straightforward solution is already in place.

redruin1 avatar Oct 24 '23 02:10 redruin1