Code Monkey home page Code Monkey logo

destiny2-dim-wishlist-generator's Introduction

DIM wishlist generator

A bunch of scripts for generating DIM wishlists from a human-readable source file.

If you're not comfortable with *nix command-line tools, this is probably not for you.

Installation

git submodule add [email protected]:gelraen/destiny2-dim-wishlist-generator.git gen
ln -s gen/Makefile
make install-hooks  # optional, but highly recommended
make
git add data/

This will add this repository as a submodule, install pre-commit hook to keep generated files up to date, and generate macros for perk and weapon hashes.

Importing other wishlists

m4 makes it easy to include additional files in your wishlist. For example, you can import voltron.txt. First add repository as a submodule:

git submodule add https://github.com/48klocs/dim-wish-list-sources.git sources

Then in your wishlist file:

include(`sources/voltron.txt')

Usage

Create a file with .m4 extension and write your wishlist there. Example:

title:My personal wishlist

//notes:Super stable kinetic sniper rifle
Dreaded_Venture(Arrowhead_Brake, Tactical_Mag, Triple_Tap, Rapid_Hit)

Austringer(Hammer_Forged_Rifling, 3142289711, any_of(1168162263, 3124871000), any_of(3425386926, Rangefinder))

Jack_Queen_King_3(any_of(Subsistence, Demolitionist), 2848615171)

Check files in data/ for the list of names you can use. Weapon names are used as kind of "functions", with any arguments added as perks. Perks can be listed either by name (if there is one in data/perks.m4) or by numerical ID. If there are multiple perks specified in a single argument (either using any_of macro or by simply separating them with |), single line will generate all combinations of listed perks.

After you created your wishlist, run make, which will generate corresponding text file. Commit that text file and push it to GitHub. Then open your text file on GitHub in your browser, press "Raw" button and copy URL into wishlist URL field in DIM settings.

Macro reference

wishlist_entry

Syntax: wishlist_entry(itemID, perks...)

Generates entries for a given item with given perks, automatically computing all combinations for perks listed with multiple options (in a single argument, separated by |).

While you can use this directly, it's advised to define a wrapper macro for each item ID (like in data/weapons.m4):

define(`Sidearm', `wishlist_entry(14, $@)')

Sidearm(Demolitionist)

any_of

Syntax: any_of(perks...)

Helper macro to make specifying perk options slightly more readable. Retuns all arguments joined with | as a single string.

Caveats

Not all perks/items are present in generated files

The code currently skips any names that match more than one ID, because I haven't figured yet a good way to disambiguate them. This is mostly happens with overly generic names, like "Aggressive Frame", where actual perks are specific to weapon types, despite identical display names.

Macro names can't start with a digit

m4 doesn't recognize macro invocations of macros with "invalid" names. Definition of "invalid" includes, among other things, names that start with a digit. To work this around you can use indir builtin: indir(`123foobar', args...)

destiny2-dim-wishlist-generator's People

Contributors

deekue avatar imax9000 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

deekue

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.