RUST Rust Map API v1.3.3

No permission to download
You can download a maximum of 0 files within 24 hours
Allows creating an image of the current map. The map image can be split into multiple sections with varying number of rows and columns. Custom map images can be created by passing in custom render settings. All images are saved to rusts file storage and only need to be generated once per wipe. Map renders will need to created every restart. Overlays can be added to the map images. There is a built in default overlap map called "Icons". This map image contains an icon for each monument and each icon can be changed in the config.

This plugin is only for generating a PNG, JPG image of the map. It does not do anything to the in game client map​

Configuration​

The settings and options can be configured in the RustMapApi file under the config directory. The use of an editor and validator is recommended to avoid formatting issues and syntax errors.
Code:
Please, Log in or Register to view codes content!

Map Colors Version​

Version1 - The map colors before the 10/2020 update
Current - The current map colors

Commands​

This plugin provides both chat and console commands using the same syntax. When using a command in chat, prefix it with a forward slash: `/`.
rma_regenerate - removes the existing maps from file storage and regenerates them.This is useful when you change the overlay in the config. This is an admin only command.

rma_upload - uploads the map image to imgur. Requires ImgurApi plugin loaded and configured

Linux Users​

This plugin requires LibGDIPlus to be installed on your system.

sudo apt install libgdiplus

Afterwards restart your system for the changes to take effect

Developer API​

Allows developers to use images generated by the plugin or to create their own custom image

Input Data​

Image Render Config​

The image render config is used to configure the map render.Here you can override the default colors and values for the map render.The Render Config is passed in as a Hash<string, object> with the key being the field name and the value being the field value.

StartColor (Vector3) new Vector3(0.324313372f, 0.397058845f, 0.195609868f)
WaterColor (Vector4) new Vector4(0.269668937f, 0.4205476f, 0.5660378f, 1f)
GravelColor (Vector4) new Vector4(0.139705867f, 0.132621378f, 0.114024632f, 0.372f)
DirtColor (Vector4) new Vector4(0.322227329f, 0.375f, 0.228860289f, 1f)
SandColor (Vector4) new Vector4(1f, 0.8250507f, 0.448529422f, 1f)
GrassColor (Vector4) new Vector4(0.4509804f, 0.5529412f, 0.270588249f, 1f)
ForestColor (Vector4) new Vector4(0.5529412f, 0.440000027f, 0.270588249f, 1f)
RockColor (Vector4) new Vector4(0.42344287f, 0.4852941f, 0.314013839f, 1f)
SnowColor (Vector4) new Vector4(0.8088235f, 0.8088235f, 0.8088235f, 1f)
PebbleColor (Vector4) new Vector4(0.121568628f, 0.419607848f, 0.627451f, 1f)
OffShoreColor (Vector4) new Vector4(0.166295841f, 0.259337664f, 0.3490566f, 1f)
SunDirection (Vector3) Vector3.Normalize(new Vector3(0.95f, 2.87f, 2.37f))
Half (Vector3) new Vector3(0.5f, 0.5f, 0.5f)
WaterOffset (int) 0
SunPower (float) 0.5f
Brightness (float) 1f
Contrast (float) 0.87f
OceanWaterLevel (float) 0.0f
Version (string) supports the MapColorVersion enum as string

Overlay Config​

The Overlay config allows custom image overlays to be added to the image after being rendered.The Overlay Config is passed in as a Hash<string, object> with the key being the field name and the value being the field value.If an image goes outside the bounds of the map it may be cutoff or not rendered at all.

XPos (int) - X pixel position on the map. Overlay image center will be at this position
YPos (int) - Y pixel on the map. Overlay image center will be at this position
Width (int) - Width of the image to be resized to
height (int) - Height of the image to be resized to
DebugName (string) - Used for error output when image is out of range
Image byte[] - byte[] of the image

Returned Data​

Map Split​

A map split contains all the images for a map image based on the number of rows and columns requested for the split.Map splits are returns as a Hash<string, Hash<string,object>>.The first hash key is the row and column of the split as "{row}x{column}" Ex. 5x4The inner hash contains a Map Section.

Map Section​

A map section of a section of the map that based on the entered split.The sections consists of a Hash<string, object> with the following keys
image (byte[]) - byte[] of the image
width (int) - width of the image
height (int) - height of the image

Map Render​

A map render consists of the raw color data before it is transformed into the image.The information from this hash can be passed into a Texture2D to turn the colors into an actual imageA map render is returned as a Hash<string, object> with the following keys
colors (UnityEngine.Color[]) - An array of colors for each pixel
width (int) - width of the image
height (int) - height of the image.

