-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Framework for version differences as the expansion draws near #108
Comments
In addition:
|
I have only used Draftsman to create vanilla game blueprints, but I would like the ability to create ones specific to the expansion pack, in addition to targeting the new base game. So as a consumer of Draftsman, I think the most Draftsman-like & Pythonic way of handling game data would be:
Having the usage of Draftsman require something like a So yes, I think versioning Draftsman's behavior is the way to go. |
Currently, Draftsman isn't versioned alongside Factorio; previous versions of Draftsman point to previous versions of Factorio, but going back to previous versions of Draftsman to work with game data from previous versions would sacrifice any modern improvements to the module which is undesirable. It would be nice to have the most modern, stable version of Draftsman be backwards compatible with previous versions of the game without having to downgrade Draftsman itself. For static game data, I think the best option moving forward is to add a argument to
... which would pull the commit with that tag from Wube's github and update the submodule inside Draftsman, and then update the configuration so that the data is reflected when you use the module. This requires write access to the Draftsman installation, but Draftsman already requires this when running The other half would be making Draftsman handle it's configuration much more flexibly than currently. For example, Linked belts and containers didn't exist prior to Factorio 1.0.20 or so; and since those items are expected to exist in Draftsman currently, setting Factorio to a version prior to that will cause Draftsman to error. (This particular issue has been fixed on 2.0, but I'm not quite done there yet.) A lot also rests on exactly how Wube themselves are going to handle the expansion, both internally in the game as well as with their external repositories, so the best we can really do right now is speculate in regards to that. I think I'll probably shoot for previous version compatibility first as a "warm up", hopefully before the expansion finally drops. |
Adding the I was about to ask for a way to check the current version of game data (ala Python's |
@tephyr In addition to querying >>> import draftsman
>>> draftsman.__version__
'1.1.0'
>>> draftsman.__version_info__
(1, 1, 0)
>>> draftsman.__factorio_version__
'1.1.88.0'
>>> draftsman.__factorio_version_info__
(1, 1, 88, 0) This value is updated with |
As of now,
In addition to all specific version tags, the command also reserves the phrase "latest", which will default to the latest tag available. Tested it against every version >= |
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 Factorio1.x
are already present: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.
The text was updated successfully, but these errors were encountered: