d2records

package
v0.0.0-...-7f92c57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package d2records provides a RecordManager implementation which is used to parse the various txt files from the d2 mpq archives. Each data dictionary (txt file) is parsed into slices or maps of structs. There is a struct type defined for each txt file.

The RecordManager is a singleton that loads all of the txt files and export them as data members. The RecordManager is meant to be used a a singleton member, exported by the AssetManager in d2core/d2asset.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArmorTypeRecord

type ArmorTypeRecord struct {
	Name  string
	Token string
}

ArmorTypeRecord describes an armor type. It has a name and 3-character token. The token is used to change the character animation mode.

type ArmorTypes

type ArmorTypes map[string]*ArmorTypeRecord

ArmorTypes is a map of ArmorTypeRecords

type AutoMagic

type AutoMagic []*AutoMagicRecord

AutoMagic has all of the AutoMagicRecords, used for generating magic properties for spawned items

type AutoMagicRecord

type AutoMagicRecord struct {
	// IncludeItemCodes
	// itype 1 to itype7
	// "Include Type" fields. You need to place item codes in any of these columns to allow that item
	// to receive mods from this row. See the note below.
	IncludeItemCodes [7]string

	// ModCode
	// They're the Property codes from Properties.txt.
	// These determine the actual properties which make up this autoprefix.
	// Each autoprefix can include up to three modifiers.
	ModCode [3]string

	// ExcludeItemCodes
	// etype 1 to etype3
	// 'Exclude type' . This field prevents certain mods from spawning on specific item codes.
	ExcludeItemCodes [3]string

	// ModParam, min, max
	// Parameter, min, and max values for the property
	ModParam [3]int
	ModMin   [3]int
	ModMax   [3]int

	// Name
	// String Comment Blizzard lists the equivalent prefix/affix here.
	// You can use what ever you wish here though. Handy for keeping track of groups.
	Name string

	// Version
	// it needs to be set to 0 if the prefix\affix you want to create or edit is going to be a
	// classic-only item ( with "classic" we mean "non-expansion" mode,
	// which you can toggle on and off when creating a character) or set to 100 if it's going to be
	// available in Expansion. This field is important,
	// as Items with " version" set to 100 will NOT be generated in Classic Diablo II.
	Version int

	// MinSpawnLevel
	// this field accepts numeric values and specifies the minimum level from which this autoprefix
	// can spawn. The column in question can be combined with the following maxlevel: to effectively
	// control groups of automods,
	// because you can use this field to combine multiple rows so that the autoprefixes are assigned
	// based on the level of the treasure drop [see below].
	MinSpawnLevel int

	// MaxSpawnLevel
	// this field accepts numeric values and specifies the maximum level beyond which the automod
	// stop spawning.
	MaxSpawnLevel int

	// LevelRequirement
	// It is the level requirement for this autoprefix.
	// This value is added to the Level Requirement of the item generated with this mod.
	LevelRequirement int

	// Class
	// the class type
	Class d2enum.Hero

	// ClassLevelRequirement
	// If class is set, this should allow a separate level requirement for this class.
	// This is a polite thing to do,
	// as other classes gain no advantage from class specific modifiers.
	// I am uncertain that this actually works.
	ClassLevelRequirement int

	// Frequency
	// For autoprefix groups, it states the chance to spawn this specific group member vs others.
	// Higher numbers means the automod will be more common. The 1.
	// 09 version file guide has some formuae relateing to this.
	Frequency int

	// Group
	// This field accepts numeric values and groups all the lines with the same values,
	// which are treated as a group. Only one autoprefix per group can be chosen,
	// and groups are influenced by levelreq, classlevelreq and frequency The 1.
	// 09 version file guide has a very nice tutorial about how to set up groups.
	// NOTE: The group number must also be entered in the 'auto prefix' column of each entry in
	// Weapons.txt or Armor.txt in order for the property to appear.
	Group int

	// PaletteTransform
	// If transform is set to 1 then the item will be colored with the chosen color code,
	// taken from Colors.txt
	PaletteTransform int

	// CostDivide
	// Numeric value that acts as divisor for the item price.
	CostDivide int

	// CostMultiply
	// Numeric value that acts as multiplier for the item price.
	CostMultiply int

	// CostAdd
	// Numeric value that acts as a flat sum added to the item price.
	CostAdd int

	// Spawnable
	// It is a boolean type field, and states if this autoprefix can actually spawn in the game.
	// You can disable this row by setting it to 0 , or enable it by setting it to 1
	Spawnable bool

	// SpawnOnRare
	// It decides whether this autoprefix spawns on rare quality items or not.
	// You can prevent that from happening by setting it to 0 , or you can allow it by setting it to 1
	SpawnOnRare bool

	// transform
	// It is a boolean value whichallows the colorization of the items.
	Transform bool
}

AutoMagicRecord describes rules for automatically generating magic properties when spawning items

type AutoMapRecord

type AutoMapRecord struct {
	// LevelName is a string with an act number followed
	// by a level type, separated by a space. For example:
	// '1 Barracks' is the barracks level in act 1.
	LevelName string

	// TileName refers to a certain tile orientation.
	// See https://d2mods.info/forum/kb/viewarticle?a=468
	TileName string

	// Style is the top index in a 2D tile array.
	Style int // tiles[autoMapRecord.Style][]

	// StartSequence and EndSequence are sub indices the
	// same 2D array as Style. They describe a range of
	// tiles for which covered by this AutoMapRecord.
	// In some rows you can find a value of -1. This means
	// the game will only look at Style and TileName to
	// determine which tiles are addressed.
	StartSequence int // tiles[][autoMapRecord.StartSequence]
	EndSequence   int // tiles[][autoMapRecord.EndSequence]

	// Frames determine the frame of the MaxiMap(s).dc6 that
	// will be applied to the specified tiles. The frames
	// are in rows, if each row holds 20 images (when you
	// re-extract the chart with Dc6Table, you can specify
	// how many graphics a line can hold), line 1 includes
	// icons 0-19, line 2 from 20 to 39 etc.
	// Multiple values exist for Cel (and Type) to enable
	// variation. Presumably game chooses randomly between
	// any of the 4 values which are not set to -1.
	Frames []int
}

AutoMapRecord represents one row from d2data.mpq/AutoMap.txt. Based on the information here https://d2mods.info/forum/kb/viewarticle?a=419

type AutoMaps

type AutoMaps []*AutoMapRecord

AutoMaps contains all data in AutoMap.txt.

type BeltRecord

type BeltRecord struct {
	Name      string
	NumBoxes  int
	BoxWidth  int
	BoxHeight int

	Box1Left   int
	Box1Right  int
	Box1Top    int
	Box1Bottom int

	Box2Left   int
	Box2Right  int
	Box2Top    int
	Box2Bottom int

	Box3Left   int
	Box3Right  int
	Box3Top    int
	Box3Bottom int

	Box4Left   int
	Box4Right  int
	Box4Top    int
	Box4Bottom int

	Box5Left   int
	Box5Right  int
	Box5Top    int
	Box5Bottom int

	Box6Left   int
	Box6Right  int
	Box6Top    int
	Box6Bottom int

	Box7Left   int
	Box7Right  int
	Box7Top    int
	Box7Bottom int

	Box8Left   int
	Box8Right  int
	Box8Top    int
	Box8Bottom int

	Box9Left   int
	Box9Right  int
	Box9Top    int
	Box9Bottom int

	Box10Left   int
	Box10Right  int
	Box10Top    int
	Box10Bottom int

	Box11Left   int
	Box11Right  int
	Box11Top    int
	Box11Bottom int

	Box12Left   int
	Box12Right  int
	Box12Top    int
	Box12Bottom int

	Box13Left   int
	Box13Right  int
	Box13Top    int
	Box13Bottom int

	Box14Left   int
	Box14Right  int
	Box14Top    int
	Box14Bottom int

	Box15Left   int
	Box15Right  int
	Box15Top    int
	Box15Bottom int

	Box16Left   int
	Box16Right  int
	Box16Top    int
	Box16Bottom int
}

BeltRecord is a representation of the belt ui-panel dimensions/positioning

type Belts

type Belts map[string]*BeltRecord

Belts stores all of the BeltRecords

type BodyLocationRecord

type BodyLocationRecord struct {
	Name string
	Code string
}

BodyLocationRecord describes a body location that items can be equipped to

type BodyLocations

type BodyLocations map[string]*BodyLocationRecord

BodyLocations contains the body location records

type BookRecord

type BookRecord struct {
	Name            string
	Namco           string // The displayed name, where the string prefix is "Tome"
	Completed       string
	ScrollSpellCode string
	BookSpellCode   string
	Pspell          int
	SpellIcon       int
	ScrollSkill     string
	BookSkill       string
	BaseCost        int
	CostPerCharge   int
}

BookRecord is a representation of a row from books.txt

type Books

type Books map[string]*BookRecord

Books stores all of the BookRecords

type CalculationRecord

type CalculationRecord struct {
	Code        string
	Description string
}

CalculationRecord The skillcalc.txt and misscalc.txt files are essentially lookup tables for the Skills.txt and Missiles.txt Calc functions To avoid duplication (since they have identical fields) they are both represented by the CalculationRecord type

type Calculations

type Calculations map[string]*CalculationRecord

Calculations is where calculation records are stored

type CharStatRecord

type CharStatRecord struct {
	Class d2enum.Hero

	// the initial stats at character level 1
	InitStr     int // initial strength
	InitDex     int // initial dexterity
	InitVit     int // initial vitality
	InitEne     int // initial energy
	InitStamina int // initial stamina

	ManaRegen   int // number of seconds to regen mana completely
	ToHitFactor int // added to basic AR of character class

	VelocityWalk    int // velocity of the character while walking
	VelocityRun     int // velocity of the character while running
	StaminaRunDrain int // rate of stamina loss, lower is longer drain time

	// NOTE: Each point of Life/Mana/Stamina is divided by 256 for precision.
	// value is in fourths, lowest possible is 64/256
	LifePerLevel    int // amount of life per character level
	ManaPerLevel    int // amount of mana per character level
	StaminaPerLevel int // amount of stamina per character level

	LifePerVit    int // life per point of vitality
	ManaPerEne    int // mana per point of energy
	StaminaPerVit int // stamina per point of vitality

	StatPerLevel int // amount of stat points per level

	BlockFactor int // added to base shield block% in armor.txt (display & calc)

	// appears on starting weapon
	StartSkillBonus string // a key that points to a property

	// The skills the character class starts with (always available)
	BaseSkill [10]string // the base skill keys of the character, always available

	// string for bonus to class skills (ex: +1 to all Amazon skills).
	SkillStrAll       string    // string for bonus to all skills
	SkillStrTab       [3]string // string for bonus per skill tabs
	SkillStrClassOnly string    // string for class-exclusive skills

	BaseWeaponClass d2enum.WeaponClass // controls animation when unarmed

	StartItem         [10]string // tokens for the starting items
	StartItemLocation [10]string // locations of the starting items
	StartItemCount    [10]int    // amount of the starting items
}

CharStatRecord is a struct that represents a single row from charstats.txt

type CharStats

type CharStats map[d2enum.Hero]*CharStatRecord

CharStats holds all of the CharStatRecords

type ColorRecord

type ColorRecord struct {
	TransformColor string
	Code           string
}

ColorRecord is a representation of a color transform

type Colors

type Colors map[string]*ColorRecord

Colors is a map of ColorRecords

type CommonItems

type CommonItems map[string]*ItemCommonRecord

CommonItems stores all ItemCommonRecords

type ComponentCodeRecord

type ComponentCodeRecord struct {
	Component string
	Code      string
}

ComponentCodeRecord represents a single row from compcode.txt

type ComponentCodes

type ComponentCodes map[string]*ComponentCodeRecord

ComponentCodes is a lookup table for DCC Animation Component Subtype, it links hardcoded data with the txt files

type CompositeTypeRecord

type CompositeTypeRecord struct {
	Name  string
	Token string
}

CompositeTypeRecord describes a layer for an animated composite (multi-sprite entities). The token is used for changing character animation modes.

type CompositeTypes

type CompositeTypes map[string]*CompositeTypeRecord

CompositeTypes is a map of CompositeTypeRecords

type CubeModifierRecord

type CubeModifierRecord struct {
	Name  string
	Token string
}

CubeModifierRecord is a name and 3-character token for cube modifier codes and gem types

type CubeModifiers

type CubeModifiers map[string]*CubeModifierRecord

CubeModifiers is a map of CubeModifierRecords

type CubeRecipeItem

type CubeRecipeItem struct {
	Code   string   // item code e.g. 'weap'
	Params []string // list of parameters e.g. 'sock'
	Count  int      // required stack count
}

CubeRecipeItem represents an item, with a stack count and parameters. Here it is used to describe the required ingredients of the recipe and the output result. See: https://d2mods.info/forum/kb/viewarticle?a=284

type CubeRecipeItemProperty

type CubeRecipeItemProperty struct {
	Code string // the code field from properties.txt

	// Note: I can't find any example value for this
	// so I've made it an int for now
	Chance int // the chance to apply the property

	// Note: The few examples in cubemain.txt are integers,
	// however d2records.UniqueItemProperty is a similar
	// struct which handles a similar field that may be a
	// string or an integer.
	//
	// See: https://d2mods.info/forum/kb/viewarticle?a=345
	// "the parameter passed on to the associated property, this is used to pass skill IDs,
	// state IDs, monster IDs, montype IDs and the like on to the properties that require
	// them, these fields support calculations."
	Param int // for properties that use parameters

	Min int // the minimum value of the property stat
	Max int // the maximum value of the property stat
}

CubeRecipeItemProperty represents the mod #, mod # chance, mod # param, mod # min, mod # max fields in cubemain.txt

type CubeRecipeRecord

type CubeRecipeRecord struct {
	// Description has no function, it just describes the
	// recipe.
	Description string

	// Enabled is true if the recipe is active in game.
	Enabled bool

	// Ladder is true if the recipe is only allowed in
	// ladder on realms. Also works for single player
	// TCP/IP.
	Ladder bool

	// MinDiff sets the minimum difficulty level required
	// to use this recipe.
	MinDiff int // 0, 1, 2 = normal, nightmare, hell

	// Version specifies whether the recipe is old
	// classic, new classic or expansion.
	Version int // 0, 1, 100 = old cl, new cl, expansion

	// The following three 'Req' values form a comparison:
	// if <ReqStatID> <ReqOperation> <ReqValue> then recipe
	// is allowed.
	//
	// ReqStatID is an ID value from the ItemStatsCost
	// data set specifying the stat to compare. Whether
	// this references a player or item stat depends on
	// the Operator.
	ReqStatID int
	// ReqOperation is a number describing the
	// comparison operator and the action to take if
	// it evaluates to true. See Appendix A in the
	// linked article and note that 1, 2, 27 and 28
	// are unusual.
	ReqOperation int // 1 - 28
	// ReqValue is the number the stat is compared against.
	ReqValue int

	// Class Can be used to make recipes class
	// specific. Example class codes given are:
	// ama bar pal nec sor dru ass
	//
	// Since this field isn't used in the game data,
	// classFieldToEnum has been implemented based on that
	// example. It understands the following syntax,
	// which may be incorrect:
	// "ama,bar,dru"
	Class []d2enum.Hero

	// NumInputs is the total count of input items
	// required, including counts in item stacks.
	NumInputs int

	// Inputs is the actual recipe, a collection of
	// items/stacks with parameters required to
	// obtain the items defined in Outputs.
	Inputs []CubeRecipeItem

	// Outputs are the items created when the recipe
	// is used.
	Outputs []CubeRecipeResult
}

CubeRecipeRecord represents one row from CubeMain.txt. It is one possible recipe for the Horadric Cube, with requirements and output items. See: https://d2mods.info/forum/kb/viewarticle?a=284

type CubeRecipeResult

type CubeRecipeResult struct {
	// Item is the item, with a count and parameters.
	Item CubeRecipeItem

	// Level causes the item to be a specific level.
	//
	// Note that this value force spawns the item at
	// this specific level. Its also used in the
	// formula for the next two fields.
	Level int // the item level of Item

	// PLevel uses a portion of the players level for
	// the output level.
	PLevel int

	// ILevel uses a portion of the first input's
	// level for the output level.
	ILevel int

	// Properties is a list of properties which may
	// be attached to Item.
	Properties []CubeRecipeItemProperty
}

CubeRecipeResult is an item generated on use of a cube recipe.

type CubeRecipes

type CubeRecipes []*CubeRecipeRecord

CubeRecipes contains all rows in CubeMain.txt.

type CubeTypeRecord

type CubeTypeRecord struct {
	Name  string
	Token string
}

CubeTypeRecord is a name and 3-character token for cube item types

type CubeTypes

type CubeTypes map[string]*CubeTypeRecord

CubeTypes is a map of CubeTypeRecords

type DifficultyLevelRecord

type DifficultyLevelRecord struct {
	// Difficulty name. it is hardcoded and you cannot add new ones unless you do
	// some Code Edits
	Name string // Name

	// Resistance penalty in the current difficulty.
	ResistancePenalty int // ResistPenalty

	// The percentage of experience you lose when you die on this difficulty.
	DeathExperiencePenalty int // DeathExpPenalty

	// Not Used. Pre 1.07 it was the percentage of low quality, normal, superior and
	// exceptional items dropped on this difficulty.
	DropChanceLow         int // UberCodeOddsNormal
	DropChanceNormal      int // UberCodeOddsNormal
	DropChanceSuperior    int // UberCodeOddsNormal
	DropChanceExceptional int // UberCodeOddsNormal

	// Not used. Pre 1.07 it was the percentage of magic, rare, set and unique
	// exceptional items dropped on this difficulty.
	DropChanceMagic  int // UberCodeOddsGood
	DropChanceRare   int // UberCodeOddsGood
	DropChanceSet    int // UberCodeOddsGood
	DropChanceUnique int // UberCodeOddsGood

	// Additional skill points added to monster skills specified in MonStats.txt
	// for this difficulty. It has nothing to do with the missile damage bonus.
	MonsterSkillBonus int // MonsterSkillBonus

	// This value is a divisor, and so never set it to 0. It applies to the monster
	// freezing length and cold length duration.
	MonsterColdDivisor   int // MonsterColdDivisor
	MonsterFreezeDivisor int // MonsterFreezeDivisor

	// These values are divisor and they're used respectively for AI altering states
	AiCurseDivisor   int // AiCurseDivisor
	LifeStealDivisor int // LifeStealDivisor
	ManaStealDivisor int // ManaStealDivisor

}

DifficultyLevelRecord contain the parameters that change for different difficulties

type DifficultyLevels

type DifficultyLevels map[d2enum.DifficultyType]*DifficultyLevelRecord

DifficultyLevels contain the difficulty records for each difficulty

type DropRatioInfo

type DropRatioInfo struct {
	Frequency  int
	Divisor    int
	DivisorMin int
}

DropRatioInfo is a helper struct for item drop calculation

type ElemTypeRecord

type ElemTypeRecord struct {
	// ElemType Elemental damage type name
	ElemType string

	// Code Elemental damage type code
	Code string
}

ElemTypeRecord represents a single line in ElemType.txt

type ElemTypes

type ElemTypes map[string]*ElemTypeRecord

ElemTypes stores the ElemTypeRecords

type EventRecord

type EventRecord struct {
	Event string
}

EventRecord is a representation of a single row from events.txt

type Events

type Events []*EventRecord

Events holds all of the event records from events.txt

type ExperienceBreakpointRecord

type ExperienceBreakpointRecord struct {
	Level           int
	HeroBreakpoints map[d2enum.Hero]int
	Ratio           int
}

ExperienceBreakpointRecord describes the experience points required to gain a level for all character classes

type ExperienceBreakpoints

type ExperienceBreakpoints map[int]*ExperienceBreakpointRecord

ExperienceBreakpoints describes the required experience for each level for each character class

type ExperienceMaxLevels

type ExperienceMaxLevels map[d2enum.Hero]int

ExperienceMaxLevels defines the max character levels

type Gamble

type Gamble map[string]*GambleRecord

Gamble is a map of GambleRecords

type GambleRecord

type GambleRecord struct {
	Name string
	Code string
}

GambleRecord is a representation of an item type that can be gambled for at vendors

type GemRecord

type GemRecord struct {
	Name            string
	Letter          string
	Transform       int
	Code            string
	Nummods         int
	WeaponMod1Code  string
	WeaponMod1Param int
	WeaponMod1Min   int
	WeaponMod1Max   int
	WeaponMod2Code  string
	WeaponMod2Param int
	WeaponMod2Min   int
	WeaponMod2Max   int
	WeaponMod3Code  string
	WeaponMod3Param int
	WeaponMod3Min   int
	WeaponMod3Max   int
	HelmMod1Code    string
	HelmMod1Param   int
	HelmMod1Min     int
	HelmMod1Max     int
	HelmMod2Code    string
	HelmMod2Param   int
	HelmMod2Min     int
	HelmMod2Max     int
	HelmMod3Code    string
	HelmMod3Param   int
	HelmMod3Min     int
	HelmMod3Max     int
	ShieldMod1Code  string
	ShieldMod1Param int
	ShieldMod1Min   int
	ShieldMod1Max   int
	ShieldMod2Code  string
	ShieldMod2Param int
	ShieldMod2Min   int
	ShieldMod2Max   int
	ShieldMod3Code  string
	ShieldMod3Param int
	ShieldMod3Min   int
	ShieldMod3Max   int
}

GemRecord is a representation of a single row of gems.txt it describes the properties of socketable items

type Gems

type Gems map[string]*GemRecord

Gems stores all of the GemRecords

type HirelingDescriptionRecord

type HirelingDescriptionRecord struct {
	Name  string
	Token string
}

HirelingDescriptionRecord represents is a hireling subtype

type HirelingDescriptions

type HirelingDescriptions map[string]*HirelingDescriptionRecord

HirelingDescriptions is a lookup table for hireling subtype codes

type HirelingRecord

