Skip to content

Seed Sphere MaximumItemLevel defaults to 0, blocking /item from creating tiers 2-6 even though crafting supports them #890

Description

@didiconcs

Summary

All "Seed Sphere (Element) (N)" ItemDefinitions (Group 12) are seeded with MaximumItemLevel left at the default 0, because CreateSeedSphere() never sets it — unlike the sibling CreateSeed() method right above it, which does:

// CreateSeed() — sets it correctly
itemDefinition.MaximumItemLevel = (byte)options.PossibleOptions.Max(o => o.Number);

// CreateSeedSphere() — never sets it, stays at the default 0
private void CreateSeedSphere(byte number, string name, byte level, ItemOptionDefinition options)
{
    var itemDefinition = this.Context.CreateNew<ItemDefinition>();
    itemDefinition.Name = name;
    itemDefinition.Number = number;
    itemDefinition.Group = 12;
    itemDefinition.Durability = 1;
    itemDefinition.Width = 1;
    itemDefinition.Height = 1;
    itemDefinition.DropLevel = level;
    itemDefinition.SetGuid(itemDefinition.Group, itemDefinition.Number);
    itemDefinition.PossibleItemOptions.Add(options);
    this.GameConfiguration.Items.Add(itemDefinition);
}

(src/Persistence/Initialization/VersionSeasonSix/Items/SocketSystem.cs)

Confirmed on a freshly seeded Season 6 database:

Name                          | MaximumItemLevel
Seed Sphere (Fire) (1)        | 0
Seed Sphere (Water) (1)       | 0
Seed Sphere (Fire) (2)        | 0
...

Why this matters

A Seed Sphere's socket-bonus tier is determined at runtime by its item instance Level (0-5), not by which of the 6 per-tier ItemDefinitions it is. Confirmed in MountSeedSphereCrafting.CreateOrModifyResultItemsAsync:

sphereOption.ItemOption = seedSphere.Definition.PossibleItemOptions
    .SelectMany(o => o.PossibleOptions)
    .Single(o => o.OptionType == ItemOptionTypes.SocketOption && o.Number == seedSphere.Level);
sphereOption.Level = seedSphere.Level;

and in SeedSphereCrafting.CreateOrModifyResultItemsAsync:

result.Level = seed.Level; // The level defines the kind of option

The normal crafting path (Seed Master NPC → "Seed Sphere Creation") works fine because it assigns Item.Level directly in code, bypassing any MaximumItemLevel check. But /item explicitly enforces the cap before creating anything, in ItemChatCommandPlugIn.TryParseArgumentsAsync:

if (arguments.Level > itemDefinition.MaximumItemLevel)
{
    await gameMaster.ShowLocalizedBlueMessageAsync(nameof(PlayerMessage.ItemLevelExceeded), itemDefinition.MaximumItemLevel).ConfigureAwait(false);
    return (false, null);
}

Since MaximumItemLevel=0, any /item ... lvl=1 (or higher) request for a Seed Sphere is rejected with "Item level exceeded" — a GM can only ever spawn tier-1 (Level 0) Seed Spheres for testing, even though the real crafting system supports and produces all 6 tiers (0-5) without issue. This likely also blocks setting a higher level through any other path that validates against MaximumItemLevel (e.g. creating a brand-new item of this type through the AdminPanel).

Suggested fix

In CreateSeedSphere(), set MaximumItemLevel the same way CreateSeed() already does one method above it:

itemDefinition.MaximumItemLevel = (byte)options.PossibleOptions.Max(o => o.Number);

This evaluates to 5, matching the 6 valid IncreasableItemOption.Number entries (0-5) already seeded per element.

Environment

  • Confirmed against origin/master (commit b29338b78), Season 6 seed data, fresh database.
  • Not gameplay-breaking — the real crafting path is unaffected. This only limits GM/admin tooling.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions