RUST Monument Finder v3.1.4

No permission to download
You can download a maximum of 0 files within 24 hours

Features​

  • Allows privileged players to list and view monuments
  • Provides API for plugins to find monuments
  • Supports vanilla monuments, custom monuments, train tunnels, and underwater labs
  • Allows customizing monument bounds which is useful for custom monuments

How it works​

The primary objective of Monument Finder is to accurately define the bounds of monuments. This is necessary because the bounds defined by the game are not accurate for every monument, and there is no way for map makers to define bounds for their custom monuments. Plugins that care where monuments are located and how much space they occupy can utilize Monument Finder to find out. Server owners can assist plugins that use Monument Finder by defining or overriding monuments bounds in the config as needed.

All plugins that use Monument Finder get the same information, allowing them to have a consistent view of which monuments occupy which space. This is a feature, but not every plugin necessarily wants the same view of monuments. For example, a plugin that wants to limit teleportation radius around a monument may want different bounds than defined in Monument Finder. In such a case, that plugin can provide its own logic/config for defining monument bounds and doesn't need to use Monument Finder.

For vanilla monuments that already have fairly accurate bounds, Monument Finder simply operates using those bounds. For vanilla monuments that have inaccurate bounds, as well as for underground Train Tunnel sections, Monument Finder provides hard-coded bounds that the developer and/or community has deemed accurate. The bounds can also be overriden by server owners in the config.

Underwater labs are procedurally generated collections of modules. Monument Finder considers each module as a separate monument, since the overall lab monument doesn't have a consistent layout. As a result, this allows server owners to, for example, use the Monument Addons plugin to place a vending machine in a moonpool module, causing every instance of that moonpool module to have an identical vending machine, across all underwater lab monuments.

For custom monuments, there are multiple options for defining bounds:

  • Map makers can resize the monument marker (using transform scale) to encapsulate all the contents of the monument, and server owners can configure Monument Finder to determine that monument's bounds from the monument marker.
  • Map makers can place a "prevent building" volume on the monument (applicable to most custom monuments), and server owners can configure Monument Finder to determine that monument's bounds from the prevent building volume.
  • Server owners can define custom bounds in the config.
Map makers can assist with the above configuration process by providing recommended configuration to server owners.

Permissions​

This plugin uses the permission system. To assign a permission, use oxide.grant <user or group> <name or steam id> <permission>. To remove a permission, use oxide.revoke <user or group> <name or steam id> <permission>.
  • monumentfinder.find -- Allows players to find monuments. Intended for administrators.

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: `/`.
Note: The command mf can be changed in the plugin configuration.

  • mf -- Prints help info about available commands.
  • mf list <filter> -- List all monuments, train tunnels, and underwater lab modules. The filter is optional.
  • mf show <filter> -- (Requires admin) Shows text above all monuments, train tunnels, and underwater lab modules. The filter is optional.
  • mf closest -- Prints information about the closest monument, train tunnel, or underwater lab module. If admin, this also displays the monument bounds.
  • mf closest config -- Adds an entry into the config for the closest monument.

Configuration​

