Interface IWorldMapMarkers
- Namespace
- SkyrimForge
- Assembly
- SkyrimForge.dll
Adds markers to the world map at runtime, each a place the player can fast travel to.
public interface IWorldMapMarkers
Remarks
Each marker is a reference the game saves. Its name and icon are stored in this plugin's saved state and set again after each load. Call members on the game's thread with a game loaded.
Methods
Add(string, FormId<WorldSpace>, NiPoint3, string, MARKER_TYPE)
Adds a marker named name with the icon kind at position in the worldspace with worldspaceId.
The player may be anywhere, an interior included.
ObjectReference Add(string key, FormId<WorldSpace> worldspaceId, NiPoint3 position, string name, MARKER_TYPE kind)
Parameters
keystringThe name under which the marker is stored. It is unique among this plugin's markers and must not change between versions of the plugin.
worldspaceIdFormId<WorldSpace>The ID of the worldspace, such as 0000003C, Skyrim.esm's Tamriel.
positionNiPoint3The position in that worldspace. Fast travel places the player near it.
namestringThe name the world map shows.
kindMARKER_TYPEThe icon the world map shows.
Returns
- ObjectReference
The marker's reference, which is on the world map. Its parent cell is null while the cell containing the position is not loaded.
Exceptions
- ArgumentNullException
keyornameisnull.- ArgumentException
No worldspace has
worldspaceId, or this plugin added a marker withkeyalready.- InvalidOperationException
The game created no reference or set no marker on it.
GetReferenceId(string)
Returns the reference ID of the marker with key. The result is null where this plugin added no marker with that key.
FormId<ObjectReference>? GetReferenceId(string key)
Parameters
keystring
Returns
Exceptions
- ArgumentNullException
keyisnull.
Remove(string)
Removes the marker with key from the world map and deletes its reference. A key with no marker has no effect.
void Remove(string key)
Parameters
keystring
Exceptions
- ArgumentNullException
keyisnull.