A simple playground for modding Scrapland https://discord.gg/eBw2Pzpu4w
Go to file
strongleong cb3f060644 Added menu for background blur 2023-02-10 19:09:41 +11:00
Loader Added menu for background blur 2023-02-10 19:09:41 +11:00
Logger Fixed crashes 2023-02-07 19:38:24 +11:00
Police2Gear Added ability to load lang files 2023-02-07 23:53:17 +11:00
ScorerPlayground Added menu for background blur 2023-02-10 19:09:41 +11:00
.gitignore Added config for build.ps1 2023-02-07 17:59:13 +11:00
.vimrc Added menu for background blur 2023-02-10 19:09:41 +11:00
LICENSE Aded LICENSE 2023-02-08 00:04:45 +11:00
README.md Updated README.md 2023-02-07 23:53:34 +11:00
build.ps1 Fixed newline bug with lang files 2023-02-08 00:04:33 +11:00
config.example.ps1 Added config for build.ps1 2023-02-07 17:59:13 +11:00

README.md

Scrapland Mods

This repository is a just my playground where I learn how to mod Scrapland and try to make something useful and/or fun. Don't take this repository too serous. It is no near good example on modding Scrapland. I am just playing around here 😅.

Warning: everything in here is in development!
Anything, at any time can stop work properly, crash your game, set your pc on fire, start cancer or kill your dog. Use it on your own.

Table of content

Requirements

For building .packed files with build.sh I use ScrapPackedExplorer. If you want to use my build.sh you need to use ScrapPackedExplorer >= 0.3.1.

For compiling .py to .pyc you need Python 1.5.2.

And preferably you need to have any version of Scrapland itself 😄.

build.ps1

build.ps1 is a script that can build, install and uninstall mods from this repo.

Setup

To use build.ps1 you need to do 2 simple steps:

  1. Copy config.example.ps1 to config.ps1
  2. Change paths to ScrapPackedExplorer, Python 1.5.2 and Scrapland to yours.
$packed_explorer_path = '..\bins\spe.exe';
$pyhton_path          = 'C:\Program Files (x86)\Python\python.exe';
$scrapland_path       = 'D:\Games\SteamLibrary\steamapps\common\Scrapland';

If you will not do this 2 steps build.ps1 will use default variables.

How to use it

Building mods:

.\build.ps1          # If no argument specified will build all folders except 'bin' and 'out'
.\build.ps1 ModName  # Will build mod from folder "ModName"

Flags:

.\build.ps1 -i --install   # Installs mod after building it
.\build.ps1 -u --uninstall # Instead of building mod will uninstall it

Mods will be in the out folder

Every folder is a separate mod.

Mods structure

There is 2 types of "configuration" of mod folder: simple and with misc

Simple mod

Everything in mod folder except README.md will be packed in .packed file. That's it. Pretty simple.

Mod with custom text

..
ModFolder\
|__ packed\
|____ ...
|__ lang\
|____ ...

packed folder is your ModName.packed. Everything in it will be packed and loaded to the game's Mods folder

lang folder is where yours files with custom text lines works.
File with custom text should be named just as file in Scrapland\Languages\, i.e. English.txt, German.txt, Russan.txt etc.
It should contains only new lines that you want to add.

When mod loads script will save original text file, and it will append to it everything from all loaded mods, that have same <Language>.txt file.

Existing mods:

  • Loader: Contains just scripts/init.py.
  • Logger: Contains... logger. How surprising.
  • Police2Gear: Replaces default money-bagging police action to transforming to armed police
  • ScorerPlayground: Just playground for working with SScorer where I try to make custom menus

Check out ModName/README.md for more info.