Skip to content

[Factorio mod] This is an experimental example mod to make possible development with candran together with other stuff as easy as possible.

Notifications You must be signed in to change notification settings

ZwerOxotnik/factorio-candran-example

Repository files navigation

Notes | Contributing | License


Example mod

Release Star Discord
Patreon Buy me a coffee Fork

Changelog · Translations . Documentation

Factorio + Candran example

This is an experimental example mod to make possible development with candran together with other stuff as easy as possible.

Currently, it's not so "smooth", but you can develop in vscode.

Check another example without candran: https://github.com/ZwerOxotnik/factorio-example-mod

Download the mod  ▶

Requirements

I recommend to install luaver for managing versions of Lua and luarocks.

Installation of dependencies on Debian and Ubuntu:

sudo apt-get install linux-headers-generic libreadline-dev build-essential git unzip make dkms -y

Don't forget to use:

sudo apt-get update
sudo apt-get upgrade

Install luaver and then manage versions:

luaver install 5.4.6
luaver use 5.4.6
luaver set-default 5.4.6
luaver install-luarocks 3.9.2
luaver use-luarocks 3.9.2
luaver set-default-luarocks 3.9.2

(If you have problems with wget, read this: https://forums.linuxmint.com/viewtopic.php?t=349438 )

Shell scripts depends on git, 7z, jq, candran.

Installation of some dependencies on Debian and Ubuntu:

sudo apt install p7zip-full jq git -y

Installation of candran and lpeg as a component for lpeg.re:

luarocks install candran
luarocks install lpeg

If your Visual Studio Code terminal/tasks doesn't work properly, then write this into your user profile (settings.json). (tested on Linux Mint)

"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
	"bash": {
	  "path": "bash",
	  "icon": "terminal-bash",
	  "args": ["-i"]
	}
},
"terminal.integrated.env.linux": {
	"LD_PRELOAD": null,
},

If you still have some issues with lua on Linux, then you could try:

sudo apt install ssh && sudo apt autoremove && sudo apt install lua5.4 luarocks

(I don't know why it helps in some distros)

Notes

example.can works slightly differently and uses --# instead of # for candran to support some interactions with Visual Studio Code.

Some additional information you can find on: https://github.com/ZwerOxotnik/factorio-example-mod

‼️ Important Links (Translations, Discord Support)

Installation Guide Translations Discord
📖 Installation Guide 📚 Help with translations 🦜 Discord

If you want to download from this source, then use commands below (requires git).

git clone --recurse-submodules -j8 https://github.com/ZwerOxotnik/factorio-candran-example candran-example
cd candran-example

Don't be afraid to contribute! We have many, many things you can do to help out. If you're trying to contribute but stuck, tag @ZwerOxotnik

Alternatively, join the Discord group and send a message there.

Please read the contributing file for other details on how to contribute.

License

I'm interested in distributing code as freely as possible.

Copyright (c) 2021-2022 ZwerOxotnik zweroxotnik@gmail.com

Licensed under the MIT licence.

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

[Factorio mod] This is an experimental example mod to make possible development with candran together with other stuff as easy as possible.

Topics

Resources

Stars

Watchers

Forks