This project has 2 parts. The first pulls all of the Item and Recipe info for Guild Wars 2 into a database. The second is a client side only recipe management interface (no server processing).
I threw this together for a friend in 8 hours, as some of its functionality coincided with stuff I needed for another one of my projects. It was not meant to be pretty, so the interface is a bit spartan, and the code comments are a bit lacking. It also doesn’t check user input very thoroughly :-) .ContentGitHub Page - http://www.github.com/dakusan/GW2-Recipe-Manager
- The following fields are shown per recipe:
- 4 user toggles
- Recipe Info: Type, Disciplines, Minimum Rating, Flags (AutoLearned/LearnedFromItem), Ingredients, Time To Craft
- Output Item Info: Name, Rarity, Level, Vendor Value, Flags, Usable Game Types
- All of these fields can be used as search filters for the recipe list
- All field columns can be hidden (via the checkbox next to their filter label)
- Results can be limited to a maximum amount. Do note that if you clear this filter and have it show all the recipes, it might take a while for your browser to render it. I only tested these large data sets in Google Chrome.
- Recipes can be sorted by all fields except for the user toggles
- User toggles are saved via cookies (not too thoroughly tested). The user toggle value list is also shown in a textbox on the interface, for manual copy+backup purposes.
- Since all recipes are stored, sorted, and handled via the browser, this can become a bit memory intensive (a few hundred megs in Chrome)
- Create your database and run all sql files in the “Install” directory in it
- Rename “Config.php.default” to “Config.php” and add your database information into it
- Execute RetrieveAPIData.php via your web browser or PHP CLI. You might need to up your PHP’s max_execution_time for it
- Execute GenerateJSData.php via your web browser or PHP CLI
- Run ListItems.html via your web browser
- Note: Since the php files are not required to run the interface, they can be removed once the "ItemData.js" has been generated.
- Pulls the info from the Guild Wars 2 API into the database using http requests.
- It polls the GW2 API serially 100 items at a time. Since there are currently ~9k recipes and ~40k items, and each query takes around a second, this takes some time to run (8-10 minutes for me).
- Export all the data in the DB relevant to the Recipe Management Interface into ItemData.js.
- Because of this, the recipe management interface does not need any server side processing.
- The JS data is in the following format:
- An Array of 2 items: An array of the column names, and then an array each of the row’s data (which is itself an array)
- Doing it this way, instead of having each row as an object/associative array, seriously cuts back on the file size.
- Numbers are also not stringified.
ListItems.html: The interface design for the Recipe Management Interface
ListItems.js: The code for the Recipe Management Interface
Config.php.default: Database configuration (Rename to Config.php)
Scripts/: See the “Dependencies” section
Live Version (Management Interface Only)
To add comments, please go to the forum page for this project (guest comments are allowed for the Projects, Posts, and Updates Forums).
Comments are owned by the user who posted them. We accept no responsibility for the contents of these comments.
No comments for this Project