npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

openrct2lib

v0.1.3

Published

OpenRCT2 New Savefile Format parser

Downloads

4

Readme

OpenRCT2Lib

OpenRCT2Lib parses OpenRCT2's New Savefile format (*.park).
This offers *.park file's informations, such as Park's name, Scenario's objective and etc.

Install

npm install --save openrct2lib

Example

const OpenRCT2Lib = require('openrct2lib');

let parkData = new OpenRCT2Lib(__dirname + '/Example.park');
console.log(parkData.park.name);      // Park's name
console.log(parkData.park.cash);      // Park's cash
console.log(parkData.scenario.name);  // Scenario's name

Header

Header is not compressed even if the save file is compressed with gzip. | Property | Description | Misc. | |-------------------------|----------------------------------------------|--------------------------------------------------| | header.magic | | | | header.targetVersion | | | | header.minVersion | | | | header.numChunks | Count of chunks | | | header.uncompressedSize | uncompressed size | | | header.compression | 0: uncompressed, 1: gzip | | | header.compressedSize | compressed size | | | header.FNV1a | FNV1a hash | (Offers array of integers yet due to my skill) | | header.padding | It is just a padding, which is filled with 0 | |

Chunk

0x01: Authoring

| Property | Description | Misc. | |------------------------|--------------------------------|-------| | authoring.engine | E.g. "openrct2 v0.1.2 (Linux)" | | | authoring.authors | | | | authoring.dateStarted | | | | authoring.dateModified | | |

0x02: Objects

(Not supported yet)

0x03: Scenario

| Property | Description | Misc. | |------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| | scenario.category | Category of the scenario | | | scenario.name | Name of the scenario | | | scenario.parkName | Park name of the scenario | | | scenario.details | Description of the scenario | | | scenario.objective.type | Objective type in number.1: Guests by {guests}2: Park value by {currency}3: Have Fun!4: Build the best {guest} you can!5: To have 10 different types of roller coasters6: Guests by {guests} with park rating 700 above7: Monthly ride income at least {currency}8: To have 10 roller coasters with min. length {guests}9: To finish 5 coasters with excitement ratings of at least {currency}10: Repay loans and park value with {currency}11: Monthly profit from food/drink/sales of at least {currency} * {guests} = objective.guests, {currency} = objective.currency | | | scenario.objective.typeText | Objective type in text | | | scenario.objective.year | Year value of objective | | | scenario.objective.guests | Count of Guests for objective.type=1RideId for objective.type=4Min. length of coaster for objective.type=8 | | | scenario.objective.currency | Money value for objective.type=2, 7, 10, 11Min. excitement ratings for objective.type=9 | | | scenario.objective.ratingWarningDays | | | | scenario.objective.completedCompanyValue | Completed company value | | | scenario.objective.allowEarlyCompletion | 1 if the scenario early completion is allowed | | | scenario.objective.scenarioFileName | | Seems not accurate? | | Seems not accurate? |

0x04: General

| Property | Description | Misc. | |-------------------------------|-----------------------|-------| | general.gamePaused | | | | general.currentTicks | | | | general.dateMonthTicks | | | | general.dateMonthsElapsed | | | | general.rand | | | | general.guestInitialHappiness | | | | general.guestInitialCash | | | | general.guestInitialHunger | | | | general.guestInitialThirst | | | | general.peepSpawns | (Not supported yet) | |

0x05: Climate

| Property | Description | Misc. | |---------------------|----------------------------------------------------------------------------------|-------| | climate.state | Current weather state0: Cool and wet1: Warm2: Hot and dry3: Cold | | | climate.updateTimer | | | | climate.current | weathertemperatureweatherEffectweatherGloomlevel | | | climate.next | (Same with above) | |

0x06: Park

| Property | Description | Misc. | |----------------------------------|-------------------------------------------------|-------| | park.name | Park name | | | park.cash | Current cash | | | park.loan | Current loan | | | park.maxLoan | Maximum loan | | | park.loanInterestRate | Interest rate of loan | | | park.parkFlags | | | | park.parkEntranceFee | Entrance fee of the park | | | park.staffHandymanColour | Colour index of Handymans | | | park.staffMechanicColour | Colour index of Mechanics | | | park.staffSecurityColour | Colour index of Securities | | | park.samePriceThroughoutPark | | | | park.numMonths | | | | park.numTypes | | | | park.expenditureTable | | | | park.historicalProfit | | | | park.marketingCampaigns | | | | park.currentAwards | | | | park.parkValue | Current park value | | | park.companyValue | Current company value | | | park.parkSize | Area of the park | | | park.numGuestsInPark | Count of guests in the park | | | park.numGuestsHeadingForPark | Count of guests heading for the park's entrance | | | park.parkRating | Park rating | | | park.parkRatingCasualtyPenalty | | | | park.currentEpenditure | | | | park.currentProfit | | | | park.weeklyProfitAverageDividend | | | | park.weeklyProfitAverageDivisor | | | | park.totalAdmissions | | | | park.totalIncomeFromAdmissions | | | | park.totalRideValueForMoney | | | | park.numGuestsInParkLastWeek | | | | park.guestChangeModifier | | | | park.guestGenerationProbability | | | | park.suggestedGuestMaximum | | | | park.peepWarningThrottle | | | | park.parkRatingHistory | History of park rating | | | park.guestsInParkHistory | History of count of guests in the park | | | park.cashHistory | History of cash | | | park.weeklyProfitHistory | History of weekly profit | | | park.parkValueHistory | History of park value | |

0x08: Research

| Property | Description | Misc. | |--------------------------|-------------|-------| | research.fundinglevel | | | | research.priorities | | | | research.progressStage | | | | research.progress | | | | research.expectMonth | | | | research.expectDay | | | | research.lastItem | | | | research.nextItem | | | | research.itemsUninvented | | | | research.itemsInvented | | |

0x09: Notifications

(Not supported yet)

0x20: Interface

(Not supported yet)

0x30: Tiles

(Not fully supported yet)

| Property | Description | Misc. | |-----------------|-------------|-------| | tiles.mapX | Map width | | | tiles.mapY | Map height | |

0x31: Entities

(Not supported yet)

0x33: Banners

(Not supported yet)

0x36: Cheats

(Not supported yet)

0x37: Restricted objects

(Not supported yet)

0x80: Packed objects

(Not supported yet)

References

  • https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/park/ParkFile.cpp
  • https://raw.githubusercontent.com/OpenRCT2/OpenRCT2/develop/docs/save-format.md
    (I think it might be outdated but useful for ref.)