Show / Hide Table of Contents

Class ItemBuilder

Generates new items for various game systems. This helper still under development.

Inheritance
Object
ItemBuilder
Namespace: DaggerfallWorkshop.Game.Items
Assembly: Assembly-CSharp.dll
Syntax
public static class ItemBuilder

Fields

| Improve this Doc View Source

clothingDyes

Declaration
public static DyeColors[] clothingDyes
Field Value
Type Description
DyeColors[]
| Improve this Doc View Source

firstFemaleArchive

Declaration
public const int firstFemaleArchive = 245
Field Value
Type Description
Int32
| Improve this Doc View Source

firstMaleArchive

Declaration
public const int firstMaleArchive = 249
Field Value
Type Description
Int32
| Improve this Doc View Source

materialsByModifier

Declaration
public static readonly byte[] materialsByModifier
Field Value
Type Description
Byte[]

Methods

| Improve this Doc View Source

ApplyArmorMaterial(DaggerfallUnityItem, ArmorMaterialTypes)

Set material and adjust armor stats accordingly

Declaration
public static void ApplyArmorMaterial(DaggerfallUnityItem armor, ArmorMaterialTypes material)
Parameters
Type Name Description
DaggerfallUnityItem armor
ArmorMaterialTypes material
| Improve this Doc View Source

ApplyArmorSettings(DaggerfallUnityItem, Genders, Races, ArmorMaterialTypes, Int32)

Set gender, body morphology and material of armor

Declaration
public static void ApplyArmorSettings(DaggerfallUnityItem armor, Genders gender, Races race, ArmorMaterialTypes material, int variant = 0)
Parameters
Type Name Description
DaggerfallUnityItem armor
Genders gender
Races race
ArmorMaterialTypes material
Int32 variant
| Improve this Doc View Source

ApplyWeaponMaterial(DaggerfallUnityItem, WeaponMaterialTypes)

Set material and adjust weapon stats accordingly

Declaration
public static void ApplyWeaponMaterial(DaggerfallUnityItem weapon, WeaponMaterialTypes material)
Parameters
Type Name Description
DaggerfallUnityItem weapon
WeaponMaterialTypes material
| Improve this Doc View Source

CreateArmor(Genders, Races, Armor, ArmorMaterialTypes, Int32)

Generates armour.

Declaration
public static DaggerfallUnityItem CreateArmor(Genders gender, Races race, Armor armor, ArmorMaterialTypes material, int variant = -1)
Parameters
Type Name Description
Genders gender

Gender armor is created for.

Races race

Race armor is created for.

Armor armor

Type of armor item to create.

ArmorMaterialTypes material

Material of armor.

Int32 variant

Visual variant of armor. If -1, a random variant is chosen.

Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem

| Improve this Doc View Source

CreateBook(Int32)

Creates a new book.

Declaration
public static DaggerfallUnityItem CreateBook(int id)
Parameters
Type Name Description
Int32 id

The numeric id of book resource.

Returns
Type Description
DaggerfallUnityItem

An instance of the book item or null.

| Improve this Doc View Source

CreateBook(String)

Creates a new book.

Declaration
public static DaggerfallUnityItem CreateBook(string fileName)
Parameters
Type Name Description
String fileName

The name of the books resource.

Returns
Type Description
DaggerfallUnityItem

An instance of the book item or null.

| Improve this Doc View Source

CreateGoldPieces(Int32)

Generates gold pieces.

Declaration
public static DaggerfallUnityItem CreateGoldPieces(int amount)
Parameters
Type Name Description
Int32 amount

Total number of gold pieces in stack.

Returns
Type Description
DaggerfallUnityItem
| Improve this Doc View Source

CreateItem(ItemGroups, Int32)

Creates a generic item from group and template index.

Declaration
public static DaggerfallUnityItem CreateItem(ItemGroups itemGroup, int templateIndex)
Parameters
Type Name Description
ItemGroups itemGroup

Item group.

Int32 templateIndex

Template index.

Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem.

