Coder Social home page Coder Social logo

mattantonelli / ffxiv-triple-triad Goto Github PK

View Code? Open in Web Editor NEW
19.0 3.0 3.0 13.73 MB

Card collection tracker and deck builder for Final Fantasy XIV's Triple Triad

Home Page: https://triad.raelys.com/

License: MIT License

Ruby 69.04% JavaScript 0.52% HTML 22.07% CoffeeScript 4.52% SCSS 3.86%
final-fantasy-xiv ffxiv triple-triad ruby-on-rails ruby rails

ffxiv-triple-triad's Introduction

Another Triple Triad Tracker

This is yet another application for tracking your Final Fantasy XIV Triple Triad card collection written in Ruby on Rails and powered by Saint Coinach. This application strives to be as autonomous as possible by pulling its card and NPC data from the game files via Saint Coinach. This ensures that manual data entry is only required for data not available on the client side, such as instance drop locations. Even if the card source is unknown, the cards themselves will still be created and the source can easily be updated later when it becomes known.

Notice

The functionality of this application has been migrated to ffxiv-collect.

API

All of this application's data is made available through a RESTful JSON API. See the documentation for details.

Dependencies

  • Ruby (3.1)
  • Rails (6.1)
  • MySQL
  • Redis

Installation

Clone and initialize the repository

git clone https://github.com/mattantonelli/ffxiv-triple-triad
cd ffxiv-triple-triad
bundle install
bundle exec rake app:update:bin

Set up the database

Create the MySQL databases triad_development and triad_test as well as a database user with access to them

Create the necessary 3rd party applications

  1. Create a new Discord app for user authentication. Take note of the client ID and secret.
    1. Set the redirect URI on the OAuth2 page of your app: http://localhost:3000/users/auth/discord/callback
  2. Configure the credentials file to match the format below using your data.
rm config/credentials.yml.enc
rails credentials:edit
mysql:
  development:
    username: username
    password: password
discord:
  client_id: 123456789
  client_secret: abc123

Extract the images

Extract card images from the game data by following the instructions in the data repository.

Load the database

bundle exec rake db:schema:load
bundle exec rake data:initialize

Schedule jobs

Run whenever to schedule the application's cronjobs.

bundle exec whenever -s 'environment=INSERT_ENV_HERE' --update-crontab

Please note that if you did not install your Ruby using rbenv, you will need to change the bundle command located in config/schedule.rb

Start the server

rails server

Updating

When new cards & NPCs become available on patch day, they can be loaded into the database by running the data:update rake task.

bundle exec rake data:update
bundle exec rake assets:precompile
# Restart the application
bundle exec rails console
[Card, NPC].each { |model| puts "#{model}: #{model.where('created_at > ?', Date.current.beginning_of_day).update_all(patch: 'CURRENT PATCH')}" }
exit

This data is available once the data repository has been updated with the latest patch data.

More action may be required in the event of complex game updates (e.g. new card types, packs, etc.) Patch data must be populated manually.

Images

Images are no longer provided by the data repository and must be extracted from the game data. Click here for details.


FINAL FANTASY is a registered trademark of Square Enix Holdings Co., Ltd.

FINAL FANTASY XIV © SQUARE ENIX CO., LTD.

ffxiv-triple-triad's People

Contributors

akurosia avatar mattantonelli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ffxiv-triple-triad's Issues

The button "select your cards" is misplaced (?)

Hi,

Thank you for making such a wonderful tool!

I use Safari 14.1.2 on macOs BigSur (11.5.1) and I see that instead of being in a flex class the form is positioned outside of it. I'd suggest the form and the button are either on the same line, or they aligned left (flex-start)

How it is now:

Screenshot 2021-08-02 at 10 33 08

How I think it's supposed to be

Screenshot 2021-08-02 at 10 32 43

If you need help with styling - let me know!

Automatically mark an NPC as defeated if a player collects a card uniquely available from them

This is particularly useful for people like myself, who have not been tracking NPCs defeated along the way, or started using the site after amassing a decent collection of cards.

There are many NPCs who I implicitly must have defeated - as I have cards that only they drop - But it falls on me to manually cross-reference that (or not bother, and just find them in-world to check completion).

Owned cards not showing on the 'packs' page

I remember in the past when I used the website, and can also see references to this in the code, that the 'packs' page would show which cards in a pack you already own, which is a really great feature.

However, I'm currently no longer able to see this on the page, despite being logged in and having filled in my collection. I have tried logging in again and visiting the site from another machine. It is working on the 'my cards' page, where cards I own are greyed out. But on the 'packs' page, this isn't happening for any entries, despite for example owning every card from the Bronze Triad Card pack.

MySQL error when self hosting

I tried to selfhost your repo.
I started the program with "bundle exec rackup" and after accessing the site via localhost:9292 i am greeted with following error message (see attached image file).
Did i missed some steps (could you maybe provide a small guide?)
Kind regards
chrome_flgxopl4v8

Select Cards page doesn't split for Page 12

In the app, the "Select Cards" feature only shows 11 pages, whereas the game client shows 12 pages.

I've only given it a cursory look, but it seems like it has to do with cards arrays being sliced here, which is something I'd be happy to submit a PR for, but I wanted to check in before starting work, partially because I'm not entirely sure about the "hide missing cards" bit's purpose.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.