Documentation ¶
Index ¶
- func ExportCiv5MapFile(mapData *Civ5MapData, outputFilename string)
- func ExportCiv5ReplayFile(replayData *Civ5ReplayData, outputFilename string)
- func ExportCiv5SaveFile(saveData *Civ5SaveData, outputFilename string)
- func GroupEventsByTurn(replayEvents []Civ5ReplayEvent) map[int][]Civ5ReplayEvent
- func ParseMapTileProperties(inputData []byte, height int, width int) ([][]*Civ5MapTileImprovement, error)
- type Civ5CityData
- type Civ5CityHeader
- type Civ5GameDescriptionHeader
- type Civ5MapData
- type Civ5MapHeader
- type Civ5MapJson
- type Civ5MapTile
- type Civ5MapTileHeader
- type Civ5MapTileImprovement
- type Civ5MapTilePhysical
- type Civ5PlayerData
- type Civ5PlayerHeader
- type Civ5ReplayCiv
- type Civ5ReplayCivDataset
- type Civ5ReplayData
- type Civ5ReplayDataEntry
- type Civ5ReplayEvent
- type Civ5ReplayEventTile
- type Civ5ReplayFileConfigEntry
- type Civ5ReplayJson
- type Civ5SaveData
- type Civ5SaveJson
- type Civ5UnitData
- type Civ5UnitHeaderV11
- type Civ5UnitHeaderV12
- type CivColorInfo
- type CivColorOverride
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportCiv5MapFile ¶
func ExportCiv5MapFile(mapData *Civ5MapData, outputFilename string)
func ExportCiv5ReplayFile ¶
func ExportCiv5ReplayFile(replayData *Civ5ReplayData, outputFilename string)
func ExportCiv5SaveFile ¶
func ExportCiv5SaveFile(saveData *Civ5SaveData, outputFilename string)
func GroupEventsByTurn ¶
func GroupEventsByTurn(replayEvents []Civ5ReplayEvent) map[int][]Civ5ReplayEvent
func ParseMapTileProperties ¶
func ParseMapTileProperties(inputData []byte, height int, width int) ([][]*Civ5MapTileImprovement, error)
Types ¶
type Civ5CityData ¶
type Civ5CityData struct { Name string Owner int OwnerAdjusted int IsNameLocalized bool IsPuppetState bool IsOccupied bool Population int Health int BuildingInfo []byte }
func ParseCityData ¶
func ParseCityData(cityData []byte, version int, maxCityId int) ([]*Civ5CityData, error)
type Civ5CityHeader ¶
type Civ5GameDescriptionHeader ¶
type Civ5GameDescriptionHeader struct { Unknown1 [68]byte MaxTurns uint32 Unknown2 [4]byte StartYear int32 PlayerCount uint8 CityStateCount uint8 TeamCount uint8 Unknown3 byte ImprovementDataSize uint32 UnitTypeDataSize uint32 TechTypeDataSize uint32 PolicyTypeDataSize uint32 BuildingTypeDataSize uint32 PromotionTypeDataSize uint32 UnitDataSize uint32 UnitNameDataSize uint32 CityDataSize uint32 }
type Civ5MapData ¶
type Civ5MapData struct { MapHeader Civ5MapHeader TerrainList []string FeatureTerrainList []string ResourceList []string TileImprovementList []string MapTiles [][]*Civ5MapTilePhysical MapTileImprovements [][]*Civ5MapTileImprovement Civ5PlayerData []*Civ5PlayerData CityOwnerIndexMap map[int]int CivColorOverrides []CivColorOverride }
func ImportCiv5MapFileFromJson ¶
func ImportCiv5MapFileFromJson(inputFilename string) *Civ5MapData
func ReadCiv5MapFile ¶
func ReadCiv5MapFile(filename string) (*Civ5MapData, error)
type Civ5MapHeader ¶
type Civ5MapJson ¶
type Civ5MapJson struct { GameName string FileFormat string MapData *Civ5MapData }
type Civ5MapTile ¶
type Civ5MapTileHeader ¶
type Civ5MapTileImprovement ¶
type Civ5MapTilePhysical ¶
type Civ5PlayerData ¶
func ParseCivData ¶
func ParseCivData(inputData []byte) ([]*Civ5PlayerData, error)
type Civ5PlayerHeader ¶
type Civ5ReplayCiv ¶
type Civ5ReplayCivDataset ¶
type Civ5ReplayCivDataset struct { CivIndex int DatasetValues map[string][]Civ5ReplayDataEntry }
type Civ5ReplayData ¶
type Civ5ReplayData struct { PlayerCiv string IsReplayFile bool AllCivs []Civ5ReplayCiv AllReplayEvents []Civ5ReplayEvent DatasetNames []string DatasetValues []Civ5ReplayCivDataset }
func ImportCiv5ReplayFileFromJson ¶
func ImportCiv5ReplayFileFromJson(inputFilename string) *Civ5ReplayData
func ReadCiv5ReplayFile ¶
func ReadCiv5ReplayFile(filename string) (*Civ5ReplayData, error)
type Civ5ReplayDataEntry ¶
type Civ5ReplayEvent ¶
type Civ5ReplayEvent struct { Turn int TypeId int Tiles []Civ5ReplayEventTile CivId int Text string }
type Civ5ReplayEventTile ¶
type Civ5ReplayJson ¶
type Civ5ReplayJson struct { GameName string FileFormat string ReplayData *Civ5ReplayData }
type Civ5SaveData ¶
type Civ5SaveData struct { PlayerCiv string IsReplayFile bool AllCivs []Civ5ReplayCiv AllReplayEvents []Civ5ReplayEvent }
func ReadCiv5SaveFile ¶
func ReadCiv5SaveFile(filename string, outputFilename string) (*Civ5SaveData, error)
type Civ5SaveJson ¶
type Civ5SaveJson struct { GameName string FileFormat string ReplayData *Civ5SaveData }
type Civ5UnitData ¶
type Civ5UnitData struct { Name string Experience int Health int UnitType int Owner int FacingDirection int Status int PromotionInfo []byte }
func ParseUnitData ¶
func ParseUnitData(unitData []byte, version int) ([]*Civ5UnitData, error)
type Civ5UnitHeaderV11 ¶
type Civ5UnitHeaderV12 ¶
type CivColorInfo ¶
type CivColorOverride ¶
type CivColorOverride struct { CivKey string OuterColor CivColorInfo InnerColor CivColorInfo }
Click to show internal directories.
Click to hide internal directories.