From 5248e4b9b636e03803320b565d172203b1c3c1f4 Mon Sep 17 00:00:00 2001 From: Lynn Date: Thu, 25 Oct 2018 19:50:00 +0200 Subject: [PATCH 1/4] Reworked the documentation structure --- README.md | 53 +++++++++-------------------- docs/Index.md | 5 +++ docs/Installation.md | 49 +++++++++++++++++++++++++++ docs/scenarios/Diggy.md | 63 ++++++++++++++++++++++++++++++++++ map_gen/Diggy/Readme.md | 75 +---------------------------------------- 5 files changed, 134 insertions(+), 111 deletions(-) create mode 100644 docs/Index.md create mode 100644 docs/Installation.md create mode 100644 docs/scenarios/Diggy.md diff --git a/README.md b/README.md index 8061a285..6d167c3a 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,21 @@ -# RedMew Scenario +## RedMew +RedMew is a Factorio community that hosts custom servers, maps in different shapes and sizes, scripted scenarios and +modded servers. The majority of the games hosted, are available to the public, for all players, no matter how +experienced and can be found in the Factorio multi-player lobby. -## Getting Started +## The Community +You can join the RedMew community on Discord by visiting http://redmew.com/discord -To use our scenario download it [here](https://github.com/Valansch/RedMew/archive/develop.zip) and unzip it into %AppData%/factorio/scenarios/ (~/.factorio/scenarios for linux). If you are using our scenario for a public-facing multiplayer server, please be sure to provide attribution back here to the github and keep links to our discord/patreon/website intact. +To join a RedMew Factorio server, follow the following steps in Factorio: + - From the main menu, press "Play" + - In the next window press "Multiplayer" + - Next select "Browse public games" (this requires a factorio account and may prompt you to log in) + - In the list of "Browse games" you can filter for "RedMew" and you will see all RedMew hosted maps -## Generating maps +> _Note_: Not every server in this list will be official. If you're in doubt, join Discord and ask. - There are 3 ways to generate maps using our scenario: Vanilla, FactorioMapConverter and Custom Maps. - -### Vanilla - Just start the scenario from the scenario menu and you are ready to go. +## Documentation +You can find an overview of [the documentation in the docs directory](/docs/Index.md) -### Custom Maps - - We have many premade map modules that you can combine to create a unique map. - - Checkout [map_gen/data/map_previews](https://github.com/Valansch/RedMew/tree/develop/map_gen/data/.map_previews) to view all our modules. - You can select and activate a module by removing the "--" infront of the module in the map_layout.lua file. - - You can mix as many modules as you want, as long as they logically fit together. - - Futher instructions on this read the comments in the map_layout.lua file. -### FactorioMapConverter - -You can generate your own maps from images. This works in 2 steps: - -First convert the image file into a lua file (For example image_data.lua). Then use our scenario to loa the image_data.lua file and generate the map from it. - -To achieve this please follow these steps: -1. Download the Map Converter [here](https://github.com/grilledham/FactorioMapConverter/releases) (Windows only) to generate the image_data.lua. -2. Place your image_data.lua file in the folder /map_gen/data/presets/ -3. Create new lua file (for example my_image.lua) inside the folder map_gen/presets/. This file is used to configure your map (scale, translaten etc.) -To do this you can copy map_gen/presets/template.lua and replace line 8 to point to your image_data.lua -4. Load your new preset by adding a new line to map_layout.lua. This should look similar to this: -```MAP_GEN = require "map_gen.presets.my_image.lua"``` -5. Load the scenario from the scenario menu. - - - - - +## License +The RedMew codebase is licensed under the [GPL3 License](LICENSE). diff --git a/docs/Index.md b/docs/Index.md new file mode 100644 index 00000000..d47ec0a7 --- /dev/null +++ b/docs/Index.md @@ -0,0 +1,5 @@ +## RedMew Documentation Index + - [Installing and Using the RedMew Scenario](Installation.md) + +### Scenarios + - [Diggy Installation and Configuration](scenarios/Diggy.md) diff --git a/docs/Installation.md b/docs/Installation.md new file mode 100644 index 00000000..cffe9727 --- /dev/null +++ b/docs/Installation.md @@ -0,0 +1,49 @@ +## Installing and Using the RedMew Scenario +Some scenarios have more detailed information, please check [the index](Index.md) before continuing with the generic +RedMew installation. To install the RedMew scenario directly into something playable, [download the +archive](https://github.com/Valansch/RedMew/archive/develop.zip) and take the next step based on your Operating System. + +- **Windows**: extract the the zip file into `%appdata%\Factorio\Scenarios\RedMew` +- **MacOS**: extract the the zip file into `~/Library/Application Support/factorio/Scenarios/RedMew` +- **Linux**: extract the the zip file into `~/.factorio/scenarios/RedMew` + +Make sure it's called RedMew and there's a `control.lua` in the root of that directory. If you are using the RedMew +scenario for a public-facing multi-player server, be sure to provide attribution back to github and keep links to the +Discord, Patreon and website intact. + +> _Note_: these locations are based on the default configuration [defined by +factorio](https://wiki.factorio.com/Application_directory). If your installation is not default, you have to find your +scenarios directory in another way. + +## Generating maps +There are 3 ways to generate maps using our scenario: Vanilla, FactorioMapConverter and Custom Maps. + +### Vanilla +Start the scenario from the scenario menu and you are ready to go. Additionally you can turn features on or off via +(`control.lua`)[../control.lua] if desired. + +### Custom Maps +There are many pre-made map modules that can be combined to create a unique map. + +Map module previews can be found in [map_gen/data/.map_previews](../map_gen/data/.map_previews). You can select and +activate a module by removing the `--` in front of the require in (`map_layout.lua`)[../map_layout.lua]. + +You can mix as many modules as you want, as long as they logically fit together. + +### FactorioMapConverter (Windows only) + +You can generate your own maps from images. First convert the image file into a lua file (For example `image_data.lua`). +Then use our scenario to load the `image_data.lua` file and generate the map from it. + +To create your own map preview: +1. Download the Map Converter [here](https://github.com/grilledham/FactorioMapConverter/releases) to generate the + `image_data.lua`. +2. Place your `image_data.lua` file in the `map_gen/data/presets/` directory. +3. Create new lua file (for example `my_image.lua`) inside the folder `map_gen/presets/`. This file is used to configure + your map (scale, translate etc.). To do this, you can copy `map_gen/presets/template.lua` and replace line 8 to point + to your `image_data.lua` +4. Load your new preset by adding a new line to `map_layout.lua`. This should look similar to this: + ```lua + MAP_GEN = require "map_gen.presets.my_image.lua" + ``` +5. Load the scenario from the scenario menu. diff --git a/docs/scenarios/Diggy.md b/docs/scenarios/Diggy.md new file mode 100644 index 00000000..01da2024 --- /dev/null +++ b/docs/scenarios/Diggy.md @@ -0,0 +1,63 @@ +## Diggy Installation and Configuration +Diggy is a custom [RedMew](../../README.md) scenario. You start out with nothing but a market, your pick-axe and some +walls [deep, deep in the mine](https://www.youtube.com/watch?v=ov5pxaIbJlM). The goal is to launch a rocket, but be +careful, there's not a lot of space and the mine is unstable! + +- Gameplay: https://www.youtube.com/watch?v=J3lheDK-6Cw +- Time lapse video: https://www.youtube.com/watch?v=4cRsx-wl_fk (By Namelesshunter Gaming) + +> _Note_: Scenarios- also known as soft-mods- are scripted maps. They can be played online without having to download +any mods as the script is included in the map. + +### Scenario Information +The idea of Diggy is similar to vanilla, except that it greatly changes how to build your factory. As you're in a cave, +each rock you dig, each support entity you remove and every tile you mine, can cause a collapse. You can use walls, +stone paths and (refined) concrete floor to increase the strength of your mine and reduce the chance of a collapse. + +Whenever you place or remove a wall for example, the stress level of the area around it (9x9 tiles) will rise or lower. +When a certain threshold is reached, the cave will collapse. You can stop this by quickly placing walls or run away as +fast as you can. Letting the cave collapse _will_ destroy structures below it! The recommended pattern on dirt is to +place a wall every 4th tile. Using stone paths and concrete will increase this to 5 tiles while refined concrete will +make it 6. + +## How to start Diggy for Single-player mode + +#### Step 1 +Download the zip file from +[https://github.com/Valansch/RedMew/archive/develop.zip](https://github.com/Valansch/RedMew/archive/develop.zip) + +#### Step 2 +- **Windows**: extract the the zip file into `%appdata%\Factorio\Scenarios\Diggy` +- **MacOS**: extract the the zip file into `~/Library/Application Support/factorio/Scenarios/Diggy` +- **Linux**: extract the the zip file into `~/.factorio/scenarios/Diggy` + +Make sure it's called Diggy and there's a `control.lua` in the root of that directory. + +> _Note_: these locations are based on the default configuration [defined by +factorio](https://wiki.factorio.com/Application_directory). If your installation is not default, you have to find your +scenarios directory in another way. + +#### Step 3 +Open `map_layout.lua` in that directory and look for `--require "map_gen.combined.diggy"`. +Change this to `require "map_gen.combined.diggy"`, by removing the double dashes. + +#### Step 4 +In factorio start either a local or online game via Scenarios. Select `Diggy` under +`User scenarios` and start it up. + +> _Note:_ Downloading the latest version might not always be a functional version, please consult on discord for a +working version if this is the case. + +#### Step 5 (optional) +Diggy is designed to work for at least 15 players online, working together. It's advised to change the configuration +to adjust the difficulty for your needs. You can find the config in `map_gen/Diggy/Config.lua`. Most options should be +well-explained. For Single-player it's recommend to enable cheats with modified values. You can change the starting +items and some pre-defined cheat values (if cheats are enabled) under the `SetupPlayer` config item. + +You can turn off certain features if you wish. + - DiggyCaveCollapse, disable this feature if you wish to play without collapses. + - SimpleRoomGenerator, disable this if you want to play without room generation. _**WARNING:** this is the mechanic + that spawns water._ + - AlienSpawner, disable this if you wish to disable spawning biters and spitters when mining. + - ScatteredResources, used to tweak random resource spawning. + - MarketExchange, regulates all the market related features. diff --git a/map_gen/Diggy/Readme.md b/map_gen/Diggy/Readme.md index 80016289..05300b0a 100644 --- a/map_gen/Diggy/Readme.md +++ b/map_gen/Diggy/Readme.md @@ -1,76 +1,3 @@ ## RedMew - Diggy, Custom Scenario -RedMew is a Factorio community that hosts custom servers, maps in different shapes and sizes, scripted scenarios and -modded servers. The majority of the games hosted, are available to the public, for all players, no matter how -experienced and can be found in the Factorio multi-player lobby. -You can join the RedMew community on Discord by visiting http://redmew.com/discord - -> _Note_: Scenarios- also known as soft-mods- are scripted maps. They can be played online without having to download -any mods as the script is included in the map. - -To join a RedMew Factorio server, follow the following steps in Factorio: - - From the main menu, press "Play" - - In the next window press "Multiplayer" - - Next select "Browse public games" (this requires a factorio account and may prompt you to log in) - - In the list of "Browse games" you can filter for "RedMew" and you will see all RedMew hosted maps - -> _Note_: Not every server in this list will be official. If you're in doubt, join Discord and ask. - -### Diggy -Diggy is a custom scenario. You start out with nothing but a market, your pick-axe and some walls -[deep, deep in the mine](https://www.youtube.com/watch?v=ov5pxaIbJlM). The goal is to launch a rocket, but be careful, -there's not a lot of space and the mine is unstable! - -Gameplay: https://www.youtube.com/watch?v=J3lheDK-6Cw - -Timelapse video: https://www.youtube.com/watch?v=4cRsx-wl_fk (By Namelesshunter Gaming) - -#### Scenario Information -The idea of Diggy is similar to vanilla, except that it greatly changes how to build your factory. As you're in a cave, -each rock you dig, each support entity you remove and every tile you mine, can cause a collapse. You can use walls, -stone paths and (refined) concrete floor to increase the strength of your mine and reduce the chance of a collapse. - -Whenever you place or remove a wall for example, the stress level of the area around it (9x9 tiles) will rise or lower. -When a certain threshold is reached, the cave will collapse. You can stop this by quickly placing walls or run away as -fast as you can. Letting the cave collapse _will_ destroy structures below it! The recommended pattern on dirt is to -place a wall every 4th tile. Using stone paths and concrete will increase this to 5 tiles while refined concrete will -make it 6. - -## How to start Diggy for Single-player mode - -##### Step 1 -Download the zip file from https://github.com/Valansch/RedMew/archive/develop.zip - -##### Step 2 -- **Windows**: extract the the zip file into `%appdata%\Factorio\Scenarios\Diggy` -- **MacOS**: extract the the zip file into `~/Library/Application Support/factorio/Scenarios/Diggy` -- **Linux**: extract the the zip file into `~/.factorio/scenarios/Diggy` - -Make sure it's called Diggy and there's a `control.lua` in the root of that directory. - -> _Note_: these locations are based on the default configuration [defined by factorio](https://wiki.factorio.com/Application_directory). If your installation is not default, you have to find your scenarios directory in another way. - -##### Step 3 -Open `map_layout.lua` in that directory and look for `--require "map_gen.combined.diggy"`. -Change this to `require "map_gen.combined.diggy"`, by removing the double dashes. - -##### Step 4 -In factorio start either a local or online game via Scenarios. Select `Diggy` under -`User scenarios` and start it up. - -> _Note:_ Downloading the latest version might not always be a functional version, please consult on discord for a -working version if this is the case. - -##### Step 5 (optional) -Diggy is designed to work for at least 15 players online, working together. It's advised to change the configuration -to adjust the difficulty for your needs. You can find the config in `map_gen/Diggy/Config.lua`. Most options should be -well-explained. For Single-player it's recommend to enable cheats with modified values. You can change the starting -items and some pre-defined cheat values (if cheats are enabled) under the `SetupPlayer` config item. - -You can turn off certain features if you wish. - - DiggyCaveCollapse, disable this feature if you wish to play without collapses. - - SimpleRoomGenerator, disable this if you want to play without room generation. _**WARNING:** this is the mechanic that - spawns water._ - - AlienSpawner, disable this if you wish to disable spawning biters and spitters when mining. - - ScatteredResources, used to tweak random resource spawning. - - MarketExchange, regulates all the market related features. +The documentation for Diggy has moved to [docs/scenarios/Diggy.md](../../docs/scenarios/Diggy.md). From a085d15d418a625479603ddf658cc11747ea83cc Mon Sep 17 00:00:00 2001 From: Lynn Date: Thu, 25 Oct 2018 20:08:30 +0200 Subject: [PATCH 2/4] Added documentation on how to add a new scenario --- docs/Index.md | 3 ++- docs/NewScenario.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 docs/NewScenario.md diff --git a/docs/Index.md b/docs/Index.md index d47ec0a7..02053b6e 100644 --- a/docs/Index.md +++ b/docs/Index.md @@ -1,5 +1,6 @@ ## RedMew Documentation Index - [Installing and Using the RedMew Scenario](Installation.md) + - [Creating a New Scenario Using the RedMew Framework](NewScenario.md) -### Scenarios +### Scenario Specific Documentation - [Diggy Installation and Configuration](scenarios/Diggy.md) diff --git a/docs/NewScenario.md b/docs/NewScenario.md new file mode 100644 index 00000000..87774181 --- /dev/null +++ b/docs/NewScenario.md @@ -0,0 +1,28 @@ +## Creating a New Scenario Using the RedMew Framework +To add a new scenario and make it available to everyone that wants to use RedMew, make a Pull Request on github to +request adding your scenario to the repository. + +### Starting From Scratch +Depending on the size of the scenario, it could be desired to have its own dedicated directory. By default a scenario +is added in `map_gen/combined/your_scenario.lua`. + +#### Step 1 +If you're not experienced with git, it's advised to read up on how git works first or ask someone else to help out. To +get your change into the repository, you need to [fork the repository](https://help.github.com/articles/fork-a-repo/) +and eventually make your Pull Request from there. [Clone](https://help.github.com/articles/cloning-a-repository/) the +fork to your local environment and get your favorite IDE or Editor ready. + +#### Step 2 +Small scenarios can go into a single lua file, bigger scenarios might need their own dedicated directory. To follow the +RedMew structure for scenarios, create your scenario file: `map_gen/combined/your_scenario_file.lua`. + +#### Step 3 (Optional) +If you plan on making a bigger scenario, create a directory: `map_gen/combined/your_scenario_file/` where you can place +your scenario specific lua files. + +#### Step 4 +Regardless, the `map_gen/combined/your_scenario_file.lua` file will be the entry point for your scenario and will be +loaded via `map_layout.lua`. Underneath `--combined--`, add your require: `require map_gen.combined.your_scenario_file`. + +When making the Pull Request, make sure to comment the require in `map_layout.lua` as by default it should be off. To +enable debugging and get some extra feedback during development, enable `_DEBUG` in `config.lua`. From c74d1428c60a7b471bc093f24e04756da7de9096 Mon Sep 17 00:00:00 2001 From: Lynn Date: Thu, 25 Oct 2018 20:09:48 +0200 Subject: [PATCH 3/4] Added small reference on contributing --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6d167c3a..fd5a8eb4 100644 --- a/README.md +++ b/README.md @@ -17,5 +17,9 @@ To join a RedMew Factorio server, follow the following steps in Factorio: ## Documentation You can find an overview of [the documentation in the docs directory](/docs/Index.md) +## Contributing +If you wish to contribute, don't hesitate to make a Pull Request or open an issue. When in doubt, you can always ask +on [Discord](http://redmew.com/discord). + ## License The RedMew codebase is licensed under the [GPL3 License](LICENSE). From 20b5b9d829ceaa4040d4c3108a37d9d5d636978d Mon Sep 17 00:00:00 2001 From: Lynn Date: Thu, 25 Oct 2018 20:15:59 +0200 Subject: [PATCH 4/4] Fixed broken link --- docs/Installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Installation.md b/docs/Installation.md index cffe9727..f0394503 100644 --- a/docs/Installation.md +++ b/docs/Installation.md @@ -26,7 +26,7 @@ Start the scenario from the scenario menu and you are ready to go. Additionally There are many pre-made map modules that can be combined to create a unique map. Map module previews can be found in [map_gen/data/.map_previews](../map_gen/data/.map_previews). You can select and -activate a module by removing the `--` in front of the require in (`map_layout.lua`)[../map_layout.lua]. +activate a module by removing the `--` in front of the require in [`map_layout.lua`](../map_layout.lua). You can mix as many modules as you want, as long as they logically fit together.