Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pipboylib

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pipboylib

The companion pipboy library to Fallout 4

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24
decreased by-11.11%
Maintainers
3
Weekly downloads
 
Created
Source

pipboylib

npm version Join the chat at https://gitter.im/RobCoIndustries/pipboylib

A companion library in JavaScript for the Fallout 4 pip boy app.

It's Close to Metal!

Requirements

This is a node library, so you'll need node and npm. If, like Nick Valentine, you're close to the metal:

npm install pipboylib

In order for this library to have any utility, you'll need a running Fallout 4 game with the pip-boy app enabled. It only works on PS4 and PC at the moment (see pipboylib#27).

Usage

import {
  connection,
  decoding,
  status,
  constants
} from 'pipboylib'

const {
  discover,
  createSocket,
  sendPeriodicHeartbeat
} = connection

const {
  createObservable,
  parseBinaryDatabase,
  aggregateBundles,
  generateTreeFromDatabase
} = decoding

const {
  connected
} = status

const {
  channels
} = constants

discover()
  .then(server => createSocket(server.info.address))
  .then(socket => {
    sendPeriodicHeartbeat(socket)
    return createObservable(socket)
  })
  .then(observable => {
    connected(observable)
      .then(handshake => {
        console.log('Connected!', handshake)

        const database = observable
          .filter(x => x.type === channels.DatabaseUpdate)
          .map(x => parseBinaryDatabase(x.payload))
          .scan(aggregateBundles, {})
          .map(x => generateTreeFromDatabase(x))

        database
          .map(x => x.Map.World.Player)
          .map(x => ({
            x: x.X || null,
            y: x.Y || null,
            deg: x.Rotation || null
          }))
          .distinctUntilChanged()
          .subscribe(x => {
            console.log('Player Position:', x)
          })
      })
      .catch(err => {
        console.error('Couldn\'t establish connection!', err)
      })
  })
  .catch(err => {
    throw err
  })

See examples or the Electron app, pipboy, for more examples.

Protocol documentation and other clients

FAQs

Package last updated on 24 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc