Giter Site home page Giter Site logo

danielwerg / r6data Goto Github PK

View Code? Open in Web Editor NEW
16.0 1.0 1.0 51.11 MB

๐Ÿ“Š Operators, weapons, seasons, maps, gadgets and attachments data for Rainbow Six Siege

Home Page: https://npm.im/r6data

License: MIT License

JavaScript 0.03% TypeScript 99.97%
nodejs r6s rainbow6 rainbowsix siege typescript ubisoft rainboxsixsiege assets icons

r6data's Introduction

R6Data

๐Ÿ“Š Data for r6api.js and similar projects

License Version Latest release NPM weakly downloads Discord guild

GitHub NPM Yarn Releases Changelog

๐Ÿ’พ Installation

yarn add r6data

or

npm install r6data

๐Ÿ‘€ Usage

Table of operators which are going to drop in price:

import { OPERATORS } from 'r6data';

console.table(
  OPERATORS.filter(({ isRecruit }) => !isRecruit)
    .filter(({ nextPriceDropSeasons }) => nextPriceDropSeasons)
    .map(({ name, price, nextPriceDropSeasons }) => ({
      name,
      price: price?.renown,
      priceDrop: nextPriceDropSeasons ?? 0
    }))
);

๐Ÿ’Œ Acknowledgments

Operator icons from r6operators.marcopixel.eu

r6data's People

Contributors

danielwerg avatar dependabot[bot] avatar

Stargazers

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

Watchers

 avatar

Forkers

pandadriver156

r6data's Issues

Make new gadget icons and legacy current

Feature

Current icons are not used in game anymore.

Ideal solution or implementation

Move src/assets/gadgets/(svgs|pngs)/* to src/assets/gadgets/legacy/(svgs|pngs)/* and make new icon based on "Operator Guides" in-game.

Alternative solutions or implementations

No response

Other context

No response

Add operator unique ability icons

Feature

As of now we only have small resolution images of ability icons. One of the goals of this project is to make svg version of ability icons.

Ideal solution or implementation

  1. Take a lossless screenshot in-game Operators>SIDE>OPERATOR_NAME page (alternatively, sometimes, high resolution ability icon could be found in ubisoft's seasonal asset packs or fan kits)
  2. Use image editor of your choice (ex: Gimp, Photoshop) to cut out operator unique ability icon only
  3. Scale it to 480px and place centered on 512px canvas
  4. Use as reference
  5. Open https://yqnn.github.io/svg-path-editor (or vector graphics editor of your choice (ex: Inkscape, Illustrator))
  6. Add earlier created image using "landscape" icon
  7. Profit???

Alternative solutions or implementations

Let me know if you have a better way to implement this.

Other context

High resolution ability icons I managed to find in ubisoft's fan kits: https://imgur.com/a/9Yv9YCD
Ref images I made: https://imgur.com/a/PJwXKsC

Add loadouts to operators

Feature

Each operator should have their own loadout.
marcopixel/r6operators#6

Ideal solution or implementation

Show

src/operators/recruit_attack/index.ts:

// ...

export const recruitAttack = {
  slug: 'recruit_attack',
  // ...
-  weapons: {
-    primary: ['l85a2', 'mk_14_ebr', 'm249'],
-    secondary: ['p12', 'super_shorty', 'c75_auto']
-  },
+  weapons: {
+    primary: [
+      {
+        slug: 'l85a2',
+        sights: ['holo_a'],
+        barrels: ['flash_hider'],
+        grips: ['vertical_grip'],
+        underBarrels: null
+      },
+      {
+        slug: 'mk_14_ebr',
+        sights: ['scope_3.0x'],
+        barrels: ['muzzle_brake'],
+        grips: ['vertical_grip'],
+        underBarrels: null
+      },
+      {
+        slug: 'm249',
+        sights: ['reflex_a'],
+        barrels: ['compensator'],
+        grips: ['vertical_grip'],
+        underBarrels: null
+      }
+    ],
+    secondary: [
+      {
+        slug: 'p12',
+        sights: null,
+        barrels: ['suppressor'],
+        grips: null,
+        underBarrels: null
+      },
+      {
+        slug: 'super_shorty',
+        sights: null,
+        barrels: null,
+        grips: null,
+        underBarrels: ['laser']
+      },
+      {
+        slug: 'c75_auto',
+        sights: null,
+        barrels: null,
+        grips: null,
+        underBarrels: null
+      }
+    ]
+  },
  // ...
} satisfies Operator;

src/operators/types.ts:

export interface OperatorWeapons {
  primary: OperatorWeapon[];
  secondary: OperatorWeapon[];
}

export interface OperatorWeapon {
  slug: WeaponSlug;
  sights: SightSlug[] | null;
  barrels: BarrelSlug[] | null;
  grips: GripSlug[] | null;
  underBarrels: UnderBarrelSlug[] | null;
}

Other context

Handle forced attachments

Examples:

https://github.com/danielwerg/r6data/blob/feat/operator-weapon-loadouts/src/operators/caveira/index.ts#L46
https://github.com/danielwerg/r6data/blob/feat/operator-weapon-loadouts/src/operators/echo/index.ts#L42
https://github.com/danielwerg/r6data/blob/feat/operator-weapon-loadouts/src/operators/ela/index.ts#L49

Browser Compatibility

Feature

Since r6data package doesn't bring network features, it's completely possible to make it browser compatible. Currently it uses fs to load .md notes and .svg graphics.

Ideal solution or implementation

Webpack provides the way to load non-code assets.
Notes could be inlined. .svg content could be provided as URL with different base path for different environments. At the browser side we could tweak asset base path (e.g. GitHub repo or CDN), at the server side we could load asset content with file:// protocol

Alternative solutions or implementations

Export .md content as string in .js file . Provide .svg graphic as asset URL like .png.

Other context

I would like to contribute some things and use the lib as data transformer for web/Node. E.g. processing raw seasonal data from different sources (before Operation Health - prod.datadev.ubisoft.com, Health to Brutal Swarm - r6karma/players, Solar Raid and further - Ranked 2.0 at r6s/skill/full_profiles or Ranked 1.0 at r6karma/players from crossplay spaceId) and transforming into understandable (rating, rank, W/R, K/D, etc.). It would require some additional Ubi constants and advanced schema validator.
image

Bundle size reduction ๐Ÿคฐ

Feature

Importing OPERATORS will cost your project around 1MB if not more, this could be reduced by ~60% if we load svgs and notes on demand. There several projects I work on where I never use operator notes anyway, and for svgs, although they are almost always used there are still things like chat bots where you are forced to use raster images.

Ideal solution or implementation

  • Import operators individually
  • Import svgs and operator notes on demand
  • Make cheerio a devDependency by transforming svgs on build step

Alternative solutions or implementations

No response

Other context

No response

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.