Hooks​

Returns if the plugin is ready to be used
Code:
Please, Log in or Register to view codes content!
Creates a new map render using the passed in config and overlay settings
mapName - name to save the render under. Used in methods to create map images and apply overlays
imageConfig - See Image Render Config under Input Data
Returns Hash<string, object> See Map Render under Returned Data
Code:
Please, Log in or Register to view codes content!
Creates a new map render from an existing render and applying the overlay config.
renderName - Existing render to apply the overlay to
newMapName - New render created with the overlay
overlay - List of Overlay configs. See Overlay Config under Input data
Returns Hash<string, object> See Map Render under Returned Data
Code:
Please, Log in or Register to view codes content!
Returns Hash<string, object> See Map Render under Returned data
mapName - the name of the render
Code:
Please, Log in or Register to view codes content!
Creates a single map image and returns it. This image is not saved
mapName - name of the map used to create the render
encodingMode - Jpg = 1 Png = 2
Returns Hash<string, Hash<string, object>> See Map Split under Input Data
Code:
Please, Log in or Register to view codes content!
Creates a split of the image based on the number of rows and columns and returns it. This image is not saved.
mapName - name of the map used to create the render
numRows - the number of rows you want the split to have
numCols - the number of cols you want the split to have
encodingMode - Jpg = 1 Png = 2
Returns Hash<string, Hash<string, object>> See Map Split under Input Data
Code:
Please, Log in or Register to view codes content!
Creates a single image and saves it to storage. Returns the created image data. Image is JPG encoded.
mapName - name of the map used to create the render
Returns Hash<string, Hash<string, object>> See Map Split under Input Data
Code:
Please, Log in or Register to view codes content!
Create a split image and saves it to storage. Returns the created image data. Image is JPG encoded
mapName - name of the map used to create the render
numRows - how many rows the image should have
numCols - how many cols the image should have
Returns Hash<string, Hash<string, object>> See Map Split under Input Data
Code:
Please, Log in or Register to view codes content!
Returns a list of all currently registered map render names
Code:
Please, Log in or Register to view codes content!
Returns a list of all saved splits for a specific render name
Code:
Please, Log in or Register to view codes content!
Returns a full map for the specified render name
Returns Hash<string, Hash<string, object>> See Map Section under Input Data
Code:
Please, Log in or Register to view codes content!
Returns a List<Hash<string, object>> list of Icon Overlays from the config.
Icon Overlay can be found in Overlay Config under the Input Data section
Code:
Please, Log in or Register to view codes content!
Returns if a map split has already been generated for the render name with the given rows and columns
mapName the name of the map render
numRows the number of rows in the render
numCols the number of columns in the render
Returns true if exists false otherwise
Code:
Please, Log in or Register to view codes content!
Returns a section of the map for the given render name with the given number of rows and columns.If the split doesn't exist it is generated and saved to file storage.
mapName - the name of the render
numRows - the number of rows in the split
numCols - the number of columns in the split
row the row index for the split. Must be < numRows and > 0
col the column index for the split. Must be < numCols and > 0
Returns Hash<string, object> See Map Section under Input Data
Code:
Please, Log in or Register to view codes content!
Returns a split of the map for the given render name with the given number of rows and columns.If the split doesn't exist it is generated and saved to file storage.
mapName - the name of the render
numRows - the number of rows in the split
numCols - the number of columns in the split
Returns Hash<string, Hash<string, object>> See Map Split under Input Data
Code:
Please, Log in or Register to view codes content!
Author
Box2
Downloads
0
Views
2
First release
Last update
Rating
0.00 star(s) 0 ratings

Share this resource

Similar resources

Проверка на читы, как в Rust
0.00 star(s) 0 ratings
Downloads
0
Updated
RUST  Rust Commit Feed v1.0.0 GP75.00
Displays new Rust commits to chat
0.00 star(s) 0 ratings
Downloads
0
Updated
RUST  Rust Kits v4.4.8 GP100.00
Item kits, autokits, kit cooldowns, and more
0.00 star(s) 0 ratings
Downloads
0
Updated
RUST  Rust Kits v4.4.7
Item kits, autokits, kit cooldowns, and more
0.00 star(s) 0 ratings
Downloads
0
Updated
RUST  Rust Lottery v1.2.5 GP100.00
Allows players to roll number to win more money or points
0.00 star(s) 0 ratings
Downloads
0
Updated