Documentation
¶
Index ¶
- Constants
- type BodyDetailPlanIndex
- type BodyGlossIndex
- type BodyIndex
- type Book
- type BookUnk007
- type BookUnk008
- type BookUnk010
- type BuildingIndex
- type BuiltinIndex
- type ColorIndex
- type CompressionType
- type CreatureIndex
- type CreatureIndex16
- type CreatureVariationIndex
- type Entity
- type EntityDiscoveredMatGlosses
- type EntityEntityLink
- type EntityEntityLinkType
- type EntityEthicResponse
- type EntityFlags
- type EntityIndex
- type EntityMaterials
- type EntityRecipe
- type EntityResources
- type EntitySiteLink
- type EntitySiteLinkType
- type EntityType
- type EntityUniform
- type EntityUniformItem
- type EntityUnk143
- type EntityUnk153
- type EntityUnk156
- type EntityUnk157
- type EntityUnk251
- type GemIndex
- type Header
- type InorganicIndex
- type InteractionIndex
- type Item
- type ItemIndex
- type ItemMaterialList
- type ItemType
- type Material
- type MaterialBuiltin
- type MaterialBuiltin23a
- type MaterialCreature
- type MaterialCreature23a
- type MaterialFigure
- type MaterialGem23a
- type MaterialInorganic
- type MaterialList
- type MaterialPlant
- type MaterialPlant23a
- type MaterialStone23a
- type MaterialTemplateIndex
- type MaterialType
- type MaterialType23a
- type MaterialWood23a
- type Name
- type NameForm
- type NameForm23a
- type NameForms
- type NameIndices
- type NamePart23a
- type NameParts23a
- type NestedError
- type PatternIndex
- type PlantGrowthList
- type PlantIndex
- type RaceCasteList
- type ReactionIndex
- type Reader
- type ShapeIndex
- type SymbolIndex
- type TissueTemplateIndex
- type TranslationIndex
- type TreeIndex
- type WordIndex
- type WorldDat
- type WorldGeneratedRaws
- type WorldNextID
- type WorldStringTables
Constants ¶
View Source
const MaxAlloc = 1 << 30 // allocations over 1 gigabyte are probably mistakes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BodyDetailPlanIndex ¶
type BodyDetailPlanIndex int32
type BodyGlossIndex ¶
type BodyGlossIndex int32
type Book ¶
type Book struct {
Unk000 uint32
ID uint32
Unk002 uint16
Unk003 int32
Unk004 uint16
Unk005 uint32
Unk006 uint32
Unk007 *BookUnk007
Unk008 *BookUnk008
Unk009 string
Unk010 *BookUnk010
}
type BookUnk007 ¶
type BookUnk007 struct {
Unk000 uint32
Unk001 uint32
Unk002 uint16
Unk003 int32
Unk004 int32
Unk005 uint32
Unk006 uint32
Unk007 uint16
Unk008 uint32
Unk009 uint32
Unk010 uint16
Unk011 int32
Unk012 int32
Unk013 uint32
Unk014 uint32
Unk015 uint16
Unk016 int16
Unk017 int32
Unk018 int32
Unk019 uint32
Unk020 uint32
}
type BookUnk008 ¶
type BookUnk010 ¶
type BuildingIndex ¶
type BuildingIndex int32
type BuiltinIndex ¶
type BuiltinIndex uint16
type ColorIndex ¶
type ColorIndex int32
type CompressionType ¶
type CompressionType uint32
const ( Uncompressed CompressionType = iota ZLib // the rest aren't used in files Special23a Special40d )
func (CompressionType) String ¶
func (i CompressionType) String() string
type CreatureIndex ¶
type CreatureIndex int32
type CreatureIndex16 ¶
type CreatureIndex16 uint16
type CreatureVariationIndex ¶
type CreatureVariationIndex int32
type Entity ¶
type Entity struct {
Type EntityType
ID int32
Class string
MinTemperature int16 `df2014_version_min:"1131"`
MaxTemperature int16 `df2014_version_min:"1131"`
UnitChunkID uint32
UnitChunkSubID uint16
Unused_41C []uint32 `df2014_assert_equals:"[]uint32{}"`
Name *Name
Race CreatureIndex16
Flags EntityFlags
Leather []int16
Cloth []int16
Silk []int16
Crafts MaterialList
Glass MaterialList
Wood MaterialList
Pets []int16
Cages MaterialList
Drinks MaterialList
Cheese MaterialList
Mill MaterialList
Extract MaterialList
MeatFish []int16
Plants []int16
Wagons []int16
PackAnimals []int16
WagonPullers []int16
Mounts []int16
SiegeMinions []int16
LyeWood []int16 `df2014_version_min:"1147"`
CraftMetals []int16 `df2014_version_min:"1147"`
Stone MaterialList `df2014_version_min:"1147"`
Gem MaterialList `df2014_version_min:"1147"`
Bones []int16 `df2014_version_min:"1147"`
Shells []int16 `df2014_version_min:"1147"`
Pearls []int16 `df2014_version_min:"1147"`
Ivory []int16 `df2014_version_min:"1147"`
Horn []int16 `df2014_version_min:"1147"`
Other MaterialList `df2014_version_min:"1147"`
SpecialMat0 Material
SpecialMat1 Material
SpecialMat2 Material
Diggers []int16 `df2014_version_min:"1130"`
Weapons []int16 `df2014_version_min:"1130"`
Armor []int16 `df2014_version_min:"1130"`
Ammo []int16 `df2014_version_min:"1130"`
Helms []int16 `df2014_version_min:"1130"`
Gloves []int16 `df2014_version_min:"1130"`
Shoes []int16 `df2014_version_min:"1130"`
Pants []int16 `df2014_version_min:"1130"`
Shields []int16 `df2014_version_min:"1130"`
TrapComps []int16 `df2014_version_min:"1130"`
Toys []int16 `df2014_version_min:"1130"`
Instruments []int16 `df2014_version_min:"1130"`
SiegeAmmo []int16 `df2014_version_min:"1130"`
WeaponMaterials MaterialList
ArmorMaterials MaterialList
Discoveries EntityDiscoveredMatGlosses
MeatFishRecipes []EntityRecipe
OtherRecipes []EntityRecipe
OwnedItems []int32
EntityLinks []EntityEntityLink
SiteLinks []EntitySiteLink
FigureIDs []int32
NemesisIDs []int32
ArtImageTypes []int16 `df2014_version_min:"1147"`
ArtImageIDs []int32 `df2014_version_min:"1147"`
ArtImageSubIDs []int16 `df2014_version_min:"1147"`
Uniforms []EntityUniform `df2014_version_min:"1147"`
}
type EntityEntityLink ¶
type EntityEntityLink struct {
Type EntityEntityLinkType
ID uint32
Strength uint16 `df2014_assert_lte:"100"`
}
type EntityEntityLinkType ¶
type EntityEntityLinkType uint16
const ( EntityParent EntityEntityLinkType = iota EntityChild )
type EntityEthicResponse ¶
type EntityEthicResponse uint16
const ( EERNotApplicable EntityEthicResponse = iota EERAcceptable EERPersonalMatter EERJustifiedIfNoRepercussions EERJustifiedIfGoodReason EERJustifiedIfExtremeReason EERJustifiedIfSelfDefense EEROnlyIfSanctioned EERMisguided EERShun EERAppalling EERPunishReprimand EERPunishSerious EERPunishExile EERPunishCapital EERUnthinkable EERRequired )
type EntityFlags ¶
type EntityFlags uint32
type EntityIndex ¶
type EntityIndex int32
type EntityMaterials ¶
type EntityMaterials struct {
Leather MaterialList
Fiber MaterialList
Silk MaterialList
Wool MaterialList
Craft MaterialList
Unk002 MaterialList
Barrel MaterialList
Flask MaterialList
Quiver MaterialList
Backpack MaterialList
Cage MaterialList
Wood MaterialList
Ore MaterialList
Drink MaterialList
Cheese MaterialList
Powder MaterialList
Extract MaterialList
Meat MaterialList
}
type EntityRecipe ¶
type EntityResources ¶
type EntityResources struct {
Fish RaceCasteList
Egg RaceCasteList
Plant MaterialList
Orchard PlantGrowthList
Garden PlantGrowthList
Seed MaterialList
WoodProducts ItemMaterialList
Pet RaceCasteList
Wagon RaceCasteList
PackAnimal RaceCasteList
WagonPuller RaceCasteList
Mount RaceCasteList
Minion RaceCasteList
ExoticPet RaceCasteList
Wood MaterialList
Metal []InorganicIndex
Stone []InorganicIndex
Gem []InorganicIndex
Bone MaterialList
Shell MaterialList
Pearl MaterialList
Ivory MaterialList
Horn MaterialList
Unk004 MaterialList
Sand MaterialList
Glass MaterialList
Clay MaterialList
}
type EntitySiteLink ¶
type EntitySiteLink struct {
Type EntitySiteLinkType
ID uint32
Strength uint16 `df2014_assert_lte:"100"`
}
type EntitySiteLinkType ¶
type EntitySiteLinkType uint16
type EntityType ¶
type EntityType uint16
const ( Civilization EntityType = iota SiteGovernment VesselCrew MigratingGroup NomadicGroup Religion MilitaryUnit Outcast )
type EntityUniform ¶
type EntityUniform struct {
ID int16
ItemTypes []int16
ItemSubtypes []int16
ItemInfo []EntityUniformItem
}
type EntityUniformItem ¶
type EntityUnk143 ¶
type EntityUnk153 ¶
type EntityUnk156 ¶
type EntityUnk157 ¶
type EntityUnk251 ¶
type EntityUnk251 struct {
Unk000 uint32 `df2014_assert_equals:"0x4"`
Unk001 uint32
Unk002 uint32
Unk003 int32 `df2014_assert_equals:"-1"`
Unk004 uint32
Unk005 int32 `df2014_assert_equals:"-1"`
Unk006 uint32 `df2014_assert_same_as:"Unk004"`
Unk007 int32 `df2014_assert_equals:"-1"`
Unk008 uint32 `df2014_assert_equals:"0x0"`
}
type Header ¶
type Header struct {
Version versions.Version
Compression CompressionType
}
type InorganicIndex ¶
type InorganicIndex int32
type InteractionIndex ¶
type InteractionIndex int32
type ItemMaterialList ¶
type ItemMaterialList struct {
Type []ItemType
Sub []int16 `df2014_assert_same_length_as:"Type"`
Material []MaterialType `df2014_assert_same_length_as:"Type"`
Index []int32 `df2014_assert_same_length_as:"Type"`
}
type ItemType ¶
type ItemType uint16
const ( ITBar ItemType = iota ITSmallGem ITBlock ITRoughGem ITBoulder ITLog ITDoor ITFloodgate ITBed ITChair ITChain ITFlask ITGoblet ITInstrument ITToy ITWindow ITCage ITBarrel ITBucket ITAnimalTrap ITTable ITCoffin ITStatue ITCorpse ITWeapon ITArmor ITShoes ITShield ITHelm ITGloves ITBox ITBin ITArmorStand ITWeaponRack ITCabinet ITFigurine ITAmulet ITScepter ITAmmo ITCrown ITRing ITEarring ITBracelet ITLargeGem ITAnvil ITCorpsePiece ITRemains ITMeat ITFish ITFishRaw ITVermin ITPet ITSeeds ITPlant ITLeather ITPlantGrowth ITThread ITCloth ITTotem ITPants ITBackpack ITQuiver ITCatapultParts ITBallistaParts ITSiegeAmmo ITBallistaArrowHead ITMechanism ITTrapComponent ITDrink ITPowder ITCheese ITFood ITLiquid ITCoin ITGlob ITSmallRock ITPipeSection ITHatchCover ITGrate ITQuern ITMillstone ITSplint ITCrutch ITTractionBench ITOrthopedicCast ITTool ITSlab ITEgg ITBook )
type Material ¶
type Material struct {
Type MaterialType
Index int32 `df2014_version_min:"1205"`
Index23a int16 `df2014_version_max:"1169"`
}
type MaterialBuiltin ¶
type MaterialBuiltin struct {
T BuiltinIndex
I int32
}
type MaterialBuiltin23a ¶
type MaterialBuiltin23a struct {
Type MaterialType23a
Index int16
}
type MaterialCreature ¶
type MaterialCreature struct {
T uint16
I CreatureIndex
}
type MaterialCreature23a ¶
type MaterialCreature23a struct {
Type MaterialType23a
Index CreatureIndex
}
type MaterialFigure ¶
type MaterialGem23a ¶
type MaterialGem23a struct {
Type MaterialType23a
Index GemIndex
}
type MaterialInorganic ¶
type MaterialInorganic struct {
T uint16
I InorganicIndex
}
type MaterialList ¶
type MaterialList struct {
Type []MaterialType
Index []int32 `df2014_assert_same_length_as:"Type" df2014_version_min:"1205"`
Index23a []int16 `df2014_assert_same_length_as:"Type" df2014_version_max:"1169"`
}
type MaterialPlant ¶
type MaterialPlant struct {
T uint16
I PlantIndex
}
type MaterialPlant23a ¶
type MaterialPlant23a struct {
Type MaterialType23a
Index PlantIndex
}
type MaterialStone23a ¶
type MaterialStone23a struct {
Type MaterialType23a
Index InorganicIndex
}
type MaterialTemplateIndex ¶
type MaterialTemplateIndex int32
type MaterialType ¶
type MaterialType uint16
func (MaterialType) Convert ¶
func (mt MaterialType) Convert(index int32) interface{}
func (MaterialType) Convert23a ¶
func (mt MaterialType) Convert23a(index int32) interface{}
type MaterialType23a ¶
type MaterialType23a int16
type MaterialWood23a ¶
type MaterialWood23a struct {
Type MaterialType23a
Index TreeIndex
}
type Name ¶
type Name struct {
First string
Nick string `df2014_version_min:"1116"`
Index NameIndices `df2014_version_min:"1205"`
Form NameForms `df2014_version_min:"1205"`
Parts23a NameParts23a `df2014_version_max:"1169"`
Language TranslationIndex `df2014_assert_gte:"-1"`
Mode int16
}
type NameForm23a ¶
type NameForm23a int32
type NameIndices ¶
type NameIndices struct {
FrontCompound WordIndex `df2014_assert_gte:"-1"`
RearCompound WordIndex `df2014_assert_gte:"-1"`
Adjective1 WordIndex `df2014_assert_gte:"-1"`
Adjective2 WordIndex `df2014_assert_gte:"-1"`
HyphenCompound WordIndex `df2014_assert_gte:"-1"`
TheX WordIndex `df2014_assert_gte:"-1"`
OfX WordIndex `df2014_assert_gte:"-1"`
}
type NamePart23a ¶
type NamePart23a struct {
Index WordIndex `df2014_assert_gte:"-1"`
Form NameForm23a
}
type NameParts23a ¶
type NameParts23a struct {
FrontCompound NamePart23a
RearCompound NamePart23a
Adjective1 NamePart23a
Adjective2 NamePart23a
HyphenCompound NamePart23a
TheX NamePart23a
OfX NamePart23a
}
type NestedError ¶
func (NestedError) Error ¶
func (err NestedError) Error() string
type PatternIndex ¶
type PatternIndex int32
type PlantGrowthList ¶
type PlantGrowthList struct {
Plant []PlantIndex
Growth []int16 `df2014_assert_same_length_as:"Plant"`
}
type PlantIndex ¶
type PlantIndex int32
type RaceCasteList ¶
type ReactionIndex ¶
type ReactionIndex int32
type Reader ¶
func (*Reader) DecodeSimple ¶
type ShapeIndex ¶
type ShapeIndex int32
type SymbolIndex ¶
type SymbolIndex int32
type TissueTemplateIndex ¶
type TissueTemplateIndex int32
type TranslationIndex ¶
type TranslationIndex int32
type WorldDat ¶
type WorldDat struct {
Header
Unused000 int16 `df2014_assert_equals:"0" df2014_version_min:"1205"`
Unused001 int32 `df2014_assert_equals:"0" df2014_version_max:"1169"`
// SaveSlot is the original region number of this world. A value of 0 means
// the save will be titled region1. 1 means region2, and so on.
SaveSlot int32 `df2014_assert_gte:"0" df2014_version_max:"1169"`
NextIDs WorldNextID
Name *Name
// all I know about the next five variables is that they add up to 15 bytes.
Unk100 int8 `df2014_assert_equals:"1"`
Unk101 int16 `df2014_assert_equals:"0"`
Unk102 int32 `df2014_assert_equals:"1"`
Unk103 int32 `df2014_assert_equals:"0"`
Unk104 int32 `df2014_assert_equals:"0"`
Title string `df2014_version_min:"1110"`
GeneratedRaws WorldGeneratedRaws `df2014_version_min:"1287"`
StringTables WorldStringTables
STOP struct{} `df2014_assert_equals:"STOP" df2014_version_min:"1205"`
ItemIDs []int32 `df2014_assert_next_id:"Item"`
BuildingIDs []int32 `df2014_assert_next_id:"Building"`
EntityIDs []int32 `df2014_assert_next_id:"Entity"`
NemesisIDs []int32 `df2014_assert_next_id:"Nemesis"`
ArtifactIDs []int32 `df2014_assert_next_id:"Artifact"`
CoinBatches int32 `df2014_assert_gte:"0"`
TaskTypes []int16
Items []Item `df2014_get_length_from:"ItemIDs" df2014_assert_id_set:"ItemIDs"`
Entities []Entity `df2014_get_length_from:"EntityIDs" df2014_assert_id_set:"EntityIDs"`
}
type WorldGeneratedRaws ¶
type WorldGeneratedRaws struct {
Inorganic [][]string `df2014_version_min:"1372"`
Unk000 [][]string `df2014_version_min:"1400"`
Item [][]string `df2014_version_min:"1441"`
Creature [][]string
Entity [][]string `df2014_version_min:"1441"`
Interaction [][]string `df2014_version_min:"1372"`
Language [][]string `df2014_version_min:"1441"`
}
type WorldNextID ¶
type WorldNextID struct {
Unit int32 `df2014_assert_gte:"-1"`
Unit2 int32 `df2014_assert_gte:"-1" df2014_version_min:"1287"`
Item int32 `df2014_assert_gte:"-1"`
Entity int32 `df2014_assert_gte:"-1"`
Nemesis int32 `df2014_assert_gte:"-1"`
Artifact int32 `df2014_assert_gte:"-1"`
Building int32 `df2014_assert_gte:"-1"`
Unk007 int32 `df2014_assert_gte:"-1" df2014_version_min:"1205"`
HistFigure int32 `df2014_assert_gte:"-1"`
HistEvent int32 `df2014_assert_gte:"-1"`
HistEventCollection int32 `df2014_assert_gte:"-1" df2014_version_min:"1254"`
UnitChunk int32 `df2014_assert_gte:"-1"`
ArtImageChunk int32 `df2014_assert_gte:"-1"`
Task int32 `df2014_assert_gte:"-1"`
Squad int32 `df2014_assert_gte:"-1" df2014_version_min:"1287"`
Schedule int32 `df2014_assert_gte:"-1" df2014_version_min:"1287"`
Activity int32 `df2014_assert_gte:"-1" df2014_version_min:"1287"`
InteractionInstance int32 `df2014_assert_gte:"-1" df2014_version_min:"1372"`
WrittenContent int32 `df2014_assert_gte:"-1" df2014_version_min:"1372"`
Identity int32 `df2014_assert_gte:"-1" df2014_version_min:"1372"`
Incident int32 `df2014_assert_gte:"-1" df2014_version_min:"1372"`
Crime int32 `df2014_assert_gte:"-1" df2014_version_min:"1372"`
Vehicle int32 `df2014_assert_gte:"-1" df2014_version_min:"1400"`
Unk023 int32 `df2014_assert_gte:"-1" df2014_version_min:"1441"`
Unk024 int32 `df2014_assert_gte:"-1" df2014_version_min:"1441"`
Unk025 int32 `df2014_assert_gte:"-1" df2014_version_min:"1441"`
Unk026 int32 `df2014_assert_gte:"-1" df2014_version_min:"1441"`
Unk027 int32 `df2014_assert_gte:"-1" df2014_version_min:"1441"`
}
type WorldStringTables ¶
type WorldStringTables struct {
Tree []string `df2014_version_max:"1268"`
Inorganic []string
Gem []string `df2014_version_max:"1169"`
Metal []string `df2014_version_min:"1205" df2014_version_max:"1268"`
Plant []string
Body []string
BodyGloss []string
Creature []string
Item []string
Building []string `df2014_version_min:"1287"`
Entity []string
Word []string
Symbol []string
Translation []string
Color []string `df2014_version_min:"1139"`
Shape []string `df2014_version_min:"1139"`
Pattern []string `df2014_version_min:"1205"`
Reaction []string `df2014_version_min:"1287"`
MaterialTemplate []string `df2014_version_min:"1287"`
TissueTemplate []string `df2014_version_min:"1287"`
BodyDetailPlan []string `df2014_version_min:"1287"`
CreatureVariation []string `df2014_version_min:"1287"`
Interaction []string `df2014_version_min:"1287"`
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
cmv2asciicast
command
|
|
|
cmv2gif
command
|
|
|
cmv2y4m
command
|
|
|
cmvcat
command
|
|
|
cmvrepair
command
|
|
|
cmvtimings
command
|
|
|
df-decompress
command
|
|
|
dipscript
command
|
|
|
Package cp437 provides conversions between IBM code page 437 and UTF-8.
|
Package cp437 provides conversions between IBM code page 437 and UTF-8. |
|
Package wtf23a implements the encoding used by Dwarf Fortress for save files created before version 40d.
|
Package wtf23a implements the encoding used by Dwarf Fortress for save files created before version 40d. |
Click to show internal directories.
Click to hide internal directories.