The settings and options can be configured in the MonumentFinder file under the config directory. The use of an editor and validator is recommended to avoid formatting issues and syntax errors.
Default configuration:
Code:
Please, Log in or Register to view codes content!
  • Command -- Determines the base command of the plugin.
  • Default custom monument settings -- Defines how the plugin will determine the position, rotation and bounds of custom monuments. The behavior for individual custom monuments can be overriden in the Monuments section on the config.
    • Position -- Defines how the plugin will determine the monument's "origin". Plugins such as Monument Addons or Custom Vending Setup will capture coordinates relative to the origin. Caution: Changing how the origin is determined for a monument may cause issues with plugins that have already generated coordinates relative to that monument, meaning you may have to redo setup for those plugins at that monument.
      • Auto determine from monument marker (true or false) -- While true, plugins will see the monument's origin as the monument marker's position.
        • Note: Since RustEdit does not currently allow custom prefabs to include a monument marker, map developers might not position/rotate monument markers consistently for every instance of a monument, so relying on the marker position/rotation may cause issues with plugins that use monument-relative coordinates.
      • Auto determine from prevent building volume (true or false) -- While true, plugins will see the monument's origin as the center of the Prevent Building Sphere/Cube, if there is one overlapping the monument marker.
    • Rotation -- Defines how the plugin will determine the monument's rotation. Caution: Changing how the rotation is determined for a monument may cause issues with plugins that have already generated coordinates relative to that monument, meaning you may have to redo setup for those plugins at that monument.
      • Auto determine from monument marker (true or false) -- While true, plugins will see the monument's rotation as the monument marker's rotation.
        • Note: Since RustEdit does not currently allow custom prefabs to include a monument marker, map developers might not position/rotate monument markers consistently for every instance of a monument, so relying on the marker position/rotation may cause issues with plugins that use monument-relative coordinates.
      • Auto determine from prevent building volume (true or false) -- While true, plugins will see the monument's rotation as the rotation of the Prevent Building Sphere/Cube, if there is one overlapping the monument marker.
    • Bounds -- Defines how the plugin will determine the monument's bounding box. Bounds are used by other plugins to accurately determine whether a given position is in a monument, and to determine specifically which monument.
      • Auto determine from monument marker (true or false) -- While true, plugins will see the monument's bounding box as monument marker's bounding box. This is an appropriate choice only if the map developer scaled the monument marker to cover the monument, which you should encourage map developers to do since it makes it very easy for this plugin to determine monument bounds.
      • Auto determine from prevent building volume (true or false) -- While true, plugins will see the monument's bounding box as the bounds of the Prevent Building Sphere/Cube, if there is one overlapping the monument marker.
      • Use custom bounds (true or false) -- While true, plugins will see the monument's bounding box as you configure in Custom bounds.
      • Custom bounds
        • Size -- Determines the size of the bounding box relative to the monument's origin. For example, if the monument is shaped like a cube, set x, y and z to the same value.
        • Center adjustment -- Adjusts the center of the bounding box, relative to the monument's origin. For example, if you want the center of the bounding box to be 10 meters above the monument's origin, set this to "x": 0, "y": 10, "z": 0.
  • Monuments -- This section allows you to override the configuration for individual monuments, including vanilla monuments and custom monuments. Customizing train tunnels and underwater labs is not supported. The options are the same as for Default custom monument settings, but options such as Auto determine from monument marker and Auto determine from prevent building volume have no effect on vanilla monuments.

How to set up custom monuments​

You must have ownerid or moderatorid to proceed.

  1. Run the mf list <filter> command to verify that your monument can be found. If you don't see it in the list, then the monument is not using the monument_marker prefab, so it needs to be updated in a map editor before proceeding.
  2. Once you determine the name of the monument, run the command mf show <name>. If the name has spaces, wrap the name in quotes. This command will show the monument name floating above the monument in-game.
  3. Go to the monument and run the command mf closest. This should display the monument name floating above it, with a bounding box around the monument. If this box contains the monument accurately, then you are done.
  4. If the bounding box is not accurate, run the command mf closest config to automatically add an entry into the plugin config.
  5. Configure the bounds in the plugin configuration, reload the plugin, and run mf closest to visualize the bounds. Repeat this process until you are satisifed with the bounds. Note: If the map developer made the monument marker cover the monument, or if they added a Prevent Building Sphere/Cube to the monument, then you can try the config options to auto detect the bounds from those. If neither of those are present, or if the bounds aren't suitable, then you can configure custom bounds.

Example of accurate bounds​

Eventually it should look something like below. The X, -X, Z, and -Z guidelines indicate the directions of X and Z axes so that you make changes to the correct values if configuring custom bounds.

Example monument names​

These were found by using Prefab Sniffer with the command prefab find assets/bundled/prefabs/autospawn/monument.

  • airfield_1
  • arctic_research_base_a
  • bandit_town
  • cave_large_hard
  • cave_large_medium
  • cave_large_sewers_hard
  • cave_medium_easy
  • cave_medium_hard
  • cave_medium_medium
  • cave_small_easy
  • cave_small_hard
  • cave_small_medium
  • compound
  • desert_military_base_a
  • desert_military_base_b
  • desert_military_base_c
  • desert_military_base_d
  • excavator_1
  • ferry_terminal_1
  • fishing_village_a
  • fishing_village_b
  • fishing_village_c
  • gas_station_1
  • harbor_1
  • harbor_2
  • ice_lake_1
  • ice_lake_2
  • ice_lake_3
  • ice_lake_4
  • junkyard_1
  • launch_site_1
  • lighthouse
  • military_tunnel_1
  • mining_quarry_a
  • mining_quarry_b
  • mining_quarry_c
  • nuclear_missile_silo
  • oilrig_1
  • oilrig_2
  • powerplant_1
  • radtown_small_3
  • satellite_dish
  • sphere_tank
  • stables_a
  • stables_b
  • supermarket_1
  • swamp_a
  • swamp_b
  • swamp_c
  • trainyard_1
  • underwater_lab_a
  • underwater_lab_b
  • underwater_lab_c
  • underwater_lab_d
  • warehouse
  • water_treatment_plant_1
  • water_well_a
  • water_well_b
  • water_well_c
  • water_well_d
  • water_well_e

