# @seidr/nitro-converter

> Serverside javascript library for bundling .nitro assets

Latest version **1.3.3** (published 2024-01-10) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @seidr/nitro-converter
pnpm add @seidr/nitro-converter
yarn add @seidr/nitro-converter
bun add @seidr/nitro-converter
```

Provides the command `nitro-converter`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.3 |
| Published | 2024-01-10 |
| First published | 2024-01-09 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 347.9 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | seidr |

## Links

- npm: https://www.npmjs.com/package/@seidr/nitro-converter
- Repository: https://github.com/byseidr/nitro-converter
- Issues: https://github.com/byseidr/nitro-converter/issues
- npm.io page: https://npm.io/package/@seidr/nitro-converter

## Dependencies (13)

- [ora](https://npm.io/package/ora.md) 5.3.0
- [pako](https://npm.io/package/pako.md) ^2.0.4
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.23
- [tsyringe](https://npm.io/package/tsyringe.md) ^4.7.0
- [bytebuffer](https://npm.io/package/bytebuffer.md) ^5.0.1
- [jpg-stream](https://npm.io/package/jpg-stream.md) ^1.1.2
- [node-fetch](https://npm.io/package/node-fetch.md) 2.6.1
- [png-stream](https://npm.io/package/png-stream.md) ^1.0.5
- [lzma-purejs](https://npm.io/package/lzma-purejs.md) ^0.9.3
- [concat-frames](https://npm.io/package/concat-frames.md) ^1.0.3
- [stream-to-array](https://npm.io/package/stream-to-array.md) ^2.3.0
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.13
- [free-tex-packer-core](https://npm.io/package/free-tex-packer-core.md) ^0.3.4

## Recent versions

- 1.3.3 (latest) — 2024-01-10
- 1.3.2 — 2024-01-10
- 1.3.1 — 2024-01-10
- 1.3.0 — 2024-01-10
- 1.2.0 — 2024-01-09
- 1.1.0 — 2024-01-09

## README

# Nitro Converter

This tool is used to generate `.nitro` bundled assets for use with the Nitro Client

## Configuration

You must rename `configuration.json.example` to `configuration.json`

The simplest way to set your configuration is by changing the `external.variables.url` option. The converter will pull all urls from this file if the main configuration has them set to `null or ""`

You may set any of the urls to a local path on your system or a remote url. A local path is recommended as the tool will run a lot quicker for downloading.

| key                            | value                                                                                |
| ------------------------------ | ------------------------------------------------------------------------------------ |
| output.folder                  | The folder where converted assets will be saved to                                   |
| flash.client.url               | The base url where figures/pets/effects are stored, eg https://url/gordon/           |
| furnidata.load.url             | The url to your furnidata, can be XML or JSON, eg https://url/gamedata/furnidata.xml |
| productdata.load.url           | The url to your productdata.txt, eg https://url/gamedata/productdata.txt             |
| figuremap.load.url             | The url to your figure map, can be XML or JSON, eg https://url/gordon/figuremap.xml  |
| effectmap.load.url             | The url to your effect map, can be XML or JSON, eg https://url/gordon/effectmap.xml  |
| dynamic.download.pet.url       | The full url where pets are stored, eg https://url/gordon/%className%.swf            |
| dynamic.download.figure.url    | The full url where figures are stored, eg https://url/gordon/%className%.swf         |
| dynamic.download.effect.url    | The full url where effects are stored, eg https://url/gordon/%className%.swf         |
| flash.dynamic.download.url     | The base url where furniture is stored, eg https://url/dcr/hof_furni/                |
| dynamic.download.furniture.url | The full url where furniture is stored, eg https://url/dcr/hof_furni/%className%.swf |
| external.variables.url         | The url to your external variables, eg https://url/gamedata/external_variables.txt   |
| external.texts.url             | The url to your external texts, eg https://url/gamedata/external_texts.txt           |
| convert.productdata            | Either `0` to skip or `1` to run                                                     |
| convert.externaltexts          | Either `0` to skip or `1` to run                                                     |
| convert.figure                 | Either `0` to skip or `1` to run                                                     |
| convert.figuredata             | Either `0` to skip or `1` to run                                                     |
| convert.effect                 | Either `0` to skip or `1` to run                                                     |
| convert.furniture              | Either `0` to skip or `1` to run                                                     |
| convert.pet                    | Either `0` to skip or `1` to run                                                     |

## Running the converter

**Make sure you run `yarn install && yarn build` before first use.**

To run the converter open a new terminal / console window in the main converter directory.

The converter has a few different start commands:

| key                    | value                                                      |
| ---------------------- | ---------------------------------------------------------- |
| yarn build             | Will run `tsc` and build .js from .ts                      |
| yarn start             | Will download and convert assets as set in the config      |
| yarn start:bundle      | Will bundle decompressed `.nitro` assets (json / png)      |
| yarn start:extract     | Will extract `.nitro` assets which can be used for editing |
| yarn start:convert-swf | Will convert inputted `.swf` assets to `.nitro`            |

When you run `start:bundle | start:extract | start:convert-swf` for the first time it will automatically generate a folder structure for placing your assets for conversion.

The converter will skip any assets that already exist but will always reconvert your XMLs / copy your JSONS to the `gamedata` folder to ensure you always have the latest copy.

---
_Source: https://npm.io/package/@seidr/nitro-converter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
