geordanr / xwing

Squad builder for the First Edition X-Wing Miniatures game by Fantasy Flight Games.
http://geordanr.github.io/xwing
MIT License
97 stars 153 forks source link

Adjusting point costs in a fork for local rules? #485

Open Oilerx7 opened 7 years ago

Oilerx7 commented 7 years ago

Hi there! This is a truly spectacular piece of work. Our local group uses the squad builder for all our regular games, but often uses alternative points costing for some of the particularly powerful cards in casual games. I was hoping to try a fork where I might be able to play around with the point values of cards, but my ability to read code is pretty shabby. Is one of the files directly editable to adjust this kind of thing? Many thanks for your time! Peter

geordanr commented 7 years ago

You can find relevant card data in coffeescripts/cards-common.coffee; just update the points values.

Oilerx7 commented 7 years ago

Gotcha, thanks! With your permission, may I upload the project with recosted points to a new github page at oilerx7.github.io/xwing, with a big disclaimer at the top explaining that this was not my work, and where the original is and that you wrote it? With that said, I'm not confident I know how to set it uo on a new github page, do I just download the forked (and edited) project, and then reupload it to a new repository: Oilerx7/oilerx7.github.io? Again if I'm not going about this the right way please let me know!!! Thanks so much for your time, if any of this isn't appropriate, please let me know, general practice when it comes to code sharing I know very little about! Thanks! Peter

geordanr commented 7 years ago

No problem: forks are exactly what GitHub is for!

For the GitHub page, what I do is build the project (with grunt) which creates index.html and all the other associated CSS and JS assets, then run grunt gh_pages which copies those resulting assets into ../xwing_page. I then commit those into a separate gh-pages branch of the repo, which is what the GitHub page is configured to point to (originally there wasn't a choice -- it had to be called gh-pages but you can choose whatever branch, now: see the GitHub Pages docs for more).

Oilerx7 commented 6 years ago

Hey there! Okay, I'm still running into some trouble with this, I just kept running into errors but it turned out I wasn't installing grunt correctly. I have re-downloaded grunt as they ask on the website and installed it again. Nevertheless, I just get this error when trying to runt the command "grunt" in the bower folder. I installed grunt-cli and everything following the troubleshooting, and tried the following as well: "npm install grunt --save-dev npm install grunt-serve"

but all I get is this: ">> Local Npm module "grunt-cli" not found. Is it installed?

Local Npm module "grunt-saucelabs" not found. Is it installed? Local Npm module "grunt-contrib-connect" not found. Is it installed? Warning: Task "default" not found. Use --force to continue. Aborted due to warnings."

My apologies for what may be a trivial question, thanks for your time if you get the chance to help me out.

geordanr commented 6 years ago

You shouldn't be running grunt from the Bower folder; it's meant to be run from the repository root (where package.json resides). Did you run npm install from the repository root? There should be a node_modules folder that was created there after running npm install.

Oilerx7 commented 6 years ago

Ah ok. I've probably not set up the repository root correctly. I am strongly getting the feeling I'm in over my head, as a lot of these commands are things I just don't currently understand.

Okay, if I write out where things are and what I've done perhaps it will make sense where I've made the errors. The project title is xwing supremacy (the name of our mod).

I downloaded a clone of the repository to my computer using GitHub Desktop This sits in /Users/peterholmes/Documents/GitHub/xwingsupremacy I tried changing this to a folder on my desktop but I just an error saying denied, so I guess it's there? Not entirely confident this is the best place for it.

so I go to that folder and enter npm install and get npm WARN xwsuprem@1.0.0 No description npm WARN xwsuprem@1.0.0 No repository field. up to date in 0.529s then npm install -g grunt-cli then npm init then npm install grunt --save-dev

but no grunt file seems to be generated at any point. "A valid Gruntfile could not be found. Please see the getting started guide for more information on how to configure grunt: http://gruntjs.com/getting-started Fatal error: Unable to find Gruntfile."

The grunt website doesn't seem to have anything on where the grunt file is generated from, or if it does I'm currently unclear on how to do it. It also says I should commit the .json file, which I frankly have no idea how to do.

Am I totally lost? or just mostly lost? :D Thanks!

geordanr commented 6 years ago

npm install should have installed all the necessary dependencies, including grunt. (You still need grunt-cli to put grunt in your global path, though.)

You shouldn't need to do npm init as that's for initializing a new project that doesn't already have a package.json file. Depending on how you answered the prompts, you may have put the project into a bad state. Probably best to re-clone the repository from scratch and not run npm init.

You also don't need to run npm install grunt since that's already installed from npm install reading package.json.

Not being able to find a Gruntfile is strange, as Gruntfile.coffee definitely exists. I suggest re-cloning the repo, just running npm install, and then attaching the output of npm ls here. Maybe something weird is going on when installing dependencies.

Oilerx7 commented 6 years ago

okay, I recloned the repo, ran npm install

and then it went a little crazy: (sorry to post the whole error message here, I'll remove the center bit and replace it with the comment "removed for brevity", but keep a copy in case you want to have a look)

`npm WARN deprecated bower@1.7.9: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/ npm WARN deprecated bower@1.3.12: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/ npm WARN deprecated wrench@1.4.4: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years. npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.1.14: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130 npm WARN deprecated node-uuid@1.4.8: Use uuid module instead npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated tough-cookie@0.12.1: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130 npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm

node-sass@3.8.0 install /Users/peterholmes/Documents/GitHub/xwingsupremacy/node_modules/node-sass node scripts/install.js

Cannot download "https://github.com/sass/node-sass/releases/download/v3.8.0/darwin-x64-57_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g.

  export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

  npm config set proxy http://example.com:8080

phantomjs@1.9.20 install /Users/peterholmes/Documents/GitHub/xwingsupremacy/node_modules/phantomjs node install.js

PhantomJS not found on PATH Downloading https://github.com/Medium/phantomjs/releases/download/v1.9.19/phantomjs-1.9.8-macosx.zip

[removed for Brevity]

npm ERR! Failed at the node-sass@3.8.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /var/root/.npm/_logs/2017-11-29T21_13_30_896Z-debug.log`

geordanr commented 6 years ago

That's looking better.

Looks like node-sass is having trouble building, notably this error message:

xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.

You may have to install the appropriate Xcode tools/libraries to build stuff (I'm not really familiar with this, though).