Localization​

The default messages are in the MonumentFinder file under the lang/en directory. To add support for another language, create a new language folder (e.g. de for German) if not already created, copy the default language file to the new folder and then customize the messages.
Code:
Please, Log in or Register to view codes content!

Developer API​

When to use this API​

If you want to find a predetermined aboveground vanilla monument such as Outpost, you can simply loop TerrainMeta.Path.Monuments to find it. Doing so will allow you to avoid the dependency on Monument Finder.

The main reasons to use this API are as follows:

  • To accurately determine which monument a position is within. Without this plugin, you would have to resort to distance checks, which could return inaccurate results when small monuments are next to large monuments.
  • To determine if a given position is within a train tunnel.
  • To determine if a given position is within an underwater lab module.
Not supported:

  • Caves. You can do topology checks for this use case.

Find vanilla or custom monuments​

Code:
Please, Log in or Register to view codes content!
Code:
Please, Log in or Register to view codes content!
Legacy API method:
Code:
Please, Log in or Register to view codes content!

Find train tunnels​

Code:
Please, Log in or Register to view codes content!
Code:
Please, Log in or Register to view codes content!

Find underwater lab modules​

Code:
Please, Log in or Register to view codes content!
Code:
Please, Log in or Register to view codes content!

Find any type of monument​

The following methods may return vanilla monuments, custom monuments, train tunnels and underwater lab modules.
Code:
Please, Log in or Register to view codes content!
Code:
Please, Log in or Register to view codes content!
Code:
Please, Log in or Register to view codes content!
Code:
Please, Log in or Register to view codes content!

Monument wrapper object​

Each Dictionary<string, object> object consists of the following keys.

  • "Object" -- The underlying object representing the monument, train tunnel or underwater lab room.
    • Type: MonumentInfo | DungeonGridCell | DungeonBaseLink
  • "PrefabName" -- The full prefab name of the monument.
    • Type: string
  • "ShortName" -- The short prefab name of the monument.
    • Type: string
  • "Alias" -- The alias of the monument if it has one, or else null. For example, all train stations will use the alias TrainStation.
    • Type: string
    • Possible aliases: TrainStation | BarricadeTunnel | LootTunnel | SplitTunnel | Intersection | LargeIntersection | CornerTunnel.
  • "Position" -- The position of the monument.
    • Type: Vector3
  • "Rotation" -- The rotation of the monument.
    • Type: Quaternion
  • "BoundingBoxes" -- List of bounding boxes for the monument. Most monuments have one, but underwater lab modules may have multiple.
    • Type: OBB[]
  • "TransformPoint" -- Delegate that works like UnityEngine.Transform.TransformPoint.
    • Type: Func<Vector3, Vector3>
  • "InverseTransformPoint" -- Delegate that works like UnityEngine.Transform.InverseTransformPoint.
    • Type: Func<Vector3, Vector3>
  • "ClosestPointOnBounds" -- Delegate that returns the closest position that is within the monument's bounds, like UnityEngine.Collider.ClosestPointOnBounds.
    • Type: Func<Vector3, Vector3>
  • "IsInBounds" -- Delegate that returns true if the position is within the monument's bounds, like Rust's MonumentInfo.IsInBounds(Vector3).
    • Type: Func<Vector3, bool>

Example use in plugins​

Code:
Please, Log in or Register to view codes content!
Author
Box2
Downloads
0
Views
5
First release
Last update
Rating
0.00 star(s) 0 ratings

Similar resources

Add entities, spawn points and more to monuments
0.00 star(s) 0 ratings
Downloads
0
Updated
RUST  Finder v3.1.1
Find players, sleepers, sleeping bags, buildings, and teleport to them
0.00 star(s) 0 ratings
Downloads
1
Updated
Back
Top
Development Community