1.1.2 • Published 9 years ago
pipboylib v1.1.2
pipboylib
A companion library in JavaScript for the Fallout 4 pip boy app.
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
1.1.2
9 years ago
1.1.1
10 years ago
1.1.0
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago
0.3.0
10 years ago
0.2.1
10 years ago
0.2.0
10 years ago
0.1.0
10 years ago
0.0.9
10 years ago
0.0.8
10 years ago
0.0.7
10 years ago
0.0.6
10 years ago
0.0.5
10 years ago
0.0.4
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago
0.0.0
10 years ago