| Improve this Doc View Source

CreateMensClothing(MensClothing, Races, Int32, DyeColors)

Generates men's clothing.

Declaration
public static DaggerfallUnityItem CreateMensClothing(MensClothing item, Races race, int variant = -1, DyeColors dye = DyeColors.Blue)
Parameters
Type Name Description
MensClothing item

Item type to generate.

Races race

Race of player.

Int32 variant

Variant to use. If not set, a random variant will be selected.

DyeColors dye

Dye to use

Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem.

| Improve this Doc View Source

CreatePotion(Int32, Int32)

Creates a potion.

Declaration
public static DaggerfallUnityItem CreatePotion(int recipeKey, int stackSize = 1)
Parameters
Type Name Description
Int32 recipeKey
Int32 stackSize
Returns
Type Description
DaggerfallUnityItem

Potion DaggerfallUnityItem

| Improve this Doc View Source

CreateRandomArmor(Int32, Genders, Races)

Creates random armor.

Declaration
public static DaggerfallUnityItem CreateRandomArmor(int playerLevel, Genders gender, Races race)
Parameters
Type Name Description
Int32 playerLevel

Player level for material type.

Genders gender

Gender armor is created for.

Races race

Race armor is created for.

Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem

| Improve this Doc View Source

CreateRandomBook()

Creates a new random book

Declaration
public static DaggerfallUnityItem CreateRandomBook()
Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem.

| Improve this Doc View Source

CreateRandomClassicPotion()

Creates a random (classic) potion

Declaration
public static DaggerfallUnityItem CreateRandomClassicPotion()
Returns
Type Description
DaggerfallUnityItem

Potion DaggerfallUnityItem

| Improve this Doc View Source

CreateRandomClothing(Genders, Races)

Creates a new item of random clothing.

Declaration
public static DaggerfallUnityItem CreateRandomClothing(Genders gender, Races race)
Parameters
Type Name Description
Genders gender

Gender of player

Races race
Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem.

| Improve this Doc View Source

CreateRandomDrug()

Creates a new random drug.

Declaration
public static DaggerfallUnityItem CreateRandomDrug()
Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem.

| Improve this Doc View Source

CreateRandomGem()

Creates a new random gem.

Declaration
public static DaggerfallUnityItem CreateRandomGem()
Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem.

| Improve this Doc View Source

CreateRandomIngredient()

Creates a random ingredient from a random ingredient group.

Declaration
public static DaggerfallUnityItem CreateRandomIngredient()
Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem

| Improve this Doc View Source

CreateRandomIngredient(ItemGroups)

Creates a random ingredient from any of the ingredient groups. Passing a non-ingredient group will return null.

Declaration
public static DaggerfallUnityItem CreateRandomIngredient(ItemGroups ingredientGroup)
Parameters
Type Name Description
ItemGroups ingredientGroup

Ingredient group.

Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem

| Improve this Doc View Source

CreateRandomJewellery()

Creates a new random jewellery.

Declaration
public static DaggerfallUnityItem CreateRandomJewellery()
Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem.

| Improve this Doc View Source

CreateRandomlyFilledSoulTrap()

Declaration
public static DaggerfallUnityItem CreateRandomlyFilledSoulTrap()
Returns
Type Description
DaggerfallUnityItem
| Improve this Doc View Source

CreateRandomMagicItem(Int32, Genders, Races)

Creates random magic item in same manner as classic.

Declaration
public static DaggerfallUnityItem CreateRandomMagicItem(int playerLevel, Genders gender, Races race)
Parameters
Type Name Description
Int32 playerLevel
Genders gender
Races race
Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem

| Improve this Doc View Source

CreateRandomPotion(Int32)

Creates a random potion from all registered recipes.

Declaration
public static DaggerfallUnityItem CreateRandomPotion(int stackSize = 1)
Parameters
Type Name Description
Int32 stackSize
Returns
Type Description
DaggerfallUnityItem

Potion DaggerfallUnityItem

| Improve this Doc View Source

