Quick Nav


Back To Top

Overview

FCompile is a simple utility designed to package Factorio mods into ZIP files suitable for release. This automation allows for saving large quantities of time when releasing new versions of many mods at once, especially when the development folder contains many files you do not wish to include in the public downloads (such as construction images or old copies of assets).

Function

FCompile will read through all appropriate mods in the target folder, and package all "mod-relevant" files into ZIPs, one for each mod. These ZIPs can then be uploaded directly to the Factorio mod portal. What mods are relevant, and where to find them, as well as what constitutes a "mod relevant" file, are defined in the settings (see below). There is also functionality for things like automatically populating the version and swapping in files in place of the ones found in the mod folder.

At this time, this is not a GUI program; it is launched via the standard jar-running method (java -jar [jarname].jar [args]) in command-line, and all settings are parsed from the settings.ini file.

Settings

mod_directory

Type: Single Value
Current Default Value:
C:/Users/Reika/AppData/Roaming/Factorio/mods
Where your Factorio mods are located.

target_author

Type: Single Value
Current Default Value:
Reika
The mod author whose mods you wish to compile. Almost always you.

api_key

Type: Single Value
Current Default Value:
c9e0537be1cb.e9d7f614eb82cee8d72a77045f1ba4fd
Upload API Key.

min_age

Type: Single Value
Current Default Value:
360
How old compiled files must be to count as out of date. Anything that exists and is less than this number of seconds old will not be recompiled.

ver_cache_lifetime

Type: Single Value
Current Default Value:
86400
How old the cached mod portal release data (ie what versions were released when) must be, in seconds, before it is replaced. Default = 86400s = 1d.

output_directory

Type: Single Value
Current Default Value:
E:/Compiled Factorio Mods
The output to which you want the compiled mods exported.

version_override

Type: Single Value
Current Default Value:
1.153.001
If this is not 'none', whatever version is supplied in the mod folder/info is ignored in favor of the override. Very useful if you do not want a constantly-changing folder name (for example, because of GitHub pathing). Ensure it is the standard 'A.B.C' format, but you can use the numbers to mean what you wish.

ignored_filetypes

Type: List
Current Default Value:
pdn,
psd,
zip,
rar,
bmp,
gif,
jpg,
jpeg,
aup,
aiff,
wav,
skp,
skb
File extenstions to ignore; basically anything you do not want packed into the mod download. Use 'none' for nothing; separate entries with ',', and do not include the leading period.

ignored_strings

Type: List
Current Default Value:
.git,
metadata
Anything containing any one of the following strings (anywhere in the path or name) is ignored. Use 'none' for nothing; separate entries with ','.

image_filter

Type: Single Value
Current Default Value:
graphics
Should images only be allowed conditionally, and if so, from what folder(s) (ie in-mod path must start with one of these)? Use 'none' for no filter; separate entries with ','.

sound_filter

Type: List
Current Default Value:
sounds,
sound
Should sounds only be allowed conditionally, and if so, from what folder(s) (ie in-mod path must start with one of these)? Use 'none' for no filter; separate entries with ','.

log_per_file

Type: Single Value
Current Default Value:
false
Whether to print a log message for every file parsed. Useful when debugging to see why a file is or is not being included in the final zip.

swap_ins

Type: Single Value
Current Default Value:
Oreverhaul|config.lua|E:/Java Workspaces/FactorioCompiler/Factorio Compiler/default_oreverhaul_config.lua
Which, if any, files to "swap in" in place of ones from the mod dir, and from where. Format: [ModName|FileToSwap|Replacement], with the file to swap using mod-relative path and the replacement using absolute. Use 'none' for no swaps; separate entries with ','.

Future Plans

I have desire to enable this tool to upload the compiled ZIPs to the mod portal, but I have no idea how to do the HTTP or authentication system to make that possible.

I also want to make the jar runnable "directly", ie via clicking on it in explorer, not requiring a command line call.

Source Code

The source code for FCompile can be found here:GitHub

License

FCompile is released under a personal-use visible-source license. It may be used for the intended or similar purposes, for personal use (including creation/maintenance of your own projects). It may not be used for commercial purposes or paid software. Unless given explicit written permission, it cannot be redistributed, nor can it be adapted or packaged into a larger product. Derivative works of FCompile can be produced, but only for your own personal use; these works or modified versions may never be shared with others.


Downloads

Via Mediafire