type HirelingRecord struct {
	Hireling        string
	SubType         string
	ID              int
	Class           int
	Act             int
	Difficulty      int
	Level           int
	Seller          int
	NameFirst       string
	NameLast        string
	Gold            int
	ExpPerLvl       int
	HP              int
	HPPerLvl        int
	Defense         int
	DefPerLvl       int
	Str             int
	StrPerLvl       int
	Dex             int
	DexPerLvl       int
	AR              int
	ARPerLvl        int
	Share           int
	DmgMin          int
	DmgMax          int
	DmgPerLvl       int
	Resist          int
	ResistPerLvl    int
	WType1          string
	WType2          string
	HireDesc        string
	DefaultChance   int
	Skill1          string
	Mode1           int
	Chance1         int
	ChancePerLevel1 int
	Level1          int
	LvlPerLvl1      int
	Skill2          string
	Mode2           int
	Chance2         int
	ChancePerLevel2 int
	Level2          int
	LvlPerLvl2      int
	Skill3          string
	Mode3           int
	Chance3         int
	ChancePerLevel3 int
	Level3          int
	LvlPerLvl3      int
	Skill4          string
	Mode4           int
	Chance4         int
	ChancePerLevel4 int
	Level4          int
	LvlPerLvl4      int
	Skill5          string
	Mode5           int
	Chance5         int
	ChancePerLevel5 int
	Level5          int
	LvlPerLvl5      int
	Skill6          string
	Mode6           int
	Chance6         int
	ChancePerLevel6 int
	Level6          int
	LvlPerLvl6      int
	Head            int
	Torso           int
	Weapon          int
	Shield          int
}

HirelingRecord is a representation of rows in hireling.txt these records describe mercenaries

type Hirelings

type Hirelings []*HirelingRecord

Hirelings stores hireling (mercenary) records

type HitClassRecord

type HitClassRecord struct {
	Name  string
	Token string
}

HitClassRecord is used for changing character animation modes.

type HitClasses

type HitClasses map[string]*HitClassRecord

HitClasses is a map of HitClassRecords

type IndexedObjects

type IndexedObjects [][][]*ObjectLookupRecord

IndexedObjects is a slice of object records for quick lookups. nil checks should be done for uninitialized values at each level. [Act 1-5][Type 1-2][ID 0-855]

type Inventory

type Inventory map[string]*InventoryRecord //nolint:gochecknoglobals // Currently global by design

Inventory holds all of the inventory records from inventory.txt

type InventoryRecord

type InventoryRecord struct {
	Name  string
	Panel *box
	Grid  *grid
	Slots map[d2enum.EquippedSlot]*box
}

InventoryRecord represents a single row from inventory.txt, it describes the grid layout and positioning of various inventory-related ui panels.

type ItemAffixCommonGroup

type ItemAffixCommonGroup struct {
	ID      int
	Members map[string]*ItemAffixCommonRecord
}

ItemAffixCommonGroup is a grouping that is common between prefix/suffix

func (*ItemAffixCommonGroup) AddMember

AddMember adds an affix to the group

func (*ItemAffixCommonGroup) GetTotalFrequency

func (g *ItemAffixCommonGroup) GetTotalFrequency() int

GetTotalFrequency returns the cumulative frequency of the affix group

type ItemAffixCommonModifier

type ItemAffixCommonModifier = PropertyDescriptor

ItemAffixCommonModifier is the generic modifier form that prefix/suffix shares modifiers are like dynamic properties, they have a key that points to a property a parameter for the property, and a min/max value

type ItemAffixCommonRecord

type ItemAffixCommonRecord struct {
	Group     *ItemAffixCommonGroup
	Modifiers []*ItemAffixCommonModifier

	ItemInclude []string
	ItemExclude []string

	Name           string
	Class          string
	TransformColor string

	Version int
	Type    d2enum.ItemAffixSubType

	Level    int
	MaxLevel int

	LevelReq      int
	ClassLevelReq int

	Frequency int
	GroupID   int

	PriceAdd   int
	PriceScale int

	IsPrefix bool
	IsSuffix bool

	Spawnable bool
	Rare      bool
	Transform bool
}

ItemAffixCommonRecord is a common definition that both prefix and suffix use

func (*ItemAffixCommonRecord) ProbabilityToSpawn

func (a *ItemAffixCommonRecord) ProbabilityToSpawn(qlvl int) float64

ProbabilityToSpawn returns the chance of the affix spawning on an item with a given quality level

type ItemAffixGroups

type ItemAffixGroups map[int]*ItemAffixCommonGroup

ItemAffixGroups are groups of MagicPrefix/Suffixes

type ItemCommonRecord

type ItemCommonRecord struct {
	UsageStats             [3]ItemUsageStat         // stat boosts applied upon usage
	CureOverlayStates      [2]string                // name of the overlay states that are removed upon use of this item
	OverlayState           string                   // name of the overlay state to be applied upon use of this item
	SpellDescriptionString string                   // points to a string containing the description
	BetterGem              string                   // 3 char code pointing to the gem this upgrades to (non if not applicable)
	SpellDescriptionCalc   d2calculation.CalcString // a calc string what value to display
	WeaponClass            string                   // what kind of attack does this weapon have (i.e. determines attack animations)
	WeaponClass2Hand       string                   // what kind of attack when wielded with two hands
	HitClass               string                   // determines sounds/graphic effects when attacking
	SpecialFeature         string                   // Just a comment
	FlavorText             string                   // unknown, probably just for reference
	TransmogCode           string                   // the 3 char code representing the item this becomes via transmog
	NightmareUpgrade       string                   // upgraded in higher difficulties
	HellUpgrade            string
	SourceArt              string                       // unused?
	GameArt                string                       // unused?
	Vendors                map[string]*ItemVendorParams // controls vendor settings
	Type                   string                       // base type in ItemTypes.txt
	Type2                  string
	DropSound              string // sfx for dropping
	UseSound               string // sfx for using
	FlippyFile             string // DC6 file animation to play when item drops on the ground
	InventoryFile          string // DC6 file used in your inventory
	UniqueInventoryFile    string // DC6 file used by the unique version of this item
	SetInventoryFile       string // DC6 file used by the set version of this item
	Code                   string // identifies the item
	NameString             string // seems to be identical to code?
	AlternateGfx           string // code of the DCC used when equipped
	OpenBetaGfx            string // unknown
	NormalCode             string
	UberCode               string
	UltraCode              string
	Name                   string
	Source                 d2enum.InventoryItemType

	Version          int // 0 = classic, 100 = expansion
	Rarity           int // higher, the rarer
	MinAC            int
	MaxAC            int
	Absorbs          int // unused?
	Speed            int // affects movement speed of wielder, >0 = you move slower, <0 = you move faster
	RequiredStrength int
	Block            int // chance to block, capped at 75%
	Durability       int // base durability 0-255
	Level            int // base item level (controls monster drops, for instance a lv20 monster cannot drop a lv30 item)
	RequiredLevel    int // required level to wield
	Cost             int // base cost
	GambleCost       int // for reference only, not used
	MagicLevel       int // additional magic level (for gambling?)
	AutoPrefix       int // prefix automatically assigned to this item on spawn, maps to group column of Automagic.txt
	SpellOffset      int // unknown
	Component        int // corresponds to Composit.txt, player animation layer used by this
	InventoryWidth   int
	InventoryHeight  int
	GemSockets       int // number of gems to store
	GemApplyType     int // what kind of gem effect is applied

	// these represent how player animations and graphics change upon wearing this
	// these come from ArmType.txt
	AnimRightArm         int
	AnimLeftArm          int
	AnimTorso            int
	AnimLegs             int
	AnimRightShoulderPad int
	AnimLeftShoulderPad  int

	MinStack          int // min size of stack when item is spawned, used if stackable
	MaxStack          int // max size of stack when item is spawned
	DropSfxFrame      int // what frame of drop animation the sfx triggers on
	TransTable        int // unknown, related to blending mode?
	LightRadius       int // apparently unused
	Quest             int // indicates that this item belongs to a given quest?
	MissileType       int // missile gfx for throwing
	DurabilityWarning int // controls what warning icon appears when durability is low
	QuantityWarning   int // controls at what quantity the low quantity warning appears
	MinDamage         int
	MaxDamage         int
	StrengthBonus     int
	DexterityBonus    int

	GemOffset               int // unknown
	BitField1               int // 1 = leather item, 3 = metal
	ColorTransform          int // colormap to use for player's gfx
	InventoryColorTransform int // colormap to use for inventory's gfx
	Min2HandDamage          int
	Max2HandDamage          int
	MinMissileDamage        int // ranged damage stats
	MaxMissileDamage        int
	MissileSpeed            int // unknown, affects movement speed of wielder during ranged attacks?
	ExtraRange              int // base range = 1, if this is non-zero add this to the range
	// final mindam = min * str / strbonus + min * dex / dexbonus
	// same for maxdam
	RequiredDexterity    int
	SpawnStack           int // unknown, something to do with stack size when spawned (sold maybe?)
	TransmogMin          int // min amount of the transmog item to create
	TransmogMax          int // max ”
	SpellIcon            int // which icon to display when used? Is this always -1?
	SpellType            int // determines what kind of function is used when you use this item
	EffectLength         int // timer for timed usage effects
	SpellDescriptionType int // specifies how to format the usage description

	AutoBelt     bool // if true, item is put into your belt when picked up
	HasInventory bool // if true, item can store gems or runes
	CompactSave  bool // if true, doesn't store any stats upon saving
	Spawnable    bool // if 0, cannot spawn in shops
	NoDurability bool // if true, item has no durability
	Useable      bool // can be used via right click if true
	// game knows what to do if used by item code
	Throwable            bool
	Stackable            bool // can be stacked in inventory
	Unique               bool // if true, only spawns as unique
	Transparent          bool // unused
	Quivered             bool // if true, requires ammo to use
	Belt                 bool // tells what kind of belt this item is
	SkipName             bool // if true, don't include the base name in the item description
	Nameable             bool // if true, item can be personalized
	BarbOneOrTwoHanded   bool // if true, barb can wield this in one or two hands
	UsesTwoHands         bool // if true, it's a 2handed weapon
	QuestDifficultyCheck bool // if true, item only works in the difficulty it was found in
	PermStoreItem        bool // if true, vendor will always sell this
	Transmogrify         bool // if true, can be turned into another item via right click
	Multibuy             bool // if true, when you buy via right click + shift it will fill your belt automatically
}

ItemCommonRecord is a representation of entries from armor.txt, weapons.txt, and misc.txt

type ItemEquivalenceByRecord

type ItemEquivalenceByRecord map[*ItemCommonRecord][]string

ItemEquivalenceByRecord is used for getting equivalent item codes using an ItemCommonRecord

type ItemEquivalenceList

type ItemEquivalenceList []*ItemCommonRecord

ItemEquivalenceList is an equivalence map that each ItemTypeRecord will have

type ItemEquivalenceMap

type ItemEquivalenceMap map[string]ItemEquivalenceList

ItemEquivalenceMap describes item equivalencies for ItemTypes

func LoadItemEquivalencies

func LoadItemEquivalencies(allItems CommonItems, allTypes ItemTypes) ItemEquivalenceMap

LoadItemEquivalencies loads a map of ItemType string codes to slices of ItemCommonRecord pointers

type ItemQualities

type ItemQualities map[string]*ItemQualityRecord

ItemQualities stores all of the QualityRecords

type ItemQualityRecord

type ItemQualityRecord struct {
	NumMods   int
	Mod1Code  string
	Mod1Param int
	Mod1Min   int
	Mod1Max   int
	Mod2Code  string
	Mod2Param int
	Mod2Min   int
	Mod2Max   int

	// The following fields determine this row's applicability to
	// categories of item.
	Armor   bool
	Weapon  bool
	Shield  bool
	Thrown  bool
	Scepter bool
	Wand    bool
	Staff   bool
	Bow     bool
	Boots   bool
	Gloves  bool
	Belt    bool

	Level    int
	Multiply int
	Add      int
}

ItemQualityRecord represents a single row of ItemQualities.txt, which controls properties for superior quality items

type ItemRatioRecord

type ItemRatioRecord struct {
	Function string
	// 0 for classic, 1 for LoD
	Version bool

	// 0 for normal, 1 for exceptional
	Uber          bool
	ClassSpecific bool

	// All following fields are used in item drop calculation
	UniqueDropInfo    DropRatioInfo
	RareDropInfo      DropRatioInfo
	SetDropInfo       DropRatioInfo
	MagicDropInfo     DropRatioInfo
	HiQualityDropInfo DropRatioInfo
	NormalDropInfo    DropRatioInfo
}