CreateRandomReligiousItem()

Creates a new random religious item.

Declaration
public static DaggerfallUnityItem CreateRandomReligiousItem()
Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem.

| Improve this Doc View Source

CreateRandomWeapon(Int32)

Creates random weapon.

Declaration
public static DaggerfallUnityItem CreateRandomWeapon(int playerLevel)
Parameters
Type Name Description
Int32 playerLevel

Player level for material type.

Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem

| Improve this Doc View Source

CreateRegularMagicItem(Int32, Int32, Genders, Races)

Create a regular non-artifact magic item.

Declaration
public static DaggerfallUnityItem CreateRegularMagicItem(int chosenItem, int playerLevel, Genders gender, Races race)
Parameters
Type Name Description
Int32 chosenItem

An integer index of the item to create, or -1 for a random one.

Int32 playerLevel

The player level to create an item for.

Genders gender

The gender to create an item for.

Races race

The race to create an item for.

Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem

Exceptions
Type Condition
Exception

When a base item cannot be created.

| Improve this Doc View Source

CreateWeapon(Weapons, WeaponMaterialTypes)

Generates a weapon.

Declaration
public static DaggerfallUnityItem CreateWeapon(Weapons weapon, WeaponMaterialTypes material)
Parameters
Type Name Description
Weapons weapon
WeaponMaterialTypes material

Ignored for arrows

Returns
Type Description
DaggerfallUnityItem
| Improve this Doc View Source

CreateWomensClothing(WomensClothing, Races, Int32, DyeColors)

Generates women's clothing.

Declaration
public static DaggerfallUnityItem CreateWomensClothing(WomensClothing item, Races race, int variant = -1, DyeColors dye = DyeColors.Blue)
Parameters
Type Name Description
WomensClothing item

Item type to generate.

Races race

Race of player.

Int32 variant

Variant to use. If not set, a random variant will be selected.

DyeColors dye

Dye to use

Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem.

| Improve this Doc View Source

GetBodyMorphology(Races)

Declaration
public static ItemBuilder.BodyMorphology GetBodyMorphology(Races race)
Parameters
Type Name Description
Races race
Returns
Type Description
ItemBuilder.BodyMorphology
| Improve this Doc View Source

RandomClothingDye()

Declaration
public static DyeColors RandomClothingDye()
Returns
Type Description
DyeColors
| Improve this Doc View Source

RandomizeArmorVariant(DaggerfallUnityItem)

Sets a random variant of armor item.

Declaration
public static void RandomizeArmorVariant(DaggerfallUnityItem item)
Parameters
Type Name Description
DaggerfallUnityItem item

Item to randomize variant.

| Improve this Doc View Source

RandomizeClothingVariant(DaggerfallUnityItem)

Sets a random variant of clothing item.

Declaration
public static void RandomizeClothingVariant(DaggerfallUnityItem item)
Parameters
Type Name Description
DaggerfallUnityItem item

Item to randomize variant.

| Improve this Doc View Source

SetItemPropertiesByMaterial(DaggerfallUnityItem, WeaponMaterialTypes)

Sets properties for a weapon or piece of armor based on its material.

Declaration
public static DaggerfallUnityItem SetItemPropertiesByMaterial(DaggerfallUnityItem item, WeaponMaterialTypes material)
Parameters
Type Name Description
DaggerfallUnityItem item

Item to have its properties modified.

WeaponMaterialTypes material

Material to use to apply properties.

Returns
Type Description
DaggerfallUnityItem

DaggerfallUnityItem

| Improve this Doc View Source

SetRace(DaggerfallUnityItem, Races)

Declaration
public static void SetRace(DaggerfallUnityItem item, Races race)
Parameters
Type Name Description
DaggerfallUnityItem item
Races race
| Improve this Doc View Source

SetVariant(DaggerfallUnityItem, Int32)

Declaration
public static void SetVariant(DaggerfallUnityItem item, int variant)
Parameters
Type Name Description
DaggerfallUnityItem item
Int32 variant
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX