jpw1991 / chebs-necromancy

Cheb's Necromancy adds Necromancy to Valheim via craftable wands and structures. Minions will follow you, guard your base, and perform menial tasks.
The Unlicense
10 stars 4 forks source link

Expose all minion resource requirements to config #82

Closed jpw1991 closed 1 year ago

jpw1991 commented 1 year ago

Description

Instead of things like Surtling Cores for mages being a hardcoded requirement, make these things something the user can specify via the config using the <Prefab1>:<quantity>[[,<PreFab2>:<quantity>], ...] template.

Is the feature related to a problem?

Supporting the diverse difficulty requirements of all players.

Approach

Refactor the following:

ArmorLeatherScrapsRequiredConfig = plugin.Config.Bind("SkeletonWand (Server Synced)", "ArmoredSkeletonLeatherScrapsRequired",
                5, new ConfigDescription("The amount of LeatherScraps required to craft a skeleton in leather armor.", null,
                new ConfigurationManagerAttributes { IsAdminOnly = true }));

 ...

            SurtlingCoresRequiredConfig = plugin.Config.Bind("SkeletonWand (Server Synced)", "SkeletonMageSurtlingCoresRequired",
                1, new ConfigDescription("The amount of surtling cores required to craft a skeleton mage.", null,
                new ConfigurationManagerAttributes { IsAdminOnly = true }));

to be more like:

ArmorLeatherRequirementsConfig = plugin.Config.Bind("SkeletonWand (Server Synced)", "ArmoredSkeletonLeatherRequirements",
                "LeatherScraps:5", new ConfigDescription("The items needed to craft an armored skeleton.", null,
                new ConfigurationManagerAttributes { IsAdminOnly = true }));

 ...

            MageRequirementsConfig = plugin.Config.Bind("SkeletonWand (Server Synced)", "SkeletonMageRequirements",
                "SurtlingCore:1", new ConfigDescription("The items needed to craft a skeleton mage.", null,
                new ConfigurationManagerAttributes { IsAdminOnly = true }));
jpw1991 commented 1 year ago

@Dracbjorn when you're done with your config stuff, we should do this one.