From 23ae10b0705c5667857f52cf3b6222ae8f8c2401 Mon Sep 17 00:00:00 2001 From: Phil Bajsicki Date: Fri, 25 Aug 2023 16:16:46 +0200 Subject: [PATCH] Added a new idea for the process (bottom of file). --- README.org | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.org b/README.org index fed40f8..a324f48 100644 --- a/README.org +++ b/README.org @@ -427,3 +427,27 @@ close $out or die "$out: $!"; #+end_src #+RESULTS: + +* New Idea (parsing lua files directly): +https://wiki.factorio.com/Console#Access_a_mod's_data + +- It may be possible to access lua directly and pull data from there. +- It may be more effective and accurate than pulling data from an exported CSV. +- Further investigation needed. +- *The key problem:* it would be very challenging for a human/ person to make modifications to this export as-is. It's then necessary to create another layer of processing to make the output human-readable. +- ON the other hand, we don't yet have a system for importing recipes, items, and tech levels from a csv into Factorio mods... +- That may be something to explore to better define the constraints on this project. + + E.g. If it were possible to build the Lua files programmatically from user-created CSVs... Factorio modding would become significantly more accessible and easy for a ton of people. Of course, this would not be as powerful as diving into the code, however... I do see potential here with regards to large overhaul mods. + + Imagine: + 1. Export factorio base to csv. + 2. Change csv however you like, adding items, changing values, adding recipes, technologies, etc. + 3. Run a script which compiles your csv into a mod + 4. Have your mod running. + + There are several issues which bear addressing: + 1. Icons - in the case of a lack of icons, the script should default to something, so the GUI isn't broken. + 2. The script would have to dynamically generate a lot of lua code, or at least wrap the contents of the CSV in lua code. This may create licensing issues? Maybe? + 3. The item descriptions could be generated (partially) automatically, but they would still require someone to write large parts of them. + 4. Localization; it may be possible to also do with the script (eg hooking into google translate, deepl or sth), at least for the item names.