V Rising
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
4 years ago
Downloads
68
Size
77KB

Still WIP, use it at your own risk.

VRising Game Data Library

See V Rising Database for detailed information about V Rising items, NPCs and more.

Installation

Install the NuGet package VRising.GameData

Usage

  • Add it to your Plugin's Load() method:
public override void Load()
{
    // ... other code
    GameData.OnInitialize += GameDataOnInitialize;
    // ... other code
}
  • Create the initialization method
private static void GameDataOnInitialize(World world)
{
    // Here you can start using the methods like these:
    Logger.LogWarning("All Users:");
    foreach (var userModel in GameData.Users.All)
    {
        Logger.LogMessage($"{userModel.CharacterName} Connected: {userModel.IsConnected}");
    }

    var weapons = GameData.Items.Weapons.Take(10);
    Logger.LogWarning("Some Weapons:");
    foreach (var itemModel in weapons)
    {
        Logger.LogMessage($"{itemModel.Name}");
    }
}
  • Remove the event hook in your plugin's Unload() method:
public override bool Unload()
{
    // ... other code
    GameData.OnInitialize -= GameData_OnInitialize;
    // ... other code
    return true;
}

See the sample project here:

https://github.com/adainrivers/VRising.GameData/tree/main/src/VRising.GameData.SamplePlugin

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.