Go to file
Zequez 8492aa41ff Added parallel tests support. 2015-08-06 16:54:50 -03:00
app Remove jQuery CDN so it doesn't fail test while offline 2015-08-06 16:40:05 -03:00
bin Windows compatibility fix 2015-01-15 20:49:32 -03:00
config Added parallel tests support. 2015-08-06 16:54:50 -03:00
db I think I messed up a migration at some point; Doesn't matter, all test OK 2015-08-06 09:46:09 -03:00
design Windows compatibility fix 2015-01-15 20:49:32 -03:00
lib 🐛 Preload the authors_mod on AuthorsUsersSeparatorUpdater 2015-08-06 12:12:39 -03:00
log Windows compatibility fix 2015-01-15 20:49:32 -03:00
public Major cleanup. Moved many texts to I18n. Added the most basic user page. 2015-07-16 22:41:04 -03:00
spec Added parallel tests support. 2015-08-06 16:54:50 -03:00
vendor/assets Windows compatibility fix 2015-01-15 20:49:32 -03:00
.env.example Added host to production so it can properly build the mod URL when encoding 2015-07-28 13:33:22 -03:00
.gitignore Add rake task to import prod DB from Heroku 2015-08-06 09:18:04 -03:00
.rspec Require rails_helper by default on specs 2015-08-01 07:34:51 -03:00
.slugignore Added spec to .slugignore 2015-07-20 12:33:29 -03:00
.travis.yml Switch to PhantomJS from Selenium 2015-07-22 21:56:20 -05:00
Gemfile Added parallel tests support. 2015-08-06 16:54:50 -03:00
Gemfile.lock Added parallel tests support. 2015-08-06 16:54:50 -03:00
Guardfile ForumValidation controller and views 2015-08-04 11:21:22 -03:00
LICENSE.txt I think I finally decided for a licence, it's CPAL, the same licence as Reddit 2015-07-16 02:23:37 -03:00
README.md Fix README 2015-08-01 07:57:55 -03:00
Rakefile Add rake task to import prod DB from Heroku 2015-08-06 09:18:04 -03:00
cassette_explorer.rb Create little utility to mount a web server with the VCR cassettes 2015-08-01 19:41:24 -03:00
config.ru Windows compatibility fix 2015-01-15 20:49:32 -03:00

README.md

Factorio Mods Build Status

FactorioMods.com it's an open source web app to host Factorio Mods, and make it easier for user and devs alike to share, find, download, and manage mods.

Trello board with tasks being worked, ideas, planning and stuff. For bug report use the Github issues.

Is FactorioMods a mod manager?

No, FactorioMods it's not a mod manager, after you download the mods, you have to install them yourself. However there is another open source app, FactorioModManager that allows you to do just that, and here is the forum post with instructions of how to use it.

Since these are both open source apps, it's just a matter of time until we can coordinate to use a common protocol to install mods in the same way that NexusModManager does it.

API to get mods

The API and the API documentation are a WIP, but some features are already working and some basic docs are already here:

The API lives in api.factoriomods.com, going there you can see list of available URLs (authors and users APIs not working yet)

You can get a list of mods by calling /mods or by calling /mods/{mod}. The first one returns an array, and the later, a single object. Or /mods?names=mod-name,mod-name2,another-mod

The structure of the mods given by the API is the following:

{
    "title": "Example Mod!",
    "name": "example-mod", // This is the name on the info.json file
    "url": "http://www.factoriomods.com/mods/example-mod",
    "description": "The summary of what the mod does.",
    "homepage": "", // Official site
    "contact": "", // Authors contact information
    "authors": ["That guy", "That other guy"], // List of authors
    "categories": ["logistics-network", "map", "player"]
    "releases": [{
        "version": "0.1.2",
        "released_at": "2015-07-22T00:00:00.000Z",
        "game_versions": ["0.11.x", "0.12.x"], // This list of versions the mod works with. But it's actually a range, not a list
        "dependencies": [], // This should be the dependencies listed on info.json but it's empty for now
        "files": [{
            "name": "",
            "url": "http://www.factorioforums.com/forum/download/file.php?id=4726",
            "mirror": "http://s3.amazonaws.com/factoriomods/mod_files/attachments/000/000/222/original/example-mod.zip?1437683360"
        }]
    }, {
        "version": "0.1.1",
        "released_at": "2015-07-15T00:00:00.000Z",
        "game_versions": ["0.11.x"],
        "dependencies": [],
        "files": [{
            "name": "",
            "url": "http://www.factorioforums.com/forum/download/file.php?id=4484",
            "mirror": "http://s3.amazonaws.com/factoriomods/mod_files/attachments/000/000/206/original/example-mod.zip?1437014505"
        }]
    }]
}

Yes, the main URL is an external hotlink, bandwidth costs money, I'm cheap and poor. It that link it's broken you can use the mirror hosted on the project S3 bucket.

factoriomods:// protocol

The URIs look like the following:

factoriomods://eyJ0aXRsZSI6IkN1cnNlZCBVbmRlcmdyb3VuZCBUcmFuc3BvcnQiLCJuYW1lIjoiIiwidXJsIjoiaHR0cDovL3d3dy5mYWN0b3Jpb21vZHMuY29tL21vZHMvY3Vyc2VkLXVuZGVyZ3JvdW5kLXRyYW5zcG9ydCIsImRlc2NyaXB0aW9uIjoiTm8gb25lIGxpa2VzIGEgdHJhaW4gY3Jhc2hpbmcgeW91LCBubyBvbmUgZGl2aWRlIHRoZSBmYWN0b3J5IGp1c3QgZm9yIGEgdHJhaW4sIHdpdGggdGhpcyBtb2QgeW91IGNhbiBwdXQgdGhlIHRyYWluIHVuZGVyIHRoZSBmYWN0b3J5ISA6RCIsImhvbWVwYWdlIjoiIiwiY29udGFjdCI6IiIsImF1dGhvcnMiOlsiTDA3NzEiXSwicmVsZWFzZXMiOlt7InZlcnNpb24iOiIwLjAuMyIsInJlbGVhc2VkX2F0IjoiMjAxNS0wNy0yN1QwMDowMDowMC4wMDBaIiwiZ2FtZV92ZXJzaW9ucyI6WyIwLjEyLngiXSwiZGVwZW5kZW5jaWVzIjpbXSwiZmlsZXMiOlt7Im5hbWUiOiIiLCJ1cmwiOiJodHRwczovL2dpdGh1Yi5jb20vTDA3NzEvQ3Vyc2VkLVVHL3JlbGVhc2VzL2Rvd25sb2FkL3YwLjAuMy9DdXJzZWQtVUdfMC4wLjMuemlwIiwibWlycm9yIjoiIn1dfSx7InZlcnNpb24iOiIwLjAuMiIsInJlbGVhc2VkX2F0IjoiMjAxNS0wNi0xMFQwMDowMDowMC4wMDBaIiwiZ2FtZV92ZXJzaW9ucyI6WyIwLjExLngiXSwiZGVwZW5kZW5jaWVzIjpbXSwiZmlsZXMiOlt7Im5hbWUiOiIiLCJ1cmwiOiJodHRwczovL2dpdGh1Yi5jb20vTDA3NzEvQ3Vyc2VkLVVHL3JlbGVhc2VzL2Rvd25sb2FkL3YwLjAuMi9DdXJzZWQtVUdfMC4wLjIuemlwIiwibWlycm9yIjoiIn1dfV19

If it seems familiar, it's because it's a Base64 encoded JSON string, the same JSON string returned by the API /mods and /mods/{mod}. Just check whether it's an array or a single object, and install it.

One thing consider is that the user can click a link to install an specific version, and when he does, the same mod is encoded, but instead of a list of all versions in the #releases attribute, it has just the version the user wants to install.

If the user just clicks install, the version to be installed is to be selected by the mod manager.

How do I submit mods?

Just create an account on the site. After that you'll be able to go to /mods/new and create new mods.

If you already published a mod on the Factorio forums, there is high chance that the mod it's already on the DB. To claim the mod as your own and get management rights, after you register just send me a PM me on the forum and I'll transfer you the mod. I'm working on automating this step, but I want to ask for permission to create an automated bot for the forum first.

How to get it up and running locally

If you want to contribute you'll probably need to run it locally

git clone https://github.com/Zequez/FactorioMods
bundle

At this point you'll need to configure a Postgres server.

rake db:setup
rake fake_data

That might take a while, specially because rake fake_data actually scraps posts from the Factorio forum.

After that you just have to

rails s

And you're on! ...probably... didn't actually test it from scratch on a different computer, you might need to install some things, I'm sure you'll figure it out!

Running tests

bundle exec spring rspec # for one time
guard # for continuous development

And you can check if everything it's working on Travis.

Planned features

I just dump all the ideas on the project Trello board

Copyright / License

Copyright © Ezequiel Adrian Schwartzman. All Rights Reserved.

Licensed under the CPAL-1.0 (the same license that Reddit uses, seemed like a good license for open sourcing web apps).