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

@danielv123/gridworld

v1.0.2

Published

Clusterio plugin for automatic creation of gridworlds connected using edge_transports

Downloads

7

Readme

Clusterio gridworld

Automatic gridworld configuration

Documentation and FAQ

Installation

Dependencies:

  • https://www.npmjs.com/package/@hornwitser/server_select
  • https://www.npmjs.com/package/@clusterio/plugin-edge_transports

Run the following commands in the folder Clusterio is installed to:

npm install @danielv123/gridworld
npx clusteriocontroller plugin add @danielv123/gridworld
npm install universal_edges
npx clusteriocontroller plugin add universal_edges

Substitute clusteriocontroller with clusteriohost or clusterioctl if this a dedicated host or ctl installation respectively.

Install the companion mod as a modpack in clusterio, this is required for power, fluid transfers and train pathfinding to work:

https://mods.factorio.com/mod/universal_edges

Usage

Open the web UI, navigate to the gridworld page and create a new gridworld. A lobby server will be created. If you want to use a custom map exchange string, navigate to the controller page and set "Gridworld map exchange string" to the long string you get from the game.

Once this is done, join the lobby server and press the "Joing game button". Additional server are created on demand as you explore. The load balancing picks the host with the fewest instances to create the new server on.

Transfers between servers

The universal_edges plugin is used to transfer items between servers. When an edge is green, it is active and can be used for transfers. Connectors are set up by placing the following items up against the edge:

  • Transport belts
  • Pipes
  • Substations
  • Straight rails (the departing train can't leave from a curve, leave a long straight)

Visualization of this repo

Development setup

Clone the repository in clusterio/external_plugins/

git clone https://github.com/clusterio/clusterio
cd clusterio/external_plugins
git clone https://github.com/Danielv123/gridworld
git clone https://github.com/clusterio/edge_transports
cd ..
pnpm install

Interactive:

node packages/create --dev

node packages/ctl plugin add ./external_plugins/gridworld
node packages/ctl plugin add ./external_plugins/edge_transports
pnpm install @hornwitser/server_select -w
node packages/controller bootstrap create-admin Danielv123
node packages/controller bootstrap create-ctl-config Danielv123
node packages/controller plugin add @hornwitser/server_select
node packages/controller plugin add ./plugins/global_chat
node packages/controller plugin add ./plugins/inventory_sync
node packages/controller plugin add ./plugins/player_auth
node packages/controller plugin add ./plugins/research_sync
node packages/controller plugin add ./plugins/statistics_exporter
node packages/controller bootstrap generate-user-token Danielv123 > token.txt
node packages/controller run --dev --dev-plugin gridworld

Log into the webui with the token in token.txt and create a new host token with id 1 then run the following in terminal to setup the host:

wget -O factorio.tar.gz https://www.factorio.com/get-download/latest/headless/linux64
tar -xf factorio.tar.gz
node packages/host config set host.id 1
node packages/host config set host.controller_token xxxxxxxxxxxxxxxxxxxxx
node packages/host config set host.name "Host 1"
node packages/host config set host.public_address "localhost"

Luacheck can be downloaded from https://github.com/mpeterv/luacheck/releases/download/0.23.0/luacheck.exe or sudo apt install lua-check or brew install luacheck

Put it in your %path% and run luacheck ./module