ItemRatioRecord encapsulates information found in ItemRatio.txt, it specifies drop ratios for various types of items The information has been gathered from [https://d2mods.info/forum/kb/viewarticle?a=387]

type ItemRatios

type ItemRatios map[string]*ItemRatioRecord

ItemRatios holds all of the ItemRatioRecords from ItemRatio.txt

type ItemStatCostRecord

type ItemStatCostRecord struct {
	Name    string
	OpBase  string
	OpStat1 string
	OpStat2 string
	OpStat3 string

	MaxStat         string // if Direct true, will not exceed val of MaxStat
	DescStrPos      string // string used when val is positive
	DescStrNeg      string
	DescStr2        string // additional string used by some string funcs
	DescGroupStrPos string // string used when val is positive
	DescGroupStrNeg string
	DescGroupStr2   string // additional string used by some string funcs

	// Stuff
	// Stay far away from this column unless you really know what you're
	// doing and / or work for Blizzard, this column is used during bin-file
	// creation to generate a cache regulating the op-stat stuff and other
	// things, changing it can be futile, it works like the constants column
	// in MonUMod.txt and has no other relation to ItemStatCost.txt, the first
	// stat in the file simply must have this set or else you may break the
	// entire op stuff.
	Stuff string

	Index int

	// path_d2.mpq version doesnt have Ranged columne, excluding for now
	// Ranged  bool // game attempts to keep stat in a range, like strength >-1
	MinAccr int // minimum ranged value

	SendBits  int // #bits to send in stat update
	SendParam int // #bits to send in stat update

	SavedBits int // #bits allocated to the value in .d2s file

	SaveBits      int // #bits saved to .d2s files, max == 2^SaveBits-1
	SaveAdd       int // how large the negative range is (lowers max, as well)
	SaveParamBits int // #param bits are saved (safe value is 17)

	Encode d2enum.EncodingType // how the stat is encoded in .d2s files

	// these two fields control additional cost on items
	// cost * (1 + value * multiply / 1024)) + add (...)
	CostAdd      int
	CostMultiply int

	ValShift int // controls how stat is stored in .d2s

	OperatorType d2enum.OperatorType
	OpParam      int

	EventID1     d2enum.ItemEventType
	EventID2     d2enum.ItemEventType
	EventFuncID1 d2enum.ItemEventFuncID
	EventFuncID2 d2enum.ItemEventFuncID

	DescPriority int // determines order when displayed
	DescFnID     int

	// Controls whenever and if so in what way the stat value is shown
	// 0 = doesn't show the value of the stat
	// 1 = shows the value of the stat infront of the description
	// 2 = shows the value of the stat after the description.
	DescVal int

	// when stats in the same group have the same value they use the
	// group func for desc (they need to be in the same affix)
	DescGroup       int
	DescGroupVal    int
	DescGroupFuncID int

	CallbackEnabled bool // whether callback fn is called if value changes
	Signed          bool // whether the stat is signed
	KeepZero        bool // prevent from going negative (assume only client side)
	UpdateAnimRate  bool // when altered, forces speed handler to adjust speed
	SendOther       bool // whether to send to other clients
	Saved           bool // whether this stat is saved in .d2s files
	SavedSigned     bool // whether the stat is saved as signed/unsigned
	Direct          bool // whether is temporary or permanent
	ItemSpecific    bool // prevents stacking with an existing stat on item

	DamageRelated bool // prevents stacking of stats while dual wielding
}

ItemStatCostRecord represents a row from itemstatcost.txt these records describe the stat values and costs (in shops) of items refer to https://d2mods.info/forum/kb/viewarticle?a=448

type ItemStatCosts

type ItemStatCosts map[string]*ItemStatCostRecord

ItemStatCosts stores all of the ItemStatCostRecords

type ItemTypeRecord

type ItemTypeRecord struct {
	// Name (ItemType)
	// A comment field that contains the “internal name” of this iType,
	// you can basically  enter anything you wish here,
	// but since you can add as many comment columns as you wish,
	// there is no reason to use it for another purpose .
	Name string

	// Code
	// The ID pointer of this ItemType, this pointer is used in many txt files  (armor.txt,
	// cubemain.txt, misc.txt, skills.txt, treasureclassex.txt, weapons.txt),
	// never use the same ID pointer twice,
	// the game will only use the first instance and ignore all other occurrences.
	// ID pointers are case sensitive, 3-4 chars long and can contain numbers, letters and symbols.
	Code string

	// Equiv1-2
	// This is used to define the parent iType, note that an iType can have multiple parents (
	// as will be shown in the cladogram – link below),
	// the only thing you must avoid at all cost is creating infinite loops.
	// I haven't ever tested what happens when you create an iType loop,
	// but infinite loops are something you should always avoid.
	Equiv1 string
	Equiv2 string

	// Shoots
	// This column specifies which type of quiver (“ammo”) this iType (
	// in case it is a weapon) requires in order to shoot (
	// you use the ID pointer of the quiver iType here).
	// Caution: The place it checks which missile to pick (either arrow, bolt,
	// explosive arrow or magic arrow) is buried deep within D2Common.dll,
	// the section can be modified, there is an extensive post discussing this in Code Editing.
	// - Thanks go to Kingpin for spotting a silly little mistake in here.
	Shoots string

	// Quiver
	// The equivalent to the previous column,
	// in here you specify which weapon this quiver is linked to. Make sure the two columns match. (
	// this also uses the ID pointer of course).
	Quiver string

	// InvGfx1-6
	// This column contains the file names of the inventory graphics that are randomly picked for
	// this iType, so if you use columns 1-3, you will set VarInvGfx to 3 (duh).
	InvGfx1 string
	InvGfx2 string
	InvGfx3 string
	InvGfx4 string
	InvGfx5 string
	InvGfx6 string

	// StorePage
	// The page code for the page a vendor should place this iType in when sold,
	// if you enable the magic tab in D2Client.dll,
	// you need to use the proper code here to put items in that tab.
	// Right now the ones used are weap = weapons1 and 2, armo = armor and misc = miscellaneous.
	StorePage string

	// BodyLoc1-2
	// If you have set the previous column to 1,
	// you need to specify the inventory slots in which the item has to be equipped. (
	// the codes used by this field are read from BodyLocs.txt)
	BodyLoc1 int
	BodyLoc2 int

	// MaxSock1, MaxSock25, MaxSock40
	// Maximum sockets for iLvl 1-25,
	// 26-40 and 40+. The range is hardcoded but the location is known,
	// so you can alter around the range to your liking. On normal,
	// items dropped from monsters are limited to 3, on nightmare to 4 and on hell to 6 sockets,
	// irregardless of this columns content.
	MaxSock1  int
	MaxSock25 int
	MaxSock40 int

	// TreasureClass
	// Can this iType ID Pointer be used as an auto TC in TreasureClassEx.txt. 1=Yes,
	// 0=No. *Such as armo3-99 and weap3-99 etc.
	TreasureClass int

	// Rarity
	// Dunno what it does, may have to do with the chance that an armor or weapon rack will pick
	// items of this iType. If it works like other rarity fields,
	// the chance is rarity / total_rarity * 100.
	Rarity int

	// StaffMods
	// Contains the class code for the character class that should get +skills from this iType (
	// such as wands that can spawn with +Necromancer skills). Note,
	// this only works if the item is not low quality, set or unique. Note,
	// that this uses the vanilla min/max skill IDs for each class as the range for the skill pool,
	// so if you add new class skills to the end of the file, you should use automagic.txt instead
	StaffMods d2enum.Hero

	// CostFormula
	// Does the game generate the sell/repair/buy prices of this iType based on its modifiers or does
	// it use only the cost specific in the respective item txt files. 2=Organ (
	// probably higher price based on unit that dropped the organ), 1=Yes, 0=No.
	// Note: Only applies to items that are not unique or set, for those the price is solely controlled
	// by the base item file and by the bonus to price given in SetItems and UniqueItems txt files.
	// The exact functionality remains unknown, as for example charms, have this disabled.
	CostFormula int

	// Class
	// Contains the class code for the class that should be able to use this iType (
	// for class specific items).
	Class d2enum.Hero

	// VarInvGfx
	// This column contains the sum of randomly picked inventory graphics this iType can have.
	VarInvGfx int

	// Repair
	// Boolean, 1=Merchants can repair this item type, 0=Merchants cannot repair this iType (note,
	// this also refers to charges being rechargeable).
	Repair bool

	// Body
	// Boolean, 1=The character can wear this iType,
	// 0=This iType can only be carried in the inventory,
	// cube or stash (and belt if it is set as “beltable” in the other item related txt files)
	Body bool

	// Throwable
	// Can this iType be thrown (determines whenever it uses the quantity and throwing damage columns
	// in Weapons.txt for example).
	Throwable bool

	// Reload
	// Can the this item be re-stacked via drag and drop. 1=Yes, 0=No.
	Reload bool

	// ReEquip
	// If the ammo runs out the game will automatically pick the next item of the same iType to
	// be equipped in it's place.
	// 1=Yes, 0=No. (more clearly, when you use up all the arrows in a quiver, the next quiver,
	// if available, will be equipped in its place).
	ReEquip bool

	// AutoStack
	// Are identical stacks automatically combined when you pick the up? 1=Yes, 0=No. (for example,
	// which you pick up throwing potions or normal javelins,
	// they are automatically combined with those you already have)
	AutoStack bool

	// Magic
	// Is this iType always Magic? 1=Yes, 0=No.
	Magic bool

	// Rare
	// Can this iType spawn as a rare item?
	// 1=Yes, 0=No.
	// Note: If you want an item that spawns only as magic or rare,
	// you need to set the previous column to 1 as well.
	Rare bool

	// Normal
	// Is this iType always Normal? 1=Yes, 0=No.
	Normal bool

	// Charm
	// Does this iType function as a charm? 1=Yes, 0=No. Note: This effect is hardcoded,
	// if you need a new charm type, you must use the char iType in one of the equivs.
	Charm bool

	// Gem
	// Can this iType be inserted into sockets? 1=Yes,
	// 0=No (Link your item to the sock iType instead to achieve this).
	Gem bool

	// Beltable
	// Can this iType be placed in your characters belt slots? 1=Yes,
	// 0=No. (This requires further tweaking in other txt files).
	Beltable bool

	EquivalentItems ItemEquivalenceList
}

ItemTypeRecord describes the types for items

type ItemTypes

type ItemTypes map[string]*ItemTypeRecord

ItemTypes stores all of the ItemTypeRecords

type ItemUsageStat

type ItemUsageStat struct {
	Stat string                   // name of the stat to add to
	Calc d2calculation.CalcString // calc string representing the amount to add
}

ItemUsageStat the stat that gets applied when the item is used

type ItemVendorParams

type ItemVendorParams struct {
	Min        int // minimum of this item they can stock
	Max        int // max they can stock
	MagicMin   int
	MagicMax   int
	MagicLevel int
}

ItemVendorParams are parameters that vendors use

type LevelDetailRecord

type LevelDetailRecord struct {

	// Name
	// This column has no function, it only serves as a comment field to make it
	// easier to identify the Level name
	Name string // Name <-- the corresponding column name in the txt

	// mon1-mon25 work in Normal difficulty, while nmon1-nmon25 in Nightmare and
	// Hell. They tell the game which monster ID taken from MonStats.txt.
	// NOTE: you need to manually add from mon11 to mon25 and from nmon11 to
	// nmon25 !
	MonsterID1Normal  string // mon1
	MonsterID2Normal  string // mon2
	MonsterID3Normal  string // mon3
	MonsterID4Normal  string // mon4
	MonsterID5Normal  string // mon5
	MonsterID6Normal  string // mon6
	MonsterID7Normal  string // mon7
	MonsterID8Normal  string // mon8
	MonsterID9Normal  string // mon9
	MonsterID10Normal string // mon10

	MonsterID1Nightmare  string // nmon1
	MonsterID2Nightmare  string // nmon2
	MonsterID3Nightmare  string // nmon3
	MonsterID4Nightmare  string // nmon4
	MonsterID5Nightmare  string // nmon5
	MonsterID6Nightmare  string // nmon6
	MonsterID7Nightmare  string // nmon7
	MonsterID8Nightmare  string // nmon8
	MonsterID9Nightmare  string // nmon9
	MonsterID10Nightmare string // nmon10

	// Gravestench - adding additional fields for Hell, original txt combined
	// the nighmare and hell ID's stringo the same field
	MonsterID1Hell  string // nmon1
	MonsterID2Hell  string // nmon2
	MonsterID3Hell  string // nmon3
	MonsterID4Hell  string // nmon4
	MonsterID5Hell  string // nmon5
	MonsterID6Hell  string // nmon6
	MonsterID7Hell  string // nmon7
	MonsterID8Hell  string // nmon8
	MonsterID9Hell  string // nmon9
	MonsterID10Hell string // nmon10

	// Works only in normal and it tells which ID will be used for Champion and
	// Random Uniques. The ID is taken from MonStats.txtOnly the first ten
	// columns appear in the unmodded file. In 1.10 final, beta 1.10s and
	// v1.11+ you can add the missing umon11-umon25 columns.
	// NOTE: you can allow umon1-25 to also work in Nightmare and Hell by
	// following this simple ASM edit
	// (https://d2mods.info/forum/viewtopic.php?f=8&t=53969&p=425179&hilit=umon#p425179)
	MonsterUniqueID1  string // umon1
	MonsterUniqueID2  string // umon2
	MonsterUniqueID3  string // umon3
	MonsterUniqueID4  string // umon4
	MonsterUniqueID5  string // umon5
	MonsterUniqueID6  string // umon6
	MonsterUniqueID7  string // umon7
	MonsterUniqueID8  string // umon8
	MonsterUniqueID9  string // umon9
	MonsterUniqueID10 string // umon10

	// Critter Species 1-4. Uses the ID from monstats2.txt and only monsters
	// with critter column set to 1 can spawn here. critter column is also found
	// in monstats2.txt. Critters are in reality only present clientside.
	MonsterCritterID1 string // cmon1
	MonsterCritterID2 string // cmon2
	MonsterCritterID3 string // cmon3
	MonsterCritterID4 string // cmon4

	// String Code for the Display name of the Level
	LevelDisplayName string // LevelName

	LevelWarpName string // LevelWarp

	// Which *.DC6 Title Image is loaded when you enter this area. this file
	// MUST exist, otherwise you will crash with an exception when you enter the
	// level (for all levels below the expansion row, the files must be
	// present in the expension folders)
	TitleImageName string // EntryFile

	// ID
	// Level ID (used in columns like VIS0-7)
	ID int

	// Palette is the Act Palette . Reference only
	Palette int // Pal

	// Act that the Level is located in (internal enumeration ranges from 0 to 4)
	Act int // Act

	// QuestFlag, QuestExpansionFlag
	// Used the first one in Classic games and the latter in Expansion games ,
	// they set a questflag. If this flag is set, a character must have
	// completed the quest associated with the flag to take a town portal to
	// the area in question. A character can always use a portal to get back to
	// town.
	QuestFlag          int // QuestFlag
	QuestFlagExpansion int // QuestFlagEx

	// Each layer is an unique ID. This number is used to store each automap on
	// a character. This is used by the game to remember what level the automap
	// are for.
	// NOTE: you need to use the extended levels plugin to be able to add
	// additional layers.
	AutomapIndex int // Layer

	// SizeXNormal -- SizeYHell If this is a preset area this sets the
	// X size for the area. Othervise use the same value here that are used in
	// lvlprest.txt to set the size for the .ds1 file.
	SizeXNormal    int // SizeX
	SizeYNormal    int // SizeY
	SizeXNightmare int // SizeX(N)
	SizeYNightmare int // SizeY(N)
	SizeXHell      int // SizeX(H)
	SizeYHell      int // SizeY(H)

	// They set the X\Y position in the world space
	WorldOffsetX int // OffsetX
	WorldOffsetY int // OffsetY

	// This set what level id's are the Depended level.
	// Example: Monastery uses this field to place its entrance always at same
	// location.
	DependantLevelID int // Depend

	// The type of the Level (Id from lvltypes.txt)
	LevelType int // LevelType

	// Controls if teleport is allowed in that level.
	// 0 = Teleport not allowed
	// 1 = Teleport allowed
	// 2 = Teleport allowed, but not able to use teleport throu walls/objects
	// (maybe for objects this is controlled by IsDoor column in objects.txt)
	TeleportFlag d2enum.TeleportFlag // Teleport

	// Setting for Level Generation: You have 3 possibilities here:
	// 1 Random Maze
	// 2 Preset Area
	// 3 Wilderness level
	LevelGenerationType d2enum.LevelGenerationType // DrlgType

	// Setting Regarding the level sub-type.
	// Example: 6=wilderness, 9=desert etc, -1=no subtype.
	SubType int // SubType

	// Tells which subtheme a wilderness area should use.
	// Themes ranges from -1 (no subtheme) to 4.
	SubTheme int // SubTheme

	// Setting Regarding Waypoints
	// NOTE: it does NOT control waypoint placement.
	SubWaypoint int // SubWaypoint

	// Setting Regarding Shrines.
	// NOTE: it does NOT control which Shrine will spawn.
	SubShrine int // SubShrine

	// These fields allow linking level serverside, allowing you to travel
	// through areas. The Vis must be filled in with the LevelID your level is
	// linked with, but the actuall number of Vis ( 0 - 7 ) is determined by
	// your actual map (the .ds1 fle).
	// Example: Normally Cave levels are only using vis 0-3 and wilderness areas 4-7 .
	LevelLinkID0 int // Vis0
	LevelLinkID1 int // Vis1
	LevelLinkID2 int // Vis2
	LevelLinkID3 int // Vis3
	LevelLinkID4 int // Vis4
	LevelLinkID5 int // Vis5
	LevelLinkID6 int // Vis6
	LevelLinkID7 int // Vis7

	// This controls the visual graphics then you move the mouse pointer over
	// an entrance. To show the graphics you use an ID from lvlwarp.txt and the
	// behavior on the graphics is controlled by lvlwarp.txt. Your Warps must
	// match your Vis.
	// Example: If your level uses Vis 3,5,7 then you must also use Warp 3,5,7 .
	WarpGraphicsID0 int // Warp0
	WarpGraphicsID1 int // Warp1
	WarpGraphicsID2 int // Warp2
	WarpGraphicsID3 int // Warp3
	WarpGraphicsID4 int // Warp4
	WarpGraphicsID5 int // Warp5
	WarpGraphicsID6 int // Warp6
	WarpGraphicsID7 int // Warp7

	// These settings handle the light intensity as well as its RGB components
	LightIntensity int // Intensity
	Red            int // Red
	Green          int // Green
	Blue           int // Blue

	// What quest is this level related to. This is the quest id (as example the
	// first quest Den of Evil are set to 1, since its the first quest).
	QuestID int // Quest

	// This sets the minimum distance from a VisX or WarpX location that a
	// monster, object or tile can be spawned at. (also applies to waypoints and
	// some preset portals).
	WarpClearanceDistance int // WarpDist

	//  Area Level on Normal-Nightmare-Hell in Classic and Expansion.
	// It controls the item level of items that drop from chests etc.
	MonsterLevelNormal      int // MonLvl1
	MonsterLevelNightmare   int // MonLvl2
	MonsterLevelHell        int // MonLvl3
	MonsterLevelNormalEx    int // MonLvl1Ex
	MonsterLevelNightmareEx int // MonLvl2Ex
	MonsterLevelHellEx      int // MonLvl3Ex

	// This is a chance in 100000ths that a monster pack will spawn on a tile.
	// The maximum chance the game allows is 10% (aka 10000) in v1.10+,
	MonsterDensityNormal    int // MonDen
	MonsterDensityNightmare int // MonDen(N)
	MonsterDensityHell      int // MonDen(H)

	// Minimum - Maximum Unique and Champion Monsters Spawned in this Level.
	// Whenever any spawn at all however is bound to MonDen.
	MonsterUniqueMinNormal    int // MonUMin
	MonsterUniqueMinNightmare int // MonUMin(N)
	MonsterUniqueMinHell      int // MonUMin(H)

	MonsterUniqueMaxNormal    int // MonUMax
	MonsterUniqueMaxNightmare int // MonUMax(N)
	MonsterUniqueMaxHell      int // MonUMax(H)

	// Number of different Monster Types that will be present in this area, the
	// maximum is 13. You can have up to 13 different monster types at a time in
	// Nightmare and Hell difficulties, selected randomly from nmon1-nmon25. In
	// Normal difficulty you can have up to 13 normal monster types selected
	// randomly from mon1-mon25, and the same number of champion and unique
	// types selected randomly from umon1-umon25.
	NumMonsterTypes int // NumMon

	// Controls the chance for a critter to spawn.
	MonsterCritter1SpawnChance int // cpct1
	MonsterCritter2SpawnChance int // cpct2
	MonsterCritter3SpawnChance int // cpct3
	MonsterCritter4SpawnChance int // cpct4

	// Referes to a entry in SoundEnviron.txt (for the Levels Music)
	SoundEnvironmentID int // SoundEnv

	// 255 means no Waipoint for this level, while others state the Waypoint' ID
	// for the level
	// NOTE: you can switch waypoint destinations between areas this way, not
	// between acts however so don't even bother to try.
	WaypointID int // Waypoint

	// this field uses the ID of the ObjectGroup you want to Spawn in this Area,
	// taken from Objgroup.txt.
	ObjectGroupID0 int // ObjGrp0
	ObjectGroupID1 int // ObjGrp1
	ObjectGroupID2 int // ObjGrp2
	ObjectGroupID3 int // ObjGrp3
	ObjectGroupID4 int // ObjGrp4
	ObjectGroupID5 int // ObjGrp5
	ObjectGroupID6 int // ObjGrp6
	ObjectGroupID7 int // ObjGrp7

	// These fields indicates the chance for each object group to spawn (if you
	// use ObjGrp0 then set ObjPrb0 to a value below 100)
	ObjectGroupSpawnChance0 int // ObjPrb0
	ObjectGroupSpawnChance1 int // ObjPrb1
	ObjectGroupSpawnChance2 int // ObjPrb2
	ObjectGroupSpawnChance3 int // ObjPrb3
	ObjectGroupSpawnChance4 int // ObjPrb4
	ObjectGroupSpawnChance5 int // ObjPrb5
	ObjectGroupSpawnChance6 int // ObjPrb6
	ObjectGroupSpawnChance7 int // ObjPrb7

	// It sets whether rain or snow (in act 5 only) can fall . Set it to 1 in
	// order to enable it, 0 to disable it.
	EnableRain bool // Rain

	// Unused setting (In pre beta D2 Blizzard planned Rain to generate Mud
	// which would have slowed your character's speed down, but this never made
	// it into the final game). the field is read by the code but the return
	// value is never utilized.
	EnableMud bool // Mud

	// Setting for 3D Enhanced D2 that disables Perspective Mode for a specific
	// level. A value of 1 enables the users to choose between normal and
	// Perspective view, while 0 disables that choice.
	EnablePerspective bool // NoPer

	// Allows you to look through objects and walls even if they are not in a
	// wilderness level. 1 enables it, 0 disables it.
	EnableLineOfSightDraw bool // LOSDraw

	// Unknown. Probably has to do with Tiles and their Placement.
	// 1 enables it, 0 disables it.
	EnableFloorFliter bool // FloorFilter

	// Unknown. Probably has to do with tiles and their placement.
	// 1 enables it, 0 disables it.
	EnableBlankScreen bool // BlankScreen

	// for levels bordered with mountains or walls, like the act 1 wildernesses.
	// 1 enables it, 0 disables it.
	EnableDrawEdges bool // DrawEdges

	// Setting it to 1 makes the level to be treated as an indoor area, while
	// 0 makes this level an outdoor. Indoor areas are not affected by day-night
	// cycles, because they always use the light values specified in Intensity,
	// Red, Green, Blue. this field also controls whenever sounds will echo if
	// you're running the game with a sound card capable of it and have
	// environment sound effects set to true.
	IsInside bool // IsInside

	// This field is required for some levels, entering those levels when portal
	// field isn't set will often crash the game. This also applies to
	// duplicates of those levels created with both of the extended level
	// plugins.
	PortalEnable bool // Portal

	// This controls if you can re-position a portal in a level or not. If it's
	// set to 1 you will be able to reposition the portal by using either map
	// entry#76 Tp Location #79. If both tiles are in the level it will use Tp
	// Location #79. If set to 0 the map won't allow repositioning.
	PortalRepositionEnable bool // Position

	// Setting this field to 1 will make the monsters status saved in the map.
	// Setting it to 0 will allow some useful things like NPC refreshing their
	// stores.
	// WARNING: Do not set this to 1 for non-town areas, or the monsters you'll
	// flee from will simply vanish and never reappear. They won't even be
	// replaced by new ones
	// Gravestench - this funcionality should not be in one field
	SaveMonsterStates  bool // SaveMonsters
	SaveMerchantStates bool // SaveMonsters

	// No info on the PK page, but I'm guessing it's for monster wandering
	MonsterWanderEnable bool // MonWndr

	// This setting is hardcoded to certain level Ids, like the River Of Flame,
	// enabling it in other places can glitch up the game, so leave it alone.
	// It is not known what exactly it does however.
	MonsterSpecialWalk bool // MonSpcWalk

	//  Give preference to monsters set to ranged=1 in MonStats.txt on Nightmare
	// and Hell difficulties when picking something to spawn.
	MonsterPreferRanged bool // rangedspawn

}

LevelDetailRecord is a representation of a row from levels.txt it describes lots of things about the levels, like where they are connected, what kinds of monsters spawn, the level generator type, and lots of other stuff.

type LevelDetails

type LevelDetails map[int]*LevelDetailRecord

LevelDetails has all of the LevelDetailRecords

type LevelMazeDetailRecord

type LevelMazeDetailRecord struct {
	// descriptive, not loaded in game. Corresponds with Name field in
	// Levels.txt
	Name string // Name

	// ID from Levels.txt
	// NOTE: Cave 1 is the Den of Evil, its associated treasure level is quest
	// only.
	LevelID int // Level

	// the minimum number of .ds1 map sections that will make up the maze in
	// Normal, Nightmare and Hell difficulties.
	NumRoomsNormal    int // Rooms
	NumRoomsNightmare int // Rooms(N)
	NumRoomsHell      int // Rooms(H)

	// the size in the X\Y direction of any component ds1 map section.
	SizeX int // SizeX
	SizeY int // SizeY

}

LevelMazeDetailRecord is a representation of a row from lvlmaze.txt these records define the parameters passed to the maze level generator

type LevelMazeDetails

type LevelMazeDetails map[int]*LevelMazeDetailRecord

LevelMazeDetails stores all of the LevelMazeDetailRecords

type LevelPresetRecord

type LevelPresetRecord struct {
	Files        [6]string
	Name         string
	DefinitionID int
	LevelID      int
	SizeX        int
	SizeY        int
	Pops         int
	PopPad       int
	FileCount    int
	Dt1Mask      uint
	Populate     bool
	Logicals     bool
	Outdoors     bool
	Animate      bool
	KillEdge     bool
	FillBlanks   bool
	AutoMap      bool
	Scan         bool
	Beta         bool
	Expansion    bool
}

LevelPresetRecord is a representation of a row from lvlprest.txt these records define parameters for the preset level map generator

type LevelPresets

type LevelPresets map[int]LevelPresetRecord

LevelPresets stores all of the LevelPresetRecords

type LevelSubstitutionRecord

type LevelSubstitutionRecord struct {
	// Description, reference only.
	Name string // Name

	// This value is used in Levels.txt, in the column 'SubType'. You'll notice
	// that in LvlSub.txt some rows use the same value, we can say they forms
	// groups. If you count each row of a group starting from 0, then you'll
	// obtain what is written in Levels.txt, columns 'SubTheme', 'SubWaypoint'
	// and 'SubShrine'. (added by Paul Siramy)
	ID int // Type

	// What .ds1 is being used.
	File string // File

	// 0 for classic, 1 for Expansion.
	IsExpansion bool // Expansion

	// this field can contain values ranging from -1 to 2
	// NOTE: wall types have 0, 1 or 2, while Non-wall types have -1.
	BorderType int // BordType

	// Set it to 1 or 2 I'm assuming this means a block of tiles ie: 4x4.
	GridSize int // GridSize

	// For some rows, this is their place in LvlTypes.txt. The Dt1 mask also
	// includes the mask for the Floor.Dt1 of that level. (see Trials0 below)
	Mask int // Dt1Mask

	// The probability of the Dt1 being spawned.
	ChanceSpawn0 int // Prob0
	ChanceSpawn1 int // Prob1
	ChanceSpawn2 int // Prob2
	ChanceSpawn3 int // Prob3
	ChanceSpawn4 int // Prob4

	// This appears to be a chance of either a floor tile being spawned or the
	// actual Dt1..
	ChanceFloor0 int // Trials0
	ChanceFloor1 int // Trials1
	ChanceFloor2 int // Trials2
	ChanceFloor3 int // Trials3
	ChanceFloor4 int // Trials4

	// This appears to be how much will spawn in the Grid.
	GridMax0 int // Max0
	GridMax1 int // Max1
	GridMax2 int // Max2
	GridMax3 int // Max3
	GridMax4 int // Max4

}

LevelSubstitutionRecord is a representation of a row from lvlsub.txt these records are parameters for levels and describe substitution rules

type LevelSubstitutions

type LevelSubstitutions map[int]*LevelSubstitutionRecord

LevelSubstitutions stores all of the LevelSubstitutionRecords

type LevelTypeRecord

type LevelTypeRecord struct {
	Files     [32]string
	Name      string
	ID        int
	Act       int
	Beta      bool
	Expansion bool
}

LevelTypeRecord is a representation of a row from lvltype.txt the fields describe what ds1 files a level uses

type LevelTypes

type LevelTypes []*LevelTypeRecord

LevelTypes stores all of the LevelTypeRecords

type LevelWarpRecord

type LevelWarpRecord struct {
	Name       string
	ID         int
	SelectX    int
	SelectY    int
	SelectDX   int
	SelectDY   int
	ExitWalkX  int
	ExitWalkY  int
	OffsetX    int
	OffsetY    int
	LitVersion bool
	Tiles      int
	Direction  string
}

LevelWarpRecord is a representation of a row from lvlwarp.txt it describes the warp graphics offsets and dimensions for levels

type LevelWarps

type LevelWarps map[int]*LevelWarpRecord

LevelWarps loaded from txt records

type LowQualities

type LowQualities []*LowQualityRecord

LowQualities is a slice of LowQualityRecords

type LowQualityRecord

type LowQualityRecord struct {
	Name string
}

LowQualityRecord is a name prefix that can be used for low quality item names

type MagicPrefix

type MagicPrefix map[string]*ItemAffixCommonRecord

MagicPrefix stores all of the magic prefix records

type MagicSuffix

type MagicSuffix map[string]*ItemAffixCommonRecord

MagicSuffix stores all of the magic suffix records

type MissileAnimation

type MissileAnimation struct {
	CelFileName        string
	StepsBeforeVisible int
	StepsBeforeActive  int
	AnimationRate      int // seems to do nothing
	AnimationLength    int
	AnimationSpeed     int
	StartingFrame      int // called "RandFrame"
	SubStartingFrame   int
	SubEndingFrame     int
	LoopAnimation      bool
	HasSubLoop         bool // runs after first animation ends
}

MissileAnimation stores parameters for a missile animation

type MissileCalc

type MissileCalc struct {
	Calc   d2calculation.CalcString
	Desc   string
	Params []MissileCalcParam
}

MissileCalc is a calculation for a missile

type MissileCalcParam

type MissileCalcParam struct {
	Param int
	Desc  string
}

MissileCalcParam is a calculation parameter for a missile

type MissileCollision

type MissileCollision struct {
	CollisionType int // controls the kind of collision
	// 0 = none, 1 = units only, 3 = normal (units, walls),
	// 6 = walls only, 8 = walls, units, and floors
	TimerFrames            int // how many frames to persist
	DestroyedUponCollision bool
	FriendlyFire           bool
	LastCollide            bool // unknown
	Collision              bool // unknown
	ClientCollision        bool // unknown
	ClientSend             bool // unclear
	UseCollisionTimer      bool // after hit, use timer before dying
}

MissileCollision parameters for missile collision

type MissileDamage

type MissileDamage struct {
	MinDamage      int
	MaxDamage      int
	MinLevelDamage [5]int // additional damage per missile level
	// [0]: lvs 2-8, [1]: lvs 9-16, [2]: lvs 17-22, [3]: lvs 23-28, [4]: lv 29+
	MaxLevelDamage       [5]int                   // see above
	DamageSynergyPerCalc d2calculation.CalcString // works like synergy in skills.txt, not clear
}

MissileDamage parameters for calculating missile physical damage

type MissileElementalDamage

type MissileElementalDamage struct {
	Damage        MissileDamage
	ElementType   string
	Duration      int    // frames, 25 = 1 second
	LevelDuration [3]int // 0,1,2, unknown level intervals, bonus duration per level
}

MissileElementalDamage parameters for calculating missile elemental damage

type MissileLight

type MissileLight struct {
	Diameter int
	Flicker  int
	Red      uint8
	Green    uint8
	Blue     uint8
}

MissileLight has the parameters for missile lighting

type MissileRecord

type MissileRecord struct {
	ServerMovementCalc  MissileCalc
	ClientMovementCalc  MissileCalc
	ServerCollisionCalc MissileCalc
	ClientCollisionCalc MissileCalc
	ServerDamageCalc    MissileCalc
	Light               MissileLight
	Animation           MissileAnimation
	Collision           MissileCollision
	Damage              MissileDamage
	ElementalDamage     MissileElementalDamage
	SubMissile          [3]string // 0,1,2 name of missiles spawned by movement function
	HitSubMissile       [4]string // 0,1,2 name of missiles spawned by collision function
	ClientSubMissile    [3]string // see above, but for client only
	ClientHitSubMissile [4]string // see above, but for client only
	Name                string

	SkillName string // if not empty, the missile will refer to this skill instead of its own data for the following:

	TravelSound string // name of sound to play during lifetime
	// whether or not it loops depends on the specific sound's settings?
	// if it doesn't loop, it's just a on-spawn sound effect
	HitSound  string // sound plays upon collision
	ProgSound string // plays at "special events", like a mariachi band

	ProgOverlay      string // name of an overlay from overlays.txt to use at special events
	ExplosionMissile string // name of a missile from missiles.txt that is created upon collision

	Id int //nolint:golint,stylecheck // ID is the correct key

	ClientMovementFunc  int
	ClientCollisionFunc int
	ServerMovementFunc  int
	ServerCollisionFunc int
	ServerDamageFunc    int

	Velocity           int
	MaxVelocity        int
	LevelVelocityBonus int
	Accel              int
	Range              int
	LevelRangeBonus    int

	XOffset int
	YOffset int
	ZOffset int
	Size    int // diameter

	DestroyedByTPFrame int // see above, for client side, (this is a guess) which frame it vanishes on

	HolyFilterType   int // specifies what this missile can hit
	KnockbackPercent int // chance of knocking the target back, 0-100

	TransparencyMode int // controls rendering

	ResultFlags int // unknown
	// 4 = normal missiles, 5 = explosions, 8 = non-damaging missiles
	HitFlags int // unknown

	HitShift int // damage is measured in 256s

	SourceDamage     int // 0-128, 128 is 100%
	SourceMissDamage int // 0-128, 128 is 100%

	HitClass int // controls clientside aesthetic effects for collisions
	// particularly sound effects that are played on a hit
	NumDirections int // count of dirs in the DCC loaded by CelFile
	// apparently this value is no longer needed in D2
	LocalBlood int // blood effects?
	// 0 = no blood, 1 = blood, 2 = blood and affected by open wounds
	DamageReductionRate int // how many frames between applications of the

	DestroyedByTP bool // if true, destroyed when source player teleports to town
	CanDestroy    bool // unknown

	UseAttackRating bool // if true, uses 'attack rating' to determine if it hits or misses
	// if false, has a 95% chance to hit.
	AlwaysExplode bool // if true, always calls its collision function when it is destroyed,

	ClientExplosion bool // if true, does not really exist
	// is only aesthetic / client side
	TownSafe bool // if true, doesn't vanish when spawned in town
	// if false, vanishes when spawned in town
	IgnoreBossModifiers bool // if true, doesn't get bonuses from boss mods
	IgnoreMultishot     bool // if true, can't gain the mulitshot modifier
	// 0 = all units, 1 = undead only, 2 = demons only, 3 = all units (again?)
	CanBeSlowed       bool // if true, is affected by skill_handofathena
	TriggersHitEvents bool // if true, triggers events that happen "upon getting hit" on targets
	TriggersGetHit    bool // if true, can cause target to enter hit recovery mode
	SoftHit           bool // unknown

	UseQuantity bool // if true, uses quantity
	// not clear what this means. Also apparently requires a special starting function in skills.txt
	AffectedByPierce bool // if true, affected by the pierce modifier and the Pierce skill
	SpecialSetup     bool // unknown, only true for potions

	MissileSkill bool // if true, applies elemental damage from items to the splash radius instead of normal damage modifiers

	ApplyMastery bool // unknown
	// percentage of source units attack properties to apply to the missile?
	// not only affects damage but also other modifiers like lifesteal and manasteal (need a complete list)
	// setting this to -1 "gets rid of SrcDmg from skills.txt", not clear what that means
	HalfDamageForTwoHander bool // if true, damage is halved when a two-handed weapon is used

}

MissileRecord is a representation of a row from missiles.txt

type Missiles

type Missiles map[int]*MissileRecord

Missiles stores all of the MissileRecords

type MonModeRecord

type MonModeRecord struct {
	Name  string
	Token string
	Code  string
}

MonModeRecord is a representation of a single row of Monmode.txt

type MonModes

type MonModes map[string]*MonModeRecord

MonModes stores all of the MonModeRecords

type MonPresets

type MonPresets map[int32][]string

MonPresets stores monster presets

type MonProp

type MonProp struct {
	Code   string
	Param  string
	Chance int
	Min    int
	Max    int
}

MonProp is a monster property

type MonPropRecord

type MonPropRecord struct {
	ID string

	Properties struct {
		Normal    [numMonProps]*MonProp
		Nightmare [numMonProps]*MonProp
		Hell      [numMonProps]*MonProp
	}
}

MonPropRecord is a representation of a single row of monprop.txt

type MonStat2Record

type MonStat2Record struct {
	// Available options for equipment
	// randomly selected from
	EquipmentOptions [16][]string

	Key             string // Key, the object ID MonStatEx feild from MonStat
	BaseWeaponClass string
	ResurrectSkill  string
	Heart           string
	BodyPart        string

	// These follow three are apparently unused
	Height        int
	OverlayHeight int
	PixelHeight   int

	// Diameter in subtiles
	SizeX int
	SizeY int

	// Bounding box
	BoxTop    int
	BoxLeft   int
	BoxWidth  int
	BoxHeight int

	// Spawn method used
	SpawnMethod int

	// Melee radius
	MeleeRng int

	// base weaponclass?
	HitClass int

	// Sum of available components
	TotalPieces int

	// Number of directions for each mode
	DirectionsPerMode [16]int

	// If the units is restored on map reload
	Restore int

	// What maximap index is used for the automap
	AutomapCel int

	// Blood offset?
	LocalBlood int

	// 0 = don't bleed, 1 = small blood missile, 2 = small and large, > 3 other missiles?
	Bleed int

	// If the unit is lights up the area
	Light int

	// Light color
	LightR int
	LightG int

	// Palettes per difficulty
	NormalPalette    int
	NightmarePalette int
	HellPalatte      int

	// Inferno animation stuff
	InfernoLen      int
	InfernoAnim     int
	InfernoRollback int
	// Which mode is used after resurrection
	ResurrectMode d2enum.MonsterAnimationMode

	// This specifies if the size values get used for collision detection
	NoGfxHitTest bool

	// Does the unit have this component
	HasComponent [16]bool

	// Available animation modes
	HasAnimationMode [16]bool

	// Available modes while moving aside from WL and RN
	A1mv bool
	A2mv bool
	SCmv bool
	S1mv bool
	S2mv bool
	S3mv bool
	S4mv bool

	// true of unit uses an automap entry
	NoMap bool

	// If the units can use overlays
	NoOvly bool

	// If unit is selectable
	IsSelectable bool

	// If unit is selectable by allies
	AllySelectable bool

	// If unit is not selectable
	NotSelectable bool

	// if the units corpse is selectable
	IsCorpseSelectable bool

	// If the unit is attackable
	IsAttackable bool

	// If the unit is revivable
	IsRevivable bool

	// If the unit is a critter
	IsCritter bool

	// If the unit is Small, Small units can be knocked back with 100% efficiency
	IsSmall bool

	// Large units can be knocked back at 25% efficincy
	IsLarge bool

	// Possibly to do with sound, usually set for creatures without flesh
	IsSoft bool

	// Aggressive or harmless, usually NPC's
	IsInert bool

	// Enables collision on corpse for units
	IsCorpseCollidable bool

	// Can the corpse be walked through
	IsCorpseWalkable bool

	// If the unit casts a shadow
	HasShadow bool

	// If unique palettes should not be used
	NoUniqueShift bool

	// If multiple layers should be used on death (otherwise only TR)
	CompositeDeath bool
	// contains filtered or unexported fields
}

MonStat2Record is a representation of a row from monstats2.txt

type MonStatRecord

type MonStatRecord struct {

	// Key contains the pointer that will be used in other txt files
	// such as levels.txt and superuniques.txt.
	Key string // called `Id` in monstats.txt

	// Id is the actual internal ID of the unit (this is what the ID pointer
	// actually points at) remember that no two units can have the same ID,
	// this will result in lots of unpredictable behavior and crashes so please
	// don’t do it. This 'HarcCodedInDeX' is used for several things, such as
	// determining whenever the unit uses DCC or DC6 graphics (like mephisto
	// and the death animations of Diablo, the Maggoc Queen etc.), the hcIdx
	// column also links other hardcoded effects to the units, such as the
	// transparency on necro summons and the name-color change on unique boss
	// units (thanks to Kingpin for the info)
	ID int // called `hcIdx` in monstats.txt

	// BaseKey is an ID pointer of the “base” unit for this specific
	// monster type (ex. There are five types of “Fallen”; all of them have
	// fallen1 as their “base” unit).
	BaseKey string // called `BaseId` in monstats.txt

	// NextKey is the ID of the next unit in the chain. (fallen1 has the ID pointer of fallen2 in here).
	// The game uses this for “map generated” monsters such as the fallen in the fallen camps,
	// which get picked based on area level.
	NextKey string // called `NextInClass` in monstats.txt

	// NameStringTableKey the string-key used in the TBL (string.tbl,
	// expansionstring.tbl and patchstring.tbl) files to make this monsters
	// name appear when you highlight it.
	NameString string // called `NameStr` in monstats.txt

	// ExtraDataKey the ID pointer to an entry in MonStats2.txt.
	ExtraDataKey string // called `MonStatsEx` in monstats.txt

	// PropertiesKey contains the ID pointer to an entry in MonProp.txt which
	// controls what special modifiers are appended to the unit
	PropertiesKey string // called `MonProp` in monstats.txt

	// MonsterGroup contains the group ID of the “super group” this monster
	// belongs to, IE all skeletons belong to the "super group" skeleton. The
	MonsterGroup string // called `MonType` in monstats.txt

	// AiKey tells the game which AI to use for this monster. Every AI
	// needs a specific set of animation modes (GH, A1, A2, S1, WL, RN etc).
	AiKey string // called `AI` in monstats.txt

	// DescriptionStringTableKey contains the string-key used in the TBL (string.tbl,
	// expansionstring.tbl and patchstring.tbl) files for the monsters
	// description (leave it blank for no description).
	// NOTE: ever wondered how to make it say something below the monster
	// name (such as “Drains Mana and Stamina etc), well this is how you do it.
	// Just put the string-key of the string you want to display below the
	// monsters name in here.
	DescriptionStringTableKey string // called `DescStr` in monstats.txt

	// AnimationDirectoryToken controls which token (IE name of a folder that
	// contains animations) the game uses for this monster.
	AnimationDirectoryToken string // called `Code` in monstats.txt

	// SpawnKey contains the key of the unit to spawn.
	SpawnKey string // called `spawn` in monstats.txt

	// SpawnAnimationKey
	// which animation mode will the spawned monster be spawned in.
	SpawnAnimationKey string // called `spawnmode` in monstats.txt

	// MinionId1 is an Id of a minion that spawns when this monster is created
	MinionId1 string //nolint:golint,stylecheck // called `minion1` in monstats.txt

	// MinionId2 is an Id of a minion that spawns when this monster is created
	MinionId2 string //nolint:golint,stylecheck // called `minion2` in monstats.txt

	// SoundKeyNormal, SoundKeySpecial
	// specifies the ID pointer to this monsters “Sound Bank” in MonSound.txt
	// when this monster is normal.
	SoundKeyNormal  string // called `MonSound` in monstats.txt
	SoundKeySpecial string // called `UMonSound` in monstats.txt

	// MissileA1 -- MissileSQ
	// these columns control “non-skill-related” missiles used by the monster.
	// For example if you enter a missile ID pointer (from Missiles.txt) in
	// MissA1 then, whenever the monster uses its A1 mode, it will shoot a
	// missile, this however will successfully prevent it from dealing any damage
	// with the swing of A1.
	// NOTE: for the beginners, A1=Attack1, A2=Attack2, S1=Skill1, S2=Skill2,
	// S3=Skill3, S4=Skill4, C=Cast, SQ=Sequence.
	MissileA1 string // called `MissA1` in monstats.txt
	MissileA2 string // called `MissA2` in monstats.txt
	MissileS1 string // called `MissS1` in monstats.txt
	MissileS2 string // called `MissS2` in monstats.txt
	MissileS3 string // called `MissS3` in monstats.txt
	MissileS4 string // called `MissS4` in monstats.txt
	MissileC  string // called `MissC` in monstats.txt
	MissileSQ string // called `MissSQ` in monstats.txt

	// SkillId1 -- SkillId8
	// the ID Pointer to the skill (from Skills.txt) the monster will cast when
	// this specific slot is accessed by the AI. Which slots are used is
	// determined by the units AI.
	SkillId1 string //nolint:golint,stylecheck // called `Skill1` in monstats.txt
	SkillId2 string //nolint:golint,stylecheck // called `Skill2` in monstats.txt
	SkillId3 string //nolint:golint,stylecheck // called `Skill3` in monstats.txt
	SkillId4 string //nolint:golint,stylecheck // called `Skill4` in monstats.txt
	SkillId5 string //nolint:golint,stylecheck // called `Skill5` in monstats.txt
	SkillId6 string //nolint:golint,stylecheck // called `Skill6` in monstats.txt
	SkillId7 string //nolint:golint,stylecheck // called `Skill7` in monstats.txt
	SkillId8 string //nolint:golint,stylecheck // called `Skill8` in monstats.txt

	// SkillAnimation1 -- SkillAnimation8
	// the graphical MODE (or SEQUENCE) this unit uses when it uses this skill.
	SkillAnimation1 string // called `Sk1mode` in monstats.txt
	SkillAnimation2 string // called `Sk2mode` in monstats.txt
	SkillAnimation3 string // called `Sk3mode` in monstats.txt
	SkillAnimation4 string // called `Sk4mode` in monstats.txt
	SkillAnimation5 string // called `Sk5mode` in monstats.txt
	SkillAnimation6 string // called `Sk6mode` in monstats.txt
	SkillAnimation7 string // called `Sk7mode` in monstats.txt
	SkillAnimation8 string // called `Sk8mode` in monstats.txt

	// DamageSkillId
	// ID Pointer to the skill that controls this units damage. This is used for
	// the druids summons. IE their damage is specified solely by Skills.txt and
	// not by MonStats.txt.
	DamageSkillId string //nolint:golint,stylecheck // called `SkillDamage` in monstats.txt

	// ElementAttackMode1 -- ElementAttackMode3
	// the mode to which the elemental damage is appended. The modes to which
	// you would usually attack elemental damage are A1, A2, S1, S2, S3, S4, SQ
	// or C as these are the only ones that naturally contain trigger bytes.
	ElementAttackMode1 string // called `El1Mode` in monstats.txt
	ElementAttackMode2 string // called `El2Mode` in monstats.txt
	ElementAttackMode3 string // called `El3Mode` in monstats.txt

	// ElementType1 -- ElementType3
	// the type of the elemental damage appended to an attack. There are several
	// elements: fire=Fire Damage, ltng=Lightning Damage, cold=Cold Damage
	// (uses duration), pois = Poison Damage (uses duration), mag=Magic Damage,
	// life=Life Drain (the monster heals the specified amount when it hits
	// you), mana=Mana Drain (the monster steals the specified amount of mana
	// when it hits you), stam=Stamina Drain (the monster steals the specified
	// amount of stamina when it hits you), stun=Stun Damage (uses duration,
	// damage is not used, this only effects pets and mercs, players will not
	// get immobilized but they will get thrown into hit recovery whenever they
	// get hit by an attack, no matter what type of attack it is, thanks to
	// Brother Laz clearing this one up), rand=Random Damage (uses duration,
	// either does Poison, Cold, Fire or Lightning damage, randomly picked for
	// every attack), burn=Burning Damage (uses duration, this damage type
	// cannot be resisted or reduced in any way), frze=Freezing Damage (uses
	// duration, this will effect players like normal cold damage but will
	// freeze and shatter pets). If you want to give your monster knockback use
	// MonProp.txt.
	ElementType1 string // called `El1Type` in monstats.txt
	ElementType2 string // called `El2Type` in monstats.txt
	ElementType3 string // called `El3Type` in monstats.txt

	// TreasureClassNormal
	// Treasure class for normal monsters, champions, uniques, and quests
	// on the respective difficulties.
	TreasureClassNormal            string // called `TreasureClass1` in monstats.txt
	TreasureClassNightmare         string // called `TreasureClass1(N)` in monstats.txt
	TreasureClassHell              string // called `TreasureClass1(H)` in monstats.txt
	TreasureClassChampionNormal    string // called `TreasureClass2` in monstats.txt
	TreasureClassChampionNightmare string // called `TreasureClass2(N)` in monstats.txt
	TreasureClassChampionHell      string // called `TreasureClass2(H)` in monstats.txt
	TreasureClass3UniqueNormal     string // called `TreasureClass3` in monstats.txt
	TreasureClass3UniqueNightmare  string // called `TreasureClass3(N)` in monstats.txt
	TreasureClass3UniqueHell       string // called `TreasureClass3(H)` in monstats.txt
	TreasureClassQuestNormal       string // called `TreasureClass4` in monstats.txt
	TreasureClassQuestNightmare    string // called `TreasureClass4(N)` in monstats.txt
	TreasureClassQuestHell         string // called `TreasureClass4(H)` in monstats.txt

	// TreasureClassQuestTriggerId
	// the ID of the Quest that triggers the Quest Treasureclass drop.
	TreasureClassQuestTriggerId string //nolint:golint,stylecheck // called `TCQuestId` in monstats.txt

	// TreasureClassQuestCompleteId
	//  the ID of the Quest State that you need to complete to trigger the Quest
	// Treasureclass trop.
	TreasureClassQuestCompleteId string //nolint:golint,stylecheck // called `TCQuestCP` in monstats.txt

	// PaletteId indicates which palette (color) entry the unit will use, most
	// monsters have a palshift.dat file in their COF folder, this file
	// contains 8 palettes, starting from index 0. These palettes are used by
	// the game to make the various monster sub-types appear with color
	// variations. The game with use the palette from the palettes file
	// corresponding to the value in this column plus 2; eg: translvl = 0 will
	// use the third palette in the file.
	// NOTE: some tokens (token = IE name of a folder that contains animations)
	// such as FC do not accept their palettes.
	// NOTE no 2: some monsters got unused palettes, ZM (zombie) for example
	// will turn light-rotten-green with palette nr 5 and pink-creamy with 6.
	PaletteId int //nolint:golint,stylecheck // called `TransLvl` in monstats.txt

	// SpawnOffsetX, SpawnOffsetY
	// are the x/y offsets at which spawned monsters are placed. IE this prevents
	// the spawned monsters from being created at the same x/y coordinates as
	// the spawner itself.
	SpawnOffsetX int // called `spawnx` in monstats.txt
	SpawnOffsetY int // called `spawny` in monstats.txt

	// MinionPartyMin, MinionPartyMax controls how many minions are spawned together with this unit.
	MinionPartyMin int // called `PartyMin` in monstats.txt
	MinionPartyMax int // called `PartyMax` in monstats.txt

	// MinionGroupMin, MinionGroupMax
	// controls how many units of the base unit to spawn.
	MinionGroupMin int // called `MinGrp` in monstats.txt
	MinionGroupMax int // called `MaxGrp` in monstats.txt

	// PopulationReductionPercent controls the overall chance something will spawn in
	// percentages. Blank entries are the same as 100%.
	PopulationReductionPercent int // called `sparsePopulate` in monstats.txt

	// SpeedBase, SpeedRun
	// controls the walking and running speed of this monster respectively.
	// NOTE: RUN is only used if the monster has a RN mode and its AI uses that
	// mode.
	SpeedBase int // called `Velocity` in monstats.txt
	SpeedRun  int // called `Run` in monstats.txt

	// Rarity controls the overall odds that this monster will be spawned.
	// IE Lets say in Levels.txt you have two monsters set to spawn - Monster A
	// has rarity of 10 whereas Monster B has rarity of 1 and the level in
	// question is limited to 1 monster type. First the game sums up the
	// chances (11) and then calculates the odds of the monster spawning. Which
	// would be 1/11 (9% chance) for Monster B and 10/11 (91% chance) for
	// Monster A, thus Monster A is a lot more common than monster B. If you set
	// this column to 0 then the monster will never be selected by Levels.txt
	// for obvious reasons.
	Rarity int // called `Rarity` in monstats.txt

	// LevelNormal, LevelNightmare, LevelHell
	// controls the monsters level on the specified difficulty. This setting is
	// only used on normal. On nightmare and hell the monsters level is
	// identical with the area level from Levels.txt, unless your monster has
	// BOSS column set to 1, in this case its level will be always taken from
	// these 3 columns.
	LevelNormal    int // called `Level` in monstats.txt
	LevelNightmare int // called `Level(N)` in monstats.txt
	LevelHell      int // called `Level(H)` in monstats.txt

	// used by the game to tell AIs which unit to target first. The higher this
	// is the higher the threat level. Setting this to 25 or so on Maggot Eggs
	// would make your Mercenary NPC try to destroy those first.
	ThreatLevel int // called `threat` in monstats.txt

	// AiDelayNormal, AiDelayNightmare, AiDelayHell
	// this controls delays between AI ticks (on normal, nightmare and hell).
	// The lower the number, the faster the AI's will attack thanks to reduced
	// delay between swings, casting spells, throwing missiles etc. Please
	// remember that some AI's got individual delays between attacks, this will
	// still make them faster and seemingly more deadly though.
	AiDelayNormal    int // called `aidel` in monstats.txt
	AiDelayNightmare int // called `aidel(N)` in monstats.txt
	AiDelayHell      int // called `aidel(H)` in monstats.txt

	// AiDistanceNormal, AiDistanceNightmare, AiDistanceHell
	// the distance in cells from which AI is activated. Most AI"s have base
	// hardcoded activation radius of 35 which stands for a distamnce of about
	// 1 screen, thus leaving these fields blank sets this to 35 automatically.
	AiDistanceNormal    int // called `aidist` in monstats.txt
	AiDistanceNightmare int // called `aidist(N)` in monstats.txt
	AiDistanceHell      int // called `aidist(H)` in monstats.txt

	// AiParameterNormal1, AiParameterNightmare1, AiParameterHell1
	// these cells are very important, they pass on parameters (in percentage)
	// to the AI code. For descriptions about what all these AI's do, check
	// The AI Compendium. https://d2mods.info/forum/viewtopic.php?t=36230
	// Warning: many people have trouble with the AI of the Imps, this AI is
	// special and uses multiple rows.
	AiParameterNormal1    int // called `aip1` in monstats.txt
	AiParameterNormal2    int // called `aip2` in monstats.txt
	AiParameterNormal3    int // called `aip3` in monstats.txt
	AiParameterNormal4    int // called `aip4` in monstats.txt
	AiParameterNormal5    int // called `aip5` in monstats.txt
	AiParameterNormal6    int // called `aip6` in monstats.txt
	AiParameterNormal7    int // called `aip7` in monstats.txt
	AiParameterNormal8    int // called `aip8` in monstats.txt
	AiParameterNightmare1 int // called `aip1(N)` in monstats.txt
	AiParameterNightmare2 int // called `aip2(N)` in monstats.txt
	AiParameterNightmare3 int // called `aip3(N)` in monstats.txt
	AiParameterNightmare4 int // called `aip4(N)` in monstats.txt
	AiParameterNightmare5 int // called `aip5(N)` in monstats.txt
	AiParameterNightmare6 int // called `aip6(N)` in monstats.txt
	AiParameterNightmare7 int // called `aip7(N)` in monstats.txt
	AiParameterNightmare8 int // called `aip8(N)` in monstats.txt
	AiParameterHell1      int // called `aip1(H)` in monstats.txt
	AiParameterHell2      int // called `aip2(H)` in monstats.txt
	AiParameterHell3      int // called `aip3(H)` in monstats.txt
	AiParameterHell4      int // called `aip4(H)` in monstats.txt
	AiParameterHell5      int // called `aip5(H)` in monstats.txt
	AiParameterHell6      int // called `aip6(H)` in monstats.txt
	AiParameterHell7      int // called `aip7(H)` in monstats.txt
	AiParameterHell8      int // called `aip8(H)` in monstats.txt

	// Alignment controls whenever the monster fights on your side or
	// fights against you (or if it just walks around, IE a critter).
	// If you want to turn some obsolete NPCs into enemies, this is
	// one of the settings you will need to modify. Setting it to 2
	// without adjusting other settings (related to AI and also some
	// in MonStats2) it will simply attack everything.
	Alignment d2enum.MonsterAlignmentType // called `Align` in monstats.txt

	// SkillLevel1 -- SkillLevel8
	// the skill level of the skill in question. This gets a bonus on nightmare
	// and hell which you can modify in DifficultyLevels.txt.
	SkillLevel1 int // called `Sk1lvl` in monstats.txt
	SkillLevel2 int // called `Sk2lvl` in monstats.txt
	SkillLevel3 int // called `Sk3lvl` in monstats.txt
	SkillLevel4 int // called `Sk4lvl` in monstats.txt
	SkillLevel5 int // called `Sk5lvl` in monstats.txt
	SkillLevel6 int // called `Sk6lvl` in monstats.txt
	SkillLevel7 int // called `Sk7lvl` in monstats.txt
	SkillLevel8 int // called `Sk8lvl` in monstats.txt

	// LeechSensitivityNormal / Nightmare / Hell
	// controls the effectiveness of Life and Mana steal from equipment on this
	// unit on the respective difficulties. 0=Can’t leech at all. Remember that
	// besides this, Life and Mana Steal is further limited by DifficultyLevels.txt.
	LeechSensitivityNormal    int // called `Drain` in monstats.txt
	LeechSensitivityNightmare int // called `Drain(N)` in monstats.txt
	LeechSensitivityHell      int // called `Drain(H)` in monstats.txt

	// ColdSensitivityNormal / Nightmare / Hell
	// controls the effectiveness of cold effect and its duration and freeze
	// duration on this unit. The lower this value is, the more speed this unit
	// looses when its under the effect of cold, also freezing/cold effect will
	// stay for longer. Positive values will make the unit faster (thanks to
	// Brother Laz for confirming my assumption), and 0 will make it
	// unfreezeable. Besides this, cold length and freeze length settings are
	// also set in DifficultyLevels.txt.
	ColdSensitivityNormal    int // called `coldeffect` in monstats.txt
	ColdSensitivityNightmare int // called `coldeffect(N)` in monstats.txt
	ColdSensitivityHell      int // called `coldeffect(H)` in monstats.txt

	// ResistancePhysicalNormal
	// Damage resistance on the respective difficulties. Negative values mean
	// that the unit takes more damage from this element, values at or above 100
	// will result in immunity.
	ResistancePhysicalNormal     int // called `ResDm` in monstats.txt
	ResistancePhysicalNightmare  int // called `ResDm(N)` in monstats.txt
	ResistancePhysicalHell       int // called `ResDm(H)` in monstats.txt
	ResistanceMagicNormal        int // called `ResMa` in monstats.txt
	ResistanceMagicNightmare     int // called `ResMa(N)` in monstats.txt
	ResistanceMagicHell          int // called `ResMa(H)` in monstats.txt
	ResistanceFireNormal         int // called `ResFi` in monstats.txt
	ResistanceFireNightmare      int // called `ResFi(N)` in monstats.txt
	ResistanceFireHell           int // called `ResFi(H)` in monstats.txt
	ResistanceLightningNormal    int // called `ResLi` in monstats.txt
	ResistanceLightningNightmare int // called `ResLi(N)` in monstats.txt
	ResistanceLightningHell      int // called `ResLi(H)` in monstats.txt
	ResistanceColdNormal         int // called `ResCo` in monstats.txt
	ResistanceColdNightmare      int // called `ResCo(N)` in monstats.txt
	ResistanceColdHell           int // called `ResCo(H)` in monstats.txt
	ResistancePoisonNormal       int // called `ResPo` in monstats.txt
	ResistancePoisonNightmare    int // called `ResPo(N)` in monstats.txt
	ResistancePoisonHell         int // called `ResPo(H)` in monstats.txt

	// HealthRegenPerFrame
	// this controls how much health this unit regenerates per frame. Sometimes
	// this is altered by the units AI. The formula is (REGEN * HP) / 4096. So
	// a monster with 200 hp and a regen rate of 10 would regenerate ~0,5 HP
	// (~12 per second) every frame (1 second = 25 frames).
	HealthRegenPerFrame int // called `DamageRegen` in monstats.txt

	// ChanceToBlockNormal / Nightmare / Hell
	// this units chance to block. See the above column for details when this
	// applies or not. Monsters are capped at 75% block as players are AFAIK.
	ChanceToBlockNormal    int // called `ToBlock` in monstats.txt
	ChanceToBlockNightmare int // called `ToBlock(N)` in monstats.txt
	ChanceToBlockHell      int // called `ToBlock(H)` in monstats.txt

	// ChanceDeadlyStrike
	// this units chance of scoring a critical hit (dealing double the damage).
	ChanceDeadlyStrike int // called `Crit` in monstats.txt

	// MinHPNormal -- MaxHPHell
	// minHp, maxHp, minHp(N), maxHp(N), minHp(H), maxHp(H): this units minimum
	// and maximum HP on the respective difficulties.
	// NOTE: Monster HitPoints are calculated as the following: (minHp * Hp from
	// MonLvl.txt)/100 for minimal hp and (maxHp * Hp from MonLvl.txt)/100 for
	// maximum hp.
	// To make this guide idiot-proof, we will calculate the hit points of a
	// Hungry Dead from vanilla on Normal difficulty and Single Player mode.
	// It has minHp = 101 and maxHp = 186 and level 2. Hp for level 2 in
	// MonLvl.txt = 9
	// It means Hungry Dead has (101*9)/100 ~ 9 of minimum hp and
	// (186*9)/100 ~ 17 maximum hit points. You have to remember monsters on
	// nightmare and hell take their level (unless Boss = 1) from area level of
	// Levels.txt instead of Level column of MonStats.txt. I hope this is clear.
	MinHPNormal    int // called `minHP` in monstats.txt
	MinHPNightmare int // called `MinHP(N)` in monstats.txt
	MinHPHell      int // called `MinHP(H)` in monstats.txt
	MaxHPNormal    int // called `maxHP` in monstats.txt
	MaxHPNightmare int // called `MaxHP(N)` in monstats.txt
	MaxHPHell      int // called `MaxHP(H)` in monstats.txt

	// ArmorClassNormal -- Hell
	// this units Armor Class on the respective difficulties. The calculation is
	// the same (analogical) as for hit points.
	ArmorClassNormal    int // called `AC` in monstats.txt
	ArmorClassNightmare int // called `AC(N)` in monstats.txt
	ArmorClassHell      int // called `AC(H)` in monstats.txt

	// ExperienceNormal -- Hell
	// the experience you get when killing this unit on the respective
	// difficulty. The calculation is the same (analogical) as for hit points.
	ExperienceNormal    int // called `Exp` in monstats.txt
	ExperienceNightmare int // called `Exp(N)` in monstats.txt
	ExperienceHell      int // called `Exp(H)` in monstats.txt

	// DamageMinA1Normal / Nightmare / Hell
	// DamageMaxA1Normal / Nightmare /Hell
	// this units minimum and maximum damage when it uses A1/A2/S1 mode.
	// The calculation is the same (analogical) as for hit points.
	DamageMinA1Normal    int // called `A1MinD` in monstats.txt
	DamageMinA1Nightmare int // called `A1MinD(N)` in monstats.txt
	DamageMinA1Hell      int // called `A1MinD(H)` in monstats.txt
	DamageMaxA1Normal    int // called `A1MaxD` in monstats.txt
	DamageMaxA1Nightmare int // called `A1MaxD(N)` in monstats.txt
	DamageMaxA1Hell      int // called `A1MaxD(H)` in monstats.txt
	DamageMinA2Normal    int // called `A2MinD` in monstats.txt
	DamageMinA2Nightmare int // called `A2MinD(N)` in monstats.txt
	DamageMinA2Hell      int // called `A2MinD(H)` in monstats.txt
	DamageMaxA2Normal    int // called `A2MaxD` in monstats.txt
	DamageMaxA2Nightmare int // called `A2MaxD(N)` in monstats.txt
	DamageMaxA2Hell      int // called `A2MaxD(H)` in monstats.txt
	DamageMinS1Normal    int // called `S1MinD` in monstats.txt
	DamageMinS1Nightmare int // called `S1MinD(N)` in monstats.txt
	DamageMinS1Hell      int // called `S1MinD(H)` in monstats.txt
	DamageMaxS1Normal    int // called `S1MaxD` in monstats.txt
	DamageMaxS1Nightmare int // called `S1MaxD(N)` in monstats.txt
	DamageMaxS1Hell      int // called `S1MaxD(H)` in monstats.txt

	// AttackRatingA1Normal AttackRatingS1Hell
	// this units attack rating for A1/A2/S1 mode on the respective difficulties
	// The calculation is the same (analogical) as for hit points.
	AttackRatingA1Normal    int // called `A1TH` in monstats.txt
	AttackRatingA1Nightmare int // called `A1TH(N)` in monstats.txt
	AttackRatingA1Hell      int // called `A1TH(H)` in monstats.txt
	AttackRatingA2Normal    int // called `A2TH` in monstats.txt
	AttackRatingA2Nightmare int // called `A2TH(N)` in monstats.txt
	AttackRatingA2Hell      int // called `A2TH(H)` in monstats.txt
	AttackRatingS1Normal    int // called `S1TH` in monstats.txt
	AttackRatingS1Nightmare int // called `S1TH(N)` in monstats.txt
	AttackRatingS1Hell      int // called `S1TH(H)` in monstats.txt

	// ElementChance1Normal -- ElementChance3Hell
	// chance to append elemental damage to an attack on the respective
	// difficulties. 0=Never append, 100=Always append.
	ElementChance1Normal    int // called `El1Pct` in monstats.txt
	ElementChance1Nightmare int // called `El1Pct(N)` in monstats.txt
	ElementChance1Hell      int // called `El1Pct(H)` in monstats.txt
	ElementChance2Normal    int // called `El2Pct` in monstats.txt
	ElementChance2Nightmare int // called `El2Pct(N)` in monstats.txt
	ElementChance2Hell      int // called `El2Pct(H)` in monstats.txt
	ElementChance3Normal    int // called `El3Pct` in monstats.txt
	ElementChance3Nightmare int // called `El3Pct(N)` in monstats.txt
	ElementChance3Hell      int // called `El3Pct(H)` in monstats.txt

	// ElementDamageMin1Normal -- ElementDamageMax3Hell
	// minimum and Maximum elemental damage to append to the attack on the
	// respective difficulties. Note that you should only append elemental
	// damage to those missiles that don’t have any set in Missiles.txt. The
	// calculation is the same (analogical) as for hit points.
	ElementDamageMin1Normal    int // called `El1MinD` in monstats.txt
	ElementDamageMin1Nightmare int // called `El1MinD(N)` in monstats.txt
	ElementDamageMin1Hell      int // called `El1MinD(H)` in monstats.txt
	ElementDamageMin2Normal    int // called `El2MinD` in monstats.txt
	ElementDamageMin2Nightmare int // called `El2MinD(N)` in monstats.txt
	ElementDamageMin2Hell      int // called `El2MinD(H)` in monstats.txt
	ElementDamageMin3Normal    int // called `El3MinD` in monstats.txt
	ElementDamageMin3Nightmare int // called `El3MinD(N)` in monstats.txt
	ElementDamageMin3Hell      int // called `El3MinD(H)` in monstats.txt
	ElementDamageMax1Normal    int // called `El1MaxD` in monstats.txt
	ElementDamageMax1Nightmare int // called `El1MaxD(N)` in monstats.txt
	ElementDamageMax1Hell      int // called `El1MaxD(H)` in monstats.txt
	ElementDamageMax2Normal    int // called `El2MaxD` in monstats.txt
	ElementDamageMax2Nightmare int // called `El2MaxD(N)` in monstats.txt
	ElementDamageMax2Hell      int // called `El2MaxD(H)` in monstats.txt
	ElementDamageMax3Normal    int // called `El3MaxD` in monstats.txt
	ElementDamageMax3Nightmare int // called `El3MaxD(N)` in monstats.txt
	ElementDamageMax3Hell      int // called `El3MaxD(H)` in monstats.txt

	// ElementDuration1Normal -- ElementDuration3Hell
	// duration of the elemental effect (for freeze, burn, cold, poison and
	// stun) on the respective difficulties.
	ElementDuration1Normal    int // called `El1Dur` in monstats.txt
	ElementDuration1Nightmare int // called `El1Dur(N)` in monstats.txt
	ElementDuration1Hell      int // called `El1Dur(H)` in monstats.txt
	ElementDuration2Normal    int // called `El2Dur` in monstats.txt
	ElementDuration2Nightmare int // called `El2Dur(N)` in monstats.txt
	ElementDuration2Hell      int // called `El2Dur(H)` in monstats.txt
	ElementDuration3Normal    int // called `El3Dur` in monstats.txt
	ElementDuration3Nightmare int // called `El3Dur(N)` in monstats.txt
	ElementDuration3Hell      int // called `El3Dur(H)` in monstats.txt

	// SpecialEndDeath
	// 0 == no special death
	// 1 == spawn minion1 on death
	// 2 == kill mounted minion on death (ie the guard tower)
	SpecialEndDeath int // called `SplEndDeath` in monstats.txt

	// Enabled controls whenever the unit can be
	// used at all for any purpose whatsoever. This is not the only setting
	// that controls this; there are some other things that can also disable
	// the unit (Rarity and isSpawn columns see those for description).
	Enabled bool // called `enabled` in monstats.txt

	// SpawnsMinions tells the game whenever this
	// unit is a “nest”. IE, monsters that spawn new monsters have this set to
	// 1. Note that you can make any monster spawn new monsters, irregardless of
	// its AI, all you need to do is adjust spawn related columns and make sure
	// one of its skills is either “Nest” or “Minion Spawner”.
	SpawnsMinions bool // called `placespawn` in monstats.txt

	// IsLeader controls if a monster is the leader of minions it spawns
	// a leadercan order "raid on target" it causes group members to use
	// SK1 instead of A1 and A2 modes while raiding.
	IsLeader bool // called `SetBoss` in monstats.txt

	// TransferLeadership is connected with the previous one,
	// when "boss of the group" is killed, the "leadership" is passed to one of
	// his minions.
	TransferLeadership bool // called `BossXfer` in monstats.txt

	// Boolean, 1=spawnable, 0=not spawnable. This controls whenever this unit
	// can be spawned via Levels.txt.
	IsLevelSpawnable bool // called `isSpawn` in monstats.txt

	// IsMelee controls whenever
	// this unit can spawn with boss modifiers such as multiple shot or not.
	IsMelee bool // called `isMelee` in monstats.txt

	// IsNPC controls whenever the unit is a NPC or not.
	IsNpc bool // called `npc` in monstats.txt

	// IsInteractable
	// controls whenever you can interact with this unit. IE this controls
	// whenever it opens a speech-box or menu when you click on the unit. To
	// turn units like Kaeleen or Flavie into enemies you will need to set this
	// to 0 (you will also need to set NPC to 0 for that).
	IsInteractable bool // called `interact` in monstats.txt

	// IsRanged tells the game whenever this is a ranged attacker. It will make it possible for
	// monsters to spawn with multiple shot modifier.
	IsRanged bool // called `rangedtype` in monstats.txt

	// HasInventory Controls whenever this
	// NPC or UNIT can carry items with it. For NPCs this means that you can
	// access their Inventory and buy items (if you disable this and then try to
	// access this feature it will cause a crash so don’t do it unless you know
	// what you’re doing). For Monsters this means that they can access their
	// equipment data in MonEquip.txt.
	HasInventory bool // called `inventory` in monstats.txt

	// CanEnterTown
	// controls whenever enemies can follow you into a town or not. This should be set to
	// 1 for everything that spawns in a town for obvious reasons. According to
	// informations from Ogodei, it also disables/enables collision in
	// singleplayer and allows pets to walk/not walk in city in multiplayer.
	// In multiplayer collision is always set to 0 for pets.
	CanEnterTown bool // called `inTown` in monstats.txt

	// IsUndeadLow, IsUndeadHigh
	// Blizzard used this to differentiate High and Low Undead (IE low
	// undead like Zombies, Skeletons etc are set to 1 here), both this and
	// HUNDEAD will make the unit be considered undead. Low undeads can be
	// resurrected by high undeads. High undeads can't resurrect eachother.
	IsUndeadLow  bool // called `lUndead` in monstats.txt
	IsUndeadHigh bool // called `hUndead` in monstats.txt

	// IsDemon makes the game consider this unit a demon.
	IsDemon bool // called `demon` in monstats.txt

	// IsFlying If you set this to 1 the monster will be able to move fly over
	// obstacles such as puddles and rivers.
	IsFlying bool // called `flying` in monstats.txt

	// CanOpenDoors controls whether monsters can open doors or not
	CanOpenDoors bool // called `opendoors` in monstats.txt

	// IsSpecialBoss controls whenever this unit
	// is a special boss, as mentioned already, monsters set as boss IGNORE the
	// level settings, IE they will always spawn with the levels specified in
	// MonStats.txt. Boss will gain some special resistances, such as immunity
	// to being stunned (!!!), also it will not be affected by things like
	// deadly strike the way normal monsters are.
	IsSpecialBoss bool // called `boss` in monstats.txt

	// IsActBoss
	// Setting this to 1 will give your monsters huge (300% IIRC) damage bonus
	// against hirelings and summons. Ever wondered why Diablo destroys your
	// skeletons with 1 fire nova while barely doing anything to you? Here is
	// your answer.
	IsActBoss bool // called `primeevil` in monstats.txt

	// IsKillable will make the monster absolutely unkillable.
	IsKillable bool // called `killable` in monstats.txt

	// IsAiSwitchable Gives controls if this units mind may
	// be altered by “mind altering skills” like Attract, Conversion, Revive
	IsAiSwitchable bool // called `switchai` in monstats.txt

	// DisableAura Monsters set to 0 here
	// will not be effected by friendly auras
	DisableAura bool // called `noAura` in monstats.txt

	// DisableMultiShot
	// This is another layer of security to prevent this modifier from spawning,
	// besides the ISMELEE layer.
	DisableMultiShot bool // called `nomultishot` in monstats.txt

	// DisableCounting
	// prevents your pets from being counted as population in said area, for
	// example thanks to this you can finish The Den Of Evil quest while having
	// pets summoned.
	DisableCounting bool // called `neverCount` in monstats.txt

	// IgnorePets
	// Summons and hirelings are ignored by this unit, 0=Summons and
	// hirelings are noticed by this unit. If you set this to 1 you will the
	// monsters going directly for the player.
	IgnorePets bool // called `petIgnore` in monstats.txt

	// DealsDamageOnDeath This works similar to corpse explosion (its based on
	// hitpoints) and damages the surrounding players when the unit dies. (Ever
	// wanted to prevent those undead stygian dolls from doing damage when they
	// die, this is all there is to it)
	DealsDamageOnDeath bool // called `deathDmg` in monstats.txt

	// GenericSpawn Has to do
	// something is with minions being transformed into suicide minions, the
	// exact purpose of this is a mystery.
	GenericSpawn bool // called `genericSpawn` in monstats.txt

	// IgnoreMonLevelTxt Does this unit use
	// MonLevel.txt or does it use the stats listed in MonStats.txt as is.
	// Setting this to 1 will result in an array of problems, such as the
	// appended elemental damage being completely ignored, irregardless of the
	// values in it.
	IgnoreMonLevelTxt bool // called `noRatio` in monstats.txt

	// CanBlockWithoutShield in order for a unit to
	// block it needs the BL mode, if this is set to 1 then it will block
	// irregardless of what modes it has.
	CanBlockWithoutShield bool // called `NoShldBlock` in monstats.txt

	// SpecialGetModeChart
	// Unknown but could be telling the game to look at some internal table.
	// This is used for some Act Bosses and monsters like Putrid Defilers.
	SpecialGetModeChart bool // called `SplGetModeChar` in monstats.txt

	// SpecialEndGeneric Works in conjunction with SPLCLIENTEND, this
	// makes the unit untargetable when it is first spawned (used for those monsters that are under water, under ground or fly above you)
	SpecialEndGeneric bool // called `SplEndGeneric` in monstats.txt

	// SpecialClientEnd Works in conjunction with SPLENDGENERIC, this
	// makes the unit invisible when it is first spawned (used for those
	// monsters that are under water, under ground or fly above you), this is
	// also used for units that have other special drawing setups.
	SpecialClientEnd bool // called `SplClientEnd` in monstats.txt

}

MonStatRecord represents a single row from `data/global/excel/monstats.txt` in the MPQ files. These records are used for creating monsters.

type MonStats

type MonStats map[string]*MonStatRecord

MonStats stores all of the MonStatRecords

type MonStats2

type MonStats2 map[string]*MonStat2Record

MonStats2 stores all of the MonStat2Records

type MonTypeRecord

type MonTypeRecord struct {
	Type   string
	Equiv1 string
	Equiv2 string
	Equiv3 string
	// StrSing is the string displayed for the singular form (Skeleton), note
	// that this is unused in the original engine, since the only modifier
	// display code that accesses MonType uses StrPlur.
	StrSing   string
	StrPlural string
}

MonTypeRecord is a representation of a single row of MonType.txt.

type MonUModRecord

type MonUModRecord struct {
	// Name of modifer, not used by other files
	Name string

	// ID of the modifier,
	// the Mod fields of SuperUniqueRecord refer to these ID's
	ID int

	// Enabled boolean for whether this modifier can be applied
	Enabled bool

	// ExpansionOnly boolean for whether this modifier can only be applied in an expansion game.
	// In the file, the value 100 represents expansion only
	ExpansionOnly bool

	// If true, "Minion" will be displayed below the life bar of minions of
	// the monster with this modifier
	Xfer bool

	// Champion boolean, only usable by champion monsters
	Champion bool

	// FPick Unknown
	FPick int

	// Exclude1 monster type code that cannot have this modifier
	Exclude1 string

	// Exclude2 monster type code that cannot have this modifier
	Exclude2 string

	PickFrequencies struct {
		Normal    *PickFreq
		Nightmare *PickFreq
		Hell      *PickFreq
	}
}

MonUModRecord represents a single line in monumod.txt Information gathered from [https://d2mods.info/forum/kb/viewarticle?a=161]

type MonsterAI

type MonsterAI map[string]*MonsterAIRecord

MonsterAI holds the MonsterAIRecords, The monai.txt file is a lookup table for unit AI codes

type MonsterAIRecord

type MonsterAIRecord struct {
	AI string
}

MonsterAIRecord represents a single row from monai.txt

type MonsterEquipment

type MonsterEquipment map[string][]*MonsterEquipmentRecord

MonsterEquipment stores the MonsterEquipmentRecords

type MonsterEquipmentRecord

type MonsterEquipmentRecord struct {
	// Name of monster, pointer to MonStats.txt
	Name string

	// If true, monster is created by level, otherwise created by skill
	OnInit bool

	// Not written in description, only appear on monsters with OnInit false,
	// Level of skill for which this equipment row can be used?
	Level int

	Equipment []*monEquip
}

MonsterEquipmentRecord represents a single line in monequip.txt Information gathered from [https://d2mods.info/forum/kb/viewarticle?a=365]

type MonsterLevelRecord

type MonsterLevelRecord struct {

	// The level
	Level int

	// Values for Battle.net
	BattleNet monsterDifficultyLevels

	// Values for ladder/single player/lan
	Ladder monsterDifficultyLevels
}

MonsterLevelRecord represents a single row in monlvl.txt

type MonsterLevels

type MonsterLevels map[int]*MonsterLevelRecord

MonsterLevels stores the MonsterLevelRecords

type MonsterPlacementRecord

type MonsterPlacementRecord string

MonsterPlacementRecord represents a line from MonPlace.txt.

type MonsterPlacements

type MonsterPlacements []MonsterPlacementRecord

MonsterPlacements stores the MonsterPlacementRecords.

type MonsterProperties

type MonsterProperties map[string]*MonPropRecord

MonsterProperties stores all of the MonPropRecords

type MonsterSequenceFrame

type MonsterSequenceFrame struct {
	// The animation mode for this frame (refers to MonMode.txt)
	Mode string

	// The frame of the animation mode used for this frame of the sequence
	Frame int

	// Direction of the frame, enumerated by d2enum.AnimationFrameDirection
	Direction int

	// Event triggered by this frame
	Event int
}

MonsterSequenceFrame represents a single frame of a monster sequence

type MonsterSequenceRecord

type MonsterSequenceRecord struct {

	// Name of the sequence, referred to by monstats.txt
	Name string

	// Frames of this sequence
	Frames []*MonsterSequenceFrame
}

MonsterSequenceRecord contains a record for a monster sequence Composed of multiple lines from monseq.txt with the same name in the first column. Information gathered from [https://d2mods.info/forum/kb/viewarticle?a=395]

type MonsterSequences

type MonsterSequences map[string]*MonsterSequenceRecord

MonsterSequences contains the MonsterSequenceRecords

type MonsterSoundRecord

type MonsterSoundRecord struct {
	// ID is the identifier, used in MonStats.txt to refer to a particular sound record
	ID string

	// Melee attack sound ID, refers to a sound from Sounds.txt
	Attack1 string

	// Weapon attack sound ID, refers to a sound from Sounds.txt
	Weapon1 string

	// Delay in frames of Attack1 sound
	Attack1Delay int

	// Delay in frames of Weapon1 sound
	Weapon1Delay int

	// Probability of playing Attack1 sound instead of Weapon1
	Attack1Probability int

	// Overrides weapon volume from Sounds.txt
	Weapon1Volume int

	// Ditto, 2 sets of sounds are possible
	Attack2            string
	Weapon2            string
	Attack2Delay       int
	Weapon2Delay       int
	Attack2Probability int
	Weapon2Volume      int

	// Sound when monster takes a hit, refers to a sound from Sounds.txt
	HitSound string

	// Sound when monster dies, refers to a sound from Sounds.txt
	DeathSound string

	// Delay in frames of HitSound
	HitDelay int

	// Delay in frames of DeathSound
	DeaDelay int

	// Sound when monster enters skill mode
	Skill1 string
	Skill2 string
	Skill3 string
	Skill4 string

	// Sound played each loop of the WL animation
	Footstep string

	// Additional WL animation sound
	FootstepLayer string

	// Number of footstep sounds played (e.g. 2 for two-legged monsters)
	FootstepCount int

	// FsOff, possibly delay between footstep sounds
	FootstepOffset int

	// Probability of playing footstep sound, percentage
	FootstepProbability int

	// Sound when monster is neutral (also played when walking)
	Neutral string

	// Delay in frames between neutral sounds
	NeutralTime int

	// Sound when monster is initialized
	Init string

	// Sound when monster is encountered
	Taunt string

	// Sound when monster retreats
	Flee string

	// The following are related to skills in some way
	// Initial monster animation code (MonMode.txt)
	CvtMo1 string
	// ID of skill
	CvtSk1 string
	// End monster animation code (MonMode.txt)
	CvtTgt1 string

	CvtMo2  string
	CvtSk2  string
	CvtTgt2 string

	CvtMo3  string
	CvtSk3  string
	CvtTgt3 string
}

MonsterSoundRecord represents a single line in MonSounds.txt

type MonsterSounds

type MonsterSounds map[string]*MonsterSoundRecord

MonsterSounds stores the MonsterSoundRecords

type MonsterTypes

type MonsterTypes map[string]*MonTypeRecord

MonsterTypes stores all of the MonTypeRecords

type MonsterUniqueModifierConstants

type MonsterUniqueModifierConstants []int

MonsterUniqueModifierConstants contains constants from monumod.txt, can be accessed with indices from d2enum.MonUModConstIndex

type MonsterUniqueModifiers

type MonsterUniqueModifiers map[string]*MonUModRecord

MonsterUniqueModifiers stores the MonsterUniqueModifierRecords

type NPCRecord

type NPCRecord struct {
	// Name is an ID pointer to row of this npc in monstats.txt
	Name string

	Multipliers *costMultiplier

	QuestMultipliers map[int]*costMultiplier

	// MaxBuy is the maximum amount of gold an NPC will pay for an item for the corresponding
	// difficulty
	MaxBuy struct {
		Normal    int
		Nightmare int
		Hell      int
	}
}

NPCRecord represents a single line in NPC.txt The information has been gathered from [https:// d2mods.info/forum/kb/viewarticle?a=387]

type NPCs

type NPCs map[string]*NPCRecord

NPCs stores the NPCRecords

type ObjectDetailRecord

type ObjectDetailRecord struct {
	Index         int    // Line number in file, this is the actual index used for objects
	FrameCount    [8]int // how many frames does this mode have, 0 = skip
	FrameDelta    [8]int // what rate is the animation played at (256 = 100% speed)
	LightDiameter [8]int

	StartFrame [8]int

	OrderFlag   [8]int //  0 = object, 1 = floor, 2 = wall
	Parm        [8]int // unknown
	Name        string
	Description string

	SpawnMax        int // unused?
	TrapProbability int // unused

	SizeX int
	SizeY int

	NTgtFX int // unknown
	NTgtFY int // unknown
	NTgtBX int // unknown
	NTgtBY int // unknown

	Orientation int // unknown (1=sw, 2=nw, 3=se, 4=ne)
	Trans       int // controls palette mapping

	XOffset int // in pixels offset
	YOffset int

	TotalPieces int // selectable DCC components count
	SubClass    int // subclass of object:

	XSpace int // unknown
	YSpace int

	NameOffset int // pixels to offset the name from the animation pivot

	OperateRange   int // distance object can be used from, might be unused
	ShrineFunction int // unused

	Act int // what acts this object can appear in (15 = all three)

	Damage int // amount of damage done by this (used depending on operatefn)

	Left   int // unknown, clickable bounding box?
	Top    int
	Width  int
	Height int

	OperateFn  int // what function is called when the player clicks on the object
	PopulateFn int // what function is used to spawn this object?
	InitFn     int // what function is run when the object is initialized?
	ClientFn   int // controls special audio-visual functions

	// 'To ...' or 'trap door' when highlighting, not sure which is T/F
	AutoMap int // controls how this object appears on the map

	CycleAnimation   [8]bool // probably whether animation loops
	Selectable       [8]bool // is this mode selectable
	BlocksLight      [8]bool
	HasCollision     [8]bool
	HasAnimationMode [8]bool // 'Mode' in source, true if this mode is used
	SelS             [8]bool
	IsAttackable     bool // do we kick it when interacting
	EnvEffect        bool // unknown
	IsDoor           bool
	BlockVisibility  bool // only works with IsDoor
	PreOperate       bool // unknown
	Draw             bool // if false, object isn't drawn (shadow is still drawn and player can still select though)
	SelHD            bool // whether these DCC components are selectable
	SelTR            bool
	SelLG            bool
	SelRA            bool
	SelLA            bool
	SelRH            bool
	SelLH            bool
	SelSH            bool
	MonsterOk        bool // unknown
	Restore          bool // if true, object is stored in memory and will be retained if you leave and re-enter the area
	Lockable         bool
	Gore             bool // unknown, something with corpses
	Sync             bool // unknown
	Flicker          bool // light flickers if true
	Beta             bool // if true, appeared in the beta?
	Overlay          bool // unknown
	CollisionSubst   bool // unknown, controls some kind of special collision checking?
	RestoreVirgins   bool // if true, only restores unused objects (see Restore)
	BlockMissile     bool // if true, missiles collide with this
	DrawUnder        bool // if true, drawn as a floor tile is
	OpenWarp         bool // needs clarification, controls whether highlighting shows

	LightRed   byte // if lightdiameter is set, rgb of the light
	LightGreen byte
	LightBlue  byte
	// contains filtered or unexported fields
}

ObjectDetailRecord represents the settings for one type of object from objects.txt

type ObjectDetails

type ObjectDetails map[int]*ObjectDetailRecord

ObjectDetails stores all of the ObjectDetailRecords

type ObjectGroupMember

type ObjectGroupMember struct {
	// ID is the ID of the object.
	ID int

	// Density is how densely the level is filled with the object.
	// Must be below 125.
	Density int

	// Probability is the probability of this particular object being spawned.
	// The value is a percentage.
	Probability int
}

ObjectGroupMember represents a member of an object group.

type ObjectGroupRecord

type ObjectGroupRecord struct {
	// GroupName is the name of the group.
	GroupName string

	// Offset is the ID of the group, referred to by Levels.txt.
	Offset int

	// Members are the objects in the group.
	Members *[objectsGroupSize]ObjectGroupMember

	// Shrines determines whether this is a group of shrines.
	// Note: for shrine groups, densities must be set to 0.
	Shrines bool

	// Wells determines whether this is a group of wells.
	// Note: for wells groups, densities must be set to 0.
	Wells bool
}

ObjectGroupRecord represents a single line in objgroup.txt. Information has been gathered from [https://d2mods.info/forum/kb/viewarticle?a=394].

type ObjectGroups

type ObjectGroups map[int]*ObjectGroupRecord

ObjectGroups stores the ObjectGroupRecords.

type ObjectLookupRecord

type ObjectLookupRecord struct {
	Act           int
	Type          d2enum.ObjectType
	Id            int //nolint:golint,stylecheck // ID is the right key
	Name          string
	Description   string
	ObjectsTxtId  int //nolint:golint,stylecheck // ID is the right key
	MonstatsTxtId int //nolint:golint,stylecheck // ID is the right key
	Direction     int
	Base          string
	Token         string
	Mode          string
	Class         string
	HD            string
	TR            string
	LG            string
	RA            string
	LA            string
	RH            string
	LH            string
	SH            string
	S1            string
	S2            string
	S3            string
	S4            string
	S5            string
	S6            string
	S7            string
	S8            string
	ColorMap      string
	Index         int
}

ObjectLookupRecord is a representation of a row from objectLookups.txt

type ObjectModeRecord

type ObjectModeRecord struct {
	Name  string
	Token string
}

ObjectModeRecord is a representation of an animation mode for an object

type ObjectModes

type ObjectModes map[string]*ObjectModeRecord

ObjectModes is a map of ObjectModeRecords

type ObjectTypeRecord

type ObjectTypeRecord struct {
	Name  string
	Token string
}

ObjectTypeRecord is a representation of a row from objtype.txt

type ObjectTypes

type ObjectTypes []ObjectTypeRecord

ObjectTypes contains the name and token for objects

type OverlayRecord

type OverlayRecord struct {
	// Overlay name
	Name string

	// .dcc file found in Data/Globals/Overlays
	Filename string

	// XOffset, YOffset the x,y offset of the overlay
	XOffset, YOffset int

	// These values modify Y-axis placement
	Height1 int
	Height2 int
	Height3 int
	Height4 int

	// AnimRate animation speed control
	AnimRate int

	// Trans controls overlay blending mode, check out the link for more info
	// This should probably become an "enum" later on
	Trans int

	// Radius maximum for light
	Radius int

	// InitRadius Light radius increase per frame
	InitRadius int

	// Red, Green, Blue color for light
	Red, Green, Blue uint8

	// Version is 100 for expansion, 0 for vanilla
	Version bool

	// PreDraw controls overlay drawing precedence
	PreDraw bool
}

OverlayRecord encapsulates information found in Overlay.txt

type Overlays

type Overlays map[string]*OverlayRecord

Overlays contains all of the OverlayRecords from Overlay.txt

type PetTypeRecord

type PetTypeRecord struct {
	// Name of the pet type, refferred by "pettype" in skills.txt
	Name string

	// Name text under the pet icon
	IconName string

	// .dc6 file for the pet's icon, located in /data/global/ui/hireables
	BaseIcon string

	// Alternative pet icon .dc6 file
	MIcon1 string
	MIcon2 string
	MIcon3 string
	MIcon4 string

	// ID number of the pet type
	ID int

	// GroupID number of the group this pet belongs to
	GroupID int

	// BaseMax unknown what this does...
	BaseMax int

	// Pet icon type
	IconType int

	// Alternative pet index from monstats.txt
	MClass1 int
	MClass2 int
	MClass3 int
	MClass4 int

	// Warp warps with the player, otherwise it dies
	Warp bool

	// Range the pet only die if the distance between the player  and the pet exceeds 41 sub-tiles.
	Range bool

	// Unknown
	PartySend bool

	// Unsummon whether the pet can be unsummoned
	Unsummon bool

	// Automap whether the pet is displayed on the automap
	Automap bool

	// If true, the pet's HP will be displayed under the icon
	DrawHP bool
}

PetTypeRecord represents a single line in PetType.txt

type PetTypes

type PetTypes map[string]*PetTypeRecord

PetTypes stores the PetTypeRecords

type PickFreq

type PickFreq struct {
	// ...on champion monsters
	Champion int

	// ... on unique monsters
	Unique int
}

PickFreq restricts the range of modifiers that can spawn ...

type PlayerClassRecord

type PlayerClassRecord struct {
	// Name of the player class
	Name string

	// Code for the player class
	Code string
}

PlayerClassRecord represents a single line from PlayerClass.txt Lookup table for class codes

type PlayerClasses

type PlayerClasses map[string]*PlayerClassRecord

PlayerClasses stores the PlayerClassRecords

type PlayerModeRecord

type PlayerModeRecord struct {
	// Player animation mode name
	Name string

	// Player animation mode token
	Token string
}

PlayerModeRecord represents a single line in PlayerMode.txt

type PlayerModes

type PlayerModes map[string]*PlayerModeRecord

PlayerModes stores the PlayerModeRecords

type PlayerTypeRecord

type PlayerTypeRecord struct {
	Name  string
	Token string
}

PlayerTypeRecord is used for changing character animation modes.

type PlayerTypes

type PlayerTypes map[string]*PlayerTypeRecord

PlayerTypes is a map of PlayerTypeRecords

type Properties

type Properties map[string]*PropertyRecord

Properties stores all of the PropertyRecords

type PropertyDescriptor

type PropertyDescriptor struct {
	// Code is an ID pointer of a property from Properties.txt,
	// these columns control each of the eight different full set modifiers a set item can grant you
	// at most.
	Code string

	// Param is the passed on to the associated property, this is used to pass skill IDs, state IDs,
	// monster IDs, montype IDs and the like on to the properties that require them,
	// these fields support calculations.
	Parameter string

	// Min value to assign to the associated property.
	// Certain properties have special interpretations based on stat encoding (e.g.
	// chance-to-cast and charged skills). See the File Guides for Properties.txt and ItemStatCost.
	// txt for further details.
	Min int

	// Max value to assign to the associated property.
	// Certain properties have special interpretations based on stat encoding (e.g.
	// chance-to-cast and charged skills). See the File Guides for Properties.txt and ItemStatCost.
	// txt for further details.
	Max int
}

PropertyDescriptor is a generic description of a property, used to create properties. Sets, SetItems, UniqueItems will all use this generic form of a property

type PropertyRecord

type PropertyRecord struct {
	Code   string
	Active string
	Stats  [7]*PropertyStatRecord
}

PropertyRecord is a representation of a single row of properties.txt

type PropertyStatRecord

type PropertyStatRecord struct {
	SetID      int
	Value      int
	FunctionID int
	StatCode   string
}

PropertyStatRecord contains stat information for a property

type RareItemAffix

type RareItemAffix struct {
	Name          string
	IncludedTypes []string
	ExcludedTypes []string
}

RareItemAffix described both rare prefixes and suffixes

type RareItemPrefixRecord

type RareItemPrefixRecord = RareItemAffix

RareItemPrefixRecord is a name prefix for rare items (items with more than 2 affixes)

type RareItemSuffixRecord

type RareItemSuffixRecord = RareItemAffix

RareItemSuffixRecord is a name suffix for rare items (items with more than 2 affixes)

type RarePrefixes

type RarePrefixes []*RareItemPrefixRecord

RarePrefixes is where all RareItemPrefixRecords are stored

type RareSuffixes

type RareSuffixes []*RareItemSuffixRecord

RareSuffixes is where all RareItemSuffixRecords are stored

type RecordManager

type RecordManager struct {
	*d2util.Logger

	Animation struct {
		Data  *d2animdata.AnimationData
		Token struct {
			Player    PlayerTypes
			Composite CompositeTypes
			Armor     ArmorTypes
			Weapon    WeaponClasses
			HitClass  HitClasses
		}
	}
	BodyLocations
	Calculation struct {
		Skills   Calculations
		Missiles Calculations
	}
	Character struct {
		Classes PlayerClasses
		Events
		Experience ExperienceBreakpoints
		MaxLevel   ExperienceMaxLevels
		Modes      PlayerModes
		Stats      CharStats
	}
	ComponentCodes
	Colors
	DifficultyLevels
	ElemTypes
	Gamble
	Hireling struct {
		Details      Hirelings
		Descriptions HirelingDescriptions
	}
	Item struct {
		All CommonItems // NOTE: populated when armor, weapons, and misc items are ALL loaded

		Armors  CommonItems
		Misc    CommonItems
		Weapons CommonItems

		Equivalency         ItemEquivalenceMap      // NOTE: populated when all items are loaded
		EquivalenceByRecord ItemEquivalenceByRecord // NOTE: populated when all items are loaded

		AutoMagic
		Belts
		Books
		Gems
		Magic struct {
			Prefix MagicPrefix
			Suffix MagicSuffix
		}
		MagicPrefixGroups  ItemAffixGroups
		MagicSuffixGroups  ItemAffixGroups
		Quality            ItemQualities
		LowQualityPrefixes LowQualities
		Rare               struct {
			Prefix RarePrefixes
			Suffix RareSuffixes
		}
		Ratios ItemRatios
		Cube   struct {
			Recipes   CubeRecipes
			Modifiers CubeModifiers
			Types     CubeTypes
		}
		Runewords
		Sets
		SetItems
		Stats    ItemStatCosts
		Treasure struct {
			Normal    TreasureClass
			Expansion TreasureClass
		}
		Types  ItemTypes
		Unique UniqueItems
		StorePages
	}
	Layout struct {
		Inventory
		Overlays
	}
	Level struct {
		AutoMaps
		Details LevelDetails
		Maze    LevelMazeDetails
		Presets LevelPresets
		Sub     LevelSubstitutions
		Types   LevelTypes
		Warp    LevelWarps
	}
	Missiles

	Monster struct {
		AI        MonsterAI
		Equipment MonsterEquipment
		Levels    MonsterLevels
		Modes     MonModes
		Name      struct {
			Prefix UniqueMonsterAffixes
			Suffix UniqueMonsterAffixes
		}
		Placements MonsterPlacements
		Presets    MonPresets
		Props      MonsterProperties
		Sequences  MonsterSequences
		Sounds     MonsterSounds
		Stats      MonStats
		Stats2     MonStats2
		Types      MonsterTypes
		Unique     struct {
			Appellations UniqueAppellations
			Mods         MonsterUniqueModifiers
			Constants    MonsterUniqueModifierConstants
			Super        SuperUniques
		}
	}
	NPCs
	Object struct {
		Details ObjectDetails
		Lookup  IndexedObjects
		Modes   ObjectModes
		Shrines
		Types ObjectTypes
	}
	PetTypes
	Properties
	Skill struct {
		Details      SkillDetails
		Descriptions SkillDescriptions
	}
	Sound struct {
		Details     SoundDetails
		Environment SoundEnvironments
	}
	States
	// contains filtered or unexported fields
}

RecordManager stores all of the records loaded from txt files

func NewRecordManager

func NewRecordManager(l d2util.LogLevel) (*RecordManager, error)

NewRecordManager creates a new record manager (no loaders are bound!)

func (*RecordManager) AddLoader

func (r *RecordManager) AddLoader(path string, loader recordLoader) error

AddLoader associates a file path with a record loader

func (*RecordManager) FindEquivalentTypesByItemCommonRecord

func (r *RecordManager) FindEquivalentTypesByItemCommonRecord(
	icr *ItemCommonRecord,
) []string

FindEquivalentTypesByItemCommonRecord returns itemtype codes that are equivalent to the given item common record

func (*RecordManager) GetExperienceBreakpoint

func (r *RecordManager) GetExperienceBreakpoint(heroType d2enum.Hero, level int) int

GetExperienceBreakpoint given a hero type and a level, returns the experience required for the level

func (*RecordManager) GetLevelDetails

func (r *RecordManager) GetLevelDetails(id int) *LevelDetailRecord

GetLevelDetails gets a LevelDetailRecord by the record Id

func (*RecordManager) GetMaxLevelByHero

func (r *RecordManager) GetMaxLevelByHero(heroType d2enum.Hero) int

GetMaxLevelByHero returns the highest level attainable for a hero type

func (*RecordManager) GetMissileByName

func (r *RecordManager) GetMissileByName(missileName string) *MissileRecord

GetMissileByName allows lookup of a MissileRecord by a given name. The name will be lowercased and stripped of whitespaces.

func (*RecordManager) GetSkillByName

func (r *RecordManager) GetSkillByName(skillName string) *SkillRecord

GetSkillByName returns the skill record for the given Skill name.

func (*RecordManager) LevelPreset

func (r *RecordManager) LevelPreset(id int) LevelPresetRecord

LevelPreset looks up a LevelPresetRecord by ID

func (*RecordManager) Load

func (r *RecordManager) Load(path string, dict *d2txt.DataDictionary) error

Load will pass the dictionary to any bound loaders and populate the record entries

func (*RecordManager) LookupObject

func (r *RecordManager) LookupObject(act, typ, id int) *ObjectLookupRecord

LookupObject looks up an object record

func (*RecordManager) SelectSoundByIndex

func (r *RecordManager) SelectSoundByIndex(index int) *SoundDetailRecord

SelectSoundByIndex selects a sound by its ID

type RuneRecord

type RuneRecord struct {
	Name     string
	RuneName string // More of a note - the actual name should be read from the TBL files.
	Complete bool   // An enabled/disabled flag. Only "Complete" runewords work in game.
	Server   bool   // Marks a runeword as only available on ladder, not single player or tcp/ip.

	// The item types for includsion/exclusion for this runeword record
	ItemTypes struct {
		Include []string
		Exclude []string
	}

	// Runes slice of ID pointers from Misc.txt, controls what runes are
	// required to make the rune word and in what order they are to be socketed.
	Runes []string

	Properties []*RunewordProperty
}

RuneRecord is a representation of a single row of runes.txt. It defines runewords available in the game.

type RunewordProperty

type RunewordProperty = PropertyDescriptor

RunewordProperty is a representation of a stat possessed by this runeword

type Runewords

type Runewords map[string]*RuneRecord

Runewords stores all of the RuneRecords

type SetItemProperty

type SetItemProperty = PropertyDescriptor

SetItemProperty is describes a property of a set item

type SetItemRecord

type SetItemRecord struct {
	// SetItemKey (index)
	// string key to item's name in a .tbl file
	SetItemKey string

	// SetKey (set)
	// string key to the index field in Sets.txt - the set the item is a part of.
	SetKey string

	// ItemCode (item)
	// base item code of this set item (matches code field in Weapons.txt, Armor.txt or Misc.txt files).
	ItemCode string

	// Rarity
	// Chance to pick this set item if more then one set item of the same base item exist,
	// this uses the common rarity/total_rarity formula, so if you have two set rings,
	// one with a rarity of 100 the other with a rarity of 1,
	// then the first will drop 100/101 percent of the time (
	// 99%) and the other will drop 1/101 percent of the time (1%),
	// rarity can be anything between 0 and 255.
	Rarity int

	// QualityLevel (lvl)
	// The quality level of this set item, monsters, cube recipes, vendors,
	// objects and the like most be at least this level or higher to be able to drop this item,
	// otherwise they would drop a magical item with twice normal durability.
	QualityLevel int

	// RequiredLevel ("lvl req")
	// The character level required to use this set item.
	RequiredLevel int

	// CharacterPaletteTransform (chrtransform)
	// Palette shift to apply to the the DCC component-file and the DC6 flippy-file (
	// whenever or not the color shift will apply is determined by Weapons.txt,
	// Armor.txt or Misc.txt). This is an ID pointer from Colors.txt.
	CharacterPaletteTransform int

	// InventoryPaletteTransform (invtransform)
	// Palette shift to apply to the the DC6 inventory-file (
	// whenever or not the color shift will apply is determined by Weapons.txt,
	// Armor.txt or Misc.txt). This is an ID pointer from Colors.txt.
	InventoryPaletteTransform int

	// InvFile
	// Overrides the invfile and setinvfile specified in Weapons.txt,
	// Armor.txt or Misc.txt for the base item.
	// This field contains the file name of the DC6 inventory graphic (without the .dc6 extension).
	InvFile string

	// FlippyFile
	// Overrides the flippyfile specified in Weapons.txt, Armor.txt or Misc.txt for the base item.
	// This field contains the file name of the DC6 flippy animation (without the .dc6 extension).
	FlippyFile string

	// DropSound
	// Overrides the dropsound (the sound played when the item hits the ground) specified in Weapons.
	// txt, Armor.txt or Misc.txt for the base item. This field contains an ID pointer from Sounds.txt.
	DropSound string

	// DropSfxFrame
	// How many frames after the flippy animation starts playing will the associated drop sound start
	// to play. This overrides the values in Weapons.txt, Armor.txt or Misc.txt.
	DropSfxFrame int

	// UseSound
	// Overrides the usesound (the sound played when the item is consumed by the player) specified in
	// Weapons.txt, Armor.txt or Misc.txt for the base item.
	// This field contains an ID pointer from Sounds.txt.
	UseSound string

	// CostMult ("cost mult")
	// The base item's price is multiplied by this value when sold, repaired or bought from a vendor.
	CostMult int

	// CostAdd ("cost add")
	// After the price has been multiplied, this amount of gold is added to the price on top.
	CostAdd int

	// AddFn ("add func")
	// a property mode field that controls how the variable attributes will appear and be functional
	// on a set item. See the appendix for further details about this field's effects.
	AddFn int

	// Properties are a propert code, parameter, min, max for generating an item propert
	Properties [numPropertiesOnSetItem]*SetItemProperty

	// SetPropertiesLevel1 is the first version of bonus properties for the set
	SetPropertiesLevel1 [numBonusPropertiesOnSetItem]*SetItemProperty

	// SetPropertiesLevel2 is the second version of bonus properties for the set
	SetPropertiesLevel2 [numBonusPropertiesOnSetItem]*SetItemProperty
}

SetItemRecord represents a set item

type SetItems

type SetItems map[string]*SetItemRecord

SetItems holds all of the SetItemRecords

type SetProperty

type SetProperty = PropertyDescriptor

SetProperty represents a property possessed by the set

type SetRecord

type SetRecord struct {
	// index
	// String key linked to by the set field in SetItems.
	// txt - used to tie all of the set's items to the same set.
	Key string

	// name
	// String key to item's name in a .tbl file.
	StringTableKey string

	// Version 0 for vanilla, 100 for LoD expansion
	Version int

	// Level
	// set level, perhaps intended as a minimum level for partial or full attributes to appear
	// (reference only, not loaded into game).
	Level int

	// Properties contains the partial and full set bonus properties.
	Properties struct {
		PartialA []*SetProperty
		PartialB []*SetProperty
		Full     []*SetProperty
	}
}

SetRecord describes the set bonus for a group of set items

type Sets

type Sets map[string]*SetRecord

Sets contain the set records from sets.txt

type ShrineRecord

type ShrineRecord struct {
	ShrineType       string // None, Recharge, Booster, or Magic
	ShrineName       string // Name of the Shrine
	Effect           string // Effect on the player
	Code             int    // Unique identifier
	Arg0             int    // ? (0-400)
	Arg1             int    // ? (0-2000)
	DurationFrames   int    // How long the shrine lasts in frames
	ResetTimeMinutes int    // How many minutes until the shrine resets?
	Rarity           int    // 1-3
	EffectClass      int    // 0-4
	LevelMin         int    // 0-32
}

ShrineRecord is a representation of a row from shrines.txt

type Shrines

type Shrines map[string]*ShrineRecord

Shrines contains the Unique Appellations

type SkillDescriptionRecord

type SkillDescriptionRecord struct {
	Name         string                    // skilldesc
	SkillPage    int                       // SkillPage
	SkillRow     int                       // SkillRow
	SkillColumn  int                       // SkillColumn
	ListRow      int                       // ListRow
	ListPool     string                    // ListPool
	IconCel      int                       // IconCel
	NameKey      string                    // str name
	ShortKey     string                    // str short
	LongKey      string                    // str long
	AltKey       string                    // str alt
	ManaKey      string                    // str mana
	Descdam      string                    // descdam
	DdamCalc1    d2calculation.Calculation // ddam calc1
	DdamCalc2    d2calculation.Calculation // ddam calc2
	P1dmelem     string                    // p1dmelem
	P1dmmin      d2calculation.Calculation // p1dmmin
	P1dmmax      d2calculation.Calculation // p1dmmax
	P2dmelem     string                    // p2dmelem
	P2dmmin      d2calculation.Calculation // p2dmmin
	P2dmmax      d2calculation.Calculation // p2dmmax
	P3dmelem     string                    // p3dmelem
	P3dmmin      d2calculation.Calculation // p3dmmin
	P3dmmax      d2calculation.Calculation // p3dmmax
	Descatt      string                    // descatt
	Descmissile1 string                    // descmissile1
	Descmissile2 string                    // descmissile2
	Descmissile3 string                    // descmissile3
	Descline1    string                    // descline1
	Desctexta1   string                    // desctexta1
	Desctextb1   string                    // desctextb1
	Desccalca1   d2calculation.Calculation // desccalca1
	Desccalcb1   d2calculation.Calculation // desccalcb1
	Descline2    string                    // descline2
	Desctexta2   string                    // desctexta2
	Desctextb2   string                    // desctextb2
	Desccalca2   d2calculation.Calculation // desccalca2
	Desccalcb2   d2calculation.Calculation // desccalcb2
	Descline3    string                    // descline3
	Desctexta3   string                    // desctexta3
	Desctextb3   string                    // desctextb3
	Desccalca3   d2calculation.Calculation // desccalca3
	Desccalcb3   d2calculation.Calculation // desccalcb3
	Descline4    string                    // descline4
	Desctexta4   string                    // desctexta4
	Desctextb4   string                    // desctextb4
	Desccalca4   d2calculation.Calculation // desccalca4
	Desccalcb4   d2calculation.Calculation // desccalcb4
	Descline5    string                    // descline5
	Desctexta5   string                    // desctexta5
	Desctextb5   string                    // desctextb5
	Desccalca5   d2calculation.Calculation // desccalca5
	Desccalcb5   d2calculation.Calculation // desccalcb5
	Descline6    string                    // descline6
	Desctexta6   string                    // desctexta6
	Desctextb6   string                    // desctextb6
	Desccalca6   d2calculation.Calculation // desccalca6
	Desccalcb6   d2calculation.Calculation // desccalcb6
	Dsc2line1    string                    // dsc2line1
	Dsc2texta1   string                    // dsc2texta1
	Dsc2textb1   string                    // dsc2textb1
	Dsc2calca1   d2calculation.Calculation // dsc2calca1
	Dsc2calcb1   d2calculation.Calculation // dsc2calcb1
	Dsc2line2    string                    // dsc2line2
	Dsc2texta2   string                    // dsc2texta2
	Dsc2textb2   string                    // dsc2textb2
	Dsc2calca2   d2calculation.Calculation // dsc2calca2
	Dsc2calcb2   d2calculation.Calculation // dsc2calcb2
	Dsc2line3    string                    // dsc2line3
	Dsc2texta3   string                    // dsc2texta3
	Dsc2textb3   string                    // dsc2textb3
	Dsc2calca3   d2calculation.Calculation // dsc2calca3
	Dsc2calcb3   d2calculation.Calculation // dsc2calcb3
	Dsc2line4    string                    // dsc2line4
	Dsc2texta4   string                    // dsc2texta4
	Dsc2textb4   string                    // dsc2textb4
	Dsc2calca4   d2calculation.Calculation // dsc2calca4
	Dsc2calcb4   d2calculation.Calculation // dsc2calcb4
	Dsc3line1    string                    // dsc3line1
	Dsc3texta1   string                    // dsc3texta1
	Dsc3textb1   string                    // dsc3textb1
	Dsc3calca1   d2calculation.Calculation // dsc3calca1
	Dsc3calcb1   d2calculation.Calculation // dsc3calcb1
	Dsc3line2    string                    // dsc3line2
	Dsc3texta2   string                    // dsc3texta2
	Dsc3textb2   string                    // dsc3textb2
	Dsc3calca2   d2calculation.Calculation // dsc3calca2
	Dsc3calcb2   d2calculation.Calculation // dsc3calcb2
	Dsc3line3    string                    // dsc3line3
	Dsc3texta3   string                    // dsc3texta3
	Dsc3textb3   string                    // dsc3textb3
	Dsc3calca3   d2calculation.Calculation // dsc3calca3
	Dsc3calcb3   d2calculation.Calculation // dsc3calcb3
	Dsc3line4    string                    // dsc3line4
	Dsc3texta4   string                    // dsc3texta4
	Dsc3textb4   string                    // dsc3textb4
	Dsc3calca4   d2calculation.Calculation // dsc3calca4
	Dsc3calcb4   d2calculation.Calculation // dsc3calcb4
	Dsc3line5    string                    // dsc3line5
	Dsc3texta5   string                    // dsc3texta5
	Dsc3textb5   string                    // dsc3textb5
	Dsc3calca5   d2calculation.Calculation // dsc3calca5
	Dsc3calcb5   d2calculation.Calculation // dsc3calcb5
	Dsc3line6    string                    // dsc3line6
	Dsc3texta6   string                    // dsc3texta6
	Dsc3textb6   string                    // dsc3textb6
	Dsc3calca6   d2calculation.Calculation // dsc3calca6
	Dsc3calcb6   d2calculation.Calculation // dsc3calcb6
	Dsc3line7    string                    // dsc3line7
	Dsc3texta7   string                    // dsc3texta7
	Dsc3textb7   string                    // dsc3textb7
	Dsc3calca7   d2calculation.Calculation // dsc3calca7
	Dsc3calcb7   d2calculation.Calculation // dsc3calcb7
}

SkillDescriptionRecord is a single row from skilldesc.txt and is used for generating text strings for skills.

type SkillDescriptions

type SkillDescriptions map[string]*SkillDescriptionRecord

SkillDescriptions stores all of the SkillDescriptionRecords

type SkillDetails

type SkillDetails map[int]*SkillRecord

SkillDetails has all of the SkillRecords

type SkillRecord

type SkillRecord struct {
	Skill             string
	Charclass         string
	Skilldesc         string
	Prgcalc1          d2calculation.Calculation
	Prgcalc2          d2calculation.Calculation
	Prgcalc3          d2calculation.Calculation
	Srvmissile        string
	Srvmissilea       string
	Srvmissileb       string
	Srvmissilec       string
	Srvoverlay        string
	Aurastate         string
	Auratargetstate   string
	Auralencalc       d2calculation.Calculation
	Aurarangecalc     d2calculation.Calculation
	Aurastat1         string
	Aurastatcalc1     d2calculation.Calculation
	Aurastat2         string
	Aurastatcalc2     d2calculation.Calculation
	Aurastat3         string
	Aurastatcalc3     d2calculation.Calculation
	Aurastat4         string
	Aurastatcalc4     d2calculation.Calculation
	Aurastat5         string
	Aurastatcalc5     d2calculation.Calculation
	Aurastat6         string
	Aurastatcalc6     d2calculation.Calculation
	Auraevent1        string
	Auraevent2        string
	Auraevent3        string
	Auratgtevent      string
	Auratgteventfunc  string
	Passivestate      string
	Passiveitype      string
	Passivestat1      string
	Passivecalc1      d2calculation.Calculation
	Passivestat2      string
	Passivecalc2      d2calculation.Calculation
	Passivestat3      string
	Passivecalc3      d2calculation.Calculation
	Passivestat4      string
	Passivecalc4      d2calculation.Calculation
	Passivestat5      string
	Passivecalc5      d2calculation.Calculation
	Passiveevent      string
	Passiveeventfunc  string
	Summon            string
	Pettype           string
	Petmax            d2calculation.Calculation
	Summode           string
	Sumskill1         string
	Sumsk1calc        d2calculation.Calculation
	Sumskill2         string
	Sumsk2calc        d2calculation.Calculation
	Sumskill3         string
	Sumsk3calc        d2calculation.Calculation
	Sumskill4         string
	Sumsk4calc        d2calculation.Calculation
	Sumskill5         string
	Sumsk5calc        d2calculation.Calculation
	Sumoverlay        string
	Stsound           string
	Stsoundclass      string
	Dosound           string
	DosoundA          string
	DosoundB          string
	Tgtoverlay        string
	Tgtsound          string
	Prgoverlay        string
	Prgsound          string
	Castoverlay       string
	Cltoverlaya       string
	Cltoverlayb       string
	Cltmissile        string
	Cltmissilea       string
	Cltmissileb       string
	Cltmissilec       string
	Cltmissiled       string
	Cltcalc1          d2calculation.Calculation
	Cltcalc2          d2calculation.Calculation
	Cltcalc3          d2calculation.Calculation
	Range             string
	Itypea1           string
	Itypea2           string
	Itypea3           string
	Etypea1           string
	Etypea2           string
	Itypeb1           string
	Itypeb2           string
	Itypeb3           string
	Etypeb1           string
	Etypeb2           string
	Anim              d2enum.PlayerAnimationMode
	Seqtrans          string
	Monanim           string
	ItemCastSound     string
	ItemCastOverlay   string
	Skpoints          d2calculation.Calculation
	Reqskill1         string
	Reqskill2         string
	Reqskill3         string
	State1            string
	State2            string
	State3            string
	Perdelay          d2calculation.Calculation
	Calc1             d2calculation.Calculation
	Calc2             d2calculation.Calculation
	Calc3             d2calculation.Calculation
	Calc4             d2calculation.Calculation
	ToHitCalc         d2calculation.Calculation
	DmgSymPerCalc     d2calculation.Calculation
	EType             string
	EDmgSymPerCalc    d2calculation.Calculation
	ELenSymPerCalc    d2calculation.Calculation
	ID                int
	Srvstfunc         int
	Srvdofunc         int
	Srvprgfunc1       int
	Srvprgfunc2       int
	Srvprgfunc3       int
	Prgdam            int
	Aurafilter        int
	Auraeventfunc1    int
	Auraeventfunc2    int
	Auraeventfunc3    int
	Sumumod           int
	Cltstfunc         int
	Cltdofunc         int
	Cltprgfunc1       int
	Cltprgfunc2       int
	Cltprgfunc3       int
	Attackrank        int
	Weapsel           int
	Seqnum            int
	Seqinput          int
	LineOfSight       int
	SelectProc        int
	ItemEffect        int
	ItemCltEffect     int
	ItemTgtDo         int
	ItemTarget        int
	Reqlevel          int
	Maxlvl            int
	Reqstr            int
	Reqdex            int
	Reqint            int
	Reqvit            int
	Restrict          int
	Delay             int
	Checkfunc         int
	Startmana         int
	Minmana           int
	Manashift         int
	Mana              int
	Lvlmana           int
	Param1            int
	Param2            int
	Param3            int
	Param4            int
	Param5            int
	Param6            int
	Param7            int
	Param8            int
	ToHit             int
	LevToHit          int
	ResultFlags       int
	HitFlags          int
	HitClass          int
	HitShift          int
	SrcDam            int
	MinDam            int
	MinLevDam1        int
	MinLevDam2        int
	MinLevDam3        int
	MinLevDam4        int
	MinLevDam5        int
	MaxDam            int
	MaxLevDam1        int
	MaxLevDam2        int
	MaxLevDam3        int
	MaxLevDam4        int
	MaxLevDam5        int
	EMin              int
	EMinLev1          int
	EMinLev2          int
	EMinLev3          int
	EMinLev4          int
	EMinLev5          int
	EMax              int
	EMaxLev1          int
	EMaxLev2          int
	EMaxLev3          int
	EMaxLev4          int
	EMaxLev5          int
	ELen              int
	ELevLen1          int
	ELevLen2          int
	ELevLen3          int
	Aitype            int
	Aibonus           int
	CostMult          int
	CostAdd           int
	Prgstack          bool
	Decquant          bool
	Lob               bool
	Stsuccessonly     bool
	Stsounddelay      bool
	Weaponsnd         bool
	Warp              bool
	Immediate         bool
	Enhanceable       bool
	Noammo            bool
	Durability        bool
	UseAttackRate     bool
	TargetableOnly    bool
	SearchEnemyXY     bool
	SearchEnemyNear   bool
	SearchOpenXY      bool
	TargetCorpse      bool
	TargetPet         bool
	TargetAlly        bool
	TargetItem        bool
	AttackNoMana      bool
	TgtPlaceCheck     bool
	ItemCheckStart    bool
	ItemCltCheckStart bool
	Leftskill         bool
	Repeat            bool
	Nocostinstate     bool
	Usemanaondo       bool
	Interrupt         bool
	InTown            bool
	Aura              bool
	Periodic          bool
	Finishing         bool
	Passive           bool
	Progressive       bool
	General           bool
	Scroll            bool
	InGame            bool
	Kick              bool
}

SkillRecord is a row from the skills.txt file. Here are two resources for more info on each field

type SoundDetailRecord

type SoundDetailRecord struct {
	Handle    string
	FileName  string
	Index     int
	Volume    int
	GroupSize int
	FadeIn    int
	FadeOut   int
	Duration  int
	Compound  int
	Reverb    int
	Falloff   int
	Priority  int
	Block1    int
	Block2    int
	Block3    int
	Loop      bool
	DeferInst bool
	StopInst  bool
	Cache     bool
	AsyncOnly bool
	Stream    bool
	Stereo    bool
	Tracking  bool
	Solo      bool
	MusicVol  bool
}

SoundDetailRecord represents a sound entry

type SoundDetails

type SoundDetails map[string]*SoundDetailRecord

SoundDetails is a map of the SoundEntries

type SoundEnvironRecord

type SoundEnvironRecord struct {
	Handle          string
	Index           int
	Song            int
	DayAmbience     int
	NightAmbience   int
	DayEvent        int
	NightEvent      int
	EventDelay      int
	Indoors         int
	Material1       int
	Material2       int
	EAXEnviron      int
	EAXEnvSize      int
	EAXEnvDiff      int
	EAXRoomVol      int
	EAXRoomHF       int
	EAXDecayTime    int
	EAXDecayHF      int
	EAXReflect      int
	EAXReflectDelay int
	EAXReverb       int
	EAXRevDelay     int
	EAXRoomRoll     int
	EAXAirAbsorb    int
}

SoundEnvironRecord describes the different sound environments. Not listed on Phrozen Keep.

type SoundEnvironments

type SoundEnvironments map[int]*SoundEnvironRecord

SoundEnvironments contains the SoundEnviron records

type StateRecord

type StateRecord struct {
	// Name of status effect (Line # is used for ID purposes)
	State string

	// Exact usage depends on the state and how the code accesses it,
	// overlay1 however is the one you should generally be using.
	Overlay1 string
	Overlay2 string
	Overlay3 string
	Overlay4 string

	// Overlay shown on target of progressive skill when chargeup triggers.
	PgOverlay string

	// Overlay displayed when the state is applied initially
	// (later replaced by overlay1 or whatever applicable by code).
	CastOverlay string

	// Like castoverlay, just this one is displayed when the state expires.
	RemOverlay string

	// Primary stat associated with the state, mostly used for display purposes
	// (you should generally use skills.txt for assigning stats to states).
	Stat string

	// The missile that this state will utilize for certain events,
	// how this is used depends entirely on the functions associated with the state.
	Missile string

	// The skill that will be queried for this state in some sections of code,
	// strangely enough this contradicts the fact states store their assigner skill anyway
	// (via STAT_MODIFIERLIST_SKILL)
	Skill string

	// What item type is effected by this states color change.
	ItemType string

	// The color being applied to this item
	// (only going to have an effect on alternate gfx, inventory gfx isn't effected).
	ItemTrans string

	// Sound played respectively when the state is initially applied
	OnSound string

	// and when it expires
	OffSound string

	// States can be grouped together, so they cannot stack
	Group int

	// Clientside callback function invoked when the state is applied initially.
	SetFunc int

	// Clientside callback function invoked when the state expires or is otherwise removed.
	RemFunc int

	// The color priority for this states color change, the, this can range from 0 to 255,
	// the state with the highest color priority will always be used should more then
	// one co-exist on the unit. If two states exist with the same priority the one with the
	// lowest id is used (IIRC).
	ColorPri int

	// Index for the color shift palette picked from the *.PL2 files.
	ColorShift int

	// Change the color of the light radius to what is indicated here,
	// (only has an effect in D3D and glide of course).
	LightR int

	// Change the color of the light radius to what is indicated here,
	// (only has an effect in D3D and glide of course).
	LightG int

	// Change the color of the light radius to what is indicated here,
	// (only has an effect in D3D and glide of course).
	LightB int

	// What unit type is used for the disguise gfx
	// (1 being monsters, 2 being players, contrary to internal game logic).
	GfxType int

	// The unit class used for disguise gfx, this corresponds with the index
	// from monstats.txt and charstats.txt
	GfxClass int

	// Clientside event callback for this state
	// (likely very inconsistent with the server side events, beware).
	CltEvent string

	// Callback function invoked when the client event triggers.
	CltEventFunc int

	// CltDoFunc called every frame the state is active
	CltActiveFunc int

	// Srvdofunc called every frame the state is active
	SrvActiveFunc int

	// If a monster gets hit, the state will be dispelled
	RemHit bool

	// Not yet analyzed in detail
	NoSend bool

	// Whenever a state transforms the appearance of a unit
	Transform bool

	// Aura states will stack on-screen. Aura states are dispelled when a monster is
	// affected by conversion
	Aura bool

	// Can a heal enabled npc remove this state when you talk to them?
	Cureable bool

	// Curse states can't stack. Controls duration reduction from cleansing, and curse resistance.
	// When a new curse is applied, the old one is removed.
	Curse bool

	// State has a StateActiveFunc associated with it. The active func is called every frame while
	// the state is active.
	Active bool

	// State restricts skill usage (druid shapeshift)
	Restrict bool

	// State makes the game load another sprite (use with Transform)
	Disguise bool

	// State applies a color change that overrides all others
	Blue bool

	// Control when attack rating is displayed in blue
	AttBlue bool

	// Control when damage is displayed in blue
	DmgBlue bool

	// Control when armor class is displayed in blue
	ArmBlue bool

	// Control when fire resistance is displayed in blue
	RfBlue bool

	// Control when lightning resistance is displayed in blue
	RlBlue bool

	// Control when cold resistance is displayed in blue
	RcBlue bool

	// Control when poison resistance is displayed in blue
	RpBlue bool

	// Control when attack rating is displayed in red
	AttRed bool

	// Control when damage is displayed in red
	DmgRed bool

	// Control when armor class is displayed in red
	ArmRed bool

	// Control when fire resistance is displayed in red
	RfRed bool

	// Control when lightning resistance is displayed in red
	RlRed bool

	// Control when cold resistance is displayed in red
	RcRed bool

	// Control when poison resistance is displayed in red
	RpRed bool

	// Control when stamina bar color is changed to blue
	StamBarBlue bool

	// When a unit effected by this state kills another unit,
	// the summon owner will receive experience
	Exp bool

	// Whenever the state is removed when the player dies
	PlrStayDeath bool

	// Whenever the state is removed when the monster dies
	MonStayDeath bool

	// Whenever the state is removed when the boss dies. Prevents bosses from shattering?
	BossStayDeath bool

	// When the unit dies, the corpse and death animation will not be drawn
	Hide bool

	// Whenever the unit shatters or explodes when it dies. This is heavily hardcoded,
	// it will always use the ice shatter for all states other than STATE_UBERMINION
	Shatter bool

	// Whenever this state prevents the corpse from being selected by spells and the ai
	UDead bool

	// When a state with this is active, it cancels out the native life regen of monsters.
	// (using only the mod part instead of accr).
	Life bool

	// Whenever this state applies a color change that overrides all others (such as from items).
	// (see blue column, which seams to do the same).
	Green bool

	// Whenever this state is associated with progressive spells and will be
	// looked up when the charges are triggered.
	Pgsv bool

	// Related to assigning overlays to the unit, not extensively researched yet.
	NoOverlays bool

	// Like the previous column, also only used on states with the previous column enabled.
	NoClear bool

	// whenever this state will use the minion owners inventory clientside (this is what makes
	// the decoy always show up with your own equipment,
	// even when you change what you wear after summoning one).
	BossInv bool

	// Prevents druids that wield a bow or crossbow while shape shifted from
	// firing missiles, and will rather attack in melee.
	MeleeOnly bool

	// Not researched yet
	NotOnDead bool
}

StateRecord describes a body location that items can be equipped to

type States

type States map[string]*StateRecord

States contains the state records

type StorePageRecord

type StorePageRecord struct {
	StorePage string
	Code      string
}

StorePageRecord represent a row in the storepage.txt file

type StorePages

type StorePages map[string]*StorePageRecord

StorePages is a map of all store page records

type SuperUniqueRecord

type SuperUniqueRecord struct {

	// id of the SuperUnique Monster. Each SuperUnique Monster must use a different id.
	// It also serves as the string to use in the 'Place' field of MonPreset.txt
	Key string // Superunique

	// Name for this SuperUnique which must be retrieved from a .TBL file
	Name string

	// the base monster type of the SuperUnique, refers to the "Key" field in monstats.go ("ID" column in the MonStats.txt)
	Class string

	// This is the "hardcoded index".
	// Vanilla SuperUniques in the game ranges from 0 to 65. Some of them have some hardcoded stuffs attached.
	// NOTE: It is also possible to create new SuperUniques with hardcoded stuff attached. To do this, you can use a hcIx from 0 to 65.
	// Example A: If you create a new SuperUnique with a hcIdx of 42 (Shenk the Overseer) then whatever its Class,
	// this SuperUnique will have 20 Enslaved as minions (exactly like the vanilla Shenk, and in spite of NOT being Shenk).
	// Example B: If you want a simple new SuperUnique, you must use a hcIdx greater than 65,
	// because greater indexes don't exist in the code and therefore your new boss won't have anything special attached
	HcIdx string

	// This field forces the SuperUnique to use a special set of sounds for attacks, taunts, death etc.
	// The Countess is a clear and noticeable example of this. The MonSound set is taken from MonSounds.txt.
	MonSound string

	// These three fields assign special abilities so SuperUnique monsters such as "Fire Enchanted" or "Stone Skin".
	// These fields refers to the ID's corresponding to the properties in MonUMod.txt.
	// Here is the list of available properties.
	// 0.  None
	// 1.  Inits the random name seed, automatically added to monster, you don't need to add this UMod.
	// 2.  Hit Point bonus which is automatically added to the monster. You don't really need to manually add this UMod
	// 3.  Increases the light radius and picks a random color for it (bugged in v1.10+).
	// 4.  Increases the monster level, resulting in higher damage.
	// 5.  Extra Strong: increases physical damage done by boss.
	// 6.  Extra Fast: faster walk / run and attack speed (Although the increased attack speed isn't added in newer versions . . .)
	// 7.  Cursed: randomly cast Amplify Damage when hitting
	// 8.  Magic Resist: +50% resistance against Elemental attacks (Fire, Cold, Lightning and Poison)
	// 9.  Fire Enchanted: additional fire damage and +50% fire resistance.
	// 10. When killed, release a poisonous cloud, like the Mummies in Act 2.
	// 11. Corpse will spawn little white maggots (like Duriel).
	// 12. Works for Bloodraven only, and seems to have something to do with her Death sequence.
	// 13. Ignore your Armor Class and nearly always hit you.
	// 14. It should add damage to its minions
	// 15. When killed, all his minions die immediately as well.
	// 16. Adds base champion modifiers [color=#0040FF][b](champions only)[/b][/color]
	// 17. Lightning Enchanted: additional lightning damage, +50% lightning resistance and release Charged Bolts when hit.
	// 18. Cold  Enchanted: additional cold damage, +50% cold resistance, and releases a Frost Nova upon death
	// 19. Assigns extra damage to hireling attacks, relic from pre-lod, causes bugged damage.
	// 20. Releases Charged Bolts when hit, like the Scarabs in act 2.
	// 21. Present in the code, but it seems to have no effect.
	// 22. Has to do with quests, but is non-functional for Superuniques which aren´t in relation to a quest.
	// 23. Has a poison aura that poisons you when you're approaching him, adds poison damage to attack.
	// 24. Code present, but untested in v1.10+, does something else now.
	// 25. Mana Burn: steals mana from you and heals itself when hitting. Adds magic resistance.
	// 26. TeleHeal: randomly warps around when attacked and heals itself.
	// 27. Spectral Hit: deals random elemental damage when hitting
	// 28. Stone Skin: +80% physical damage resistance, increases defense
	// 29. Multiple Shots: Ranged attackers shoots several missiles at once.
	// 30. Aura Enchanted: Assigns a random offensive aura (aside from Thorns, Sanctuary and Concentration) to the SuperUnique
	// 31. Explodes in a Corpse Explosion when killed.
	// 32. Explodeswith a fiery flash when killed (Visual effect only).
	// 33. Explode and chills you when killed (like suicide minions). It heavily reduces the Boss' Hit Points
	// 34. Self-resurrect effect for Reanimate Horde, bugged on other units.
	// 35. Shatter into Ice pieces when killed, no corpse remains.
	// 36. Adds physical resistance and reduces movement speed(used for Champions only)
	// 37. Alters champion stats (used for Champions only)
	// 38. Champion cannot be cursed (used for Champions only)
	// 39. Alters champion stats (used for Champions only)
	// 40. Releases a painworm when killed, but display is very buggy.
	// 41. Code present, but has no effect in-game, probably due to bugs
	// 42. Releases a Nova when killed, but display is bugged.
	Mod [3]int

	// These two fields control the Minimum and Maximum amount of minions which will be spawned along with the SuperUnique.
	// If those values differ, the game will roll a random number within the MinGrp and the MaxGrp.
	MinGrp int
	MaxGrp int

	// Boolean indicates if the game is expansion or classic
	IsExpansion bool // named as "EClass" in the SuperUniques.txt

	// This field states whether the SuperUnique will be placed within a radius from his original
	// position(defined by the .ds1 map file), or not.
	// false means that the boss will spawn in a random position within a large radius from its actual
	// position in the .ds1 file,
	// true means it will spawn exactly where expected.
	AutoPosition bool

	// Specifies if this SuperUnique can spawn more than once in the same game.
	// true means it can spawn more than once in the same game, false means it can not.
	Stacks bool

	// Treasure Classes for the 3 Difficulties.
	// These columns list the treasureclass that is valid if this boss is killed and drops something.
	// These fields must contain the values taken from the "TreasureClass" column in TreasureClassEx.txt (Expansion)
	// or TreasureClass (Classic).
	TreasureClassNormal    string
	TreasureClassNightmare string
	TreasureClassHell      string

	// These fields dictate which RandTransform.dat color index the SuperUnique will use respectively in Normal, Nightmare and Hell mode.
	UTransNormal    string
	UTransNightmare string
	UTransHell      string
}

SuperUniqueRecord Defines the unique monsters and their properties. SuperUnique monsters are boss monsters which always appear at the same places and always have the same base special abilities with the addition of one or two extra ones per difficulty (Nightmare provides one extra ability, Hell provides two). Notable examples are enemies such as Corpsefire, Pindleskin or Nihlathak.

type SuperUniques

type SuperUniques map[string]*SuperUniqueRecord

SuperUniques stores all of the SuperUniqueRecords

type Treasure

type Treasure struct {
	Code        string
	Probability int
}

Treasure describes a treasure to drop the Name is either a reference to an item, or to another treasure class

type TreasureClass

type TreasureClass map[string]*TreasureClassRecord

TreasureClass contains all of the TreasureClassRecords

type TreasureClassRecord

type TreasureClassRecord struct {
	Name       string
	Group      int
	Level      int
	NumPicks   int
	FreqUnique int
	FreqSet    int
	FreqRare   int
	FreqMagic  int
	FreqNoDrop int
	Treasures  []*Treasure
}

TreasureClassRecord represents a rule for item drops in diablo 2

type UniqueAppellationRecord

type UniqueAppellationRecord struct {
	// The title
	Name string
}

UniqueAppellationRecord described the extra suffix of a unique monster name

type UniqueAppellations

type UniqueAppellations map[string]*UniqueAppellationRecord

UniqueAppellations contains all of the UniqueAppellationRecords

type UniqueItemProperty

type UniqueItemProperty = PropertyDescriptor

UniqueItemProperty is describes a property of a unique item

type UniqueItemRecord

type UniqueItemRecord struct {
	Properties [12]*UniqueItemProperty

	Name                  string
	Code                  string // three letter code, points to a record in Weapons, Armor, or Misc
	TypeDescription       string
	UberDescription       string
	CharacterGfxTransform string // palette shift applied to this items gfx when held and when
	// on the ground (flippy). Points to a record in Colors.txt
	InventoryGfxTransform string // palette shift applied to the inventory gfx
	FlippyFile            string // if non-empty, overrides the base item's dropped gfx
	InventoryFile         string // if non-empty, overrides the base item's inventory gfx
	DropSound             string // if non-empty, overrides the base item's drop sound
	UseSound              string // if non-empty, overrides the sound played when item is used

	Version int // 0 = classic pre 1.07, 1 = 1.07-1.11, 100 = expansion
	Rarity  int // 1-255, higher is more common (ironically...)
	Level   int // item's level, can only be dropped by monsters / recipes / vendors / objects of this level or higher
	// otherwise they would drop a rare item with enhanced durability
	RequiredLevel  int // character must have this level to use this item
	CostMultiplier int // base price is multiplied by this when sold, repaired or bought
	CostAdd        int // after multiplied by above, this much is added to the price
	DropSfxFrame   int // if non-empty, overrides the base item's frame at which the drop sound plays

	Enabled bool // if false, this record won't be loaded (should always be true...)
	Ladder  bool // if true, can only be found on ladder and not in single player / tcp/ip
	NoLimit bool // if true, can drop more than once per game
	// (if false, can only drop once per game; if it would drop,
	//	 instead a rare item with enhanced durability drops)
	SingleCopy bool // if true, player can only hold one of these. can't trade it or pick it up
}

UniqueItemRecord is a representation of a row from uniqueitems.txt

type UniqueItems

type UniqueItems map[string]*UniqueItemRecord

UniqueItems stores all of the UniqueItemRecords

type UniqueMonsterAffixRecord

type UniqueMonsterAffixRecord struct {
	StringTableKey   string
	MonsterTypeFlags *akara.BitSet
}

UniqueMonsterAffixRecord is a string table key and a bit vector for the possible monster types that the suffix can be used with.

type UniqueMonsterAffixes

type UniqueMonsterAffixes map[string]*UniqueMonsterAffixRecord

UniqueMonsterAffixes is a map of UniqueMonsterAffixRecords. The key is the string table lookup key.

type UniqueMonsterPrefix

type UniqueMonsterPrefix = UniqueMonsterAffixRecord

UniqueMonsterPrefix is a representation of a possible name prefix for a unique monster instance eg _Blood_ Wing the Quick

type UniqueMonsterSuffix

type UniqueMonsterSuffix = UniqueMonsterAffixRecord

UniqueMonsterSuffix is a representation of a possible name suffix for a unique monster instance. eg. Blood Wing _the Quick_

type WeaponClassRecord

type WeaponClassRecord struct {
	Name  string
	Token string
}

WeaponClassRecord describes a weapon class. It has a name and 3-character token. The token is used to change the character animation mode.

type WeaponClasses

type WeaponClasses map[string]*WeaponClassRecord

WeaponClasses is a map of WeaponClassRecords

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL