LGR Utility

From Elma Wiki
Revision as of 06:29, 1 June 2017 by Sunl (talk | contribs) (Created page with "Topic and download and repository: http://mopolauta.moposite.com/viewtopic.php?f=3&t=9618&p=253883 == Readme == Welcome to sunl's LGR Utility! ===== FancyBOOST ===== This w...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Topic and download and repository: http://mopolauta.moposite.com/viewtopic.php?f=3&t=9618&p=253883

Readme

Welcome to sunl's LGR Utility!

FancyBOOST

This will boost your lgr files so that they are compatible with FancyPic.exe, allowing custom images in any level.

Simply select an lgr or select your lgr folder, and when you press the button, a backup of your lgr file(s) will be made, and then your lgr file(s) will be converted to FancyBOOST-compatible format.

How it works is it adds the 256 palette colors as images that can be manipulated to the end of the lgr file, without touching anything else in the lgr file so all levels function normally.

Unzip LGR

Select an lgr or folder to unzip all images and data into folders.

The pictures will be saved in two folders: both LGR_unzip and LGR_by_pic. LGR_unzip can be used to edit your images and image properties using the .txt file, and then rezip.

LGR_by_pic is useful for comparing pictures from a bunch of different lgrs. This is super useful for building your own lgr. For example, you can easily find and take Bjenn's circular head, a ghost player 2 bike and circular apples, in order to have the best lgr you want.

An "_X" will be added if default palette is not used.

Zip LGR

Using a .txt, this will make an .lgr file. I recommend unzipping an lgr file to see what the .txt file should look like

Each line in the .txt file provides 1 instruction:

Example image

LGR_IMAGE;image_filepath;image_type;distance;clipping;transparency

bush1;folder/bush1_new.png;PICTURE;550;S;TOPLEFT

LGR_IMAGE: Refers to the actual name used inside elma.exe (e.g. bush1, sky)

image_filepath: Relative to the .txt file, or absolute. ACCEPTS ANY IMAGE FORMAT (.BMP, .PNG, JPG, .PCX). Automatically converted to the correct palette.

image_type: PICTURE, MASK or TEXTURE

distance: 1-999

clipping: G, S or U

transparency: The pixel used for transparency of the image. TOPLEFT, TOPRIGHT, BOTTOMLEFT, BOTTOMRIGHT or #000000

  • #000000 is a special transparency mode where the first palette index is used as the transparency. In the default palette of default.lgr, this means that the rgb color (0,0,0) is used as transparency. It was previously known as "None" in EasyLGR.exe, but this is not strictly true as there is a transparency.
Special images

Special images such as bike images or food do not have any special properties, and so are in the following format:

LGR_RESOURCE;image_filepath

Q1BODY;folder/Q1BODY_test.png

Special commands

__comment;text here

  • This line is ignored

palette_image;PALETTE

  • Used to specify the palette that should be used
  • PALETTE="default_palette" or an LGR_IMAGE (e.g. Q1BIKE)
    • "default_palette" will use the palette of default.lgr
    • Writing the name of an LGR_IMAGE will attempt to use the palette of the LGR_IMAGE. If this palette is invalid, it will use the default palette
  • If not specified, the default action is to attempt to take the palette of Q1BIKE, or, if unavailable, the default palette

lgr_filename;NAME

  • Will save the file as NAME.lgr

implement_hq;Yes

  • If not specified, defaults to "Yes". Set to "No" to not implement FancyBOOST
  • Implements FancyBOOST (as explained above)

qupdown_folder;FOLDERNAME

  • This folder contains all the "qup_XX.pcx" and "qdown_XX.pcx" files.
  • Make sure that each file in here starts with "qup_" or "qdown_"
  • Make sure that each file in here has a name of maximum 8 characters, excluding the .xxx
  • Make sure that each file has an extension that is 3 characters long (e.g. .jpg but NOT .jpeg)
  • All of the files in this folder are automatically added as grass
Error Checking

When making this lgr file, the program will tell you of any errors to fix, but the lgr file will be made anyways if possible.