Magically import images and more into Gamecraft as blocks
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.7KB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Pixi
  2. Gamecraft mod for converting images into coloured blocks.
  3. Think of it like automatic pixel art.
  4. ## Installation
  5. To install the Pixi mod, copy the build's `Pixi.dll` into the `Plugins` folder in Gamecraft's main folder.
  6. ## Usage
  7. Pixi adds new commands to Gamecraft's command line to import images into a game.
  8. `PixiScale [width] [height]` sets the block canvas size (usually you'll want this to be the same size as your image).
  9. When conversion using `Pixi2D` is done, if the canvas is larger than your image the image will be repeated.
  10. If the canvas is smaller than your image, the image will be cropped based to the lower left corner.
  11. `Pixi2D "[image]"` converts an image to blocks and places it as blocks beside where you're standing (along the xy-plane).
  12. If your image is not stored in the same folder as Gamecraft, you should specify the full filepath (eg `C:\path\to\image.png`) to the image.
  13. For example, if you want to add an image called `pixel_art.png`,
  14. with a resolution of 1920x1080, stored in Gamecraft's installation directory,
  15. execute the command `PixiScale 1920 1080` to set the size and then `Pixi2D "pixel_art.png` to load the image.
  16. ## Development
  17. Show your love by offering your time.
  18. ### Setup
  19. Pixi's development environment is similar to most Gamecraft mods, since it's based on HelloModdingWorld's configuration.
  20. This project requires most of Gamecraft's `.dll` files to function correctly.
  21. Most, but not all, of these files are stored in Gamecraft's `Gamecraft_Data\Managed` folder.
  22. The project is pre-configured to look in a folder called ref in the solution's main directory or one level up from that.
  23. You can make sure Pixi can find all of `.dll` files it needs by copying your Gamecraft folder here and renaming it to `ref`, but you'll have to re-copy it after every Gamecraft update.
  24. You can also create a symbolic link (look it up) to your Gamecraft install folder named `ref` in this folder to avoid having to re-copy files.
  25. Like most mods, you will have to patch your game with [GCIPA](https://git.exmods.org/modtainers/GCIPA).
  26. Pixi also requires the [GamecraftModdingAPI](https://git.exmods.org/modtainers/GamecraftModdingAPI) library to be installed (in `ref/Plugins/GamecraftModdingAPI.dll`).
  27. ## Building
  28. After you've completed the setup, open the solution file `Pixi.sln` in your prefered C# .NET/Mono development environment.
  29. I'd recommend Visual Studio Community Edition or JetBrains Rider for Windows and Monodevelop for Linux.
  30. If you've successfully completed setup, you should be able to build the Pixi project without errors.
  31. If it doesn't work and you can't figure out why, ask for help on [our Discord server](https://discord.gg/xjnFxQV).