Coder Social home page Coder Social logo

horus-heresy's Introduction

BSData Project

BattleScribeDataWeb is the web application that serves BattleScribe data files from the various data repositories on GitHub. It is a Java 8 web application designed to run on Google App Engine. It is built and deployed using Maven 3.5.

It consists of an Angular (JavaScript) front end and a RESTful (Jersey / JAX-RS) back end.

This guide is written from the perspective of a Netbeans IDE user running Windows, however you can use any IDE or toolset that supports Maven.

It is assumes that you have some experience with developing on Windows, or can translate the following to your operating system of choice. You should also have some knowledge of software development/programming using Java (or are willing to learn it!).

Contents

Before You Start

  1. Make sure you have a Google account.
  2. Make sure you have a GitHub account and are a member of the BSData organisation (https://github.com/BSData).
  3. Generate a GitHub security token to let the app access GitHub on your behalf.
    • Log in to GitHub and go to Settings -> Developer Settings -> Personal access tokens (https://github.com/settings/tokens).
    • Generate a new token with public_repo and read:org scopes. Take a note of the token.

Download and Install Everything

(Note: On Windows, references to "Google Cloud Shell" below means the "Google Cloud Shell" command line launched from the Start Menu.)

  1. Download and install the Java SE 8 JDK (http://www.oracle.com/technetwork/java/javase/downloads/index.html)
    • You may be able to use the Java 9 SDK - YMMV.
  2. Download and install the GitHub Desktop app (https://desktop.github.com/).
    • Check out the bsdata project. (https://github.com/BSData/bsdata).
    • The root folder you check out into (containing pom.xml) will be referred to as the project folder.
  3. Download and install the Google Cloud SDK (https://cloud.google.com/sdk).
  4. Initialise the Google Cloud SDK (https://cloud.google.com/sdk/docs/quickstarts).
    • You will be presented with a command line after installation, or you can run gcloud init from the Google Cloud Shell.
    • Log in with your Google account.
    • Choose to create a new project (or select a previously created project). This will will be your own App Engine development environment that you can deploy and test on. Make a note of the name.
    • You do not need to configure Compute Engine, it can be skipped.
    • Make sure your App Engine project is alive and well in Google Cloud Console (https://console.cloud.google.com).
  5. Install the Google Cloud Java Components (https://cloud.google.com/sdk/docs/managing-components).
    • From the Google Cloud Shell, run gcloud components install app-engine-java
    • To update the Google Cloud SDK to the latest version, run gcloud components update
  6. Download and install Netbeans Java EE bundle (https://netbeans.org/downloads/).
    • The current version of Netbeans is 8.2, and by default it does not include Maven 3.5. Future versions of Netbeans may change this.
  7. Download and unzip Maven 3.5 (https://maven.apache.org/download.cgi).

Set up the Project in Netbeans

  1. Launch Netbeans
    • Pro tip: If you prefer a dark colour scheme, go to Tools -> Plugins and install "Darcula LAF for Netbeans"
  2. Set Netbeans to use Maven 3.5
    • Go to Tools -> Options, Select the Java section then the Maven tab.
    • Set Maven Home to the directory you unzipped Maven 3.5 into.
  3. Open the BattleScribeData project you checked out from GitHub.
  4. Create a file in the project directory called maven.properties
    • This file should not be checked in to GitHub (it's excluded via .gitignore). It contains Maven settings specific to individual developers.
    • Add the following line:
      appengine.dev.project.name=YOUR_APP_ENGINE_DEV_PROJECT_NAME
      
      (Use your App Engine development project name created when setting up the Cloud SDK above).
  5. Create a file in the <project directory>/src/main/resources/common/java/ directory called github-user.properties.
    • This file should not be checked in to GitHub (it's excluded via .gitignore). It contains GitHub authentication settings that should not be public. If your GitHub authentication token is checked in to GitHub, it will be invalidated and you will need to generate a new one.
    • Add the following lines:
      ## GitHub User ##
      github.anon.username=GITHUB_USER_NAME
      github.anon.token=GITHUB_AUTHENTICATION_TOKEN
      [email protected]
      
      (Use your own GitHub username and token).
  6. Build the project
    • Select the local Maven profile from the "Project Configuration" dropdown at the top.
    • Right-click the project and select "Clean and Build".
    • Wait for Maven to download required dependencies (jar libraries) and build the project.
  7. Run the project locally (appengine:run Maven goal).
    • Select the local Maven profile.
    • Right-click the project -> Run Maven -> appengine:run.
    • Go to http://localhost:8080 to see the app.
    • (The local server is provided as part of the Cloud SDK)
  8. Debug the project locally (appengine:run Maven goal).
    • Select the local-debug Maven profile.
    • Right-click the project -> Run Maven -> appengine:run.
    • The local server will wait listening on port 5005 for the debugger to attach.
    • Go to Debug -> Attach debugger: Connector SocketAttach, Transport dt_socket, Host localhost, Port 5005.
    • Go to http://localhost:8080 to see the app.
  9. Deploy the project to your App Engine development environment (appengine:deploy Maven goal).

A Quick Tour

  • pom.xml in the project directory contains Maven configuration.
    • General app properties, such as name, version, Java version etc.
    • Build profiles which determine app configuration for specific environments.
      • local for running on the local server
      • local-debug for debugging on the local server
      • dev for deploying on your App Engine development environment
      • test and prod are for the main BSData test and live App Engine environments. You will not be able to use these unless authorised.
    • Dependencies - the specific versions of libraries required by the app.
      • Maven will handle downloading and providing the libraries when building and deploying the app.
  • /src/main/resources/ folder contains configuration files for each Maven profile, plus common properties files used by all profiles.
    • .../java/ files are general config used by the java app and are copied into the WEB-INF/classes/ folder upon build/deploy.
    • .../webapp/ files are used to configure the application server and are copied into the WEB-INF folder upon build/deploy.
  • /src/main/webapp/ folder contains the web front end
    • HTML and CSS
    • .../app/ folder contains the Angular Javascript app
  • /src/main/java/ folder contains the back end Java app.
    • rest package contains RESTful web services (https://jersey.github.io/documentation/2.26/jaxrs-resources.html).
      • BattleScribeDataRestConfig.java configures the app and performs startup tasks.
    • viewmodel package contains model classes that are used to pass data between the web services and the Angular front end.
      • These objects are converted to/from JSON to be sent/recieved in web requests/responses.
      • These objects are used by the BattleScribe app and should not be changed without proper planning. Changes could cause problems with BattleScribe reading repository information.
    • model package contains model classes for BattleScribe XML data files and indexes (http://simple.sourceforge.net/download/stream/doc/tutorial/tutorial.php).
    • dao package contains "Data Access Object" classes used used to read/write to data sources.
      • GitHubDao.java is used for communicating with GitHub.
    • repository package contains classes for creating BattleScribe repository indexes (.bsi) files.

horus-heresy's People

Contributors

alphalas avatar amis92 avatar anthonylerpiniere avatar arkangelmark5 avatar asterixcodix avatar austinitor avatar bsdata-bot avatar davidmunoznovoa avatar donmorr avatar drtobogganmd avatar eanlombardo avatar figjam-bohica avatar kabuumu avatar mad-spy avatar martijndoornik avatar mayegelt avatar medonoop avatar mjfreese avatar mraubo avatar nstephenh avatar otterlyolive avatar reilly-cuauhtemoc-8178 avatar revivedtitan avatar sandy756x avatar shadowcore67 avatar stvnksslr avatar the4d6 avatar toreador13 avatar ursinepatriarch avatar zopha avatar

Stargazers

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

Watchers

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

horus-heresy's Issues

BattleScribe 30k army list problem..

Hi, I've noticed when creating a 30k army list on BattleScribePro that the Tactical Support Squad sergeant has an option reading 'May choose one of the follwing instead of their flamer' - However even if I change the entire squads weapons to say, plasmaguns, or any other special weapon, the sergeants entey still says 'flamer'..
Should that not change with the squads weapons, seeing as how all members of the support squads, including the sergeants, all carry the same special weapons..
Maybe it might be worth changing the line to read 'May choose any of the following in place of special weapon' ??

[Join Request]

Hello, I saw this on the Bolter and Chainsword and would like to contribute. I'm a professional tester, amateur Battlescribe fiddler and Github virgin.

Command Squads available to all Master of the Legion

Whoops. Missed that they are available to any Master of the Legion. Will have to re-work how Command squads are made, since there are several links to the Praetor's options there. Might just have to allow illegal combos, or maybe make a link for OTHERS and just not the Praetors...

Tactical Support Sergeant Upgrades

I'm not sure if this is an issue with your datafile or if the upgrade options have changed from Betrayal to the Crusade Army List:

For the Tactical Support Squad entry, you have one of the upgrades listed as

  • Trade for Bolter and Augury Scanner

However, the sergeant's upgrade options in Betrayal are as follows:

The squad's Sergeant may take any of the following:

  • Bolter ................................................................................................ +X points
  • Combi-weapon ............................................................................... +X points
  • Melta-bombs .................................................................................... + X points
  • Augury scanner ................................................................................ +X points

The squad's Sergeant may exchange their bolt pistol for:

  • Plasma pistol .................................................................................... +X points

The squad's Sergeant may exchange their combat blade/chainsword
for one of the following:

  • Po\ver weapon ................................................................................. +X points
  • Po\verfist .......................................................................................... +X points
  • Single lightning claw .................................................................... +X points

The squad's Sergeant may upgrade to artificer armour ......... +X points

Hiding not working entirely...

Recurring, reproducible bug. Roster editor spits back "You can have at most 0x ____" with the condition "hide" on the next line, even when the option is visible. This seems to exist primarily when the condition is based on an entry that is embedded more than one entry down.

Examples in my catalogues:

  • Command squads for Legion Praetor. Shows up correctly but kicks error
  • All of Alpha Legion's "The Rewards of Treason" but this may be because I'm forcing them to be shown despite having an active hide modifier
  • Attempted in Taghmata Omnissiah with Magos Prime but removed it due to this bug, can reproduce if necessary.

@Jonskichov is there a way around this - maybe I'm using this wrong?

[Anon] Bug report: The Horus Heresy.gstz

Hello,

Looks like something that might off been missed. The new update works great. But It seems that when taking a Diabolist it no longer unlocks the Dark Channelling upgrade for units but Kor Phaeron and Erebus still do.

Apart from that one thing I havn't seen any major errors yet and everything has been working fantastic keep up the great work!!!

Michael.

Hiding broken

@Jonskichov I'm making an actual issue so hopefully others can comment as well.

It seems that the latest version (1.14.03b) of Battlescribe actually broke Hiding, at least how I'm using it. Here's the details:

Legion selection and Rites of War allow for units or dedicated transports to be changed rather drastically. These are selected either through an Entry or through a Shared Entry Group which has links to several Shared Entries (the actual choices).

Previously, many other entries (units, dedicated transports, even legion-specific wargear) pointed to these Entries or Shared Entries to un-hide them and make them accessible to the user. Now, selecting these Entries or Shared Entries does not correctly activate the "Hide if there are 0 selections of ____ in the roster" condition. Instead they are always hidden, it seems.

As you can imagine, this is a rather catalogue-breaking incident in this case. Just wanted to make you aware. :)

Thanks!

Jordan

Fix Raven's Talons

They are dorked. I tried to make them an upgrade from Lightning claws, as is listed in HH:LAICL. However this is an ugly solution as it forces the user to face "add Lightning Claw" as opposed to having an incrementing selection like every other weapon. Neither is ideal but creating a separate entry (with reflected point cost) will look less ugly in the end, I believe.

I'm actually wavering on this. For instances where a single claw or single "pair of claws" is available, the upgrade is much cleaner. The real problem is when you are able to take multiple single or pairs of claws, then have to select each individual single/pair of claws and upgrade it. Not only is that a pain but you can't up/down them like normal. Ugh conundrum!

salamanders pyrocasts

im hoping its just something minor
when i select the salamanders ROW i dont seem to see the pyrocasts being added to the troops entry

Tactical Support Squad

Good day.
TSS sergeant can have following options:
Exchange flamer for ccw or bolter and augury scanner.
Maybe I've misunderstood that, but to my mind it means that sergeant can take ccw and augury scanner and then change it to pw or pf.
If i'm wrong than sorry. :)
Keep great work.

Sorry, asked about that, I'm wrong!

Question on Crusade Army catalogue structure

I've watched the tutorial video and I'm ready to start adding to the catalogue. I just can't work out why certain units (eg. drop pods, Justaerin terminators and rampagers) are shared entries and others are not.

[Anon] Bug report: (HH) Legiones Astartes - Crusade Army List.catz

When selecting Imperial Fist Phalanx Warder Squads it doesn't count the Squad Sergeant as a model for the purposes of "every 5 models may purchase one of the following" not sure how to fix this but I'm sure it's a minor error but is causing my rosters to be invalid.

Imperial Fist Templar brethren don't have the upgrade option for two models to be able to purchase Plasma Pistols either. I'm sure this was simply overlooked :).

Hope these small bugs can be fixed soon and keep up the amazing work!

Issue with Centurions & Praetors

Not sure if it's just me being stupid - I can't seem to find the option to equip Centurions and Praetors with Terminator Armour.

Also, is it possible to add an option to replace the Centurion's chainsword or combat blade with a Force weapon for 0pts, just so that it displays with all his equipment options?

Tyrant Siege Termies

No sergeant shown in middle column in desktop version, you pay 295 points and it shows 4xTermies (200 points).

Forge Lord

Every consul can switch his PA for artificier armor.
Forge Lord cannot (that's correct, he uses AA by default), but only PA shown in summary.

Bug report: "directory could not be created"

Added the .bsi to data manager & tried downloading, but it gave me this error message:

Errors occurred updating data files from repositories
> http://battlescribedata.appspot.com/repos/horus-heresy/index.bsi: Error updating from repository http://battlescribedata.appspot.com/repos/horus-heresy/index.bsi: BattleScribe failed to download and import one or more data files from the repository.
> model.dataindex.DataIndexEntry@1f4b610: Directory '~\BattleScribe\data\Warhammer 30,000: The Horus Heresy' could not be created
> http://battlescribedata.appspot.com/repos/horus-heresy/(HH)%20Legiones%20Astartes%20-%20Crusade%20Army%20List.catz: Game system not found for catalogue (HH) Legiones Astartes - Crusade Army List.catz
> http://battlescribedata.appspot.com/repos/horus-heresy/(HH)%20Mechanicum%20-%20Ordo%20Reductor.catz: Game system not found for catalogue (HH) Mechanicum - Ordo Reductor.catz
> http://battlescribedata.appspot.com/repos/horus-heresy/(HH)%20Mechanicum%20-%20Legio%20Cybernetica.catz: Game system not found for catalogue (HH) Mechanicum - Legio Cybernetica.catz
at gui.common.UpdateDataFilesDialog$1.a(Unknown Source)
at gui.common.UpdateDataFilesDialog$1.doInBackground(Unknown Source)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I'm guessing it doesn't like having the ":" in the name of the folder it's trying to create?

Anonymous User Issues

Hey @amis92 or @Jonskichov,

How are anonymous people able to submit issues? I thought it was given but some people are asking. Is there a setting that for the repository that needs to be adjusted?

Thanks!

Shared Entry link errors (hidden)

Hey, this is just here to keep track of ongoing issues affecting the catalogue.

It seems that any Shared Entry that is selected via link kicks back the following error: Legiones Astartes: Crusade Army List (Age of Darkness) cannot have any selections of ________ (hidden). I'm not sure why, this only seems to have popped up recently.

Currently this only seems to affect links to Shared Entries which typically have a "hide" condition of some type.

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.