diff --git a/analyze/.gitignore b/analyze/.gitignore new file mode 100644 index 0000000..b44fbdc --- /dev/null +++ b/analyze/.gitignore @@ -0,0 +1,2 @@ +*.json +analyze \ No newline at end of file diff --git a/analyze/analyze.go b/analyze/analyze.go index 830c9f8..7a90072 100644 --- a/analyze/analyze.go +++ b/analyze/analyze.go @@ -1,22 +1,9 @@ package main import ( - "encoding/json" - "encoding/xml" "flag" - "fmt" - "io" - "io/ioutil" - "log" - "os" - "path/filepath" - "sort" - "strconv" - "strings" - "text/template" - "github.com/iancoleman/strcase" - "github.com/robertjanetzko/LegendsBrowser2/backend/util" + "github.com/robertjanetzko/LegendsBrowser2/analyze/df" ) func main() { @@ -25,541 +12,10 @@ func main() { flag.Parse() if len(*a) > 0 { - Analyze(*a) + df.Analyze(*a) } if *g { - fmt.Println("Generating") - Generate() + df.Generate() } } - -func Analyze(filex string) { - fmt.Println("Search...", filex) - files, err := filepath.Glob(filex + "/*.xml") - if err != nil { - log.Fatal(err) - } - fmt.Println(files) - - a := NewAnalyzeData() - - for _, file := range files { - analyze(file, a) - } - - file, _ := json.MarshalIndent(a, "", " ") - _ = ioutil.WriteFile("analyze.json", file, 0644) - - createMetadata(a) -} - -func Generate() { - data, err := ioutil.ReadFile("analyze.json") - if err != nil { - return - } - - a := NewAnalyzeData() - json.Unmarshal(data, a) - createMetadata(a) -} - -type FieldData struct { - IsString bool - Multiple bool - Base bool - Plus bool -} - -func NewFieldData() *FieldData { - return &FieldData{} -} - -type AnalyzeData struct { - // Types map[string]bool - Fields map[string]*FieldData -} - -func NewAnalyzeData() *AnalyzeData { - return &AnalyzeData{ - // Types: make(map[string]bool, 0), - Fields: make(map[string]*FieldData, 0), - } -} - -func (a *AnalyzeData) GetField(s string) *FieldData { - if f, ok := a.Fields[s]; ok { - return f - } else { - f := &FieldData{} - a.Fields[s] = f - return f - } -} - -func analyze(file string, a *AnalyzeData) error { - xmlFile, err := os.Open(file) - if err != nil { - fmt.Println(err) - } - - plus := strings.HasSuffix(file, "_plus.xml") - - fmt.Println("Successfully Opened", file) - defer xmlFile.Close() - - converter := util.NewConvertReader(xmlFile) - - return analyzeElement(xml.NewDecoder(converter), a, make([]string, 0), plus) -} - -const PATH_SEPARATOR = "|" - -func analyzeElement(d *xml.Decoder, a *AnalyzeData, path []string, plus bool) error { - if len(path) > 1 { - s := strings.Join(path, PATH_SEPARATOR) - fd := NewFieldData() - a.Fields[s] = fd - if plus { - fd.Plus = true - } else { - fd.Base = true - } - } - - var ( - data []byte - ) - value := true - - fields := make(map[string]bool) - -Loop: - for { - tok, err := d.Token() - if err == io.EOF { - break Loop - } else if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - value = false - - // a.Types[strings.Join(path, PATH_SEPARATOR)] = true - - newPath := append(path, t.Name.Local) - - if _, ok := fields[t.Name.Local]; ok { - a.Fields[strings.Join(newPath, PATH_SEPARATOR)].Multiple = true - } - fields[t.Name.Local] = true - - analyzeElement(d, a, newPath, plus) - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if value { - if _, err := strconv.Atoi(string(data)); err != nil { - a.Fields[strings.Join(path, PATH_SEPARATOR)].IsString = true - } - } - - if t.Name.Local == "type" { - path[len(path)-2] = path[len(path)-2] + "+" + strcase.ToCamel(string(data)) - } - - return nil - } - } - return nil -} - -var allowedTyped = map[string]bool{ - "df_world|historical_events|historical_event": true, - "df_world|historical_event_collections|historical_event_collection": true, -} - -func filterSubtypes(data *map[string]*FieldData) []string { - filtered := make(map[string]*FieldData) - for k, v := range *data { - path := strings.Split(k, PATH_SEPARATOR) - for index, seg := range path { - if strings.Contains(seg, "+") { - base := seg[:strings.Index(seg, "+")] - basePath := strings.Join(append(path[:index], base), PATH_SEPARATOR) - if allowedTyped[basePath] { - path[index] = seg - } - } - } - filtered[strings.Join(path, PATH_SEPARATOR)] = v - } - *data = filtered - list := util.Keys(filtered) - sort.Strings(list) - return list -} - -func getSubtypes(objectTypes []string, k string) *[]string { - subtypes := make(map[string]bool) - - for _, t := range objectTypes { - if strings.HasPrefix(t, k+"+") && !strings.Contains(t[len(k):], PATH_SEPARATOR) { - subtypes[t[strings.LastIndex(t, "+")+1:]] = true - } - } - - keys := util.Keys(subtypes) - sort.Strings(keys) - - if len(keys) > 0 { - return &keys - } - - return nil -} - -func getSubtypeOf(k string) *string { - if strings.Contains(k, PATH_SEPARATOR) { - last := k[strings.LastIndex(k, PATH_SEPARATOR)+1:] - if strings.Contains(last, "+") { - base := strcase.ToCamel(last[:strings.Index(last, "+")]) - return &base - } - } - return nil -} - -func createMetadata(a *AnalyzeData) { - - // ts := filterSubtypes(a.Types) - fs := filterSubtypes(&a.Fields) - - var objectTypes []string - for k := range a.Fields { - path := strings.Split(k, PATH_SEPARATOR) - if len(path) >= 2 { - objectTypes = append(objectTypes, strings.Join(path[:len(path)-1], PATH_SEPARATOR)) - } - } - - // for _, s := range fs { - // fmt.Println(s) - // } - - objects := make(map[string]Object, 0) - - for _, k := range objectTypes { - if ok, _ := isArray(k, fs); !ok { - n := k - if strings.Contains(k, PATH_SEPARATOR) { - n = k[strings.LastIndex(k, PATH_SEPARATOR)+1:] - } - - if n == "" { - continue - } - - objFields := make(map[string]Field, 0) - - for _, f := range fs { - if strings.HasPrefix(f, k+PATH_SEPARATOR) { - fn := f[len(k)+1:] - if !strings.Contains(fn, PATH_SEPARATOR) { - legend := "" - if a.Fields[f].Base && a.Fields[f].Plus { - legend = "both" - } else if a.Fields[f].Base { - legend = "base" - } else if a.Fields[f].Plus { - legend = "plus" - } - - field := Field{ - Name: strcase.ToCamel(fn), - Type: "int", - Multiple: a.Fields[f].Multiple, - Legend: legend, - } - if ok, elements := isArray(f, fs); ok { - el := elements[strings.LastIndex(elements, PATH_SEPARATOR)+1:] - if _, ok := a.Fields[elements+PATH_SEPARATOR+"id"]; ok { - field.Type = "map" - } else { - field.Type = "array" - } - field.ElementType = &(el) - } else if ok, _ := isObject(f, fs); ok { - field.Type = "object" - } else if a.Fields[f].IsString { - field.Type = "string" - } - objFields[fn] = field - } - } - } - - objects[n] = Object{ - Name: strcase.ToCamel(n), - Id: a.Fields[k+PATH_SEPARATOR+"id"] != nil, - Named: a.Fields[k+PATH_SEPARATOR+"name"] != nil, - Typed: a.Fields[k+PATH_SEPARATOR+"type"] != nil, - SubTypes: getSubtypes(objectTypes, k), - SubTypeOf: getSubtypeOf(k), - Fields: objFields, - } - } - } - - file, _ := json.MarshalIndent(objects, "", " ") - _ = ioutil.WriteFile("model.json", file, 0644) - - f, err := os.Create("df/model.go") - defer f.Close() - - err = packageTemplate.Execute(f, struct { - Objects map[string]Object - }{ - Objects: objects, - }) - if err != nil { - fmt.Println(err) - } -} - -func isArray(typ string, types []string) (bool, string) { - fc := 0 - elements := "" - - if !strings.Contains(typ, PATH_SEPARATOR) || strings.Contains(typ[strings.LastIndex(typ, PATH_SEPARATOR):], "+") { - return false, "" - } - - for _, t := range types { - if !strings.HasPrefix(t, typ+PATH_SEPARATOR) { - continue - } - if strings.Contains(t[len(typ)+1:], PATH_SEPARATOR) { - continue - } - fc++ - elements = t - } - return fc == 1, elements -} - -func isObject(typ string, types []string) (bool, string) { - fc := 0 - - for _, t := range types { - if !strings.HasPrefix(t, typ+PATH_SEPARATOR) { - continue - } - fc++ - } - return fc > 0, typ -} - -type Object struct { - Name string `json:"name"` - Id bool `json:"id,omitempty"` - Named bool `json:"named,omitempty"` - Typed bool `json:"typed,omitempty"` - SubTypes *[]string `json:"subtypes,omitempty"` - SubTypeOf *string `json:"subtypeof,omitempty"` - Fields map[string]Field `json:"fields"` -} - -type Field struct { - Name string `json:"name"` - Type string `json:"type"` - Multiple bool `json:"multiple,omitempty"` - ElementType *string `json:"elements,omitempty"` - Legend string `json:"legend"` -} - -func (f Field) TypeLine(objects map[string]Object) string { - n := f.Name - - if n == "Id" || n == "Name" { - n = n + "_" - } - - m := "" - if f.Multiple { - m = "[]" - } - t := f.Type - if f.Type == "array" { - t = "[]*" + objects[*f.ElementType].Name - } - if f.Type == "map" { - t = "map[int]*" + objects[*f.ElementType].Name - } - if f.Type == "object" { - t = "*" + f.Name - } - j := fmt.Sprintf("`json:\"%s\" legend:\"%s\"`", strcase.ToLowerCamel(f.Name), f.Legend) - return fmt.Sprintf("%s %s%s %s", n, m, t, j) -} - -func (f Field) StartAction() string { - n := f.Name - - if n == "Id" || n == "Name" { - n = n + "_" - } - - if f.Type == "object" { - p := fmt.Sprintf("v, _ := parse%s(d, &t)", f.Name) - if !f.Multiple { - return fmt.Sprintf("%s\nobj.%s = v", p, n) - } else { - return fmt.Sprintf("%s\nobj.%s = append(obj.%s, v)", p, n, n) - } - } - - if f.Type == "array" || f.Type == "map" { - el := strcase.ToCamel(*f.ElementType) - gen := fmt.Sprintf("parse%s", el) - - if f.Type == "array" { - return fmt.Sprintf("parseArray(d, &obj.%s, %s)", f.Name, gen) - } - - if f.Type == "map" { - return fmt.Sprintf("obj.%s = make(map[int]*%s)\nparseMap(d, &obj.%s, %s)", f.Name, el, f.Name, gen) - } - } - - if f.Type == "int" || f.Type == "string" { - return "data = nil" - } - - return "" -} - -func (f Field) EndAction() string { - n := f.Name - - if n == "Id" || n == "Name" { - n = n + "_" - } - - if !f.Multiple { - if f.Type == "int" { - return fmt.Sprintf("obj.%s = n(data)", n) - } else if f.Type == "string" { - return fmt.Sprintf("obj.%s = string(data)", n) - } - } else { - if f.Type == "int" { - return fmt.Sprintf("obj.%s = append(obj.%s, n(data))", n, n) - } else if f.Type == "string" { - return fmt.Sprintf("obj.%s = append(obj.%s, string(data))", n, n) - } - } - - return "" -} - -var packageTemplate = template.Must(template.New("").Parse(`// Code generated by go generate; DO NOT EDIT. -package df - -import ( - "encoding/xml" - "strconv" - "github.com/iancoleman/strcase" -) - -{{- range $name, $obj := .Objects }} -type {{ $obj.Name }} struct { - {{- range $fname, $field := $obj.Fields }} - {{- if not (and (eq $fname "type") (not (not $obj.SubTypes))) }} - {{ $field.TypeLine $.Objects }} - {{- end }} - {{- end }} - {{- if not (not $obj.SubTypes) }} - Details any - {{- end }} -} - -{{- if $obj.Id }} -func (x *{{ $obj.Name }}) Id() int { return x.Id_ } -{{- end }} -{{- if $obj.Named }} -func (x *{{ $obj.Name }}) Name() string { return x.Name_ } -{{- end }} -{{- end }} - -// Parser - -func n(d []byte) int { - v, _ := strconv.Atoi(string(d)) - return v -} - -{{- range $name, $obj := .Objects }} -func parse{{ $obj.Name }}(d *xml.Decoder, start *xml.StartElement) (*{{ $obj.Name }}, error) { - var ( - obj = {{ $obj.Name }}{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - {{- range $fname, $field := $obj.Fields }} - case "{{ $fname }}": - {{ $field.StartAction }} - {{- end }} - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - {{- range $fname, $field := $obj.Fields }} - case "{{ $fname }}": - {{- if and (eq $fname "type") (not (not $obj.SubTypes)) }} - var err error - switch strcase.ToCamel(string(data)) { - {{- range $sub := $obj.SubTypes }} - case "{{ $sub }}": - obj.Details, err = parse{{ $obj.Name }}{{ $sub }}(d, start) - {{- end }} - default: - d.Skip() - } - if err != nil { - return nil, err - } - return &obj, nil - {{- else }} - {{ $field.EndAction }} - {{- end }} - {{- end }} - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -{{- end }} -`)) diff --git a/analyze/df/analyze.go b/analyze/df/analyze.go new file mode 100644 index 0000000..34840d1 --- /dev/null +++ b/analyze/df/analyze.go @@ -0,0 +1,235 @@ +package df + +import ( + "bytes" + "encoding/json" + "fmt" + "go/format" + "io/ioutil" + "os" + "path/filepath" + "sort" + "strings" + + "github.com/iancoleman/strcase" + "github.com/robertjanetzko/LegendsBrowser2/backend/util" +) + +func Analyze(filex string) error { + fmt.Println("Search...", filex) + files, err := filepath.Glob(filex + "/*.xml") + if err != nil { + return err + } + fmt.Println(files) + + a := NewAnalyzeData() + + for _, file := range files { + analyze(file, a) + } + + return a.Save() +} + +func Generate() error { + a, err := LoadAnalyzeData() + if err != nil { + return err + } + return createMetadata(a) +} + +var allowedTyped = map[string]bool{ + "df_world|historical_events|historical_event": true, + "df_world|historical_event_collections|historical_event_collection": true, +} + +func filterSubtypes(data *map[string]*FieldData) []string { + filtered := make(map[string]*FieldData) + for k, v := range *data { + path := strings.Split(k, PATH_SEPARATOR) + for index, seg := range path { + if strings.Contains(seg, "+") { + base := seg[:strings.Index(seg, "+")] + basePath := strings.Join(append(path[:index], base), PATH_SEPARATOR) + if allowedTyped[basePath] { + path[index] = seg + } + } + } + filtered[strings.Join(path, PATH_SEPARATOR)] = v + } + *data = filtered + list := util.Keys(filtered) + sort.Strings(list) + return list +} + +func getSubtypes(objectTypes []string, k string) *[]string { + subtypes := make(map[string]bool) + + for _, t := range objectTypes { + if strings.HasPrefix(t, k+"+") && !strings.Contains(t[len(k):], PATH_SEPARATOR) { + subtypes[t[strings.LastIndex(t, "+")+1:]] = true + } + } + + keys := util.Keys(subtypes) + sort.Strings(keys) + + if len(keys) > 0 { + return &keys + } + + return nil +} + +func getSubtypeOf(k string) *string { + if strings.Contains(k, PATH_SEPARATOR) { + last := k[strings.LastIndex(k, PATH_SEPARATOR)+1:] + if strings.Contains(last, "+") { + base := strcase.ToCamel(last[:strings.Index(last, "+")]) + return &base + } + } + return nil +} + +func createMetadata(a *AnalyzeData) error { + fs := filterSubtypes(&a.Fields) + + var objectTypes []string + for k := range a.Fields { + path := strings.Split(k, PATH_SEPARATOR) + if len(path) >= 2 { + objectTypes = append(objectTypes, strings.Join(path[:len(path)-1], PATH_SEPARATOR)) + } + } + + objects := make(map[string]Object, 0) + + for _, k := range objectTypes { + if ok, _ := isArray(k, fs); !ok { + n := k + if strings.Contains(k, PATH_SEPARATOR) { + n = k[strings.LastIndex(k, PATH_SEPARATOR)+1:] + } + + if n == "" { + continue + } + + objFields := make(map[string]Field, 0) + + for _, f := range fs { + if strings.HasPrefix(f, k+PATH_SEPARATOR) { + fn := f[len(k)+1:] + if !strings.Contains(fn, PATH_SEPARATOR) { + legend := "" + if a.Fields[f].Base && a.Fields[f].Plus { + legend = "both" + } else if a.Fields[f].Base { + legend = "base" + } else if a.Fields[f].Plus { + legend = "plus" + } + + field := Field{ + Name: strcase.ToCamel(fn), + Type: "int", + Multiple: a.Fields[f].Multiple, + Legend: legend, + } + if ok, elements := isArray(f, fs); ok { + el := elements[strings.LastIndex(elements, PATH_SEPARATOR)+1:] + if _, ok := a.Fields[elements+PATH_SEPARATOR+"id"]; ok { + field.Type = "map" + } else { + field.Type = "array" + } + field.ElementType = &(el) + } else if ok, _ := isObject(f, fs); ok { + field.Type = "object" + } else if a.Fields[f].IsString { + field.Type = "string" + } + objFields[fn] = field + } + } + } + + objects[n] = Object{ + Name: strcase.ToCamel(n), + Id: a.Fields[k+PATH_SEPARATOR+"id"] != nil, + Named: a.Fields[k+PATH_SEPARATOR+"name"] != nil, + Typed: a.Fields[k+PATH_SEPARATOR+"type"] != nil, + SubTypes: getSubtypes(objectTypes, k), + SubTypeOf: getSubtypeOf(k), + Fields: objFields, + } + } + } + + return generateCode(&objects) +} + +func generateCode(objects *map[string]Object) error { + file, _ := json.MarshalIndent(objects, "", " ") + _ = ioutil.WriteFile("model.json", file, 0644) + + f, err := os.Create("../backend/model/model.go") + if err != nil { + return err + } + defer f.Close() + + var buf bytes.Buffer + err = packageTemplate.Execute(&buf, struct { + Objects *map[string]Object + }{ + Objects: objects, + }) + if err != nil { + return err + } + p, err := format.Source(buf.Bytes()) + if err != nil { + return err + } + _, err = f.Write(p) + return err +} + +func isArray(typ string, types []string) (bool, string) { + fc := 0 + elements := "" + + if !strings.Contains(typ, PATH_SEPARATOR) || strings.Contains(typ[strings.LastIndex(typ, PATH_SEPARATOR):], "+") { + return false, "" + } + + for _, t := range types { + if !strings.HasPrefix(t, typ+PATH_SEPARATOR) { + continue + } + if strings.Contains(t[len(typ)+1:], PATH_SEPARATOR) { + continue + } + fc++ + elements = t + } + return fc == 1, elements +} + +func isObject(typ string, types []string) (bool, string) { + fc := 0 + + for _, t := range types { + if !strings.HasPrefix(t, typ+PATH_SEPARATOR) { + continue + } + fc++ + } + return fc > 0, typ +} diff --git a/analyze/df/generate.go b/analyze/df/generate.go new file mode 100644 index 0000000..8b4dc80 --- /dev/null +++ b/analyze/df/generate.go @@ -0,0 +1,208 @@ +package df + +import ( + "fmt" + "text/template" + + "github.com/iancoleman/strcase" +) + +type Object struct { + Name string `json:"name"` + Id bool `json:"id,omitempty"` + Named bool `json:"named,omitempty"` + Typed bool `json:"typed,omitempty"` + SubTypes *[]string `json:"subtypes,omitempty"` + SubTypeOf *string `json:"subtypeof,omitempty"` + Fields map[string]Field `json:"fields"` +} + +type Field struct { + Name string `json:"name"` + Type string `json:"type"` + Multiple bool `json:"multiple,omitempty"` + ElementType *string `json:"elements,omitempty"` + Legend string `json:"legend"` +} + +func (f Field) TypeLine(objects map[string]Object) string { + n := f.Name + + if n == "Id" || n == "Name" { + n = n + "_" + } + + m := "" + if f.Multiple { + m = "[]" + } + t := f.Type + if f.Type == "array" { + t = "[]*" + objects[*f.ElementType].Name + } + if f.Type == "map" { + t = "map[int]*" + objects[*f.ElementType].Name + } + if f.Type == "object" { + t = "*" + f.Name + } + j := fmt.Sprintf("`json:\"%s\" legend:\"%s\"`", strcase.ToLowerCamel(f.Name), f.Legend) + return fmt.Sprintf("%s %s%s %s", n, m, t, j) +} + +func (f Field) StartAction() string { + n := f.Name + + if n == "Id" || n == "Name" { + n = n + "_" + } + + if f.Type == "object" { + p := fmt.Sprintf("v, _ := parse%s(d, &t)", f.Name) + if !f.Multiple { + return fmt.Sprintf("%s\nobj.%s = v", p, n) + } else { + return fmt.Sprintf("%s\nobj.%s = append(obj.%s, v)", p, n, n) + } + } + + if f.Type == "array" || f.Type == "map" { + el := strcase.ToCamel(*f.ElementType) + gen := fmt.Sprintf("parse%s", el) + + if f.Type == "array" { + return fmt.Sprintf("parseArray(d, &obj.%s, %s)", f.Name, gen) + } + + if f.Type == "map" { + return fmt.Sprintf("obj.%s = make(map[int]*%s)\nparseMap(d, &obj.%s, %s)", f.Name, el, f.Name, gen) + } + } + + if f.Type == "int" || f.Type == "string" { + return "data = nil" + } + + return "" +} + +func (f Field) EndAction() string { + n := f.Name + + if n == "Id" || n == "Name" { + n = n + "_" + } + + if !f.Multiple { + if f.Type == "int" { + return fmt.Sprintf("obj.%s = n(data)", n) + } else if f.Type == "string" { + return fmt.Sprintf("obj.%s = string(data)", n) + } + } else { + if f.Type == "int" { + return fmt.Sprintf("obj.%s = append(obj.%s, n(data))", n, n) + } else if f.Type == "string" { + return fmt.Sprintf("obj.%s = append(obj.%s, string(data))", n, n) + } + } + + return "" +} + +var packageTemplate = template.Must(template.New("").Parse(`// Code generated by legendsbrowser; DO NOT EDIT. +package model + +import ( + "encoding/xml" + "strconv" + "github.com/iancoleman/strcase" +) + +{{- range $name, $obj := .Objects }} +type {{ $obj.Name }} struct { + {{- range $fname, $field := $obj.Fields }} + {{- if not (and (eq $fname "type") (not (not $obj.SubTypes))) }} + {{ $field.TypeLine $.Objects }} + {{- end }} + {{- end }} + {{- if not (not $obj.SubTypes) }} + Details any + {{- end }} +} + +{{- if $obj.Id }} +func (x *{{ $obj.Name }}) Id() int { return x.Id_ } +{{- end }} +{{- if $obj.Named }} +func (x *{{ $obj.Name }}) Name() string { return x.Name_ } +{{- end }} +{{- end }} + +// Parser + +func n(d []byte) int { + v, _ := strconv.Atoi(string(d)) + return v +} + +{{- range $name, $obj := .Objects }} +func parse{{ $obj.Name }}(d *xml.Decoder, start *xml.StartElement) (*{{ $obj.Name }}, error) { + var ( + obj = {{ $obj.Name }}{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + {{- range $fname, $field := $obj.Fields }} + case "{{ $fname }}": + {{ $field.StartAction }} + {{- end }} + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + {{- range $fname, $field := $obj.Fields }} + case "{{ $fname }}": + {{- if and (eq $fname "type") (not (not $obj.SubTypes)) }} + var err error + switch strcase.ToCamel(string(data)) { + {{- range $sub := $obj.SubTypes }} + case "{{ $sub }}": + obj.Details, err = parse{{ $obj.Name }}{{ $sub }}(d, start) + {{- end }} + default: + d.Skip() + } + if err != nil { + return nil, err + } + return &obj, nil + {{- else }} + {{ $field.EndAction }} + {{- end }} + {{- end }} + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +{{- end }} +`)) diff --git a/analyze/df/structure.go b/analyze/df/structure.go new file mode 100644 index 0000000..6477006 --- /dev/null +++ b/analyze/df/structure.go @@ -0,0 +1,143 @@ +package df + +import ( + "encoding/json" + "encoding/xml" + "fmt" + "io" + "io/ioutil" + "os" + "strconv" + "strings" + + "github.com/iancoleman/strcase" + "github.com/robertjanetzko/LegendsBrowser2/backend/util" +) + +type FieldData struct { + IsString bool + Multiple bool + Base bool + Plus bool +} + +func NewFieldData() *FieldData { + return &FieldData{} +} + +type AnalyzeData struct { + Fields map[string]*FieldData +} + +func NewAnalyzeData() *AnalyzeData { + return &AnalyzeData{ + Fields: make(map[string]*FieldData, 0), + } +} + +func (a *AnalyzeData) Save() error { + file, err := json.MarshalIndent(a, "", " ") + if err != nil { + return err + } + return ioutil.WriteFile("analyze.json", file, 0644) +} + +func LoadAnalyzeData() (*AnalyzeData, error) { + data, err := ioutil.ReadFile("analyze.json") + if err != nil { + return nil, err + } + + a := NewAnalyzeData() + json.Unmarshal(data, a) + return a, nil +} + +func (a *AnalyzeData) GetField(s string) *FieldData { + if f, ok := a.Fields[s]; ok { + return f + } else { + f := &FieldData{} + a.Fields[s] = f + return f + } +} + +func analyze(file string, a *AnalyzeData) error { + xmlFile, err := os.Open(file) + if err != nil { + fmt.Println(err) + } + + plus := strings.HasSuffix(file, "_plus.xml") + + fmt.Println("Successfully Opened", file) + defer xmlFile.Close() + + converter := util.NewConvertReader(xmlFile) + + return analyzeElement(xml.NewDecoder(converter), a, make([]string, 0), plus) +} + +const PATH_SEPARATOR = "|" + +func analyzeElement(d *xml.Decoder, a *AnalyzeData, path []string, plus bool) error { + if len(path) > 1 { + s := strings.Join(path, PATH_SEPARATOR) + fd := NewFieldData() + a.Fields[s] = fd + if plus { + fd.Plus = true + } else { + fd.Base = true + } + } + + var ( + data []byte + ) + value := true + + fields := make(map[string]bool) + +Loop: + for { + tok, err := d.Token() + if err == io.EOF { + break Loop + } else if err != nil { + return err + } + switch t := tok.(type) { + case xml.StartElement: + value = false + + newPath := append(path, t.Name.Local) + + if _, ok := fields[t.Name.Local]; ok { + a.Fields[strings.Join(newPath, PATH_SEPARATOR)].Multiple = true + } + fields[t.Name.Local] = true + + analyzeElement(d, a, newPath, plus) + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if value { + if _, err := strconv.Atoi(string(data)); err != nil { + a.Fields[strings.Join(path, PATH_SEPARATOR)].IsString = true + } + } + + if t.Name.Local == "type" { + path[len(path)-2] = path[len(path)-2] + "+" + strcase.ToCamel(string(data)) + } + + return nil + } + } + return nil +} diff --git a/analyze/go.mod b/analyze/go.mod index 3e09372..d0621b8 100644 --- a/analyze/go.mod +++ b/analyze/go.mod @@ -3,3 +3,5 @@ module github.com/robertjanetzko/LegendsBrowser2/analyze go 1.18 require github.com/iancoleman/strcase v0.2.0 + +require github.com/robertjanetzko/LegendsBrowser2/backend v0.0.0-20220414135947-77b720f8d215 diff --git a/analyze/go.sum b/analyze/go.sum index e69de29..e0580c8 100644 --- a/analyze/go.sum +++ b/analyze/go.sum @@ -0,0 +1,4 @@ +github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/robertjanetzko/LegendsBrowser2/backend v0.0.0-20220414135947-77b720f8d215 h1:i23QGS93i7zoDyarU2dQLYDYxSo8MkatzhISsRQuljM= +github.com/robertjanetzko/LegendsBrowser2/backend v0.0.0-20220414135947-77b720f8d215/go.mod h1:b6NU94RVWS7nz92lGiifeWN1cLV2EeNSzx0Oop+Ma54= diff --git a/backend/df/model.go b/backend/df/model.go deleted file mode 100644 index bc64374..0000000 --- a/backend/df/model.go +++ /dev/null @@ -1,12619 +0,0 @@ -// Code generated by go generate; DO NOT EDIT. -package df - -import ( - "encoding/xml" - "strconv" - "github.com/iancoleman/strcase" -) -type Artifact struct { - AbsTileX int `json:"absTileX" legend:"base"` - AbsTileY int `json:"absTileY" legend:"base"` - AbsTileZ int `json:"absTileZ" legend:"base"` - HolderHfid int `json:"holderHfid" legend:"base"` - Id_ int `json:"id" legend:"plus"` - Item *Item `json:"item" legend:"base"` - ItemDescription string `json:"itemDescription" legend:"plus"` - ItemSubtype string `json:"itemSubtype" legend:"plus"` - ItemType string `json:"itemType" legend:"plus"` - Mat string `json:"mat" legend:"plus"` - Name_ string `json:"name" legend:"base"` - PageCount int `json:"pageCount" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - StructureLocalId int `json:"structureLocalId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - Writing int `json:"writing" legend:"plus"` -} -func (x *Artifact) Id() int { return x.Id_ } -func (x *Artifact) Name() string { return x.Name_ } -type Circumstance struct { - Defeated int `json:"defeated" legend:"plus"` - Type string `json:"type" legend:"plus"` -} -type Creature struct { - AllCastesAlive string `json:"allCastesAlive" legend:"plus"` - ArtificialHiveable string `json:"artificialHiveable" legend:"plus"` - BiomeDesertBadland string `json:"biomeDesertBadland" legend:"plus"` - BiomeDesertRock string `json:"biomeDesertRock" legend:"plus"` - BiomeDesertSand string `json:"biomeDesertSand" legend:"plus"` - BiomeForestTaiga string `json:"biomeForestTaiga" legend:"plus"` - BiomeForestTemperateBroadleaf string `json:"biomeForestTemperateBroadleaf" legend:"plus"` - BiomeForestTemperateConifer string `json:"biomeForestTemperateConifer" legend:"plus"` - BiomeForestTropicalConifer string `json:"biomeForestTropicalConifer" legend:"plus"` - BiomeForestTropicalDryBroadleaf string `json:"biomeForestTropicalDryBroadleaf" legend:"plus"` - BiomeForestTropicalMoistBroadleaf string `json:"biomeForestTropicalMoistBroadleaf" legend:"plus"` - BiomeGlacier string `json:"biomeGlacier" legend:"plus"` - BiomeGrasslandTemperate string `json:"biomeGrasslandTemperate" legend:"plus"` - BiomeGrasslandTropical string `json:"biomeGrasslandTropical" legend:"plus"` - BiomeLakeTemperateBrackishwater string `json:"biomeLakeTemperateBrackishwater" legend:"plus"` - BiomeLakeTemperateFreshwater string `json:"biomeLakeTemperateFreshwater" legend:"plus"` - BiomeLakeTemperateSaltwater string `json:"biomeLakeTemperateSaltwater" legend:"plus"` - BiomeLakeTropicalBrackishwater string `json:"biomeLakeTropicalBrackishwater" legend:"plus"` - BiomeLakeTropicalFreshwater string `json:"biomeLakeTropicalFreshwater" legend:"plus"` - BiomeLakeTropicalSaltwater string `json:"biomeLakeTropicalSaltwater" legend:"plus"` - BiomeMarshTemperateFreshwater string `json:"biomeMarshTemperateFreshwater" legend:"plus"` - BiomeMarshTemperateSaltwater string `json:"biomeMarshTemperateSaltwater" legend:"plus"` - BiomeMarshTropicalFreshwater string `json:"biomeMarshTropicalFreshwater" legend:"plus"` - BiomeMarshTropicalSaltwater string `json:"biomeMarshTropicalSaltwater" legend:"plus"` - BiomeMountain string `json:"biomeMountain" legend:"plus"` - BiomeOceanArctic string `json:"biomeOceanArctic" legend:"plus"` - BiomeOceanTemperate string `json:"biomeOceanTemperate" legend:"plus"` - BiomeOceanTropical string `json:"biomeOceanTropical" legend:"plus"` - BiomePoolTemperateBrackishwater string `json:"biomePoolTemperateBrackishwater" legend:"plus"` - BiomePoolTemperateFreshwater string `json:"biomePoolTemperateFreshwater" legend:"plus"` - BiomePoolTemperateSaltwater string `json:"biomePoolTemperateSaltwater" legend:"plus"` - BiomePoolTropicalBrackishwater string `json:"biomePoolTropicalBrackishwater" legend:"plus"` - BiomePoolTropicalFreshwater string `json:"biomePoolTropicalFreshwater" legend:"plus"` - BiomePoolTropicalSaltwater string `json:"biomePoolTropicalSaltwater" legend:"plus"` - BiomeRiverTemperateBrackishwater string `json:"biomeRiverTemperateBrackishwater" legend:"plus"` - BiomeRiverTemperateFreshwater string `json:"biomeRiverTemperateFreshwater" legend:"plus"` - BiomeRiverTemperateSaltwater string `json:"biomeRiverTemperateSaltwater" legend:"plus"` - BiomeRiverTropicalBrackishwater string `json:"biomeRiverTropicalBrackishwater" legend:"plus"` - BiomeRiverTropicalFreshwater string `json:"biomeRiverTropicalFreshwater" legend:"plus"` - BiomeRiverTropicalSaltwater string `json:"biomeRiverTropicalSaltwater" legend:"plus"` - BiomeSavannaTemperate string `json:"biomeSavannaTemperate" legend:"plus"` - BiomeSavannaTropical string `json:"biomeSavannaTropical" legend:"plus"` - BiomeShrublandTemperate string `json:"biomeShrublandTemperate" legend:"plus"` - BiomeShrublandTropical string `json:"biomeShrublandTropical" legend:"plus"` - BiomeSubterraneanChasm string `json:"biomeSubterraneanChasm" legend:"plus"` - BiomeSubterraneanLava string `json:"biomeSubterraneanLava" legend:"plus"` - BiomeSubterraneanWater string `json:"biomeSubterraneanWater" legend:"plus"` - BiomeSwampMangrove string `json:"biomeSwampMangrove" legend:"plus"` - BiomeSwampTemperateFreshwater string `json:"biomeSwampTemperateFreshwater" legend:"plus"` - BiomeSwampTemperateSaltwater string `json:"biomeSwampTemperateSaltwater" legend:"plus"` - BiomeSwampTropicalFreshwater string `json:"biomeSwampTropicalFreshwater" legend:"plus"` - BiomeSwampTropicalSaltwater string `json:"biomeSwampTropicalSaltwater" legend:"plus"` - BiomeTundra string `json:"biomeTundra" legend:"plus"` - CreatureId string `json:"creatureId" legend:"plus"` - DoesNotExist string `json:"doesNotExist" legend:"plus"` - Equipment string `json:"equipment" legend:"plus"` - EquipmentWagon string `json:"equipmentWagon" legend:"plus"` - Evil string `json:"evil" legend:"plus"` - Fanciful string `json:"fanciful" legend:"plus"` - Generated string `json:"generated" legend:"plus"` - Good string `json:"good" legend:"plus"` - HasAnyBenign string `json:"hasAnyBenign" legend:"plus"` - HasAnyCanSwim string `json:"hasAnyCanSwim" legend:"plus"` - HasAnyCannotBreatheAir string `json:"hasAnyCannotBreatheAir" legend:"plus"` - HasAnyCannotBreatheWater string `json:"hasAnyCannotBreatheWater" legend:"plus"` - HasAnyCarnivore string `json:"hasAnyCarnivore" legend:"plus"` - HasAnyCommonDomestic string `json:"hasAnyCommonDomestic" legend:"plus"` - HasAnyCuriousBeast string `json:"hasAnyCuriousBeast" legend:"plus"` - HasAnyDemon string `json:"hasAnyDemon" legend:"plus"` - HasAnyFeatureBeast string `json:"hasAnyFeatureBeast" legend:"plus"` - HasAnyFlier string `json:"hasAnyFlier" legend:"plus"` - HasAnyFlyRaceGait string `json:"hasAnyFlyRaceGait" legend:"plus"` - HasAnyGrasp string `json:"hasAnyGrasp" legend:"plus"` - HasAnyGrazer string `json:"hasAnyGrazer" legend:"plus"` - HasAnyHasBlood string `json:"hasAnyHasBlood" legend:"plus"` - HasAnyImmobile string `json:"hasAnyImmobile" legend:"plus"` - HasAnyIntelligentLearns string `json:"hasAnyIntelligentLearns" legend:"plus"` - HasAnyIntelligentSpeaks string `json:"hasAnyIntelligentSpeaks" legend:"plus"` - HasAnyLargePredator string `json:"hasAnyLargePredator" legend:"plus"` - HasAnyLocalPopsControllable string `json:"hasAnyLocalPopsControllable" legend:"plus"` - HasAnyLocalPopsProduceHeroes string `json:"hasAnyLocalPopsProduceHeroes" legend:"plus"` - HasAnyMegabeast string `json:"hasAnyMegabeast" legend:"plus"` - HasAnyMischievous string `json:"hasAnyMischievous" legend:"plus"` - HasAnyNaturalAnimal string `json:"hasAnyNaturalAnimal" legend:"plus"` - HasAnyNightCreature string `json:"hasAnyNightCreature" legend:"plus"` - HasAnyNightCreatureBogeyman string `json:"hasAnyNightCreatureBogeyman" legend:"plus"` - HasAnyNightCreatureHunter string `json:"hasAnyNightCreatureHunter" legend:"plus"` - HasAnyNightCreatureNightmare string `json:"hasAnyNightCreatureNightmare" legend:"plus"` - HasAnyNotFireimmune string `json:"hasAnyNotFireimmune" legend:"plus"` - HasAnyNotLiving string `json:"hasAnyNotLiving" legend:"plus"` - HasAnyOutsiderControllable string `json:"hasAnyOutsiderControllable" legend:"plus"` - HasAnyRaceGait string `json:"hasAnyRaceGait" legend:"plus"` - HasAnySemimegabeast string `json:"hasAnySemimegabeast" legend:"plus"` - HasAnySlowLearner string `json:"hasAnySlowLearner" legend:"plus"` - HasAnySupernatural string `json:"hasAnySupernatural" legend:"plus"` - HasAnyTitan string `json:"hasAnyTitan" legend:"plus"` - HasAnyUniqueDemon string `json:"hasAnyUniqueDemon" legend:"plus"` - HasAnyUtterances string `json:"hasAnyUtterances" legend:"plus"` - HasAnyVerminHateable string `json:"hasAnyVerminHateable" legend:"plus"` - HasAnyVerminMicro string `json:"hasAnyVerminMicro" legend:"plus"` - HasFemale string `json:"hasFemale" legend:"plus"` - HasMale string `json:"hasMale" legend:"plus"` - LargeRoaming string `json:"largeRoaming" legend:"plus"` - LooseClusters string `json:"looseClusters" legend:"plus"` - MatesToBreed string `json:"matesToBreed" legend:"plus"` - Mundane string `json:"mundane" legend:"plus"` - NamePlural string `json:"namePlural" legend:"plus"` - NameSingular string `json:"nameSingular" legend:"plus"` - OccursAsEntityRace string `json:"occursAsEntityRace" legend:"plus"` - Savage string `json:"savage" legend:"plus"` - SmallRace string `json:"smallRace" legend:"plus"` - TwoGenders string `json:"twoGenders" legend:"plus"` - Ubiquitous string `json:"ubiquitous" legend:"plus"` - VerminEater string `json:"verminEater" legend:"plus"` - VerminFish string `json:"verminFish" legend:"plus"` - VerminGrounder string `json:"verminGrounder" legend:"plus"` - VerminRotter string `json:"verminRotter" legend:"plus"` - VerminSoil string `json:"verminSoil" legend:"plus"` - VerminSoilColony string `json:"verminSoilColony" legend:"plus"` -} -type DanceForm struct { - Description string `json:"description" legend:"base"` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"plus"` -} -func (x *DanceForm) Id() int { return x.Id_ } -func (x *DanceForm) Name() string { return x.Name_ } -type DfWorld struct { - Altname string `json:"altname" legend:"plus"` - Artifacts map[int]*Artifact `json:"artifacts" legend:"plus"` - CreatureRaw []*Creature `json:"creatureRaw" legend:"plus"` - DanceForms map[int]*DanceForm `json:"danceForms" legend:"plus"` - Entities map[int]*Entity `json:"entities" legend:"plus"` - EntityPopulations map[int]*EntityPopulation `json:"entityPopulations" legend:"plus"` - HistoricalEras []*HistoricalEra `json:"historicalEras" legend:"plus"` - HistoricalEventCollections map[int]*HistoricalEventCollection `json:"historicalEventCollections" legend:"plus"` - HistoricalEventRelationshipSupplements []*HistoricalEventRelationshipSupplement `json:"historicalEventRelationshipSupplements" legend:"plus"` - HistoricalEventRelationships []*HistoricalEventRelationship `json:"historicalEventRelationships" legend:"plus"` - HistoricalEvents map[int]*HistoricalEvent `json:"historicalEvents" legend:"plus"` - HistoricalFigures map[int]*HistoricalFigure `json:"historicalFigures" legend:"plus"` - Identities map[int]*Identity `json:"identities" legend:"plus"` - Landmasses map[int]*Landmass `json:"landmasses" legend:"plus"` - MountainPeaks map[int]*MountainPeak `json:"mountainPeaks" legend:"plus"` - MusicalForms map[int]*MusicalForm `json:"musicalForms" legend:"plus"` - Name_ string `json:"name" legend:"plus"` - PoeticForms map[int]*PoeticForm `json:"poeticForms" legend:"plus"` - Regions map[int]*Region `json:"regions" legend:"plus"` - Rivers []*River `json:"rivers" legend:"plus"` - Sites map[int]*Site `json:"sites" legend:"plus"` - UndergroundRegions map[int]*UndergroundRegion `json:"undergroundRegions" legend:"plus"` - WorldConstructions map[int]*WorldConstruction `json:"worldConstructions" legend:"plus"` - WrittenContents map[int]*WrittenContent `json:"writtenContents" legend:"plus"` -} -func (x *DfWorld) Name() string { return x.Name_ } -type Entity struct { - Child int `json:"child" legend:"plus"` - Claims string `json:"claims" legend:"plus"` - EntityLink *EntityLink `json:"entityLink" legend:"plus"` - EntityPosition *EntityPosition `json:"entityPosition" legend:"plus"` - EntityPositionAssignment *EntityPositionAssignment `json:"entityPositionAssignment" legend:"plus"` - HistfigId int `json:"histfigId" legend:"plus"` - Honor *Honor `json:"honor" legend:"base"` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"base"` - Occasion *Occasion `json:"occasion" legend:"plus"` - Profession string `json:"profession" legend:"plus"` - Race string `json:"race" legend:"plus"` - Type string `json:"type" legend:"plus"` - Weapon string `json:"weapon" legend:"plus"` - WorshipId int `json:"worshipId" legend:"plus"` -} -func (x *Entity) Id() int { return x.Id_ } -func (x *Entity) Name() string { return x.Name_ } -type EntityFormerPositionLink struct { - EndYear int `json:"endYear" legend:"base"` - EntityId int `json:"entityId" legend:"base"` - PositionProfileId int `json:"positionProfileId" legend:"base"` - StartYear int `json:"startYear" legend:"base"` -} -type EntityLink struct { - Strength int `json:"strength" legend:"plus"` - Target int `json:"target" legend:"plus"` - Type string `json:"type" legend:"plus"` -} -type EntityPopulation struct { - CivId int `json:"civId" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - Race string `json:"race" legend:"plus"` -} -func (x *EntityPopulation) Id() int { return x.Id_ } -type EntityPosition struct { - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"plus"` - NameFemale string `json:"nameFemale" legend:"plus"` - NameMale string `json:"nameMale" legend:"plus"` - Spouse string `json:"spouse" legend:"plus"` - SpouseFemale string `json:"spouseFemale" legend:"plus"` - SpouseMale string `json:"spouseMale" legend:"plus"` -} -func (x *EntityPosition) Id() int { return x.Id_ } -func (x *EntityPosition) Name() string { return x.Name_ } -type EntityPositionAssignment struct { - Histfig int `json:"histfig" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - PositionId int `json:"positionId" legend:"plus"` - SquadId int `json:"squadId" legend:"plus"` -} -func (x *EntityPositionAssignment) Id() int { return x.Id_ } -type EntityPositionLink struct { - EntityId int `json:"entityId" legend:"base"` - PositionProfileId int `json:"positionProfileId" legend:"base"` - StartYear int `json:"startYear" legend:"base"` -} -type EntityReputation struct { - EntityId int `json:"entityId" legend:"base"` - FirstAgelessSeasonCount int `json:"firstAgelessSeasonCount" legend:"base"` - FirstAgelessYear int `json:"firstAgelessYear" legend:"base"` - UnsolvedMurders int `json:"unsolvedMurders" legend:"base"` -} -type EntitySquadLink struct { - EntityId int `json:"entityId" legend:"base"` - SquadId int `json:"squadId" legend:"base"` - SquadPosition int `json:"squadPosition" legend:"base"` - StartYear int `json:"startYear" legend:"base"` -} -type Feature struct { - Reference int `json:"reference" legend:"plus"` - Type string `json:"type" legend:"plus"` -} -type HfLink struct { - Hfid int `json:"hfid" legend:"base"` - LinkStrength int `json:"linkStrength" legend:"base"` - LinkType string `json:"linkType" legend:"base"` -} -type HfSkill struct { - Skill string `json:"skill" legend:"base"` - TotalIp int `json:"totalIp" legend:"base"` -} -type HistoricalEra struct { - Name_ string `json:"name" legend:"base"` - StartYear int `json:"startYear" legend:"base"` -} -func (x *HistoricalEra) Name() string { return x.Name_ } -type HistoricalEvent struct { - Id_ int `json:"id" legend:"plus"` - Seconds72 int `json:"seconds72" legend:"base"` - Year int `json:"year" legend:"base"` - Details any -} -func (x *HistoricalEvent) Id() int { return x.Id_ } -type HistoricalEventAddHfEntityHonor struct { - EntityId int `json:"entityId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - HonorId int `json:"honorId" legend:"base"` -} -type HistoricalEventAddHfEntityLink struct { - AppointerHfid int `json:"appointerHfid" legend:"plus"` - Civ int `json:"civ" legend:"plus"` - CivId int `json:"civId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - Histfig int `json:"histfig" legend:"plus"` - Link string `json:"link" legend:"base"` - LinkType string `json:"linkType" legend:"plus"` - Position string `json:"position" legend:"plus"` - PositionId int `json:"positionId" legend:"base"` - PromiseToHfid int `json:"promiseToHfid" legend:"plus"` -} -type HistoricalEventAddHfHfLink struct { - Hf int `json:"hf" legend:"plus"` - HfTarget int `json:"hfTarget" legend:"plus"` - Hfid int `json:"hfid" legend:"base"` - HfidTarget int `json:"hfidTarget" legend:"base"` - LinkType string `json:"linkType" legend:"plus"` -} -type HistoricalEventAddHfSiteLink struct { - Civ int `json:"civ" legend:"plus"` - Histfig int `json:"histfig" legend:"plus"` - LinkType string `json:"linkType" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - Structure int `json:"structure" legend:"plus"` -} -type HistoricalEventAgreementFormed struct { - Action string `json:"action" legend:"base"` - AgreementId int `json:"agreementId" legend:"base"` - AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` - CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` - Delegated string `json:"delegated" legend:"base"` - FailedJudgmentTest string `json:"failedJudgmentTest" legend:"base"` - Method string `json:"method" legend:"base"` - RelevantEntityId int `json:"relevantEntityId" legend:"base"` - RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` - RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` - Successful string `json:"successful" legend:"base"` - TopFacet string `json:"topFacet" legend:"base"` - TopFacetModifier int `json:"topFacetModifier" legend:"base"` - TopFacetRating int `json:"topFacetRating" legend:"base"` - TopRelationshipFactor string `json:"topRelationshipFactor" legend:"base"` - TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` - TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` - TopValue string `json:"topValue" legend:"base"` - TopValueModifier int `json:"topValueModifier" legend:"base"` - TopValueRating int `json:"topValueRating" legend:"base"` -} -type HistoricalEventArtifactClaimFormed struct { - ArtifactId int `json:"artifactId" legend:"base"` - Circumstance string `json:"circumstance" legend:"base"` - Claim string `json:"claim" legend:"base"` - EntityId int `json:"entityId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - PositionProfileId int `json:"positionProfileId" legend:"base"` -} -type HistoricalEventArtifactCopied struct { - ArtifactId int `json:"artifactId" legend:"base"` - DestEntityId int `json:"destEntityId" legend:"base"` - DestSiteId int `json:"destSiteId" legend:"base"` - DestStructureId int `json:"destStructureId" legend:"base"` - FromOriginal string `json:"fromOriginal" legend:"base"` - SourceEntityId int `json:"sourceEntityId" legend:"base"` - SourceSiteId int `json:"sourceSiteId" legend:"base"` - SourceStructureId int `json:"sourceStructureId" legend:"base"` -} -type HistoricalEventArtifactCreated struct { - ArtifactId int `json:"artifactId" legend:"plus"` - Circumstance *Circumstance `json:"circumstance" legend:"plus"` - CreatorHfid int `json:"creatorHfid" legend:"plus"` - CreatorUnitId int `json:"creatorUnitId" legend:"plus"` - HistFigureId int `json:"histFigureId" legend:"base"` - NameOnly string `json:"nameOnly" legend:"base"` - Reason string `json:"reason" legend:"plus"` - SanctifyHf int `json:"sanctifyHf" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - UnitId int `json:"unitId" legend:"base"` -} -type HistoricalEventArtifactDestroyed struct { - ArtifactId int `json:"artifactId" legend:"base"` - DestroyerEnid int `json:"destroyerEnid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventArtifactFound struct { - ArtifactId int `json:"artifactId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - UnitId int `json:"unitId" legend:"base"` -} -type HistoricalEventArtifactGiven struct { - ArtifactId int `json:"artifactId" legend:"base"` - GiverEntityId int `json:"giverEntityId" legend:"base"` - GiverHistFigureId int `json:"giverHistFigureId" legend:"base"` - ReceiverEntityId int `json:"receiverEntityId" legend:"base"` - ReceiverHistFigureId int `json:"receiverHistFigureId" legend:"base"` -} -type HistoricalEventArtifactLost struct { - ArtifactId int `json:"artifactId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SitePropertyId int `json:"sitePropertyId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventArtifactPossessed struct { - ArtifactId int `json:"artifactId" legend:"base"` - Circumstance string `json:"circumstance" legend:"base"` - CircumstanceId int `json:"circumstanceId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - Reason string `json:"reason" legend:"base"` - ReasonId int `json:"reasonId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - UnitId int `json:"unitId" legend:"base"` -} -type HistoricalEventArtifactRecovered struct { - ArtifactId int `json:"artifactId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - UnitId int `json:"unitId" legend:"base"` -} -type HistoricalEventArtifactStored struct { - ArtifactId int `json:"artifactId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - UnitId int `json:"unitId" legend:"base"` -} -type HistoricalEventAssumeIdentity struct { - IdentityCaste string `json:"identityCaste" legend:"plus"` - IdentityHistfigId int `json:"identityHistfigId" legend:"plus"` - IdentityId int `json:"identityId" legend:"base"` - IdentityName string `json:"identityName" legend:"plus"` - IdentityNemesisId int `json:"identityNemesisId" legend:"plus"` - IdentityRace string `json:"identityRace" legend:"plus"` - Target int `json:"target" legend:"plus"` - TargetEnid int `json:"targetEnid" legend:"base"` - Trickster int `json:"trickster" legend:"plus"` - TricksterHfid int `json:"tricksterHfid" legend:"base"` -} -type HistoricalEventAttackedSite struct { - ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` - AttackerCivId int `json:"attackerCivId" legend:"base"` - AttackerGeneralHfid int `json:"attackerGeneralHfid" legend:"base"` - AttackerMercEnid int `json:"attackerMercEnid" legend:"base"` - DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - DefenderGeneralHfid int `json:"defenderGeneralHfid" legend:"base"` - DefenderMercEnid int `json:"defenderMercEnid" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventBodyAbused struct { - AbuseType string `json:"abuseType" legend:"plus"` - Bodies int `json:"bodies" legend:"plus"` - Civ int `json:"civ" legend:"plus"` - Coords string `json:"coords" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Histfig int `json:"histfig" legend:"plus"` - Interaction int `json:"interaction" legend:"plus"` - ItemMat string `json:"itemMat" legend:"plus"` - ItemSubtype string `json:"itemSubtype" legend:"plus"` - ItemType string `json:"itemType" legend:"plus"` - PileType string `json:"pileType" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - Structure int `json:"structure" legend:"plus"` - SubregionId int `json:"subregionId" legend:"base"` - Tree int `json:"tree" legend:"plus"` - VictimEntity int `json:"victimEntity" legend:"plus"` -} -type HistoricalEventBuildingProfileAcquired struct { - AcquirerEnid int `json:"acquirerEnid" legend:"base"` - AcquirerHfid int `json:"acquirerHfid" legend:"base"` - BuildingProfileId int `json:"buildingProfileId" legend:"base"` - Inherited string `json:"inherited" legend:"base"` - LastOwnerHfid int `json:"lastOwnerHfid" legend:"base"` - PurchasedUnowned string `json:"purchasedUnowned" legend:"base"` - RebuiltRuined string `json:"rebuiltRuined" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventCeremony struct { - CivId int `json:"civId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - OccasionId int `json:"occasionId" legend:"base"` - ScheduleId int `json:"scheduleId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventChangeCreatureType struct { - Changee int `json:"changee" legend:"plus"` - Changer int `json:"changer" legend:"plus"` - NewCaste int `json:"newCaste" legend:"plus"` - NewRace string `json:"newRace" legend:"plus"` - OldCaste int `json:"oldCaste" legend:"plus"` - OldRace string `json:"oldRace" legend:"plus"` -} -type HistoricalEventChangeHfBodyState struct { - BodyState string `json:"bodyState" legend:"base"` - Coords string `json:"coords" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventChangeHfJob struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"plus"` - NewJob string `json:"newJob" legend:"plus"` - OldJob string `json:"oldJob" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventChangeHfState struct { - Coords string `json:"coords" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"plus"` - Mood string `json:"mood" legend:"base"` - Reason string `json:"reason" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - State string `json:"state" legend:"plus"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventChangedCreatureType struct { - ChangeeHfid int `json:"changeeHfid" legend:"base"` - ChangerHfid int `json:"changerHfid" legend:"base"` - NewCaste string `json:"newCaste" legend:"base"` - NewRace string `json:"newRace" legend:"base"` - OldCaste string `json:"oldCaste" legend:"base"` - OldRace string `json:"oldRace" legend:"base"` -} -type HistoricalEventCompetition struct { - CivId int `json:"civId" legend:"base"` - CompetitorHfid int `json:"competitorHfid" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - OccasionId int `json:"occasionId" legend:"base"` - ScheduleId int `json:"scheduleId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - WinnerHfid int `json:"winnerHfid" legend:"base"` -} -type HistoricalEventCreateEntityPosition struct { - Civ int `json:"civ" legend:"plus"` - Histfig int `json:"histfig" legend:"plus"` - Position string `json:"position" legend:"plus"` - Reason string `json:"reason" legend:"plus"` - SiteCiv int `json:"siteCiv" legend:"plus"` -} -type HistoricalEventCreatedBuilding struct { - BuilderHf int `json:"builderHf" legend:"plus"` - Civ int `json:"civ" legend:"plus"` - Rebuild string `json:"rebuild" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteCiv int `json:"siteCiv" legend:"plus"` - Structure int `json:"structure" legend:"plus"` -} -type HistoricalEventCreatedSite struct { - BuilderHfid int `json:"builderHfid" legend:"base"` - CivId int `json:"civId" legend:"base"` - ResidentCivId int `json:"residentCivId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventCreatedStructure struct { - BuilderHfid int `json:"builderHfid" legend:"base"` - CivId int `json:"civId" legend:"base"` - Rebuilt string `json:"rebuilt" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventCreatedWorldConstruction struct { - CivId int `json:"civId" legend:"base"` - MasterWcid int `json:"masterWcid" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId1 int `json:"siteId1" legend:"base"` - SiteId2 int `json:"siteId2" legend:"base"` - Wcid int `json:"wcid" legend:"base"` -} -type HistoricalEventCreatureDevoured struct { - Caste string `json:"caste" legend:"plus"` - Eater int `json:"eater" legend:"plus"` - Entity int `json:"entity" legend:"plus"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Race string `json:"race" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - Victim int `json:"victim" legend:"plus"` -} -type HistoricalEventDanceFormCreated struct { - Circumstance string `json:"circumstance" legend:"base"` - CircumstanceId int `json:"circumstanceId" legend:"base"` - FormId int `json:"formId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - Reason string `json:"reason" legend:"base"` - ReasonId int `json:"reasonId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventDestroyedSite struct { - AttackerCivId int `json:"attackerCivId" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventEntityAction struct { - Action string `json:"action" legend:"plus"` - Entity int `json:"entity" legend:"plus"` - Site int `json:"site" legend:"plus"` - Structure int `json:"structure" legend:"plus"` -} -type HistoricalEventEntityAllianceFormed struct { - InitiatingEnid int `json:"initiatingEnid" legend:"base"` - JoiningEnid int `json:"joiningEnid" legend:"base"` -} -type HistoricalEventEntityBreachFeatureLayer struct { - CivEntityId int `json:"civEntityId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - SiteEntityId int `json:"siteEntityId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventEntityCreated struct { - CreatorHfid int `json:"creatorHfid" legend:"base"` - EntityId int `json:"entityId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventEntityDissolved struct { - EntityId int `json:"entityId" legend:"base"` - Reason string `json:"reason" legend:"base"` -} -type HistoricalEventEntityEquipmentPurchase struct { - EntityId int `json:"entityId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - NewEquipmentLevel int `json:"newEquipmentLevel" legend:"base"` -} -type HistoricalEventEntityIncorporated struct { - JoinedEntityId int `json:"joinedEntityId" legend:"base"` - JoinerEntityId int `json:"joinerEntityId" legend:"base"` - LeaderHfid int `json:"leaderHfid" legend:"base"` - PartialIncorporation string `json:"partialIncorporation" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventEntityLaw struct { - EntityId int `json:"entityId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - LawAdd string `json:"lawAdd" legend:"base"` - LawRemove string `json:"lawRemove" legend:"base"` -} -type HistoricalEventEntityOverthrown struct { - ConspiratorHfid int `json:"conspiratorHfid" legend:"base"` - EntityId int `json:"entityId" legend:"base"` - InstigatorHfid int `json:"instigatorHfid" legend:"base"` - OverthrownHfid int `json:"overthrownHfid" legend:"base"` - PosTakerHfid int `json:"posTakerHfid" legend:"base"` - PositionProfileId int `json:"positionProfileId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventEntityPersecuted struct { - DestroyedStructureId int `json:"destroyedStructureId" legend:"base"` - ExpelledCreature int `json:"expelledCreature" legend:"base"` - ExpelledHfid int `json:"expelledHfid" legend:"base"` - ExpelledNumber int `json:"expelledNumber" legend:"base"` - ExpelledPopId int `json:"expelledPopId" legend:"base"` - PersecutorEnid int `json:"persecutorEnid" legend:"base"` - PersecutorHfid int `json:"persecutorHfid" legend:"base"` - PropertyConfiscatedFromHfid int `json:"propertyConfiscatedFromHfid" legend:"base"` - ShrineAmountDestroyed int `json:"shrineAmountDestroyed" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - TargetEnid int `json:"targetEnid" legend:"base"` -} -type HistoricalEventEntityPrimaryCriminals struct { - EntityId int `json:"entityId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventEntityRelocate struct { - EntityId int `json:"entityId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventFailedFrameAttempt struct { - ConvicterEnid int `json:"convicterEnid" legend:"base"` - Crime string `json:"crime" legend:"base"` - FooledHfid int `json:"fooledHfid" legend:"base"` - FramerHfid int `json:"framerHfid" legend:"base"` - PlotterHfid int `json:"plotterHfid" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` -} -type HistoricalEventFailedIntrigueCorruption struct { - Action string `json:"action" legend:"base"` - AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` - CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` - CorruptorHfid int `json:"corruptorHfid" legend:"base"` - CorruptorIdentity int `json:"corruptorIdentity" legend:"base"` - FailedJudgmentTest string `json:"failedJudgmentTest" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - LureHfid int `json:"lureHfid" legend:"base"` - Method string `json:"method" legend:"base"` - RelevantEntityId int `json:"relevantEntityId" legend:"base"` - RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` - RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` - TargetIdentity int `json:"targetIdentity" legend:"base"` - TopFacet string `json:"topFacet" legend:"base"` - TopFacetModifier int `json:"topFacetModifier" legend:"base"` - TopFacetRating int `json:"topFacetRating" legend:"base"` - TopRelationshipFactor string `json:"topRelationshipFactor" legend:"base"` - TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` - TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` - TopValue string `json:"topValue" legend:"base"` - TopValueModifier int `json:"topValueModifier" legend:"base"` - TopValueRating int `json:"topValueRating" legend:"base"` -} -type HistoricalEventFieldBattle struct { - ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` - AttackerCivId int `json:"attackerCivId" legend:"base"` - AttackerGeneralHfid int `json:"attackerGeneralHfid" legend:"base"` - AttackerMercEnid int `json:"attackerMercEnid" legend:"base"` - Coords string `json:"coords" legend:"base"` - DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - DefenderGeneralHfid int `json:"defenderGeneralHfid" legend:"base"` - DefenderMercEnid int `json:"defenderMercEnid" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventGamble struct { - GamblerHfid int `json:"gamblerHfid" legend:"base"` - NewAccount int `json:"newAccount" legend:"base"` - OldAccount int `json:"oldAccount" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventHfAbducted struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SnatcherHfid int `json:"snatcherHfid" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` -} -type HistoricalEventHfActOnBuilding struct { - Action string `json:"action" legend:"plus"` - Histfig int `json:"histfig" legend:"plus"` - Site int `json:"site" legend:"plus"` - Structure int `json:"structure" legend:"plus"` -} -type HistoricalEventHfAttackedSite struct { - AttackerHfid int `json:"attackerHfid" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventHfConfronted struct { - Coords string `json:"coords" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - Reason string `json:"reason" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - Situation string `json:"situation" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfConvicted struct { - CoconspiratorHfid int `json:"coconspiratorHfid" legend:"base"` - ConfessedAfterApbArrestEnid int `json:"confessedAfterApbArrestEnid" legend:"base"` - ContactHfid int `json:"contactHfid" legend:"base"` - ConvictIsContact string `json:"convictIsContact" legend:"base"` - ConvictedHfid int `json:"convictedHfid" legend:"base"` - ConvicterEnid int `json:"convicterEnid" legend:"base"` - CorruptConvicterHfid int `json:"corruptConvicterHfid" legend:"base"` - Crime string `json:"crime" legend:"base"` - DeathPenalty string `json:"deathPenalty" legend:"base"` - DidNotRevealAllInInterrogation string `json:"didNotRevealAllInInterrogation" legend:"base"` - Exiled string `json:"exiled" legend:"base"` - FooledHfid int `json:"fooledHfid" legend:"base"` - FramerHfid int `json:"framerHfid" legend:"base"` - HeldFirmInInterrogation string `json:"heldFirmInInterrogation" legend:"base"` - ImplicatedHfid int `json:"implicatedHfid" legend:"base"` - InterrogatorHfid int `json:"interrogatorHfid" legend:"base"` - PlotterHfid int `json:"plotterHfid" legend:"base"` - PrisonMonths int `json:"prisonMonths" legend:"base"` - SurveiledCoconspirator string `json:"surveiledCoconspirator" legend:"base"` - SurveiledContact string `json:"surveiledContact" legend:"base"` - SurveiledConvicted string `json:"surveiledConvicted" legend:"base"` - SurveiledTarget string `json:"surveiledTarget" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` - WrongfulConviction string `json:"wrongfulConviction" legend:"base"` -} -type HistoricalEventHfDestroyedSite struct { - AttackerHfid int `json:"attackerHfid" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventHfDied struct { - Cause string `json:"cause" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SlayerCaste string `json:"slayerCaste" legend:"base"` - SlayerHfid int `json:"slayerHfid" legend:"base"` - SlayerItemId int `json:"slayerItemId" legend:"base"` - SlayerRace string `json:"slayerRace" legend:"base"` - SlayerShooterItemId int `json:"slayerShooterItemId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfDisturbedStructure struct { - HistFigId int `json:"histFigId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventHfDoesInteraction struct { - Doer int `json:"doer" legend:"plus"` - DoerHfid int `json:"doerHfid" legend:"base"` - Interaction string `json:"interaction" legend:"base"` - InteractionAction string `json:"interactionAction" legend:"plus"` - Region int `json:"region" legend:"plus"` - Site int `json:"site" legend:"plus"` - Source int `json:"source" legend:"plus"` - Target int `json:"target" legend:"plus"` - TargetHfid int `json:"targetHfid" legend:"base"` -} -type HistoricalEventHfEnslaved struct { - EnslavedHfid int `json:"enslavedHfid" legend:"base"` - MovedToSiteId int `json:"movedToSiteId" legend:"base"` - PayerEntityId int `json:"payerEntityId" legend:"base"` - SellerHfid int `json:"sellerHfid" legend:"base"` -} -type HistoricalEventHfEquipmentPurchase struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - GroupHfid int `json:"groupHfid" legend:"base"` - Quality int `json:"quality" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfGainsSecretGoal struct { - Hfid int `json:"hfid" legend:"base"` - SecretGoal string `json:"secretGoal" legend:"base"` -} -type HistoricalEventHfInterrogated struct { - ArrestingEnid int `json:"arrestingEnid" legend:"base"` - HeldFirmInInterrogation string `json:"heldFirmInInterrogation" legend:"base"` - InterrogatorHfid int `json:"interrogatorHfid" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` - WantedAndRecognized string `json:"wantedAndRecognized" legend:"base"` -} -type HistoricalEventHfLearnsSecret struct { - Artifact int `json:"artifact" legend:"plus"` - ArtifactId int `json:"artifactId" legend:"base"` - Interaction string `json:"interaction" legend:"base"` - SecretText string `json:"secretText" legend:"plus"` - Student int `json:"student" legend:"plus"` - StudentHfid int `json:"studentHfid" legend:"base"` - Teacher int `json:"teacher" legend:"plus"` - TeacherHfid int `json:"teacherHfid" legend:"base"` -} -type HistoricalEventHfNewPet struct { - Coords string `json:"coords" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - GroupHfid int `json:"groupHfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfPerformedHorribleExperiments struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - GroupHfid int `json:"groupHfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfPrayedInsideStructure struct { - HistFigId int `json:"histFigId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventHfPreach struct { - Entity1 int `json:"entity1" legend:"base"` - Entity2 int `json:"entity2" legend:"base"` - SiteHfid int `json:"siteHfid" legend:"base"` - SpeakerHfid int `json:"speakerHfid" legend:"base"` - Topic string `json:"topic" legend:"base"` -} -type HistoricalEventHfProfanedStructure struct { - HistFigId int `json:"histFigId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventHfRecruitedUnitTypeForEntity struct { - EntityId int `json:"entityId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - UnitType string `json:"unitType" legend:"base"` -} -type HistoricalEventHfRelationshipDenied struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Reason string `json:"reason" legend:"base"` - ReasonId int `json:"reasonId" legend:"base"` - Relationship string `json:"relationship" legend:"base"` - SeekerHfid int `json:"seekerHfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` -} -type HistoricalEventHfReunion struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Group1Hfid int `json:"group1Hfid" legend:"base"` - Group2Hfid int `json:"group2Hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfRevived struct { - ActorHfid int `json:"actorHfid" legend:"base"` - Disturbance string `json:"disturbance" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfSimpleBattleEvent struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Group1Hfid int `json:"group1Hfid" legend:"base"` - Group2Hfid int `json:"group2Hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - Subtype string `json:"subtype" legend:"base"` -} -type HistoricalEventHfTravel struct { - Coords string `json:"coords" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - GroupHfid int `json:"groupHfid" legend:"base"` - Return string `json:"return" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfViewedArtifact struct { - ArtifactId int `json:"artifactId" legend:"base"` - HistFigId int `json:"histFigId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventHfWounded struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - WoundeeHfid int `json:"woundeeHfid" legend:"base"` - WounderHfid int `json:"wounderHfid" legend:"base"` -} -type HistoricalEventHfsFormedIntrigueRelationship struct { - Action string `json:"action" legend:"base"` - AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` - Circumstance string `json:"circumstance" legend:"base"` - CircumstanceId int `json:"circumstanceId" legend:"base"` - CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` - CorruptorHfid int `json:"corruptorHfid" legend:"base"` - CorruptorIdentity int `json:"corruptorIdentity" legend:"base"` - CorruptorSeenAs string `json:"corruptorSeenAs" legend:"base"` - FailedJudgmentTest string `json:"failedJudgmentTest" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - LureHfid int `json:"lureHfid" legend:"base"` - Method string `json:"method" legend:"base"` - RelevantEntityId int `json:"relevantEntityId" legend:"base"` - RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` - RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - Successful string `json:"successful" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` - TargetIdentity int `json:"targetIdentity" legend:"base"` - TargetSeenAs string `json:"targetSeenAs" legend:"base"` - TopFacet string `json:"topFacet" legend:"base"` - TopFacetModifier int `json:"topFacetModifier" legend:"base"` - TopFacetRating int `json:"topFacetRating" legend:"base"` - TopRelationshipFactor string `json:"topRelationshipFactor" legend:"base"` - TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` - TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` - TopValue string `json:"topValue" legend:"base"` - TopValueModifier int `json:"topValueModifier" legend:"base"` - TopValueRating int `json:"topValueRating" legend:"base"` -} -type HistoricalEventHfsFormedReputationRelationship struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - HfRep1Of2 string `json:"hfRep1Of2" legend:"base"` - HfRep2Of1 string `json:"hfRep2Of1" legend:"base"` - Hfid1 int `json:"hfid1" legend:"base"` - Hfid2 int `json:"hfid2" legend:"base"` - IdentityId1 int `json:"identityId1" legend:"base"` - IdentityId2 int `json:"identityId2" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHistFigureDied struct { - ArtifactId int `json:"artifactId" legend:"plus"` - DeathCause string `json:"deathCause" legend:"plus"` - Item int `json:"item" legend:"plus"` - ItemType string `json:"itemType" legend:"plus"` - Site int `json:"site" legend:"plus"` - SlayerCaste int `json:"slayerCaste" legend:"plus"` - SlayerHf int `json:"slayerHf" legend:"plus"` - SlayerRace int `json:"slayerRace" legend:"plus"` - VictimHf int `json:"victimHf" legend:"plus"` -} -type HistoricalEventHistFigureNewPet struct { - Group int `json:"group" legend:"plus"` - Pets string `json:"pets" legend:"plus"` - Site int `json:"site" legend:"plus"` -} -type HistoricalEventHistFigureWounded struct { - BodyPart int `json:"bodyPart" legend:"plus"` - InjuryType string `json:"injuryType" legend:"plus"` - PartLost string `json:"partLost" legend:"plus"` - Site int `json:"site" legend:"plus"` - Woundee int `json:"woundee" legend:"plus"` - WoundeeCaste int `json:"woundeeCaste" legend:"plus"` - WoundeeRace int `json:"woundeeRace" legend:"plus"` - Wounder int `json:"wounder" legend:"plus"` -} -type HistoricalEventHolyCityDeclaration struct { - ReligionId int `json:"religionId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventItemStolen struct { - Circumstance *Circumstance `json:"circumstance" legend:"plus"` - CircumstanceId int `json:"circumstanceId" legend:"base"` - Entity int `json:"entity" legend:"plus"` - Histfig int `json:"histfig" legend:"plus"` - Item int `json:"item" legend:"plus"` - ItemSubtype string `json:"itemSubtype" legend:"plus"` - ItemType string `json:"itemType" legend:"plus"` - Mat string `json:"mat" legend:"plus"` - Matindex int `json:"matindex" legend:"plus"` - Mattype int `json:"mattype" legend:"plus"` - Site int `json:"site" legend:"plus"` - StashSite int `json:"stashSite" legend:"plus"` - Structure int `json:"structure" legend:"plus"` - TheftMethod string `json:"theftMethod" legend:"plus"` -} -type HistoricalEventKnowledgeDiscovered struct { - First string `json:"first" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - Knowledge string `json:"knowledge" legend:"base"` -} -type HistoricalEventModifiedBuilding struct { - Modification string `json:"modification" legend:"base"` - ModifierHfid int `json:"modifierHfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventMusicalFormCreated struct { - Circumstance string `json:"circumstance" legend:"base"` - CircumstanceId int `json:"circumstanceId" legend:"base"` - FormId int `json:"formId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - Reason string `json:"reason" legend:"base"` - ReasonId int `json:"reasonId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventNewSiteLeader struct { - AttackerCivId int `json:"attackerCivId" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - NewLeaderHfid int `json:"newLeaderHfid" legend:"base"` - NewSiteCivId int `json:"newSiteCivId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventPeaceAccepted struct { - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventPeaceRejected struct { - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventPerformance struct { - CivId int `json:"civId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - OccasionId int `json:"occasionId" legend:"base"` - ScheduleId int `json:"scheduleId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventPlunderedSite struct { - AttackerCivId int `json:"attackerCivId" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - Detected string `json:"detected" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventPoeticFormCreated struct { - Circumstance string `json:"circumstance" legend:"base"` - FormId int `json:"formId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventProcession struct { - CivId int `json:"civId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - OccasionId int `json:"occasionId" legend:"base"` - ScheduleId int `json:"scheduleId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventRazedStructure struct { - CivId int `json:"civId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventReclaimSite struct { - CivId int `json:"civId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventRegionpopIncorporatedIntoEntity struct { - JoinEntityId int `json:"joinEntityId" legend:"base"` - PopFlid int `json:"popFlid" legend:"base"` - PopNumberMoved int `json:"popNumberMoved" legend:"base"` - PopRace int `json:"popRace" legend:"base"` - PopSrid int `json:"popSrid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventRemoveHfEntityLink struct { - Civ int `json:"civ" legend:"plus"` - CivId int `json:"civId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - Histfig int `json:"histfig" legend:"plus"` - Link string `json:"link" legend:"base"` - LinkType string `json:"linkType" legend:"plus"` - Position int `json:"position" legend:"plus"` - PositionId int `json:"positionId" legend:"base"` -} -type HistoricalEventRemoveHfHfLink struct { - Hfid int `json:"hfid" legend:"base"` - HfidTarget int `json:"hfidTarget" legend:"base"` -} -type HistoricalEventRemoveHfSiteLink struct { - Civ int `json:"civ" legend:"plus"` - Histfig int `json:"histfig" legend:"plus"` - LinkType string `json:"linkType" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - Structure int `json:"structure" legend:"plus"` -} -type HistoricalEventReplacedBuilding struct { - Civ int `json:"civ" legend:"plus"` - NewStructure int `json:"newStructure" legend:"plus"` - OldStructure int `json:"oldStructure" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteCiv int `json:"siteCiv" legend:"plus"` -} -type HistoricalEventReplacedStructure struct { - CivId int `json:"civId" legend:"base"` - NewAbId int `json:"newAbId" legend:"base"` - OldAbId int `json:"oldAbId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventSiteDispute struct { - Dispute string `json:"dispute" legend:"base"` - EntityId1 int `json:"entityId1" legend:"base"` - EntityId2 int `json:"entityId2" legend:"base"` - SiteId1 int `json:"siteId1" legend:"base"` - SiteId2 int `json:"siteId2" legend:"base"` -} -type HistoricalEventSiteTakenOver struct { - AttackerCivId int `json:"attackerCivId" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - NewSiteCivId int `json:"newSiteCivId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventTrade struct { - AccountShift int `json:"accountShift" legend:"base"` - Allotment int `json:"allotment" legend:"base"` - AllotmentIndex int `json:"allotmentIndex" legend:"base"` - DestSiteId int `json:"destSiteId" legend:"base"` - ProductionZoneId int `json:"productionZoneId" legend:"base"` - SourceSiteId int `json:"sourceSiteId" legend:"base"` - TraderEntityId int `json:"traderEntityId" legend:"base"` - TraderHfid int `json:"traderHfid" legend:"base"` -} -type HistoricalEventWarPeaceAccepted struct { - Destination int `json:"destination" legend:"plus"` - Site int `json:"site" legend:"plus"` - Source int `json:"source" legend:"plus"` - Topic string `json:"topic" legend:"plus"` -} -type HistoricalEventWarPeaceRejected struct { - Destination int `json:"destination" legend:"plus"` - Site int `json:"site" legend:"plus"` - Source int `json:"source" legend:"plus"` - Topic string `json:"topic" legend:"plus"` -} -type HistoricalEventWrittenContentComposed struct { - Circumstance string `json:"circumstance" legend:"base"` - CircumstanceId int `json:"circumstanceId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - Reason string `json:"reason" legend:"base"` - ReasonId int `json:"reasonId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - WcId int `json:"wcId" legend:"base"` -} -type HistoricalEventCollection struct { - EndSeconds72 int `json:"endSeconds72" legend:"base"` - EndYear int `json:"endYear" legend:"base"` - Event int `json:"event" legend:"base"` - Eventcol int `json:"eventcol" legend:"base"` - Id_ int `json:"id" legend:"base"` - StartSeconds72 int `json:"startSeconds72" legend:"base"` - StartYear int `json:"startYear" legend:"base"` - Details any -} -func (x *HistoricalEventCollection) Id() int { return x.Id_ } -type HistoricalEventCollectionAbduction struct { - AttackingEnid int `json:"attackingEnid" legend:"base"` - Coords string `json:"coords" legend:"base"` - DefendingEnid int `json:"defendingEnid" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` - ParentEventcol int `json:"parentEventcol" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventCollectionBattle struct { - ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` - ASupportMercHfid int `json:"aSupportMercHfid" legend:"base"` - AttackingHfid int `json:"attackingHfid" legend:"base"` - AttackingMercEnid int `json:"attackingMercEnid" legend:"base"` - AttackingSquadAnimated string `json:"attackingSquadAnimated" legend:"base"` - AttackingSquadDeaths int `json:"attackingSquadDeaths" legend:"base"` - AttackingSquadEntityPop int `json:"attackingSquadEntityPop" legend:"base"` - AttackingSquadNumber int `json:"attackingSquadNumber" legend:"base"` - AttackingSquadRace string `json:"attackingSquadRace" legend:"base"` - AttackingSquadSite int `json:"attackingSquadSite" legend:"base"` - CompanyMerc string `json:"companyMerc" legend:"base"` - Coords string `json:"coords" legend:"base"` - DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` - DSupportMercHfid int `json:"dSupportMercHfid" legend:"base"` - DefendingHfid int `json:"defendingHfid" legend:"base"` - DefendingMercEnid int `json:"defendingMercEnid" legend:"base"` - DefendingSquadAnimated string `json:"defendingSquadAnimated" legend:"base"` - DefendingSquadDeaths int `json:"defendingSquadDeaths" legend:"base"` - DefendingSquadEntityPop int `json:"defendingSquadEntityPop" legend:"base"` - DefendingSquadNumber int `json:"defendingSquadNumber" legend:"base"` - DefendingSquadRace string `json:"defendingSquadRace" legend:"base"` - DefendingSquadSite int `json:"defendingSquadSite" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - IndividualMerc string `json:"individualMerc" legend:"base"` - Name_ string `json:"name" legend:"base"` - NoncomHfid int `json:"noncomHfid" legend:"base"` - Outcome string `json:"outcome" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - WarEventcol int `json:"warEventcol" legend:"base"` -} -func (x *HistoricalEventCollectionBattle) Name() string { return x.Name_ } -type HistoricalEventCollectionBeastAttack struct { - Coords string `json:"coords" legend:"base"` - DefendingEnid int `json:"defendingEnid" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` - ParentEventcol int `json:"parentEventcol" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventCollectionCeremony struct { - Ordinal int `json:"ordinal" legend:"base"` -} -type HistoricalEventCollectionCompetition struct { - Ordinal int `json:"ordinal" legend:"base"` -} -type HistoricalEventCollectionDuel struct { - AttackingHfid int `json:"attackingHfid" legend:"base"` - Coords string `json:"coords" legend:"base"` - DefendingHfid int `json:"defendingHfid" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` - ParentEventcol int `json:"parentEventcol" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventCollectionEntityOverthrown struct { - Ordinal int `json:"ordinal" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - TargetEntityId int `json:"targetEntityId" legend:"base"` -} -type HistoricalEventCollectionJourney struct { - Ordinal int `json:"ordinal" legend:"base"` -} -type HistoricalEventCollectionOccasion struct { - CivId int `json:"civId" legend:"base"` - OccasionId int `json:"occasionId" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` -} -type HistoricalEventCollectionPerformance struct { - Ordinal int `json:"ordinal" legend:"base"` -} -type HistoricalEventCollectionPersecution struct { - Ordinal int `json:"ordinal" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - TargetEntityId int `json:"targetEntityId" legend:"base"` -} -type HistoricalEventCollectionProcession struct { - Ordinal int `json:"ordinal" legend:"base"` -} -type HistoricalEventCollectionPurge struct { - Adjective string `json:"adjective" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventCollectionSiteConquered struct { - AttackingEnid int `json:"attackingEnid" legend:"base"` - DefendingEnid int `json:"defendingEnid" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - WarEventcol int `json:"warEventcol" legend:"base"` -} -type HistoricalEventCollectionTheft struct { - AttackingEnid int `json:"attackingEnid" legend:"base"` - Coords string `json:"coords" legend:"base"` - DefendingEnid int `json:"defendingEnid" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` - ParentEventcol int `json:"parentEventcol" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventCollectionWar struct { - AggressorEntId int `json:"aggressorEntId" legend:"base"` - DefenderEntId int `json:"defenderEntId" legend:"base"` - Name_ string `json:"name" legend:"base"` -} -func (x *HistoricalEventCollectionWar) Name() string { return x.Name_ } -type HistoricalEventRelationship struct { - Event int `json:"event" legend:"plus"` - Relationship string `json:"relationship" legend:"plus"` - SourceHf int `json:"sourceHf" legend:"plus"` - TargetHf int `json:"targetHf" legend:"plus"` - Year int `json:"year" legend:"plus"` -} -type HistoricalEventRelationshipSupplement struct { - Event int `json:"event" legend:"plus"` - OccasionType int `json:"occasionType" legend:"plus"` - Site int `json:"site" legend:"plus"` - Unk1 int `json:"unk1" legend:"plus"` -} -type HistoricalFigure struct { - ActiveInteraction string `json:"activeInteraction" legend:"base"` - Animated string `json:"animated" legend:"base"` - AnimatedString string `json:"animatedString" legend:"base"` - Appeared int `json:"appeared" legend:"base"` - AssociatedType string `json:"associatedType" legend:"base"` - BirthSeconds72 int `json:"birthSeconds72" legend:"base"` - BirthYear int `json:"birthYear" legend:"base"` - Caste string `json:"caste" legend:"base"` - CurrentIdentityId int `json:"currentIdentityId" legend:"base"` - DeathSeconds72 int `json:"deathSeconds72" legend:"base"` - DeathYear int `json:"deathYear" legend:"base"` - Deity string `json:"deity" legend:"base"` - EntPopId int `json:"entPopId" legend:"base"` - EntityFormerPositionLink *EntityFormerPositionLink `json:"entityFormerPositionLink" legend:"base"` - EntityLink *EntityLink `json:"entityLink" legend:"base"` - EntityPositionLink *EntityPositionLink `json:"entityPositionLink" legend:"base"` - EntityReputation *EntityReputation `json:"entityReputation" legend:"base"` - EntitySquadLink *EntitySquadLink `json:"entitySquadLink" legend:"base"` - Force string `json:"force" legend:"base"` - Goal string `json:"goal" legend:"base"` - HfLink *HfLink `json:"hfLink" legend:"base"` - HfSkill *HfSkill `json:"hfSkill" legend:"base"` - HoldsArtifact int `json:"holdsArtifact" legend:"base"` - HonorEntity *HonorEntity `json:"honorEntity" legend:"base"` - Id_ int `json:"id" legend:"plus"` - InteractionKnowledge string `json:"interactionKnowledge" legend:"base"` - IntrigueActor *IntrigueActor `json:"intrigueActor" legend:"base"` - IntriguePlot *IntriguePlot `json:"intriguePlot" legend:"base"` - JourneyPet string `json:"journeyPet" legend:"base"` - Name_ string `json:"name" legend:"base"` - Race string `json:"race" legend:"plus"` - RelationshipProfileHfHistorical *RelationshipProfileHfHistorical `json:"relationshipProfileHfHistorical" legend:"base"` - RelationshipProfileHfVisual *RelationshipProfileHfVisual `json:"relationshipProfileHfVisual" legend:"base"` - Sex int `json:"sex" legend:"plus"` - SiteLink *SiteLink `json:"siteLink" legend:"base"` - SiteProperty *SiteProperty `json:"siteProperty" legend:"base"` - Sphere string `json:"sphere" legend:"base"` - UsedIdentityId int `json:"usedIdentityId" legend:"base"` - VagueRelationship *VagueRelationship `json:"vagueRelationship" legend:"base"` -} -func (x *HistoricalFigure) Id() int { return x.Id_ } -func (x *HistoricalFigure) Name() string { return x.Name_ } -type Honor struct { - ExemptEpid int `json:"exemptEpid" legend:"base"` - ExemptFormerEpid int `json:"exemptFormerEpid" legend:"base"` - GivesPrecedence int `json:"givesPrecedence" legend:"base"` - GrantedToEverybody string `json:"grantedToEverybody" legend:"base"` - Id_ int `json:"id" legend:"base"` - Name_ string `json:"name" legend:"base"` - RequiredBattles int `json:"requiredBattles" legend:"base"` - RequiredKills int `json:"requiredKills" legend:"base"` - RequiredSkill string `json:"requiredSkill" legend:"base"` - RequiredSkillIpTotal int `json:"requiredSkillIpTotal" legend:"base"` - RequiredYears int `json:"requiredYears" legend:"base"` - RequiresAnyMeleeOrRangedSkill string `json:"requiresAnyMeleeOrRangedSkill" legend:"base"` -} -func (x *Honor) Id() int { return x.Id_ } -func (x *Honor) Name() string { return x.Name_ } -type HonorEntity struct { - Battles int `json:"battles" legend:"base"` - Entity int `json:"entity" legend:"base"` - HonorId int `json:"honorId" legend:"base"` - Kills int `json:"kills" legend:"base"` -} -type Identity struct { - BirthSecond int `json:"birthSecond" legend:"plus"` - BirthYear int `json:"birthYear" legend:"plus"` - Caste string `json:"caste" legend:"plus"` - EntityId int `json:"entityId" legend:"plus"` - HistfigId int `json:"histfigId" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"plus"` - NemesisId int `json:"nemesisId" legend:"plus"` - Profession string `json:"profession" legend:"plus"` - Race string `json:"race" legend:"plus"` -} -func (x *Identity) Id() int { return x.Id_ } -func (x *Identity) Name() string { return x.Name_ } -type IntrigueActor struct { - EntityId int `json:"entityId" legend:"base"` - HandleActorId int `json:"handleActorId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - LocalId int `json:"localId" legend:"base"` - PromisedActorImmortality string `json:"promisedActorImmortality" legend:"base"` - PromisedMeImmortality string `json:"promisedMeImmortality" legend:"base"` - Role string `json:"role" legend:"base"` - Strategy string `json:"strategy" legend:"base"` - StrategyEnid int `json:"strategyEnid" legend:"base"` - StrategyEppid int `json:"strategyEppid" legend:"base"` -} -type IntriguePlot struct { - ActorId int `json:"actorId" legend:"base"` - ArtifactId int `json:"artifactId" legend:"base"` - DelegatedPlotHfid int `json:"delegatedPlotHfid" legend:"base"` - DelegatedPlotId int `json:"delegatedPlotId" legend:"base"` - EntityId int `json:"entityId" legend:"base"` - LocalId int `json:"localId" legend:"base"` - OnHold string `json:"onHold" legend:"base"` - ParentPlotHfid int `json:"parentPlotHfid" legend:"base"` - ParentPlotId int `json:"parentPlotId" legend:"base"` - PlotActor *PlotActor `json:"plotActor" legend:"base"` - Type string `json:"type" legend:"base"` -} -type Item struct { - NameString string `json:"nameString" legend:"base"` - PageNumber int `json:"pageNumber" legend:"base"` - PageWrittenContentId int `json:"pageWrittenContentId" legend:"base"` - WritingWrittenContentId int `json:"writingWrittenContentId" legend:"base"` -} -type Landmass struct { - Coord1 string `json:"coord1" legend:"plus"` - Coord2 string `json:"coord2" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"plus"` -} -func (x *Landmass) Id() int { return x.Id_ } -func (x *Landmass) Name() string { return x.Name_ } -type MountainPeak struct { - Coords string `json:"coords" legend:"plus"` - Height int `json:"height" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - IsVolcano string `json:"isVolcano" legend:"plus"` - Name_ string `json:"name" legend:"plus"` -} -func (x *MountainPeak) Id() int { return x.Id_ } -func (x *MountainPeak) Name() string { return x.Name_ } -type MusicalForm struct { - Description string `json:"description" legend:"base"` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"plus"` -} -func (x *MusicalForm) Id() int { return x.Id_ } -func (x *MusicalForm) Name() string { return x.Name_ } -type Occasion struct { - Event int `json:"event" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"plus"` - Schedule *Schedule `json:"schedule" legend:"plus"` -} -func (x *Occasion) Id() int { return x.Id_ } -func (x *Occasion) Name() string { return x.Name_ } -type PlotActor struct { - ActorId int `json:"actorId" legend:"base"` - AgreementHasMessenger string `json:"agreementHasMessenger" legend:"base"` - AgreementId int `json:"agreementId" legend:"base"` - PlotRole string `json:"plotRole" legend:"base"` -} -type PoeticForm struct { - Description string `json:"description" legend:"base"` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"plus"` -} -func (x *PoeticForm) Id() int { return x.Id_ } -func (x *PoeticForm) Name() string { return x.Name_ } -type Reference struct { - Id_ int `json:"id" legend:"plus"` - Type string `json:"type" legend:"plus"` -} -func (x *Reference) Id() int { return x.Id_ } -type Region struct { - Coords string `json:"coords" legend:"plus"` - Evilness string `json:"evilness" legend:"plus"` - ForceId int `json:"forceId" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"base"` - Type string `json:"type" legend:"base"` -} -func (x *Region) Id() int { return x.Id_ } -func (x *Region) Name() string { return x.Name_ } -type RelationshipProfileHfHistorical struct { - Fear int `json:"fear" legend:"base"` - HfId int `json:"hfId" legend:"base"` - Love int `json:"love" legend:"base"` - Loyalty int `json:"loyalty" legend:"base"` - Respect int `json:"respect" legend:"base"` - Trust int `json:"trust" legend:"base"` -} -type RelationshipProfileHfVisual struct { - Fear int `json:"fear" legend:"base"` - HfId int `json:"hfId" legend:"base"` - KnownIdentityId int `json:"knownIdentityId" legend:"base"` - LastMeetSeconds72 int `json:"lastMeetSeconds72" legend:"base"` - LastMeetYear int `json:"lastMeetYear" legend:"base"` - Love int `json:"love" legend:"base"` - Loyalty int `json:"loyalty" legend:"base"` - MeetCount int `json:"meetCount" legend:"base"` - RepFriendly int `json:"repFriendly" legend:"base"` - RepInformationSource int `json:"repInformationSource" legend:"base"` - Respect int `json:"respect" legend:"base"` - Trust int `json:"trust" legend:"base"` -} -type River struct { - EndPos string `json:"endPos" legend:"plus"` - Name_ string `json:"name" legend:"plus"` - Path string `json:"path" legend:"plus"` -} -func (x *River) Name() string { return x.Name_ } -type Schedule struct { - Feature *Feature `json:"feature" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - ItemSubtype string `json:"itemSubtype" legend:"plus"` - ItemType string `json:"itemType" legend:"plus"` - Reference int `json:"reference" legend:"plus"` - Reference2 int `json:"reference2" legend:"plus"` - Type string `json:"type" legend:"plus"` -} -func (x *Schedule) Id() int { return x.Id_ } -type Site struct { - CivId int `json:"civId" legend:"plus"` - Coords string `json:"coords" legend:"base"` - CurOwnerId int `json:"curOwnerId" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"base"` - Rectangle string `json:"rectangle" legend:"base"` - SiteProperties map[int]*SiteProperty `json:"siteProperties" legend:"base"` - Structures map[int]*Structure `json:"structures" legend:"base"` - Type string `json:"type" legend:"base"` -} -func (x *Site) Id() int { return x.Id_ } -func (x *Site) Name() string { return x.Name_ } -type SiteLink struct { - EntityId int `json:"entityId" legend:"base"` - LinkType string `json:"linkType" legend:"base"` - OccupationId int `json:"occupationId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubId int `json:"subId" legend:"base"` -} -type SiteProperty struct { - PropertyId int `json:"propertyId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type Structure struct { - CopiedArtifactId int `json:"copiedArtifactId" legend:"base"` - Deity int `json:"deity" legend:"plus"` - DeityType int `json:"deityType" legend:"plus"` - DungeonType int `json:"dungeonType" legend:"plus"` - EntityId int `json:"entityId" legend:"base"` - Id_ int `json:"id" legend:"plus"` - Inhabitant int `json:"inhabitant" legend:"plus"` - LocalId int `json:"localId" legend:"base"` - Name_ string `json:"name" legend:"base"` - Name2 string `json:"name2" legend:"plus"` - Religion int `json:"religion" legend:"plus"` - Subtype string `json:"subtype" legend:"base"` - Type string `json:"type" legend:"base"` - WorshipHfid int `json:"worshipHfid" legend:"base"` -} -func (x *Structure) Id() int { return x.Id_ } -func (x *Structure) Name() string { return x.Name_ } -type UndergroundRegion struct { - Coords string `json:"coords" legend:"plus"` - Depth int `json:"depth" legend:"base"` - Id_ int `json:"id" legend:"plus"` - Type string `json:"type" legend:"base"` -} -func (x *UndergroundRegion) Id() int { return x.Id_ } -type VagueRelationship struct { - ArtisticBuddy string `json:"artisticBuddy" legend:"base"` - AtheleticRival string `json:"atheleticRival" legend:"base"` - AthleteBuddy string `json:"athleteBuddy" legend:"base"` - BusinessRival string `json:"businessRival" legend:"base"` - ChildhoodFriend string `json:"childhoodFriend" legend:"base"` - Grudge string `json:"grudge" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - JealousObsession string `json:"jealousObsession" legend:"base"` - JealousRelationshipGrudge string `json:"jealousRelationshipGrudge" legend:"base"` - PersecutionGrudge string `json:"persecutionGrudge" legend:"base"` - ReligiousPersecutionGrudge string `json:"religiousPersecutionGrudge" legend:"base"` - ScholarBuddy string `json:"scholarBuddy" legend:"base"` - SupernaturalGrudge string `json:"supernaturalGrudge" legend:"base"` - WarBuddy string `json:"warBuddy" legend:"base"` -} -type WorldConstruction struct { - Coords string `json:"coords" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"plus"` - Type string `json:"type" legend:"plus"` -} -func (x *WorldConstruction) Id() int { return x.Id_ } -func (x *WorldConstruction) Name() string { return x.Name_ } -type WrittenContent struct { - Author int `json:"author" legend:"plus"` - AuthorHfid int `json:"authorHfid" legend:"base"` - AuthorRoll int `json:"authorRoll" legend:"base"` - Form string `json:"form" legend:"base"` - FormId int `json:"formId" legend:"base"` - Id_ int `json:"id" legend:"plus"` - PageEnd int `json:"pageEnd" legend:"plus"` - PageStart int `json:"pageStart" legend:"plus"` - Reference *Reference `json:"reference" legend:"plus"` - Style string `json:"style" legend:"plus"` - Title string `json:"title" legend:"plus"` - Type string `json:"type" legend:"plus"` -} -func (x *WrittenContent) Id() int { return x.Id_ } - -// Parser - -func n(d []byte) int { - v, _ := strconv.Atoi(string(d)) - return v -} -func parseArtifact(d *xml.Decoder, start *xml.StartElement) (*Artifact, error) { - var ( - obj = Artifact{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "abs_tile_x": - data = nil - case "abs_tile_y": - data = nil - case "abs_tile_z": - data = nil - case "holder_hfid": - data = nil - case "id": - data = nil - case "item": - v, _ := parseItem(d, &t) -obj.Item = v - case "item_description": - data = nil - case "item_subtype": - data = nil - case "item_type": - data = nil - case "mat": - data = nil - case "name": - data = nil - case "page_count": - data = nil - case "site_id": - data = nil - case "structure_local_id": - data = nil - case "subregion_id": - data = nil - case "writing": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "abs_tile_x": - obj.AbsTileX = n(data) - case "abs_tile_y": - obj.AbsTileY = n(data) - case "abs_tile_z": - obj.AbsTileZ = n(data) - case "holder_hfid": - obj.HolderHfid = n(data) - case "id": - obj.Id_ = n(data) - case "item": - - case "item_description": - obj.ItemDescription = string(data) - case "item_subtype": - obj.ItemSubtype = string(data) - case "item_type": - obj.ItemType = string(data) - case "mat": - obj.Mat = string(data) - case "name": - obj.Name_ = string(data) - case "page_count": - obj.PageCount = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_local_id": - obj.StructureLocalId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "writing": - obj.Writing = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseCircumstance(d *xml.Decoder, start *xml.StartElement) (*Circumstance, error) { - var ( - obj = Circumstance{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "defeated": - data = nil - case "type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "defeated": - obj.Defeated = n(data) - case "type": - obj.Type = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseCreature(d *xml.Decoder, start *xml.StartElement) (*Creature, error) { - var ( - obj = Creature{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "all_castes_alive": - data = nil - case "artificial_hiveable": - data = nil - case "biome_desert_badland": - data = nil - case "biome_desert_rock": - data = nil - case "biome_desert_sand": - data = nil - case "biome_forest_taiga": - data = nil - case "biome_forest_temperate_broadleaf": - data = nil - case "biome_forest_temperate_conifer": - data = nil - case "biome_forest_tropical_conifer": - data = nil - case "biome_forest_tropical_dry_broadleaf": - data = nil - case "biome_forest_tropical_moist_broadleaf": - data = nil - case "biome_glacier": - data = nil - case "biome_grassland_temperate": - data = nil - case "biome_grassland_tropical": - data = nil - case "biome_lake_temperate_brackishwater": - data = nil - case "biome_lake_temperate_freshwater": - data = nil - case "biome_lake_temperate_saltwater": - data = nil - case "biome_lake_tropical_brackishwater": - data = nil - case "biome_lake_tropical_freshwater": - data = nil - case "biome_lake_tropical_saltwater": - data = nil - case "biome_marsh_temperate_freshwater": - data = nil - case "biome_marsh_temperate_saltwater": - data = nil - case "biome_marsh_tropical_freshwater": - data = nil - case "biome_marsh_tropical_saltwater": - data = nil - case "biome_mountain": - data = nil - case "biome_ocean_arctic": - data = nil - case "biome_ocean_temperate": - data = nil - case "biome_ocean_tropical": - data = nil - case "biome_pool_temperate_brackishwater": - data = nil - case "biome_pool_temperate_freshwater": - data = nil - case "biome_pool_temperate_saltwater": - data = nil - case "biome_pool_tropical_brackishwater": - data = nil - case "biome_pool_tropical_freshwater": - data = nil - case "biome_pool_tropical_saltwater": - data = nil - case "biome_river_temperate_brackishwater": - data = nil - case "biome_river_temperate_freshwater": - data = nil - case "biome_river_temperate_saltwater": - data = nil - case "biome_river_tropical_brackishwater": - data = nil - case "biome_river_tropical_freshwater": - data = nil - case "biome_river_tropical_saltwater": - data = nil - case "biome_savanna_temperate": - data = nil - case "biome_savanna_tropical": - data = nil - case "biome_shrubland_temperate": - data = nil - case "biome_shrubland_tropical": - data = nil - case "biome_subterranean_chasm": - data = nil - case "biome_subterranean_lava": - data = nil - case "biome_subterranean_water": - data = nil - case "biome_swamp_mangrove": - data = nil - case "biome_swamp_temperate_freshwater": - data = nil - case "biome_swamp_temperate_saltwater": - data = nil - case "biome_swamp_tropical_freshwater": - data = nil - case "biome_swamp_tropical_saltwater": - data = nil - case "biome_tundra": - data = nil - case "creature_id": - data = nil - case "does_not_exist": - data = nil - case "equipment": - data = nil - case "equipment_wagon": - data = nil - case "evil": - data = nil - case "fanciful": - data = nil - case "generated": - data = nil - case "good": - data = nil - case "has_any_benign": - data = nil - case "has_any_can_swim": - data = nil - case "has_any_cannot_breathe_air": - data = nil - case "has_any_cannot_breathe_water": - data = nil - case "has_any_carnivore": - data = nil - case "has_any_common_domestic": - data = nil - case "has_any_curious_beast": - data = nil - case "has_any_demon": - data = nil - case "has_any_feature_beast": - data = nil - case "has_any_flier": - data = nil - case "has_any_fly_race_gait": - data = nil - case "has_any_grasp": - data = nil - case "has_any_grazer": - data = nil - case "has_any_has_blood": - data = nil - case "has_any_immobile": - data = nil - case "has_any_intelligent_learns": - data = nil - case "has_any_intelligent_speaks": - data = nil - case "has_any_large_predator": - data = nil - case "has_any_local_pops_controllable": - data = nil - case "has_any_local_pops_produce_heroes": - data = nil - case "has_any_megabeast": - data = nil - case "has_any_mischievous": - data = nil - case "has_any_natural_animal": - data = nil - case "has_any_night_creature": - data = nil - case "has_any_night_creature_bogeyman": - data = nil - case "has_any_night_creature_hunter": - data = nil - case "has_any_night_creature_nightmare": - data = nil - case "has_any_not_fireimmune": - data = nil - case "has_any_not_living": - data = nil - case "has_any_outsider_controllable": - data = nil - case "has_any_race_gait": - data = nil - case "has_any_semimegabeast": - data = nil - case "has_any_slow_learner": - data = nil - case "has_any_supernatural": - data = nil - case "has_any_titan": - data = nil - case "has_any_unique_demon": - data = nil - case "has_any_utterances": - data = nil - case "has_any_vermin_hateable": - data = nil - case "has_any_vermin_micro": - data = nil - case "has_female": - data = nil - case "has_male": - data = nil - case "large_roaming": - data = nil - case "loose_clusters": - data = nil - case "mates_to_breed": - data = nil - case "mundane": - data = nil - case "name_plural": - data = nil - case "name_singular": - data = nil - case "occurs_as_entity_race": - data = nil - case "savage": - data = nil - case "small_race": - data = nil - case "two_genders": - data = nil - case "ubiquitous": - data = nil - case "vermin_eater": - data = nil - case "vermin_fish": - data = nil - case "vermin_grounder": - data = nil - case "vermin_rotter": - data = nil - case "vermin_soil": - data = nil - case "vermin_soil_colony": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "all_castes_alive": - obj.AllCastesAlive = string(data) - case "artificial_hiveable": - obj.ArtificialHiveable = string(data) - case "biome_desert_badland": - obj.BiomeDesertBadland = string(data) - case "biome_desert_rock": - obj.BiomeDesertRock = string(data) - case "biome_desert_sand": - obj.BiomeDesertSand = string(data) - case "biome_forest_taiga": - obj.BiomeForestTaiga = string(data) - case "biome_forest_temperate_broadleaf": - obj.BiomeForestTemperateBroadleaf = string(data) - case "biome_forest_temperate_conifer": - obj.BiomeForestTemperateConifer = string(data) - case "biome_forest_tropical_conifer": - obj.BiomeForestTropicalConifer = string(data) - case "biome_forest_tropical_dry_broadleaf": - obj.BiomeForestTropicalDryBroadleaf = string(data) - case "biome_forest_tropical_moist_broadleaf": - obj.BiomeForestTropicalMoistBroadleaf = string(data) - case "biome_glacier": - obj.BiomeGlacier = string(data) - case "biome_grassland_temperate": - obj.BiomeGrasslandTemperate = string(data) - case "biome_grassland_tropical": - obj.BiomeGrasslandTropical = string(data) - case "biome_lake_temperate_brackishwater": - obj.BiomeLakeTemperateBrackishwater = string(data) - case "biome_lake_temperate_freshwater": - obj.BiomeLakeTemperateFreshwater = string(data) - case "biome_lake_temperate_saltwater": - obj.BiomeLakeTemperateSaltwater = string(data) - case "biome_lake_tropical_brackishwater": - obj.BiomeLakeTropicalBrackishwater = string(data) - case "biome_lake_tropical_freshwater": - obj.BiomeLakeTropicalFreshwater = string(data) - case "biome_lake_tropical_saltwater": - obj.BiomeLakeTropicalSaltwater = string(data) - case "biome_marsh_temperate_freshwater": - obj.BiomeMarshTemperateFreshwater = string(data) - case "biome_marsh_temperate_saltwater": - obj.BiomeMarshTemperateSaltwater = string(data) - case "biome_marsh_tropical_freshwater": - obj.BiomeMarshTropicalFreshwater = string(data) - case "biome_marsh_tropical_saltwater": - obj.BiomeMarshTropicalSaltwater = string(data) - case "biome_mountain": - obj.BiomeMountain = string(data) - case "biome_ocean_arctic": - obj.BiomeOceanArctic = string(data) - case "biome_ocean_temperate": - obj.BiomeOceanTemperate = string(data) - case "biome_ocean_tropical": - obj.BiomeOceanTropical = string(data) - case "biome_pool_temperate_brackishwater": - obj.BiomePoolTemperateBrackishwater = string(data) - case "biome_pool_temperate_freshwater": - obj.BiomePoolTemperateFreshwater = string(data) - case "biome_pool_temperate_saltwater": - obj.BiomePoolTemperateSaltwater = string(data) - case "biome_pool_tropical_brackishwater": - obj.BiomePoolTropicalBrackishwater = string(data) - case "biome_pool_tropical_freshwater": - obj.BiomePoolTropicalFreshwater = string(data) - case "biome_pool_tropical_saltwater": - obj.BiomePoolTropicalSaltwater = string(data) - case "biome_river_temperate_brackishwater": - obj.BiomeRiverTemperateBrackishwater = string(data) - case "biome_river_temperate_freshwater": - obj.BiomeRiverTemperateFreshwater = string(data) - case "biome_river_temperate_saltwater": - obj.BiomeRiverTemperateSaltwater = string(data) - case "biome_river_tropical_brackishwater": - obj.BiomeRiverTropicalBrackishwater = string(data) - case "biome_river_tropical_freshwater": - obj.BiomeRiverTropicalFreshwater = string(data) - case "biome_river_tropical_saltwater": - obj.BiomeRiverTropicalSaltwater = string(data) - case "biome_savanna_temperate": - obj.BiomeSavannaTemperate = string(data) - case "biome_savanna_tropical": - obj.BiomeSavannaTropical = string(data) - case "biome_shrubland_temperate": - obj.BiomeShrublandTemperate = string(data) - case "biome_shrubland_tropical": - obj.BiomeShrublandTropical = string(data) - case "biome_subterranean_chasm": - obj.BiomeSubterraneanChasm = string(data) - case "biome_subterranean_lava": - obj.BiomeSubterraneanLava = string(data) - case "biome_subterranean_water": - obj.BiomeSubterraneanWater = string(data) - case "biome_swamp_mangrove": - obj.BiomeSwampMangrove = string(data) - case "biome_swamp_temperate_freshwater": - obj.BiomeSwampTemperateFreshwater = string(data) - case "biome_swamp_temperate_saltwater": - obj.BiomeSwampTemperateSaltwater = string(data) - case "biome_swamp_tropical_freshwater": - obj.BiomeSwampTropicalFreshwater = string(data) - case "biome_swamp_tropical_saltwater": - obj.BiomeSwampTropicalSaltwater = string(data) - case "biome_tundra": - obj.BiomeTundra = string(data) - case "creature_id": - obj.CreatureId = string(data) - case "does_not_exist": - obj.DoesNotExist = string(data) - case "equipment": - obj.Equipment = string(data) - case "equipment_wagon": - obj.EquipmentWagon = string(data) - case "evil": - obj.Evil = string(data) - case "fanciful": - obj.Fanciful = string(data) - case "generated": - obj.Generated = string(data) - case "good": - obj.Good = string(data) - case "has_any_benign": - obj.HasAnyBenign = string(data) - case "has_any_can_swim": - obj.HasAnyCanSwim = string(data) - case "has_any_cannot_breathe_air": - obj.HasAnyCannotBreatheAir = string(data) - case "has_any_cannot_breathe_water": - obj.HasAnyCannotBreatheWater = string(data) - case "has_any_carnivore": - obj.HasAnyCarnivore = string(data) - case "has_any_common_domestic": - obj.HasAnyCommonDomestic = string(data) - case "has_any_curious_beast": - obj.HasAnyCuriousBeast = string(data) - case "has_any_demon": - obj.HasAnyDemon = string(data) - case "has_any_feature_beast": - obj.HasAnyFeatureBeast = string(data) - case "has_any_flier": - obj.HasAnyFlier = string(data) - case "has_any_fly_race_gait": - obj.HasAnyFlyRaceGait = string(data) - case "has_any_grasp": - obj.HasAnyGrasp = string(data) - case "has_any_grazer": - obj.HasAnyGrazer = string(data) - case "has_any_has_blood": - obj.HasAnyHasBlood = string(data) - case "has_any_immobile": - obj.HasAnyImmobile = string(data) - case "has_any_intelligent_learns": - obj.HasAnyIntelligentLearns = string(data) - case "has_any_intelligent_speaks": - obj.HasAnyIntelligentSpeaks = string(data) - case "has_any_large_predator": - obj.HasAnyLargePredator = string(data) - case "has_any_local_pops_controllable": - obj.HasAnyLocalPopsControllable = string(data) - case "has_any_local_pops_produce_heroes": - obj.HasAnyLocalPopsProduceHeroes = string(data) - case "has_any_megabeast": - obj.HasAnyMegabeast = string(data) - case "has_any_mischievous": - obj.HasAnyMischievous = string(data) - case "has_any_natural_animal": - obj.HasAnyNaturalAnimal = string(data) - case "has_any_night_creature": - obj.HasAnyNightCreature = string(data) - case "has_any_night_creature_bogeyman": - obj.HasAnyNightCreatureBogeyman = string(data) - case "has_any_night_creature_hunter": - obj.HasAnyNightCreatureHunter = string(data) - case "has_any_night_creature_nightmare": - obj.HasAnyNightCreatureNightmare = string(data) - case "has_any_not_fireimmune": - obj.HasAnyNotFireimmune = string(data) - case "has_any_not_living": - obj.HasAnyNotLiving = string(data) - case "has_any_outsider_controllable": - obj.HasAnyOutsiderControllable = string(data) - case "has_any_race_gait": - obj.HasAnyRaceGait = string(data) - case "has_any_semimegabeast": - obj.HasAnySemimegabeast = string(data) - case "has_any_slow_learner": - obj.HasAnySlowLearner = string(data) - case "has_any_supernatural": - obj.HasAnySupernatural = string(data) - case "has_any_titan": - obj.HasAnyTitan = string(data) - case "has_any_unique_demon": - obj.HasAnyUniqueDemon = string(data) - case "has_any_utterances": - obj.HasAnyUtterances = string(data) - case "has_any_vermin_hateable": - obj.HasAnyVerminHateable = string(data) - case "has_any_vermin_micro": - obj.HasAnyVerminMicro = string(data) - case "has_female": - obj.HasFemale = string(data) - case "has_male": - obj.HasMale = string(data) - case "large_roaming": - obj.LargeRoaming = string(data) - case "loose_clusters": - obj.LooseClusters = string(data) - case "mates_to_breed": - obj.MatesToBreed = string(data) - case "mundane": - obj.Mundane = string(data) - case "name_plural": - obj.NamePlural = string(data) - case "name_singular": - obj.NameSingular = string(data) - case "occurs_as_entity_race": - obj.OccursAsEntityRace = string(data) - case "savage": - obj.Savage = string(data) - case "small_race": - obj.SmallRace = string(data) - case "two_genders": - obj.TwoGenders = string(data) - case "ubiquitous": - obj.Ubiquitous = string(data) - case "vermin_eater": - obj.VerminEater = string(data) - case "vermin_fish": - obj.VerminFish = string(data) - case "vermin_grounder": - obj.VerminGrounder = string(data) - case "vermin_rotter": - obj.VerminRotter = string(data) - case "vermin_soil": - obj.VerminSoil = string(data) - case "vermin_soil_colony": - obj.VerminSoilColony = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseDanceForm(d *xml.Decoder, start *xml.StartElement) (*DanceForm, error) { - var ( - obj = DanceForm{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "description": - data = nil - case "id": - data = nil - case "name": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "description": - obj.Description = string(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseDfWorld(d *xml.Decoder, start *xml.StartElement) (*DfWorld, error) { - var ( - obj = DfWorld{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "altname": - data = nil - case "artifacts": - obj.Artifacts = make(map[int]*Artifact) -parseMap(d, &obj.Artifacts, parseArtifact) - case "creature_raw": - parseArray(d, &obj.CreatureRaw, parseCreature) - case "dance_forms": - obj.DanceForms = make(map[int]*DanceForm) -parseMap(d, &obj.DanceForms, parseDanceForm) - case "entities": - obj.Entities = make(map[int]*Entity) -parseMap(d, &obj.Entities, parseEntity) - case "entity_populations": - obj.EntityPopulations = make(map[int]*EntityPopulation) -parseMap(d, &obj.EntityPopulations, parseEntityPopulation) - case "historical_eras": - parseArray(d, &obj.HistoricalEras, parseHistoricalEra) - case "historical_event_collections": - obj.HistoricalEventCollections = make(map[int]*HistoricalEventCollection) -parseMap(d, &obj.HistoricalEventCollections, parseHistoricalEventCollection) - case "historical_event_relationship_supplements": - parseArray(d, &obj.HistoricalEventRelationshipSupplements, parseHistoricalEventRelationshipSupplement) - case "historical_event_relationships": - parseArray(d, &obj.HistoricalEventRelationships, parseHistoricalEventRelationship) - case "historical_events": - obj.HistoricalEvents = make(map[int]*HistoricalEvent) -parseMap(d, &obj.HistoricalEvents, parseHistoricalEvent) - case "historical_figures": - obj.HistoricalFigures = make(map[int]*HistoricalFigure) -parseMap(d, &obj.HistoricalFigures, parseHistoricalFigure) - case "identities": - obj.Identities = make(map[int]*Identity) -parseMap(d, &obj.Identities, parseIdentity) - case "landmasses": - obj.Landmasses = make(map[int]*Landmass) -parseMap(d, &obj.Landmasses, parseLandmass) - case "mountain_peaks": - obj.MountainPeaks = make(map[int]*MountainPeak) -parseMap(d, &obj.MountainPeaks, parseMountainPeak) - case "musical_forms": - obj.MusicalForms = make(map[int]*MusicalForm) -parseMap(d, &obj.MusicalForms, parseMusicalForm) - case "name": - data = nil - case "poetic_forms": - obj.PoeticForms = make(map[int]*PoeticForm) -parseMap(d, &obj.PoeticForms, parsePoeticForm) - case "regions": - obj.Regions = make(map[int]*Region) -parseMap(d, &obj.Regions, parseRegion) - case "rivers": - parseArray(d, &obj.Rivers, parseRiver) - case "sites": - obj.Sites = make(map[int]*Site) -parseMap(d, &obj.Sites, parseSite) - case "underground_regions": - obj.UndergroundRegions = make(map[int]*UndergroundRegion) -parseMap(d, &obj.UndergroundRegions, parseUndergroundRegion) - case "world_constructions": - obj.WorldConstructions = make(map[int]*WorldConstruction) -parseMap(d, &obj.WorldConstructions, parseWorldConstruction) - case "written_contents": - obj.WrittenContents = make(map[int]*WrittenContent) -parseMap(d, &obj.WrittenContents, parseWrittenContent) - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "altname": - obj.Altname = string(data) - case "artifacts": - - case "creature_raw": - - case "dance_forms": - - case "entities": - - case "entity_populations": - - case "historical_eras": - - case "historical_event_collections": - - case "historical_event_relationship_supplements": - - case "historical_event_relationships": - - case "historical_events": - - case "historical_figures": - - case "identities": - - case "landmasses": - - case "mountain_peaks": - - case "musical_forms": - - case "name": - obj.Name_ = string(data) - case "poetic_forms": - - case "regions": - - case "rivers": - - case "sites": - - case "underground_regions": - - case "world_constructions": - - case "written_contents": - - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseEntity(d *xml.Decoder, start *xml.StartElement) (*Entity, error) { - var ( - obj = Entity{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "child": - data = nil - case "claims": - data = nil - case "entity_link": - v, _ := parseEntityLink(d, &t) -obj.EntityLink = v - case "entity_position": - v, _ := parseEntityPosition(d, &t) -obj.EntityPosition = v - case "entity_position_assignment": - v, _ := parseEntityPositionAssignment(d, &t) -obj.EntityPositionAssignment = v - case "histfig_id": - data = nil - case "honor": - v, _ := parseHonor(d, &t) -obj.Honor = v - case "id": - data = nil - case "name": - data = nil - case "occasion": - v, _ := parseOccasion(d, &t) -obj.Occasion = v - case "profession": - data = nil - case "race": - data = nil - case "type": - data = nil - case "weapon": - data = nil - case "worship_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "child": - obj.Child = n(data) - case "claims": - obj.Claims = string(data) - case "entity_link": - - case "entity_position": - - case "entity_position_assignment": - - case "histfig_id": - obj.HistfigId = n(data) - case "honor": - - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "occasion": - - case "profession": - obj.Profession = string(data) - case "race": - obj.Race = string(data) - case "type": - obj.Type = string(data) - case "weapon": - obj.Weapon = string(data) - case "worship_id": - obj.WorshipId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseEntityFormerPositionLink(d *xml.Decoder, start *xml.StartElement) (*EntityFormerPositionLink, error) { - var ( - obj = EntityFormerPositionLink{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "end_year": - data = nil - case "entity_id": - data = nil - case "position_profile_id": - data = nil - case "start_year": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "end_year": - obj.EndYear = n(data) - case "entity_id": - obj.EntityId = n(data) - case "position_profile_id": - obj.PositionProfileId = n(data) - case "start_year": - obj.StartYear = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseEntityLink(d *xml.Decoder, start *xml.StartElement) (*EntityLink, error) { - var ( - obj = EntityLink{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "strength": - data = nil - case "target": - data = nil - case "type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "strength": - obj.Strength = n(data) - case "target": - obj.Target = n(data) - case "type": - obj.Type = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseEntityPopulation(d *xml.Decoder, start *xml.StartElement) (*EntityPopulation, error) { - var ( - obj = EntityPopulation{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "id": - data = nil - case "race": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "id": - obj.Id_ = n(data) - case "race": - obj.Race = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseEntityPosition(d *xml.Decoder, start *xml.StartElement) (*EntityPosition, error) { - var ( - obj = EntityPosition{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "id": - data = nil - case "name": - data = nil - case "name_female": - data = nil - case "name_male": - data = nil - case "spouse": - data = nil - case "spouse_female": - data = nil - case "spouse_male": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "name_female": - obj.NameFemale = string(data) - case "name_male": - obj.NameMale = string(data) - case "spouse": - obj.Spouse = string(data) - case "spouse_female": - obj.SpouseFemale = string(data) - case "spouse_male": - obj.SpouseMale = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseEntityPositionAssignment(d *xml.Decoder, start *xml.StartElement) (*EntityPositionAssignment, error) { - var ( - obj = EntityPositionAssignment{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "histfig": - data = nil - case "id": - data = nil - case "position_id": - data = nil - case "squad_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "histfig": - obj.Histfig = n(data) - case "id": - obj.Id_ = n(data) - case "position_id": - obj.PositionId = n(data) - case "squad_id": - obj.SquadId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseEntityPositionLink(d *xml.Decoder, start *xml.StartElement) (*EntityPositionLink, error) { - var ( - obj = EntityPositionLink{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "position_profile_id": - data = nil - case "start_year": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "position_profile_id": - obj.PositionProfileId = n(data) - case "start_year": - obj.StartYear = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseEntityReputation(d *xml.Decoder, start *xml.StartElement) (*EntityReputation, error) { - var ( - obj = EntityReputation{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "first_ageless_season_count": - data = nil - case "first_ageless_year": - data = nil - case "unsolved_murders": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "first_ageless_season_count": - obj.FirstAgelessSeasonCount = n(data) - case "first_ageless_year": - obj.FirstAgelessYear = n(data) - case "unsolved_murders": - obj.UnsolvedMurders = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseEntitySquadLink(d *xml.Decoder, start *xml.StartElement) (*EntitySquadLink, error) { - var ( - obj = EntitySquadLink{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "squad_id": - data = nil - case "squad_position": - data = nil - case "start_year": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "squad_id": - obj.SquadId = n(data) - case "squad_position": - obj.SquadPosition = n(data) - case "start_year": - obj.StartYear = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseFeature(d *xml.Decoder, start *xml.StartElement) (*Feature, error) { - var ( - obj = Feature{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "reference": - data = nil - case "type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "reference": - obj.Reference = n(data) - case "type": - obj.Type = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHfLink(d *xml.Decoder, start *xml.StartElement) (*HfLink, error) { - var ( - obj = HfLink{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hfid": - data = nil - case "link_strength": - data = nil - case "link_type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "hfid": - obj.Hfid = n(data) - case "link_strength": - obj.LinkStrength = n(data) - case "link_type": - obj.LinkType = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHfSkill(d *xml.Decoder, start *xml.StartElement) (*HfSkill, error) { - var ( - obj = HfSkill{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "skill": - data = nil - case "total_ip": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "skill": - obj.Skill = string(data) - case "total_ip": - obj.TotalIp = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEra(d *xml.Decoder, start *xml.StartElement) (*HistoricalEra, error) { - var ( - obj = HistoricalEra{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "name": - data = nil - case "start_year": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "name": - obj.Name_ = string(data) - case "start_year": - obj.StartYear = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEvent(d *xml.Decoder, start *xml.StartElement) (*HistoricalEvent, error) { - var ( - obj = HistoricalEvent{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "id": - data = nil - case "seconds72": - data = nil - case "type": - data = nil - case "year": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "id": - obj.Id_ = n(data) - case "seconds72": - obj.Seconds72 = n(data) - case "type": - var err error - switch strcase.ToCamel(string(data)) { - case "AddHfEntityHonor": - obj.Details, err = parseHistoricalEventAddHfEntityHonor(d, start) - case "AddHfEntityLink": - obj.Details, err = parseHistoricalEventAddHfEntityLink(d, start) - case "AddHfHfLink": - obj.Details, err = parseHistoricalEventAddHfHfLink(d, start) - case "AddHfSiteLink": - obj.Details, err = parseHistoricalEventAddHfSiteLink(d, start) - case "AgreementFormed": - obj.Details, err = parseHistoricalEventAgreementFormed(d, start) - case "ArtifactClaimFormed": - obj.Details, err = parseHistoricalEventArtifactClaimFormed(d, start) - case "ArtifactCopied": - obj.Details, err = parseHistoricalEventArtifactCopied(d, start) - case "ArtifactCreated": - obj.Details, err = parseHistoricalEventArtifactCreated(d, start) - case "ArtifactDestroyed": - obj.Details, err = parseHistoricalEventArtifactDestroyed(d, start) - case "ArtifactFound": - obj.Details, err = parseHistoricalEventArtifactFound(d, start) - case "ArtifactGiven": - obj.Details, err = parseHistoricalEventArtifactGiven(d, start) - case "ArtifactLost": - obj.Details, err = parseHistoricalEventArtifactLost(d, start) - case "ArtifactPossessed": - obj.Details, err = parseHistoricalEventArtifactPossessed(d, start) - case "ArtifactRecovered": - obj.Details, err = parseHistoricalEventArtifactRecovered(d, start) - case "ArtifactStored": - obj.Details, err = parseHistoricalEventArtifactStored(d, start) - case "AssumeIdentity": - obj.Details, err = parseHistoricalEventAssumeIdentity(d, start) - case "AttackedSite": - obj.Details, err = parseHistoricalEventAttackedSite(d, start) - case "BodyAbused": - obj.Details, err = parseHistoricalEventBodyAbused(d, start) - case "BuildingProfileAcquired": - obj.Details, err = parseHistoricalEventBuildingProfileAcquired(d, start) - case "Ceremony": - obj.Details, err = parseHistoricalEventCeremony(d, start) - case "ChangeCreatureType": - obj.Details, err = parseHistoricalEventChangeCreatureType(d, start) - case "ChangeHfBodyState": - obj.Details, err = parseHistoricalEventChangeHfBodyState(d, start) - case "ChangeHfJob": - obj.Details, err = parseHistoricalEventChangeHfJob(d, start) - case "ChangeHfState": - obj.Details, err = parseHistoricalEventChangeHfState(d, start) - case "ChangedCreatureType": - obj.Details, err = parseHistoricalEventChangedCreatureType(d, start) - case "Competition": - obj.Details, err = parseHistoricalEventCompetition(d, start) - case "CreateEntityPosition": - obj.Details, err = parseHistoricalEventCreateEntityPosition(d, start) - case "CreatedBuilding": - obj.Details, err = parseHistoricalEventCreatedBuilding(d, start) - case "CreatedSite": - obj.Details, err = parseHistoricalEventCreatedSite(d, start) - case "CreatedStructure": - obj.Details, err = parseHistoricalEventCreatedStructure(d, start) - case "CreatedWorldConstruction": - obj.Details, err = parseHistoricalEventCreatedWorldConstruction(d, start) - case "CreatureDevoured": - obj.Details, err = parseHistoricalEventCreatureDevoured(d, start) - case "DanceFormCreated": - obj.Details, err = parseHistoricalEventDanceFormCreated(d, start) - case "DestroyedSite": - obj.Details, err = parseHistoricalEventDestroyedSite(d, start) - case "EntityAction": - obj.Details, err = parseHistoricalEventEntityAction(d, start) - case "EntityAllianceFormed": - obj.Details, err = parseHistoricalEventEntityAllianceFormed(d, start) - case "EntityBreachFeatureLayer": - obj.Details, err = parseHistoricalEventEntityBreachFeatureLayer(d, start) - case "EntityCreated": - obj.Details, err = parseHistoricalEventEntityCreated(d, start) - case "EntityDissolved": - obj.Details, err = parseHistoricalEventEntityDissolved(d, start) - case "EntityEquipmentPurchase": - obj.Details, err = parseHistoricalEventEntityEquipmentPurchase(d, start) - case "EntityIncorporated": - obj.Details, err = parseHistoricalEventEntityIncorporated(d, start) - case "EntityLaw": - obj.Details, err = parseHistoricalEventEntityLaw(d, start) - case "EntityOverthrown": - obj.Details, err = parseHistoricalEventEntityOverthrown(d, start) - case "EntityPersecuted": - obj.Details, err = parseHistoricalEventEntityPersecuted(d, start) - case "EntityPrimaryCriminals": - obj.Details, err = parseHistoricalEventEntityPrimaryCriminals(d, start) - case "EntityRelocate": - obj.Details, err = parseHistoricalEventEntityRelocate(d, start) - case "FailedFrameAttempt": - obj.Details, err = parseHistoricalEventFailedFrameAttempt(d, start) - case "FailedIntrigueCorruption": - obj.Details, err = parseHistoricalEventFailedIntrigueCorruption(d, start) - case "FieldBattle": - obj.Details, err = parseHistoricalEventFieldBattle(d, start) - case "Gamble": - obj.Details, err = parseHistoricalEventGamble(d, start) - case "HfAbducted": - obj.Details, err = parseHistoricalEventHfAbducted(d, start) - case "HfActOnBuilding": - obj.Details, err = parseHistoricalEventHfActOnBuilding(d, start) - case "HfAttackedSite": - obj.Details, err = parseHistoricalEventHfAttackedSite(d, start) - case "HfConfronted": - obj.Details, err = parseHistoricalEventHfConfronted(d, start) - case "HfConvicted": - obj.Details, err = parseHistoricalEventHfConvicted(d, start) - case "HfDestroyedSite": - obj.Details, err = parseHistoricalEventHfDestroyedSite(d, start) - case "HfDied": - obj.Details, err = parseHistoricalEventHfDied(d, start) - case "HfDisturbedStructure": - obj.Details, err = parseHistoricalEventHfDisturbedStructure(d, start) - case "HfDoesInteraction": - obj.Details, err = parseHistoricalEventHfDoesInteraction(d, start) - case "HfEnslaved": - obj.Details, err = parseHistoricalEventHfEnslaved(d, start) - case "HfEquipmentPurchase": - obj.Details, err = parseHistoricalEventHfEquipmentPurchase(d, start) - case "HfGainsSecretGoal": - obj.Details, err = parseHistoricalEventHfGainsSecretGoal(d, start) - case "HfInterrogated": - obj.Details, err = parseHistoricalEventHfInterrogated(d, start) - case "HfLearnsSecret": - obj.Details, err = parseHistoricalEventHfLearnsSecret(d, start) - case "HfNewPet": - obj.Details, err = parseHistoricalEventHfNewPet(d, start) - case "HfPerformedHorribleExperiments": - obj.Details, err = parseHistoricalEventHfPerformedHorribleExperiments(d, start) - case "HfPrayedInsideStructure": - obj.Details, err = parseHistoricalEventHfPrayedInsideStructure(d, start) - case "HfPreach": - obj.Details, err = parseHistoricalEventHfPreach(d, start) - case "HfProfanedStructure": - obj.Details, err = parseHistoricalEventHfProfanedStructure(d, start) - case "HfRecruitedUnitTypeForEntity": - obj.Details, err = parseHistoricalEventHfRecruitedUnitTypeForEntity(d, start) - case "HfRelationshipDenied": - obj.Details, err = parseHistoricalEventHfRelationshipDenied(d, start) - case "HfReunion": - obj.Details, err = parseHistoricalEventHfReunion(d, start) - case "HfRevived": - obj.Details, err = parseHistoricalEventHfRevived(d, start) - case "HfSimpleBattleEvent": - obj.Details, err = parseHistoricalEventHfSimpleBattleEvent(d, start) - case "HfTravel": - obj.Details, err = parseHistoricalEventHfTravel(d, start) - case "HfViewedArtifact": - obj.Details, err = parseHistoricalEventHfViewedArtifact(d, start) - case "HfWounded": - obj.Details, err = parseHistoricalEventHfWounded(d, start) - case "HfsFormedIntrigueRelationship": - obj.Details, err = parseHistoricalEventHfsFormedIntrigueRelationship(d, start) - case "HfsFormedReputationRelationship": - obj.Details, err = parseHistoricalEventHfsFormedReputationRelationship(d, start) - case "HistFigureDied": - obj.Details, err = parseHistoricalEventHistFigureDied(d, start) - case "HistFigureNewPet": - obj.Details, err = parseHistoricalEventHistFigureNewPet(d, start) - case "HistFigureWounded": - obj.Details, err = parseHistoricalEventHistFigureWounded(d, start) - case "HolyCityDeclaration": - obj.Details, err = parseHistoricalEventHolyCityDeclaration(d, start) - case "ItemStolen": - obj.Details, err = parseHistoricalEventItemStolen(d, start) - case "KnowledgeDiscovered": - obj.Details, err = parseHistoricalEventKnowledgeDiscovered(d, start) - case "ModifiedBuilding": - obj.Details, err = parseHistoricalEventModifiedBuilding(d, start) - case "MusicalFormCreated": - obj.Details, err = parseHistoricalEventMusicalFormCreated(d, start) - case "NewSiteLeader": - obj.Details, err = parseHistoricalEventNewSiteLeader(d, start) - case "PeaceAccepted": - obj.Details, err = parseHistoricalEventPeaceAccepted(d, start) - case "PeaceRejected": - obj.Details, err = parseHistoricalEventPeaceRejected(d, start) - case "Performance": - obj.Details, err = parseHistoricalEventPerformance(d, start) - case "PlunderedSite": - obj.Details, err = parseHistoricalEventPlunderedSite(d, start) - case "PoeticFormCreated": - obj.Details, err = parseHistoricalEventPoeticFormCreated(d, start) - case "Procession": - obj.Details, err = parseHistoricalEventProcession(d, start) - case "RazedStructure": - obj.Details, err = parseHistoricalEventRazedStructure(d, start) - case "ReclaimSite": - obj.Details, err = parseHistoricalEventReclaimSite(d, start) - case "RegionpopIncorporatedIntoEntity": - obj.Details, err = parseHistoricalEventRegionpopIncorporatedIntoEntity(d, start) - case "RemoveHfEntityLink": - obj.Details, err = parseHistoricalEventRemoveHfEntityLink(d, start) - case "RemoveHfHfLink": - obj.Details, err = parseHistoricalEventRemoveHfHfLink(d, start) - case "RemoveHfSiteLink": - obj.Details, err = parseHistoricalEventRemoveHfSiteLink(d, start) - case "ReplacedBuilding": - obj.Details, err = parseHistoricalEventReplacedBuilding(d, start) - case "ReplacedStructure": - obj.Details, err = parseHistoricalEventReplacedStructure(d, start) - case "SiteDispute": - obj.Details, err = parseHistoricalEventSiteDispute(d, start) - case "SiteTakenOver": - obj.Details, err = parseHistoricalEventSiteTakenOver(d, start) - case "Trade": - obj.Details, err = parseHistoricalEventTrade(d, start) - case "WarPeaceAccepted": - obj.Details, err = parseHistoricalEventWarPeaceAccepted(d, start) - case "WarPeaceRejected": - obj.Details, err = parseHistoricalEventWarPeaceRejected(d, start) - case "WrittenContentComposed": - obj.Details, err = parseHistoricalEventWrittenContentComposed(d, start) - default: - d.Skip() - } - if err != nil { - return nil, err - } - return &obj, nil - case "year": - obj.Year = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventAddHfEntityHonor(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAddHfEntityHonor, error) { - var ( - obj = HistoricalEventAddHfEntityHonor{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "hfid": - data = nil - case "honor_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "hfid": - obj.Hfid = n(data) - case "honor_id": - obj.HonorId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventAddHfEntityLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAddHfEntityLink, error) { - var ( - obj = HistoricalEventAddHfEntityLink{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "appointer_hfid": - data = nil - case "civ": - data = nil - case "civ_id": - data = nil - case "hfid": - data = nil - case "histfig": - data = nil - case "link": - data = nil - case "link_type": - data = nil - case "position": - data = nil - case "position_id": - data = nil - case "promise_to_hfid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "appointer_hfid": - obj.AppointerHfid = n(data) - case "civ": - obj.Civ = n(data) - case "civ_id": - obj.CivId = n(data) - case "hfid": - obj.Hfid = n(data) - case "histfig": - obj.Histfig = n(data) - case "link": - obj.Link = string(data) - case "link_type": - obj.LinkType = string(data) - case "position": - obj.Position = string(data) - case "position_id": - obj.PositionId = n(data) - case "promise_to_hfid": - obj.PromiseToHfid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventAddHfHfLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAddHfHfLink, error) { - var ( - obj = HistoricalEventAddHfHfLink{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hf": - data = nil - case "hf_target": - data = nil - case "hfid": - data = nil - case "hfid_target": - data = nil - case "link_type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "hf": - obj.Hf = n(data) - case "hf_target": - obj.HfTarget = n(data) - case "hfid": - obj.Hfid = n(data) - case "hfid_target": - obj.HfidTarget = n(data) - case "link_type": - obj.LinkType = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventAddHfSiteLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAddHfSiteLink, error) { - var ( - obj = HistoricalEventAddHfSiteLink{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ": - data = nil - case "histfig": - data = nil - case "link_type": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "structure": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ": - obj.Civ = n(data) - case "histfig": - obj.Histfig = n(data) - case "link_type": - obj.LinkType = string(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure": - obj.Structure = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventAgreementFormed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAgreementFormed, error) { - var ( - obj = HistoricalEventAgreementFormed{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "action": - data = nil - case "agreement_id": - data = nil - case "ally_defense_bonus": - data = nil - case "coconspirator_bonus": - data = nil - case "delegated": - data = nil - case "failed_judgment_test": - data = nil - case "method": - data = nil - case "relevant_entity_id": - data = nil - case "relevant_id_for_method": - data = nil - case "relevant_position_profile_id": - data = nil - case "successful": - data = nil - case "top_facet": - data = nil - case "top_facet_modifier": - data = nil - case "top_facet_rating": - data = nil - case "top_relationship_factor": - data = nil - case "top_relationship_modifier": - data = nil - case "top_relationship_rating": - data = nil - case "top_value": - data = nil - case "top_value_modifier": - data = nil - case "top_value_rating": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "action": - obj.Action = string(data) - case "agreement_id": - obj.AgreementId = n(data) - case "ally_defense_bonus": - obj.AllyDefenseBonus = n(data) - case "coconspirator_bonus": - obj.CoconspiratorBonus = n(data) - case "delegated": - obj.Delegated = string(data) - case "failed_judgment_test": - obj.FailedJudgmentTest = string(data) - case "method": - obj.Method = string(data) - case "relevant_entity_id": - obj.RelevantEntityId = n(data) - case "relevant_id_for_method": - obj.RelevantIdForMethod = n(data) - case "relevant_position_profile_id": - obj.RelevantPositionProfileId = n(data) - case "successful": - obj.Successful = string(data) - case "top_facet": - obj.TopFacet = string(data) - case "top_facet_modifier": - obj.TopFacetModifier = n(data) - case "top_facet_rating": - obj.TopFacetRating = n(data) - case "top_relationship_factor": - obj.TopRelationshipFactor = string(data) - case "top_relationship_modifier": - obj.TopRelationshipModifier = n(data) - case "top_relationship_rating": - obj.TopRelationshipRating = n(data) - case "top_value": - obj.TopValue = string(data) - case "top_value_modifier": - obj.TopValueModifier = n(data) - case "top_value_rating": - obj.TopValueRating = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventArtifactClaimFormed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactClaimFormed, error) { - var ( - obj = HistoricalEventArtifactClaimFormed{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "circumstance": - data = nil - case "claim": - data = nil - case "entity_id": - data = nil - case "hist_figure_id": - data = nil - case "position_profile_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "circumstance": - obj.Circumstance = string(data) - case "claim": - obj.Claim = string(data) - case "entity_id": - obj.EntityId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "position_profile_id": - obj.PositionProfileId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventArtifactCopied(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactCopied, error) { - var ( - obj = HistoricalEventArtifactCopied{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "dest_entity_id": - data = nil - case "dest_site_id": - data = nil - case "dest_structure_id": - data = nil - case "from_original": - data = nil - case "source_entity_id": - data = nil - case "source_site_id": - data = nil - case "source_structure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "dest_entity_id": - obj.DestEntityId = n(data) - case "dest_site_id": - obj.DestSiteId = n(data) - case "dest_structure_id": - obj.DestStructureId = n(data) - case "from_original": - obj.FromOriginal = string(data) - case "source_entity_id": - obj.SourceEntityId = n(data) - case "source_site_id": - obj.SourceSiteId = n(data) - case "source_structure_id": - obj.SourceStructureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventArtifactCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactCreated, error) { - var ( - obj = HistoricalEventArtifactCreated{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "circumstance": - v, _ := parseCircumstance(d, &t) -obj.Circumstance = v - case "creator_hfid": - data = nil - case "creator_unit_id": - data = nil - case "hist_figure_id": - data = nil - case "name_only": - data = nil - case "reason": - data = nil - case "sanctify_hf": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "unit_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "circumstance": - - case "creator_hfid": - obj.CreatorHfid = n(data) - case "creator_unit_id": - obj.CreatorUnitId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "name_only": - obj.NameOnly = string(data) - case "reason": - obj.Reason = string(data) - case "sanctify_hf": - obj.SanctifyHf = n(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "unit_id": - obj.UnitId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventArtifactDestroyed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactDestroyed, error) { - var ( - obj = HistoricalEventArtifactDestroyed{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "destroyer_enid": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "destroyer_enid": - obj.DestroyerEnid = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventArtifactFound(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactFound, error) { - var ( - obj = HistoricalEventArtifactFound{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "hist_figure_id": - data = nil - case "site_id": - data = nil - case "unit_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "site_id": - obj.SiteId = n(data) - case "unit_id": - obj.UnitId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventArtifactGiven(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactGiven, error) { - var ( - obj = HistoricalEventArtifactGiven{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "giver_entity_id": - data = nil - case "giver_hist_figure_id": - data = nil - case "receiver_entity_id": - data = nil - case "receiver_hist_figure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "giver_entity_id": - obj.GiverEntityId = n(data) - case "giver_hist_figure_id": - obj.GiverHistFigureId = n(data) - case "receiver_entity_id": - obj.ReceiverEntityId = n(data) - case "receiver_hist_figure_id": - obj.ReceiverHistFigureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventArtifactLost(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactLost, error) { - var ( - obj = HistoricalEventArtifactLost{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "site_id": - data = nil - case "site_property_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "site_id": - obj.SiteId = n(data) - case "site_property_id": - obj.SitePropertyId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventArtifactPossessed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactPossessed, error) { - var ( - obj = HistoricalEventArtifactPossessed{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "circumstance": - data = nil - case "circumstance_id": - data = nil - case "feature_layer_id": - data = nil - case "hist_figure_id": - data = nil - case "reason": - data = nil - case "reason_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "unit_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "circumstance": - obj.Circumstance = string(data) - case "circumstance_id": - obj.CircumstanceId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "reason": - obj.Reason = string(data) - case "reason_id": - obj.ReasonId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "unit_id": - obj.UnitId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventArtifactRecovered(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactRecovered, error) { - var ( - obj = HistoricalEventArtifactRecovered{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "feature_layer_id": - data = nil - case "hist_figure_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - case "subregion_id": - data = nil - case "unit_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "unit_id": - obj.UnitId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventArtifactStored(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactStored, error) { - var ( - obj = HistoricalEventArtifactStored{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "hist_figure_id": - data = nil - case "site_id": - data = nil - case "unit_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "site_id": - obj.SiteId = n(data) - case "unit_id": - obj.UnitId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventAssumeIdentity(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAssumeIdentity, error) { - var ( - obj = HistoricalEventAssumeIdentity{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "identity_caste": - data = nil - case "identity_histfig_id": - data = nil - case "identity_id": - data = nil - case "identity_name": - data = nil - case "identity_nemesis_id": - data = nil - case "identity_race": - data = nil - case "target": - data = nil - case "target_enid": - data = nil - case "trickster": - data = nil - case "trickster_hfid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "identity_caste": - obj.IdentityCaste = string(data) - case "identity_histfig_id": - obj.IdentityHistfigId = n(data) - case "identity_id": - obj.IdentityId = n(data) - case "identity_name": - obj.IdentityName = string(data) - case "identity_nemesis_id": - obj.IdentityNemesisId = n(data) - case "identity_race": - obj.IdentityRace = string(data) - case "target": - obj.Target = n(data) - case "target_enid": - obj.TargetEnid = n(data) - case "trickster": - obj.Trickster = n(data) - case "trickster_hfid": - obj.TricksterHfid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventAttackedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAttackedSite, error) { - var ( - obj = HistoricalEventAttackedSite{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "a_support_merc_enid": - data = nil - case "attacker_civ_id": - data = nil - case "attacker_general_hfid": - data = nil - case "attacker_merc_enid": - data = nil - case "d_support_merc_enid": - data = nil - case "defender_civ_id": - data = nil - case "defender_general_hfid": - data = nil - case "defender_merc_enid": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "a_support_merc_enid": - obj.ASupportMercEnid = n(data) - case "attacker_civ_id": - obj.AttackerCivId = n(data) - case "attacker_general_hfid": - obj.AttackerGeneralHfid = n(data) - case "attacker_merc_enid": - obj.AttackerMercEnid = n(data) - case "d_support_merc_enid": - obj.DSupportMercEnid = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "defender_general_hfid": - obj.DefenderGeneralHfid = n(data) - case "defender_merc_enid": - obj.DefenderMercEnid = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventBodyAbused(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventBodyAbused, error) { - var ( - obj = HistoricalEventBodyAbused{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "abuse_type": - data = nil - case "bodies": - data = nil - case "civ": - data = nil - case "coords": - data = nil - case "feature_layer_id": - data = nil - case "histfig": - data = nil - case "interaction": - data = nil - case "item_mat": - data = nil - case "item_subtype": - data = nil - case "item_type": - data = nil - case "pile_type": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "structure": - data = nil - case "subregion_id": - data = nil - case "tree": - data = nil - case "victim_entity": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "abuse_type": - obj.AbuseType = string(data) - case "bodies": - obj.Bodies = n(data) - case "civ": - obj.Civ = n(data) - case "coords": - obj.Coords = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "histfig": - obj.Histfig = n(data) - case "interaction": - obj.Interaction = n(data) - case "item_mat": - obj.ItemMat = string(data) - case "item_subtype": - obj.ItemSubtype = string(data) - case "item_type": - obj.ItemType = string(data) - case "pile_type": - obj.PileType = string(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure": - obj.Structure = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "tree": - obj.Tree = n(data) - case "victim_entity": - obj.VictimEntity = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventBuildingProfileAcquired(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventBuildingProfileAcquired, error) { - var ( - obj = HistoricalEventBuildingProfileAcquired{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "acquirer_enid": - data = nil - case "acquirer_hfid": - data = nil - case "building_profile_id": - data = nil - case "inherited": - data = nil - case "last_owner_hfid": - data = nil - case "purchased_unowned": - data = nil - case "rebuilt_ruined": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "acquirer_enid": - obj.AcquirerEnid = n(data) - case "acquirer_hfid": - obj.AcquirerHfid = n(data) - case "building_profile_id": - obj.BuildingProfileId = n(data) - case "inherited": - obj.Inherited = string(data) - case "last_owner_hfid": - obj.LastOwnerHfid = n(data) - case "purchased_unowned": - obj.PurchasedUnowned = string(data) - case "rebuilt_ruined": - obj.RebuiltRuined = string(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCeremony(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCeremony, error) { - var ( - obj = HistoricalEventCeremony{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "feature_layer_id": - data = nil - case "occasion_id": - data = nil - case "schedule_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "occasion_id": - obj.OccasionId = n(data) - case "schedule_id": - obj.ScheduleId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventChangeCreatureType(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangeCreatureType, error) { - var ( - obj = HistoricalEventChangeCreatureType{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "changee": - data = nil - case "changer": - data = nil - case "new_caste": - data = nil - case "new_race": - data = nil - case "old_caste": - data = nil - case "old_race": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "changee": - obj.Changee = n(data) - case "changer": - obj.Changer = n(data) - case "new_caste": - obj.NewCaste = n(data) - case "new_race": - obj.NewRace = string(data) - case "old_caste": - obj.OldCaste = n(data) - case "old_race": - obj.OldRace = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventChangeHfBodyState(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangeHfBodyState, error) { - var ( - obj = HistoricalEventChangeHfBodyState{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "body_state": - data = nil - case "coords": - data = nil - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "body_state": - obj.BodyState = string(data) - case "coords": - obj.Coords = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventChangeHfJob(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangeHfJob, error) { - var ( - obj = HistoricalEventChangeHfJob{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "new_job": - data = nil - case "old_job": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "new_job": - obj.NewJob = string(data) - case "old_job": - obj.OldJob = string(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventChangeHfState(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangeHfState, error) { - var ( - obj = HistoricalEventChangeHfState{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "mood": - data = nil - case "reason": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "state": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "mood": - obj.Mood = string(data) - case "reason": - obj.Reason = string(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "state": - obj.State = string(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventChangedCreatureType(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangedCreatureType, error) { - var ( - obj = HistoricalEventChangedCreatureType{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "changee_hfid": - data = nil - case "changer_hfid": - data = nil - case "new_caste": - data = nil - case "new_race": - data = nil - case "old_caste": - data = nil - case "old_race": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "changee_hfid": - obj.ChangeeHfid = n(data) - case "changer_hfid": - obj.ChangerHfid = n(data) - case "new_caste": - obj.NewCaste = string(data) - case "new_race": - obj.NewRace = string(data) - case "old_caste": - obj.OldCaste = string(data) - case "old_race": - obj.OldRace = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCompetition(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCompetition, error) { - var ( - obj = HistoricalEventCompetition{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "competitor_hfid": - data = nil - case "feature_layer_id": - data = nil - case "occasion_id": - data = nil - case "schedule_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "winner_hfid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "competitor_hfid": - obj.CompetitorHfid = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "occasion_id": - obj.OccasionId = n(data) - case "schedule_id": - obj.ScheduleId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "winner_hfid": - obj.WinnerHfid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCreateEntityPosition(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreateEntityPosition, error) { - var ( - obj = HistoricalEventCreateEntityPosition{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ": - data = nil - case "histfig": - data = nil - case "position": - data = nil - case "reason": - data = nil - case "site_civ": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ": - obj.Civ = n(data) - case "histfig": - obj.Histfig = n(data) - case "position": - obj.Position = string(data) - case "reason": - obj.Reason = string(data) - case "site_civ": - obj.SiteCiv = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCreatedBuilding(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatedBuilding, error) { - var ( - obj = HistoricalEventCreatedBuilding{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "builder_hf": - data = nil - case "civ": - data = nil - case "rebuild": - data = nil - case "site": - data = nil - case "site_civ": - data = nil - case "structure": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "builder_hf": - obj.BuilderHf = n(data) - case "civ": - obj.Civ = n(data) - case "rebuild": - obj.Rebuild = string(data) - case "site": - obj.Site = n(data) - case "site_civ": - obj.SiteCiv = n(data) - case "structure": - obj.Structure = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCreatedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatedSite, error) { - var ( - obj = HistoricalEventCreatedSite{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "builder_hfid": - data = nil - case "civ_id": - data = nil - case "resident_civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "builder_hfid": - obj.BuilderHfid = n(data) - case "civ_id": - obj.CivId = n(data) - case "resident_civ_id": - obj.ResidentCivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCreatedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatedStructure, error) { - var ( - obj = HistoricalEventCreatedStructure{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "builder_hfid": - data = nil - case "civ_id": - data = nil - case "rebuilt": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "builder_hfid": - obj.BuilderHfid = n(data) - case "civ_id": - obj.CivId = n(data) - case "rebuilt": - obj.Rebuilt = string(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCreatedWorldConstruction(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatedWorldConstruction, error) { - var ( - obj = HistoricalEventCreatedWorldConstruction{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "master_wcid": - data = nil - case "site_civ_id": - data = nil - case "site_id1": - data = nil - case "site_id2": - data = nil - case "wcid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "master_wcid": - obj.MasterWcid = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id1": - obj.SiteId1 = n(data) - case "site_id2": - obj.SiteId2 = n(data) - case "wcid": - obj.Wcid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCreatureDevoured(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatureDevoured, error) { - var ( - obj = HistoricalEventCreatureDevoured{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "caste": - data = nil - case "eater": - data = nil - case "entity": - data = nil - case "feature_layer_id": - data = nil - case "race": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "victim": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "caste": - obj.Caste = string(data) - case "eater": - obj.Eater = n(data) - case "entity": - obj.Entity = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "race": - obj.Race = string(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "victim": - obj.Victim = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventDanceFormCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventDanceFormCreated, error) { - var ( - obj = HistoricalEventDanceFormCreated{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "circumstance": - data = nil - case "circumstance_id": - data = nil - case "form_id": - data = nil - case "hist_figure_id": - data = nil - case "reason": - data = nil - case "reason_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "circumstance": - obj.Circumstance = string(data) - case "circumstance_id": - obj.CircumstanceId = n(data) - case "form_id": - obj.FormId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "reason": - obj.Reason = string(data) - case "reason_id": - obj.ReasonId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventDestroyedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventDestroyedSite, error) { - var ( - obj = HistoricalEventDestroyedSite{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacker_civ_id": - data = nil - case "defender_civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "attacker_civ_id": - obj.AttackerCivId = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventEntityAction(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityAction, error) { - var ( - obj = HistoricalEventEntityAction{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "action": - data = nil - case "entity": - data = nil - case "site": - data = nil - case "structure": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "action": - obj.Action = string(data) - case "entity": - obj.Entity = n(data) - case "site": - obj.Site = n(data) - case "structure": - obj.Structure = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventEntityAllianceFormed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityAllianceFormed, error) { - var ( - obj = HistoricalEventEntityAllianceFormed{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "initiating_enid": - data = nil - case "joining_enid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "initiating_enid": - obj.InitiatingEnid = n(data) - case "joining_enid": - obj.JoiningEnid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventEntityBreachFeatureLayer(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityBreachFeatureLayer, error) { - var ( - obj = HistoricalEventEntityBreachFeatureLayer{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_entity_id": - data = nil - case "feature_layer_id": - data = nil - case "site_entity_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ_entity_id": - obj.CivEntityId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "site_entity_id": - obj.SiteEntityId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventEntityCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityCreated, error) { - var ( - obj = HistoricalEventEntityCreated{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "creator_hfid": - data = nil - case "entity_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "creator_hfid": - obj.CreatorHfid = n(data) - case "entity_id": - obj.EntityId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventEntityDissolved(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityDissolved, error) { - var ( - obj = HistoricalEventEntityDissolved{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "reason": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "reason": - obj.Reason = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventEntityEquipmentPurchase(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityEquipmentPurchase, error) { - var ( - obj = HistoricalEventEntityEquipmentPurchase{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "hfid": - data = nil - case "new_equipment_level": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "hfid": - obj.Hfid = n(data) - case "new_equipment_level": - obj.NewEquipmentLevel = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventEntityIncorporated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityIncorporated, error) { - var ( - obj = HistoricalEventEntityIncorporated{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "joined_entity_id": - data = nil - case "joiner_entity_id": - data = nil - case "leader_hfid": - data = nil - case "partial_incorporation": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "joined_entity_id": - obj.JoinedEntityId = n(data) - case "joiner_entity_id": - obj.JoinerEntityId = n(data) - case "leader_hfid": - obj.LeaderHfid = n(data) - case "partial_incorporation": - obj.PartialIncorporation = string(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventEntityLaw(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityLaw, error) { - var ( - obj = HistoricalEventEntityLaw{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "hist_figure_id": - data = nil - case "law_add": - data = nil - case "law_remove": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "law_add": - obj.LawAdd = string(data) - case "law_remove": - obj.LawRemove = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventEntityOverthrown(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityOverthrown, error) { - var ( - obj = HistoricalEventEntityOverthrown{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "conspirator_hfid": - data = nil - case "entity_id": - data = nil - case "instigator_hfid": - data = nil - case "overthrown_hfid": - data = nil - case "pos_taker_hfid": - data = nil - case "position_profile_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "conspirator_hfid": - obj.ConspiratorHfid = n(data) - case "entity_id": - obj.EntityId = n(data) - case "instigator_hfid": - obj.InstigatorHfid = n(data) - case "overthrown_hfid": - obj.OverthrownHfid = n(data) - case "pos_taker_hfid": - obj.PosTakerHfid = n(data) - case "position_profile_id": - obj.PositionProfileId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventEntityPersecuted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityPersecuted, error) { - var ( - obj = HistoricalEventEntityPersecuted{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "destroyed_structure_id": - data = nil - case "expelled_creature": - data = nil - case "expelled_hfid": - data = nil - case "expelled_number": - data = nil - case "expelled_pop_id": - data = nil - case "persecutor_enid": - data = nil - case "persecutor_hfid": - data = nil - case "property_confiscated_from_hfid": - data = nil - case "shrine_amount_destroyed": - data = nil - case "site_id": - data = nil - case "target_enid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "destroyed_structure_id": - obj.DestroyedStructureId = n(data) - case "expelled_creature": - obj.ExpelledCreature = n(data) - case "expelled_hfid": - obj.ExpelledHfid = n(data) - case "expelled_number": - obj.ExpelledNumber = n(data) - case "expelled_pop_id": - obj.ExpelledPopId = n(data) - case "persecutor_enid": - obj.PersecutorEnid = n(data) - case "persecutor_hfid": - obj.PersecutorHfid = n(data) - case "property_confiscated_from_hfid": - obj.PropertyConfiscatedFromHfid = n(data) - case "shrine_amount_destroyed": - obj.ShrineAmountDestroyed = n(data) - case "site_id": - obj.SiteId = n(data) - case "target_enid": - obj.TargetEnid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventEntityPrimaryCriminals(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityPrimaryCriminals, error) { - var ( - obj = HistoricalEventEntityPrimaryCriminals{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventEntityRelocate(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityRelocate, error) { - var ( - obj = HistoricalEventEntityRelocate{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventFailedFrameAttempt(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventFailedFrameAttempt, error) { - var ( - obj = HistoricalEventFailedFrameAttempt{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "convicter_enid": - data = nil - case "crime": - data = nil - case "fooled_hfid": - data = nil - case "framer_hfid": - data = nil - case "plotter_hfid": - data = nil - case "target_hfid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "convicter_enid": - obj.ConvicterEnid = n(data) - case "crime": - obj.Crime = string(data) - case "fooled_hfid": - obj.FooledHfid = n(data) - case "framer_hfid": - obj.FramerHfid = n(data) - case "plotter_hfid": - obj.PlotterHfid = n(data) - case "target_hfid": - obj.TargetHfid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventFailedIntrigueCorruption(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventFailedIntrigueCorruption, error) { - var ( - obj = HistoricalEventFailedIntrigueCorruption{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "action": - data = nil - case "ally_defense_bonus": - data = nil - case "coconspirator_bonus": - data = nil - case "corruptor_hfid": - data = nil - case "corruptor_identity": - data = nil - case "failed_judgment_test": - data = nil - case "feature_layer_id": - data = nil - case "lure_hfid": - data = nil - case "method": - data = nil - case "relevant_entity_id": - data = nil - case "relevant_id_for_method": - data = nil - case "relevant_position_profile_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "target_hfid": - data = nil - case "target_identity": - data = nil - case "top_facet": - data = nil - case "top_facet_modifier": - data = nil - case "top_facet_rating": - data = nil - case "top_relationship_factor": - data = nil - case "top_relationship_modifier": - data = nil - case "top_relationship_rating": - data = nil - case "top_value": - data = nil - case "top_value_modifier": - data = nil - case "top_value_rating": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "action": - obj.Action = string(data) - case "ally_defense_bonus": - obj.AllyDefenseBonus = n(data) - case "coconspirator_bonus": - obj.CoconspiratorBonus = n(data) - case "corruptor_hfid": - obj.CorruptorHfid = n(data) - case "corruptor_identity": - obj.CorruptorIdentity = n(data) - case "failed_judgment_test": - obj.FailedJudgmentTest = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "lure_hfid": - obj.LureHfid = n(data) - case "method": - obj.Method = string(data) - case "relevant_entity_id": - obj.RelevantEntityId = n(data) - case "relevant_id_for_method": - obj.RelevantIdForMethod = n(data) - case "relevant_position_profile_id": - obj.RelevantPositionProfileId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "target_hfid": - obj.TargetHfid = n(data) - case "target_identity": - obj.TargetIdentity = n(data) - case "top_facet": - obj.TopFacet = string(data) - case "top_facet_modifier": - obj.TopFacetModifier = n(data) - case "top_facet_rating": - obj.TopFacetRating = n(data) - case "top_relationship_factor": - obj.TopRelationshipFactor = string(data) - case "top_relationship_modifier": - obj.TopRelationshipModifier = n(data) - case "top_relationship_rating": - obj.TopRelationshipRating = n(data) - case "top_value": - obj.TopValue = string(data) - case "top_value_modifier": - obj.TopValueModifier = n(data) - case "top_value_rating": - obj.TopValueRating = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventFieldBattle(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventFieldBattle, error) { - var ( - obj = HistoricalEventFieldBattle{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "a_support_merc_enid": - data = nil - case "attacker_civ_id": - data = nil - case "attacker_general_hfid": - data = nil - case "attacker_merc_enid": - data = nil - case "coords": - data = nil - case "d_support_merc_enid": - data = nil - case "defender_civ_id": - data = nil - case "defender_general_hfid": - data = nil - case "defender_merc_enid": - data = nil - case "feature_layer_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "a_support_merc_enid": - obj.ASupportMercEnid = n(data) - case "attacker_civ_id": - obj.AttackerCivId = n(data) - case "attacker_general_hfid": - obj.AttackerGeneralHfid = n(data) - case "attacker_merc_enid": - obj.AttackerMercEnid = n(data) - case "coords": - obj.Coords = string(data) - case "d_support_merc_enid": - obj.DSupportMercEnid = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "defender_general_hfid": - obj.DefenderGeneralHfid = n(data) - case "defender_merc_enid": - obj.DefenderMercEnid = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventGamble(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventGamble, error) { - var ( - obj = HistoricalEventGamble{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "gambler_hfid": - data = nil - case "new_account": - data = nil - case "old_account": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "gambler_hfid": - obj.GamblerHfid = n(data) - case "new_account": - obj.NewAccount = n(data) - case "old_account": - obj.OldAccount = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfAbducted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfAbducted, error) { - var ( - obj = HistoricalEventHfAbducted{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "site_id": - data = nil - case "snatcher_hfid": - data = nil - case "subregion_id": - data = nil - case "target_hfid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "site_id": - obj.SiteId = n(data) - case "snatcher_hfid": - obj.SnatcherHfid = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "target_hfid": - obj.TargetHfid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfActOnBuilding(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfActOnBuilding, error) { - var ( - obj = HistoricalEventHfActOnBuilding{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "action": - data = nil - case "histfig": - data = nil - case "site": - data = nil - case "structure": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "action": - obj.Action = string(data) - case "histfig": - obj.Histfig = n(data) - case "site": - obj.Site = n(data) - case "structure": - obj.Structure = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfAttackedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfAttackedSite, error) { - var ( - obj = HistoricalEventHfAttackedSite{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacker_hfid": - data = nil - case "defender_civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "attacker_hfid": - obj.AttackerHfid = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfConfronted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfConfronted, error) { - var ( - obj = HistoricalEventHfConfronted{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "reason": - data = nil - case "site_id": - data = nil - case "situation": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "reason": - obj.Reason = string(data) - case "site_id": - obj.SiteId = n(data) - case "situation": - obj.Situation = string(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfConvicted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfConvicted, error) { - var ( - obj = HistoricalEventHfConvicted{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coconspirator_hfid": - data = nil - case "confessed_after_apb_arrest_enid": - data = nil - case "contact_hfid": - data = nil - case "convict_is_contact": - data = nil - case "convicted_hfid": - data = nil - case "convicter_enid": - data = nil - case "corrupt_convicter_hfid": - data = nil - case "crime": - data = nil - case "death_penalty": - data = nil - case "did_not_reveal_all_in_interrogation": - data = nil - case "exiled": - data = nil - case "fooled_hfid": - data = nil - case "framer_hfid": - data = nil - case "held_firm_in_interrogation": - data = nil - case "implicated_hfid": - data = nil - case "interrogator_hfid": - data = nil - case "plotter_hfid": - data = nil - case "prison_months": - data = nil - case "surveiled_coconspirator": - data = nil - case "surveiled_contact": - data = nil - case "surveiled_convicted": - data = nil - case "surveiled_target": - data = nil - case "target_hfid": - data = nil - case "wrongful_conviction": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "coconspirator_hfid": - obj.CoconspiratorHfid = n(data) - case "confessed_after_apb_arrest_enid": - obj.ConfessedAfterApbArrestEnid = n(data) - case "contact_hfid": - obj.ContactHfid = n(data) - case "convict_is_contact": - obj.ConvictIsContact = string(data) - case "convicted_hfid": - obj.ConvictedHfid = n(data) - case "convicter_enid": - obj.ConvicterEnid = n(data) - case "corrupt_convicter_hfid": - obj.CorruptConvicterHfid = n(data) - case "crime": - obj.Crime = string(data) - case "death_penalty": - obj.DeathPenalty = string(data) - case "did_not_reveal_all_in_interrogation": - obj.DidNotRevealAllInInterrogation = string(data) - case "exiled": - obj.Exiled = string(data) - case "fooled_hfid": - obj.FooledHfid = n(data) - case "framer_hfid": - obj.FramerHfid = n(data) - case "held_firm_in_interrogation": - obj.HeldFirmInInterrogation = string(data) - case "implicated_hfid": - obj.ImplicatedHfid = n(data) - case "interrogator_hfid": - obj.InterrogatorHfid = n(data) - case "plotter_hfid": - obj.PlotterHfid = n(data) - case "prison_months": - obj.PrisonMonths = n(data) - case "surveiled_coconspirator": - obj.SurveiledCoconspirator = string(data) - case "surveiled_contact": - obj.SurveiledContact = string(data) - case "surveiled_convicted": - obj.SurveiledConvicted = string(data) - case "surveiled_target": - obj.SurveiledTarget = string(data) - case "target_hfid": - obj.TargetHfid = n(data) - case "wrongful_conviction": - obj.WrongfulConviction = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfDestroyedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfDestroyedSite, error) { - var ( - obj = HistoricalEventHfDestroyedSite{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacker_hfid": - data = nil - case "defender_civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "attacker_hfid": - obj.AttackerHfid = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfDied(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfDied, error) { - var ( - obj = HistoricalEventHfDied{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "cause": - data = nil - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "site_id": - data = nil - case "slayer_caste": - data = nil - case "slayer_hfid": - data = nil - case "slayer_item_id": - data = nil - case "slayer_race": - data = nil - case "slayer_shooter_item_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "cause": - obj.Cause = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "slayer_caste": - obj.SlayerCaste = string(data) - case "slayer_hfid": - obj.SlayerHfid = n(data) - case "slayer_item_id": - obj.SlayerItemId = n(data) - case "slayer_race": - obj.SlayerRace = string(data) - case "slayer_shooter_item_id": - obj.SlayerShooterItemId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfDisturbedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfDisturbedStructure, error) { - var ( - obj = HistoricalEventHfDisturbedStructure{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hist_fig_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "hist_fig_id": - obj.HistFigId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfDoesInteraction(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfDoesInteraction, error) { - var ( - obj = HistoricalEventHfDoesInteraction{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "doer": - data = nil - case "doer_hfid": - data = nil - case "interaction": - data = nil - case "interaction_action": - data = nil - case "region": - data = nil - case "site": - data = nil - case "source": - data = nil - case "target": - data = nil - case "target_hfid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "doer": - obj.Doer = n(data) - case "doer_hfid": - obj.DoerHfid = n(data) - case "interaction": - obj.Interaction = string(data) - case "interaction_action": - obj.InteractionAction = string(data) - case "region": - obj.Region = n(data) - case "site": - obj.Site = n(data) - case "source": - obj.Source = n(data) - case "target": - obj.Target = n(data) - case "target_hfid": - obj.TargetHfid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfEnslaved(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfEnslaved, error) { - var ( - obj = HistoricalEventHfEnslaved{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "enslaved_hfid": - data = nil - case "moved_to_site_id": - data = nil - case "payer_entity_id": - data = nil - case "seller_hfid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "enslaved_hfid": - obj.EnslavedHfid = n(data) - case "moved_to_site_id": - obj.MovedToSiteId = n(data) - case "payer_entity_id": - obj.PayerEntityId = n(data) - case "seller_hfid": - obj.SellerHfid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfEquipmentPurchase(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfEquipmentPurchase, error) { - var ( - obj = HistoricalEventHfEquipmentPurchase{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "group_hfid": - data = nil - case "quality": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "group_hfid": - obj.GroupHfid = n(data) - case "quality": - obj.Quality = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfGainsSecretGoal(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfGainsSecretGoal, error) { - var ( - obj = HistoricalEventHfGainsSecretGoal{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hfid": - data = nil - case "secret_goal": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "hfid": - obj.Hfid = n(data) - case "secret_goal": - obj.SecretGoal = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfInterrogated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfInterrogated, error) { - var ( - obj = HistoricalEventHfInterrogated{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "arresting_enid": - data = nil - case "held_firm_in_interrogation": - data = nil - case "interrogator_hfid": - data = nil - case "target_hfid": - data = nil - case "wanted_and_recognized": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "arresting_enid": - obj.ArrestingEnid = n(data) - case "held_firm_in_interrogation": - obj.HeldFirmInInterrogation = string(data) - case "interrogator_hfid": - obj.InterrogatorHfid = n(data) - case "target_hfid": - obj.TargetHfid = n(data) - case "wanted_and_recognized": - obj.WantedAndRecognized = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfLearnsSecret(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfLearnsSecret, error) { - var ( - obj = HistoricalEventHfLearnsSecret{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact": - data = nil - case "artifact_id": - data = nil - case "interaction": - data = nil - case "secret_text": - data = nil - case "student": - data = nil - case "student_hfid": - data = nil - case "teacher": - data = nil - case "teacher_hfid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact": - obj.Artifact = n(data) - case "artifact_id": - obj.ArtifactId = n(data) - case "interaction": - obj.Interaction = string(data) - case "secret_text": - obj.SecretText = string(data) - case "student": - obj.Student = n(data) - case "student_hfid": - obj.StudentHfid = n(data) - case "teacher": - obj.Teacher = n(data) - case "teacher_hfid": - obj.TeacherHfid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfNewPet(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfNewPet, error) { - var ( - obj = HistoricalEventHfNewPet{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "feature_layer_id": - data = nil - case "group_hfid": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "group_hfid": - obj.GroupHfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfPerformedHorribleExperiments(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfPerformedHorribleExperiments, error) { - var ( - obj = HistoricalEventHfPerformedHorribleExperiments{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "group_hfid": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "group_hfid": - obj.GroupHfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfPrayedInsideStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfPrayedInsideStructure, error) { - var ( - obj = HistoricalEventHfPrayedInsideStructure{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hist_fig_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "hist_fig_id": - obj.HistFigId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfPreach(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfPreach, error) { - var ( - obj = HistoricalEventHfPreach{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_1": - data = nil - case "entity_2": - data = nil - case "site_hfid": - data = nil - case "speaker_hfid": - data = nil - case "topic": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_1": - obj.Entity1 = n(data) - case "entity_2": - obj.Entity2 = n(data) - case "site_hfid": - obj.SiteHfid = n(data) - case "speaker_hfid": - obj.SpeakerHfid = n(data) - case "topic": - obj.Topic = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfProfanedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfProfanedStructure, error) { - var ( - obj = HistoricalEventHfProfanedStructure{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hist_fig_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "hist_fig_id": - obj.HistFigId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfRecruitedUnitTypeForEntity(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfRecruitedUnitTypeForEntity, error) { - var ( - obj = HistoricalEventHfRecruitedUnitTypeForEntity{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "unit_type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "unit_type": - obj.UnitType = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfRelationshipDenied(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfRelationshipDenied, error) { - var ( - obj = HistoricalEventHfRelationshipDenied{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "reason": - data = nil - case "reason_id": - data = nil - case "relationship": - data = nil - case "seeker_hfid": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "target_hfid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "reason": - obj.Reason = string(data) - case "reason_id": - obj.ReasonId = n(data) - case "relationship": - obj.Relationship = string(data) - case "seeker_hfid": - obj.SeekerHfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "target_hfid": - obj.TargetHfid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfReunion(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfReunion, error) { - var ( - obj = HistoricalEventHfReunion{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "group_1_hfid": - data = nil - case "group_2_hfid": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "group_1_hfid": - obj.Group1Hfid = n(data) - case "group_2_hfid": - obj.Group2Hfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfRevived(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfRevived, error) { - var ( - obj = HistoricalEventHfRevived{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "actor_hfid": - data = nil - case "disturbance": - data = nil - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "actor_hfid": - obj.ActorHfid = n(data) - case "disturbance": - obj.Disturbance = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfSimpleBattleEvent(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfSimpleBattleEvent, error) { - var ( - obj = HistoricalEventHfSimpleBattleEvent{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "group_1_hfid": - data = nil - case "group_2_hfid": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "subtype": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "group_1_hfid": - obj.Group1Hfid = n(data) - case "group_2_hfid": - obj.Group2Hfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "subtype": - obj.Subtype = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfTravel(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfTravel, error) { - var ( - obj = HistoricalEventHfTravel{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "feature_layer_id": - data = nil - case "group_hfid": - data = nil - case "return": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "group_hfid": - obj.GroupHfid = n(data) - case "return": - obj.Return = string(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfViewedArtifact(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfViewedArtifact, error) { - var ( - obj = HistoricalEventHfViewedArtifact{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "hist_fig_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "hist_fig_id": - obj.HistFigId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfWounded(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfWounded, error) { - var ( - obj = HistoricalEventHfWounded{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "woundee_hfid": - data = nil - case "wounder_hfid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "woundee_hfid": - obj.WoundeeHfid = n(data) - case "wounder_hfid": - obj.WounderHfid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfsFormedIntrigueRelationship(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfsFormedIntrigueRelationship, error) { - var ( - obj = HistoricalEventHfsFormedIntrigueRelationship{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "action": - data = nil - case "ally_defense_bonus": - data = nil - case "circumstance": - data = nil - case "circumstance_id": - data = nil - case "coconspirator_bonus": - data = nil - case "corruptor_hfid": - data = nil - case "corruptor_identity": - data = nil - case "corruptor_seen_as": - data = nil - case "failed_judgment_test": - data = nil - case "feature_layer_id": - data = nil - case "lure_hfid": - data = nil - case "method": - data = nil - case "relevant_entity_id": - data = nil - case "relevant_id_for_method": - data = nil - case "relevant_position_profile_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "successful": - data = nil - case "target_hfid": - data = nil - case "target_identity": - data = nil - case "target_seen_as": - data = nil - case "top_facet": - data = nil - case "top_facet_modifier": - data = nil - case "top_facet_rating": - data = nil - case "top_relationship_factor": - data = nil - case "top_relationship_modifier": - data = nil - case "top_relationship_rating": - data = nil - case "top_value": - data = nil - case "top_value_modifier": - data = nil - case "top_value_rating": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "action": - obj.Action = string(data) - case "ally_defense_bonus": - obj.AllyDefenseBonus = n(data) - case "circumstance": - obj.Circumstance = string(data) - case "circumstance_id": - obj.CircumstanceId = n(data) - case "coconspirator_bonus": - obj.CoconspiratorBonus = n(data) - case "corruptor_hfid": - obj.CorruptorHfid = n(data) - case "corruptor_identity": - obj.CorruptorIdentity = n(data) - case "corruptor_seen_as": - obj.CorruptorSeenAs = string(data) - case "failed_judgment_test": - obj.FailedJudgmentTest = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "lure_hfid": - obj.LureHfid = n(data) - case "method": - obj.Method = string(data) - case "relevant_entity_id": - obj.RelevantEntityId = n(data) - case "relevant_id_for_method": - obj.RelevantIdForMethod = n(data) - case "relevant_position_profile_id": - obj.RelevantPositionProfileId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "successful": - obj.Successful = string(data) - case "target_hfid": - obj.TargetHfid = n(data) - case "target_identity": - obj.TargetIdentity = n(data) - case "target_seen_as": - obj.TargetSeenAs = string(data) - case "top_facet": - obj.TopFacet = string(data) - case "top_facet_modifier": - obj.TopFacetModifier = n(data) - case "top_facet_rating": - obj.TopFacetRating = n(data) - case "top_relationship_factor": - obj.TopRelationshipFactor = string(data) - case "top_relationship_modifier": - obj.TopRelationshipModifier = n(data) - case "top_relationship_rating": - obj.TopRelationshipRating = n(data) - case "top_value": - obj.TopValue = string(data) - case "top_value_modifier": - obj.TopValueModifier = n(data) - case "top_value_rating": - obj.TopValueRating = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHfsFormedReputationRelationship(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfsFormedReputationRelationship, error) { - var ( - obj = HistoricalEventHfsFormedReputationRelationship{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "hf_rep_1_of_2": - data = nil - case "hf_rep_2_of_1": - data = nil - case "hfid1": - data = nil - case "hfid2": - data = nil - case "identity_id1": - data = nil - case "identity_id2": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hf_rep_1_of_2": - obj.HfRep1Of2 = string(data) - case "hf_rep_2_of_1": - obj.HfRep2Of1 = string(data) - case "hfid1": - obj.Hfid1 = n(data) - case "hfid2": - obj.Hfid2 = n(data) - case "identity_id1": - obj.IdentityId1 = n(data) - case "identity_id2": - obj.IdentityId2 = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHistFigureDied(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHistFigureDied, error) { - var ( - obj = HistoricalEventHistFigureDied{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "death_cause": - data = nil - case "item": - data = nil - case "item_type": - data = nil - case "site": - data = nil - case "slayer_caste": - data = nil - case "slayer_hf": - data = nil - case "slayer_race": - data = nil - case "victim_hf": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "death_cause": - obj.DeathCause = string(data) - case "item": - obj.Item = n(data) - case "item_type": - obj.ItemType = string(data) - case "site": - obj.Site = n(data) - case "slayer_caste": - obj.SlayerCaste = n(data) - case "slayer_hf": - obj.SlayerHf = n(data) - case "slayer_race": - obj.SlayerRace = n(data) - case "victim_hf": - obj.VictimHf = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHistFigureNewPet(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHistFigureNewPet, error) { - var ( - obj = HistoricalEventHistFigureNewPet{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "group": - data = nil - case "pets": - data = nil - case "site": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "group": - obj.Group = n(data) - case "pets": - obj.Pets = string(data) - case "site": - obj.Site = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHistFigureWounded(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHistFigureWounded, error) { - var ( - obj = HistoricalEventHistFigureWounded{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "body_part": - data = nil - case "injury_type": - data = nil - case "part_lost": - data = nil - case "site": - data = nil - case "woundee": - data = nil - case "woundee_caste": - data = nil - case "woundee_race": - data = nil - case "wounder": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "body_part": - obj.BodyPart = n(data) - case "injury_type": - obj.InjuryType = string(data) - case "part_lost": - obj.PartLost = string(data) - case "site": - obj.Site = n(data) - case "woundee": - obj.Woundee = n(data) - case "woundee_caste": - obj.WoundeeCaste = n(data) - case "woundee_race": - obj.WoundeeRace = n(data) - case "wounder": - obj.Wounder = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventHolyCityDeclaration(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHolyCityDeclaration, error) { - var ( - obj = HistoricalEventHolyCityDeclaration{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "religion_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "religion_id": - obj.ReligionId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventItemStolen(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventItemStolen, error) { - var ( - obj = HistoricalEventItemStolen{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "circumstance": - v, _ := parseCircumstance(d, &t) -obj.Circumstance = v - case "circumstance_id": - data = nil - case "entity": - data = nil - case "histfig": - data = nil - case "item": - data = nil - case "item_subtype": - data = nil - case "item_type": - data = nil - case "mat": - data = nil - case "matindex": - data = nil - case "mattype": - data = nil - case "site": - data = nil - case "stash_site": - data = nil - case "structure": - data = nil - case "theft_method": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "circumstance": - - case "circumstance_id": - obj.CircumstanceId = n(data) - case "entity": - obj.Entity = n(data) - case "histfig": - obj.Histfig = n(data) - case "item": - obj.Item = n(data) - case "item_subtype": - obj.ItemSubtype = string(data) - case "item_type": - obj.ItemType = string(data) - case "mat": - obj.Mat = string(data) - case "matindex": - obj.Matindex = n(data) - case "mattype": - obj.Mattype = n(data) - case "site": - obj.Site = n(data) - case "stash_site": - obj.StashSite = n(data) - case "structure": - obj.Structure = n(data) - case "theft_method": - obj.TheftMethod = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventKnowledgeDiscovered(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventKnowledgeDiscovered, error) { - var ( - obj = HistoricalEventKnowledgeDiscovered{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "first": - data = nil - case "hfid": - data = nil - case "knowledge": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "first": - obj.First = string(data) - case "hfid": - obj.Hfid = n(data) - case "knowledge": - obj.Knowledge = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventModifiedBuilding(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventModifiedBuilding, error) { - var ( - obj = HistoricalEventModifiedBuilding{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "modification": - data = nil - case "modifier_hfid": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "modification": - obj.Modification = string(data) - case "modifier_hfid": - obj.ModifierHfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventMusicalFormCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventMusicalFormCreated, error) { - var ( - obj = HistoricalEventMusicalFormCreated{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "circumstance": - data = nil - case "circumstance_id": - data = nil - case "form_id": - data = nil - case "hist_figure_id": - data = nil - case "reason": - data = nil - case "reason_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "circumstance": - obj.Circumstance = string(data) - case "circumstance_id": - obj.CircumstanceId = n(data) - case "form_id": - obj.FormId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "reason": - obj.Reason = string(data) - case "reason_id": - obj.ReasonId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventNewSiteLeader(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventNewSiteLeader, error) { - var ( - obj = HistoricalEventNewSiteLeader{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacker_civ_id": - data = nil - case "defender_civ_id": - data = nil - case "new_leader_hfid": - data = nil - case "new_site_civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "attacker_civ_id": - obj.AttackerCivId = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "new_leader_hfid": - obj.NewLeaderHfid = n(data) - case "new_site_civ_id": - obj.NewSiteCivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventPeaceAccepted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPeaceAccepted, error) { - var ( - obj = HistoricalEventPeaceAccepted{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventPeaceRejected(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPeaceRejected, error) { - var ( - obj = HistoricalEventPeaceRejected{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventPerformance(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPerformance, error) { - var ( - obj = HistoricalEventPerformance{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "feature_layer_id": - data = nil - case "occasion_id": - data = nil - case "schedule_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "occasion_id": - obj.OccasionId = n(data) - case "schedule_id": - obj.ScheduleId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventPlunderedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPlunderedSite, error) { - var ( - obj = HistoricalEventPlunderedSite{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacker_civ_id": - data = nil - case "defender_civ_id": - data = nil - case "detected": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "attacker_civ_id": - obj.AttackerCivId = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "detected": - obj.Detected = string(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventPoeticFormCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPoeticFormCreated, error) { - var ( - obj = HistoricalEventPoeticFormCreated{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "circumstance": - data = nil - case "form_id": - data = nil - case "hist_figure_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "circumstance": - obj.Circumstance = string(data) - case "form_id": - obj.FormId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventProcession(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventProcession, error) { - var ( - obj = HistoricalEventProcession{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "feature_layer_id": - data = nil - case "occasion_id": - data = nil - case "schedule_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "occasion_id": - obj.OccasionId = n(data) - case "schedule_id": - obj.ScheduleId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventRazedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRazedStructure, error) { - var ( - obj = HistoricalEventRazedStructure{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventReclaimSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventReclaimSite, error) { - var ( - obj = HistoricalEventReclaimSite{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventRegionpopIncorporatedIntoEntity(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRegionpopIncorporatedIntoEntity, error) { - var ( - obj = HistoricalEventRegionpopIncorporatedIntoEntity{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "join_entity_id": - data = nil - case "pop_flid": - data = nil - case "pop_number_moved": - data = nil - case "pop_race": - data = nil - case "pop_srid": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "join_entity_id": - obj.JoinEntityId = n(data) - case "pop_flid": - obj.PopFlid = n(data) - case "pop_number_moved": - obj.PopNumberMoved = n(data) - case "pop_race": - obj.PopRace = n(data) - case "pop_srid": - obj.PopSrid = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventRemoveHfEntityLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRemoveHfEntityLink, error) { - var ( - obj = HistoricalEventRemoveHfEntityLink{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ": - data = nil - case "civ_id": - data = nil - case "hfid": - data = nil - case "histfig": - data = nil - case "link": - data = nil - case "link_type": - data = nil - case "position": - data = nil - case "position_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ": - obj.Civ = n(data) - case "civ_id": - obj.CivId = n(data) - case "hfid": - obj.Hfid = n(data) - case "histfig": - obj.Histfig = n(data) - case "link": - obj.Link = string(data) - case "link_type": - obj.LinkType = string(data) - case "position": - obj.Position = n(data) - case "position_id": - obj.PositionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventRemoveHfHfLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRemoveHfHfLink, error) { - var ( - obj = HistoricalEventRemoveHfHfLink{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hfid": - data = nil - case "hfid_target": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "hfid": - obj.Hfid = n(data) - case "hfid_target": - obj.HfidTarget = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventRemoveHfSiteLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRemoveHfSiteLink, error) { - var ( - obj = HistoricalEventRemoveHfSiteLink{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ": - data = nil - case "histfig": - data = nil - case "link_type": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "structure": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ": - obj.Civ = n(data) - case "histfig": - obj.Histfig = n(data) - case "link_type": - obj.LinkType = string(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure": - obj.Structure = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventReplacedBuilding(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventReplacedBuilding, error) { - var ( - obj = HistoricalEventReplacedBuilding{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ": - data = nil - case "new_structure": - data = nil - case "old_structure": - data = nil - case "site": - data = nil - case "site_civ": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ": - obj.Civ = n(data) - case "new_structure": - obj.NewStructure = n(data) - case "old_structure": - obj.OldStructure = n(data) - case "site": - obj.Site = n(data) - case "site_civ": - obj.SiteCiv = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventReplacedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventReplacedStructure, error) { - var ( - obj = HistoricalEventReplacedStructure{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "new_ab_id": - data = nil - case "old_ab_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "new_ab_id": - obj.NewAbId = n(data) - case "old_ab_id": - obj.OldAbId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventSiteDispute(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSiteDispute, error) { - var ( - obj = HistoricalEventSiteDispute{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "dispute": - data = nil - case "entity_id_1": - data = nil - case "entity_id_2": - data = nil - case "site_id_1": - data = nil - case "site_id_2": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "dispute": - obj.Dispute = string(data) - case "entity_id_1": - obj.EntityId1 = n(data) - case "entity_id_2": - obj.EntityId2 = n(data) - case "site_id_1": - obj.SiteId1 = n(data) - case "site_id_2": - obj.SiteId2 = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventSiteTakenOver(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSiteTakenOver, error) { - var ( - obj = HistoricalEventSiteTakenOver{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacker_civ_id": - data = nil - case "defender_civ_id": - data = nil - case "new_site_civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "attacker_civ_id": - obj.AttackerCivId = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "new_site_civ_id": - obj.NewSiteCivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventTrade(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventTrade, error) { - var ( - obj = HistoricalEventTrade{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "account_shift": - data = nil - case "allotment": - data = nil - case "allotment_index": - data = nil - case "dest_site_id": - data = nil - case "production_zone_id": - data = nil - case "source_site_id": - data = nil - case "trader_entity_id": - data = nil - case "trader_hfid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "account_shift": - obj.AccountShift = n(data) - case "allotment": - obj.Allotment = n(data) - case "allotment_index": - obj.AllotmentIndex = n(data) - case "dest_site_id": - obj.DestSiteId = n(data) - case "production_zone_id": - obj.ProductionZoneId = n(data) - case "source_site_id": - obj.SourceSiteId = n(data) - case "trader_entity_id": - obj.TraderEntityId = n(data) - case "trader_hfid": - obj.TraderHfid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventWarPeaceAccepted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventWarPeaceAccepted, error) { - var ( - obj = HistoricalEventWarPeaceAccepted{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "destination": - data = nil - case "site": - data = nil - case "source": - data = nil - case "topic": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "destination": - obj.Destination = n(data) - case "site": - obj.Site = n(data) - case "source": - obj.Source = n(data) - case "topic": - obj.Topic = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventWarPeaceRejected(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventWarPeaceRejected, error) { - var ( - obj = HistoricalEventWarPeaceRejected{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "destination": - data = nil - case "site": - data = nil - case "source": - data = nil - case "topic": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "destination": - obj.Destination = n(data) - case "site": - obj.Site = n(data) - case "source": - obj.Source = n(data) - case "topic": - obj.Topic = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventWrittenContentComposed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventWrittenContentComposed, error) { - var ( - obj = HistoricalEventWrittenContentComposed{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "circumstance": - data = nil - case "circumstance_id": - data = nil - case "hist_figure_id": - data = nil - case "reason": - data = nil - case "reason_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "wc_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "circumstance": - obj.Circumstance = string(data) - case "circumstance_id": - obj.CircumstanceId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "reason": - obj.Reason = string(data) - case "reason_id": - obj.ReasonId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "wc_id": - obj.WcId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollection(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollection, error) { - var ( - obj = HistoricalEventCollection{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "end_seconds72": - data = nil - case "end_year": - data = nil - case "event": - data = nil - case "eventcol": - data = nil - case "id": - data = nil - case "start_seconds72": - data = nil - case "start_year": - data = nil - case "type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "end_seconds72": - obj.EndSeconds72 = n(data) - case "end_year": - obj.EndYear = n(data) - case "event": - obj.Event = n(data) - case "eventcol": - obj.Eventcol = n(data) - case "id": - obj.Id_ = n(data) - case "start_seconds72": - obj.StartSeconds72 = n(data) - case "start_year": - obj.StartYear = n(data) - case "type": - var err error - switch strcase.ToCamel(string(data)) { - case "Abduction": - obj.Details, err = parseHistoricalEventCollectionAbduction(d, start) - case "Battle": - obj.Details, err = parseHistoricalEventCollectionBattle(d, start) - case "BeastAttack": - obj.Details, err = parseHistoricalEventCollectionBeastAttack(d, start) - case "Ceremony": - obj.Details, err = parseHistoricalEventCollectionCeremony(d, start) - case "Competition": - obj.Details, err = parseHistoricalEventCollectionCompetition(d, start) - case "Duel": - obj.Details, err = parseHistoricalEventCollectionDuel(d, start) - case "EntityOverthrown": - obj.Details, err = parseHistoricalEventCollectionEntityOverthrown(d, start) - case "Journey": - obj.Details, err = parseHistoricalEventCollectionJourney(d, start) - case "Occasion": - obj.Details, err = parseHistoricalEventCollectionOccasion(d, start) - case "Performance": - obj.Details, err = parseHistoricalEventCollectionPerformance(d, start) - case "Persecution": - obj.Details, err = parseHistoricalEventCollectionPersecution(d, start) - case "Procession": - obj.Details, err = parseHistoricalEventCollectionProcession(d, start) - case "Purge": - obj.Details, err = parseHistoricalEventCollectionPurge(d, start) - case "SiteConquered": - obj.Details, err = parseHistoricalEventCollectionSiteConquered(d, start) - case "Theft": - obj.Details, err = parseHistoricalEventCollectionTheft(d, start) - case "War": - obj.Details, err = parseHistoricalEventCollectionWar(d, start) - default: - d.Skip() - } - if err != nil { - return nil, err - } - return &obj, nil - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionAbduction(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionAbduction, error) { - var ( - obj = HistoricalEventCollectionAbduction{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacking_enid": - data = nil - case "coords": - data = nil - case "defending_enid": - data = nil - case "feature_layer_id": - data = nil - case "ordinal": - data = nil - case "parent_eventcol": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "attacking_enid": - obj.AttackingEnid = n(data) - case "coords": - obj.Coords = string(data) - case "defending_enid": - obj.DefendingEnid = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "ordinal": - obj.Ordinal = n(data) - case "parent_eventcol": - obj.ParentEventcol = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionBattle(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionBattle, error) { - var ( - obj = HistoricalEventCollectionBattle{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "a_support_merc_enid": - data = nil - case "a_support_merc_hfid": - data = nil - case "attacking_hfid": - data = nil - case "attacking_merc_enid": - data = nil - case "attacking_squad_animated": - data = nil - case "attacking_squad_deaths": - data = nil - case "attacking_squad_entity_pop": - data = nil - case "attacking_squad_number": - data = nil - case "attacking_squad_race": - data = nil - case "attacking_squad_site": - data = nil - case "company_merc": - data = nil - case "coords": - data = nil - case "d_support_merc_enid": - data = nil - case "d_support_merc_hfid": - data = nil - case "defending_hfid": - data = nil - case "defending_merc_enid": - data = nil - case "defending_squad_animated": - data = nil - case "defending_squad_deaths": - data = nil - case "defending_squad_entity_pop": - data = nil - case "defending_squad_number": - data = nil - case "defending_squad_race": - data = nil - case "defending_squad_site": - data = nil - case "feature_layer_id": - data = nil - case "individual_merc": - data = nil - case "name": - data = nil - case "noncom_hfid": - data = nil - case "outcome": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "war_eventcol": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "a_support_merc_enid": - obj.ASupportMercEnid = n(data) - case "a_support_merc_hfid": - obj.ASupportMercHfid = n(data) - case "attacking_hfid": - obj.AttackingHfid = n(data) - case "attacking_merc_enid": - obj.AttackingMercEnid = n(data) - case "attacking_squad_animated": - obj.AttackingSquadAnimated = string(data) - case "attacking_squad_deaths": - obj.AttackingSquadDeaths = n(data) - case "attacking_squad_entity_pop": - obj.AttackingSquadEntityPop = n(data) - case "attacking_squad_number": - obj.AttackingSquadNumber = n(data) - case "attacking_squad_race": - obj.AttackingSquadRace = string(data) - case "attacking_squad_site": - obj.AttackingSquadSite = n(data) - case "company_merc": - obj.CompanyMerc = string(data) - case "coords": - obj.Coords = string(data) - case "d_support_merc_enid": - obj.DSupportMercEnid = n(data) - case "d_support_merc_hfid": - obj.DSupportMercHfid = n(data) - case "defending_hfid": - obj.DefendingHfid = n(data) - case "defending_merc_enid": - obj.DefendingMercEnid = n(data) - case "defending_squad_animated": - obj.DefendingSquadAnimated = string(data) - case "defending_squad_deaths": - obj.DefendingSquadDeaths = n(data) - case "defending_squad_entity_pop": - obj.DefendingSquadEntityPop = n(data) - case "defending_squad_number": - obj.DefendingSquadNumber = n(data) - case "defending_squad_race": - obj.DefendingSquadRace = string(data) - case "defending_squad_site": - obj.DefendingSquadSite = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "individual_merc": - obj.IndividualMerc = string(data) - case "name": - obj.Name_ = string(data) - case "noncom_hfid": - obj.NoncomHfid = n(data) - case "outcome": - obj.Outcome = string(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "war_eventcol": - obj.WarEventcol = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionBeastAttack(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionBeastAttack, error) { - var ( - obj = HistoricalEventCollectionBeastAttack{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "defending_enid": - data = nil - case "feature_layer_id": - data = nil - case "ordinal": - data = nil - case "parent_eventcol": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "defending_enid": - obj.DefendingEnid = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "ordinal": - obj.Ordinal = n(data) - case "parent_eventcol": - obj.ParentEventcol = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionCeremony(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionCeremony, error) { - var ( - obj = HistoricalEventCollectionCeremony{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "ordinal": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "ordinal": - obj.Ordinal = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionCompetition(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionCompetition, error) { - var ( - obj = HistoricalEventCollectionCompetition{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "ordinal": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "ordinal": - obj.Ordinal = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionDuel(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionDuel, error) { - var ( - obj = HistoricalEventCollectionDuel{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacking_hfid": - data = nil - case "coords": - data = nil - case "defending_hfid": - data = nil - case "feature_layer_id": - data = nil - case "ordinal": - data = nil - case "parent_eventcol": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "attacking_hfid": - obj.AttackingHfid = n(data) - case "coords": - obj.Coords = string(data) - case "defending_hfid": - obj.DefendingHfid = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "ordinal": - obj.Ordinal = n(data) - case "parent_eventcol": - obj.ParentEventcol = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionEntityOverthrown(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionEntityOverthrown, error) { - var ( - obj = HistoricalEventCollectionEntityOverthrown{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "ordinal": - data = nil - case "site_id": - data = nil - case "target_entity_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "ordinal": - obj.Ordinal = n(data) - case "site_id": - obj.SiteId = n(data) - case "target_entity_id": - obj.TargetEntityId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionJourney(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionJourney, error) { - var ( - obj = HistoricalEventCollectionJourney{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "ordinal": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "ordinal": - obj.Ordinal = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionOccasion(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionOccasion, error) { - var ( - obj = HistoricalEventCollectionOccasion{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "occasion_id": - data = nil - case "ordinal": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "occasion_id": - obj.OccasionId = n(data) - case "ordinal": - obj.Ordinal = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionPerformance(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionPerformance, error) { - var ( - obj = HistoricalEventCollectionPerformance{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "ordinal": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "ordinal": - obj.Ordinal = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionPersecution(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionPersecution, error) { - var ( - obj = HistoricalEventCollectionPersecution{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "ordinal": - data = nil - case "site_id": - data = nil - case "target_entity_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "ordinal": - obj.Ordinal = n(data) - case "site_id": - obj.SiteId = n(data) - case "target_entity_id": - obj.TargetEntityId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionProcession(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionProcession, error) { - var ( - obj = HistoricalEventCollectionProcession{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "ordinal": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "ordinal": - obj.Ordinal = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionPurge(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionPurge, error) { - var ( - obj = HistoricalEventCollectionPurge{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "adjective": - data = nil - case "ordinal": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "adjective": - obj.Adjective = string(data) - case "ordinal": - obj.Ordinal = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionSiteConquered(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionSiteConquered, error) { - var ( - obj = HistoricalEventCollectionSiteConquered{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacking_enid": - data = nil - case "defending_enid": - data = nil - case "ordinal": - data = nil - case "site_id": - data = nil - case "war_eventcol": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "attacking_enid": - obj.AttackingEnid = n(data) - case "defending_enid": - obj.DefendingEnid = n(data) - case "ordinal": - obj.Ordinal = n(data) - case "site_id": - obj.SiteId = n(data) - case "war_eventcol": - obj.WarEventcol = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionTheft(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionTheft, error) { - var ( - obj = HistoricalEventCollectionTheft{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacking_enid": - data = nil - case "coords": - data = nil - case "defending_enid": - data = nil - case "feature_layer_id": - data = nil - case "ordinal": - data = nil - case "parent_eventcol": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "attacking_enid": - obj.AttackingEnid = n(data) - case "coords": - obj.Coords = string(data) - case "defending_enid": - obj.DefendingEnid = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "ordinal": - obj.Ordinal = n(data) - case "parent_eventcol": - obj.ParentEventcol = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventCollectionWar(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionWar, error) { - var ( - obj = HistoricalEventCollectionWar{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "aggressor_ent_id": - data = nil - case "defender_ent_id": - data = nil - case "name": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "aggressor_ent_id": - obj.AggressorEntId = n(data) - case "defender_ent_id": - obj.DefenderEntId = n(data) - case "name": - obj.Name_ = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventRelationship(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRelationship, error) { - var ( - obj = HistoricalEventRelationship{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "event": - data = nil - case "relationship": - data = nil - case "source_hf": - data = nil - case "target_hf": - data = nil - case "year": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "event": - obj.Event = n(data) - case "relationship": - obj.Relationship = string(data) - case "source_hf": - obj.SourceHf = n(data) - case "target_hf": - obj.TargetHf = n(data) - case "year": - obj.Year = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalEventRelationshipSupplement(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRelationshipSupplement, error) { - var ( - obj = HistoricalEventRelationshipSupplement{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "event": - data = nil - case "occasion_type": - data = nil - case "site": - data = nil - case "unk_1": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "event": - obj.Event = n(data) - case "occasion_type": - obj.OccasionType = n(data) - case "site": - obj.Site = n(data) - case "unk_1": - obj.Unk1 = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHistoricalFigure(d *xml.Decoder, start *xml.StartElement) (*HistoricalFigure, error) { - var ( - obj = HistoricalFigure{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "active_interaction": - data = nil - case "animated": - data = nil - case "animated_string": - data = nil - case "appeared": - data = nil - case "associated_type": - data = nil - case "birth_seconds72": - data = nil - case "birth_year": - data = nil - case "caste": - data = nil - case "current_identity_id": - data = nil - case "death_seconds72": - data = nil - case "death_year": - data = nil - case "deity": - data = nil - case "ent_pop_id": - data = nil - case "entity_former_position_link": - v, _ := parseEntityFormerPositionLink(d, &t) -obj.EntityFormerPositionLink = v - case "entity_link": - v, _ := parseEntityLink(d, &t) -obj.EntityLink = v - case "entity_position_link": - v, _ := parseEntityPositionLink(d, &t) -obj.EntityPositionLink = v - case "entity_reputation": - v, _ := parseEntityReputation(d, &t) -obj.EntityReputation = v - case "entity_squad_link": - v, _ := parseEntitySquadLink(d, &t) -obj.EntitySquadLink = v - case "force": - data = nil - case "goal": - data = nil - case "hf_link": - v, _ := parseHfLink(d, &t) -obj.HfLink = v - case "hf_skill": - v, _ := parseHfSkill(d, &t) -obj.HfSkill = v - case "holds_artifact": - data = nil - case "honor_entity": - v, _ := parseHonorEntity(d, &t) -obj.HonorEntity = v - case "id": - data = nil - case "interaction_knowledge": - data = nil - case "intrigue_actor": - v, _ := parseIntrigueActor(d, &t) -obj.IntrigueActor = v - case "intrigue_plot": - v, _ := parseIntriguePlot(d, &t) -obj.IntriguePlot = v - case "journey_pet": - data = nil - case "name": - data = nil - case "race": - data = nil - case "relationship_profile_hf_historical": - v, _ := parseRelationshipProfileHfHistorical(d, &t) -obj.RelationshipProfileHfHistorical = v - case "relationship_profile_hf_visual": - v, _ := parseRelationshipProfileHfVisual(d, &t) -obj.RelationshipProfileHfVisual = v - case "sex": - data = nil - case "site_link": - v, _ := parseSiteLink(d, &t) -obj.SiteLink = v - case "site_property": - v, _ := parseSiteProperty(d, &t) -obj.SiteProperty = v - case "sphere": - data = nil - case "used_identity_id": - data = nil - case "vague_relationship": - v, _ := parseVagueRelationship(d, &t) -obj.VagueRelationship = v - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "active_interaction": - obj.ActiveInteraction = string(data) - case "animated": - obj.Animated = string(data) - case "animated_string": - obj.AnimatedString = string(data) - case "appeared": - obj.Appeared = n(data) - case "associated_type": - obj.AssociatedType = string(data) - case "birth_seconds72": - obj.BirthSeconds72 = n(data) - case "birth_year": - obj.BirthYear = n(data) - case "caste": - obj.Caste = string(data) - case "current_identity_id": - obj.CurrentIdentityId = n(data) - case "death_seconds72": - obj.DeathSeconds72 = n(data) - case "death_year": - obj.DeathYear = n(data) - case "deity": - obj.Deity = string(data) - case "ent_pop_id": - obj.EntPopId = n(data) - case "entity_former_position_link": - - case "entity_link": - - case "entity_position_link": - - case "entity_reputation": - - case "entity_squad_link": - - case "force": - obj.Force = string(data) - case "goal": - obj.Goal = string(data) - case "hf_link": - - case "hf_skill": - - case "holds_artifact": - obj.HoldsArtifact = n(data) - case "honor_entity": - - case "id": - obj.Id_ = n(data) - case "interaction_knowledge": - obj.InteractionKnowledge = string(data) - case "intrigue_actor": - - case "intrigue_plot": - - case "journey_pet": - obj.JourneyPet = string(data) - case "name": - obj.Name_ = string(data) - case "race": - obj.Race = string(data) - case "relationship_profile_hf_historical": - - case "relationship_profile_hf_visual": - - case "sex": - obj.Sex = n(data) - case "site_link": - - case "site_property": - - case "sphere": - obj.Sphere = string(data) - case "used_identity_id": - obj.UsedIdentityId = n(data) - case "vague_relationship": - - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHonor(d *xml.Decoder, start *xml.StartElement) (*Honor, error) { - var ( - obj = Honor{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "exempt_epid": - data = nil - case "exempt_former_epid": - data = nil - case "gives_precedence": - data = nil - case "granted_to_everybody": - data = nil - case "id": - data = nil - case "name": - data = nil - case "required_battles": - data = nil - case "required_kills": - data = nil - case "required_skill": - data = nil - case "required_skill_ip_total": - data = nil - case "required_years": - data = nil - case "requires_any_melee_or_ranged_skill": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "exempt_epid": - obj.ExemptEpid = n(data) - case "exempt_former_epid": - obj.ExemptFormerEpid = n(data) - case "gives_precedence": - obj.GivesPrecedence = n(data) - case "granted_to_everybody": - obj.GrantedToEverybody = string(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "required_battles": - obj.RequiredBattles = n(data) - case "required_kills": - obj.RequiredKills = n(data) - case "required_skill": - obj.RequiredSkill = string(data) - case "required_skill_ip_total": - obj.RequiredSkillIpTotal = n(data) - case "required_years": - obj.RequiredYears = n(data) - case "requires_any_melee_or_ranged_skill": - obj.RequiresAnyMeleeOrRangedSkill = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseHonorEntity(d *xml.Decoder, start *xml.StartElement) (*HonorEntity, error) { - var ( - obj = HonorEntity{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "battles": - data = nil - case "entity": - data = nil - case "honor_id": - data = nil - case "kills": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "battles": - obj.Battles = n(data) - case "entity": - obj.Entity = n(data) - case "honor_id": - obj.HonorId = n(data) - case "kills": - obj.Kills = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseIdentity(d *xml.Decoder, start *xml.StartElement) (*Identity, error) { - var ( - obj = Identity{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "birth_second": - data = nil - case "birth_year": - data = nil - case "caste": - data = nil - case "entity_id": - data = nil - case "histfig_id": - data = nil - case "id": - data = nil - case "name": - data = nil - case "nemesis_id": - data = nil - case "profession": - data = nil - case "race": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "birth_second": - obj.BirthSecond = n(data) - case "birth_year": - obj.BirthYear = n(data) - case "caste": - obj.Caste = string(data) - case "entity_id": - obj.EntityId = n(data) - case "histfig_id": - obj.HistfigId = n(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "nemesis_id": - obj.NemesisId = n(data) - case "profession": - obj.Profession = string(data) - case "race": - obj.Race = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseIntrigueActor(d *xml.Decoder, start *xml.StartElement) (*IntrigueActor, error) { - var ( - obj = IntrigueActor{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "handle_actor_id": - data = nil - case "hfid": - data = nil - case "local_id": - data = nil - case "promised_actor_immortality": - data = nil - case "promised_me_immortality": - data = nil - case "role": - data = nil - case "strategy": - data = nil - case "strategy_enid": - data = nil - case "strategy_eppid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "handle_actor_id": - obj.HandleActorId = n(data) - case "hfid": - obj.Hfid = n(data) - case "local_id": - obj.LocalId = n(data) - case "promised_actor_immortality": - obj.PromisedActorImmortality = string(data) - case "promised_me_immortality": - obj.PromisedMeImmortality = string(data) - case "role": - obj.Role = string(data) - case "strategy": - obj.Strategy = string(data) - case "strategy_enid": - obj.StrategyEnid = n(data) - case "strategy_eppid": - obj.StrategyEppid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseIntriguePlot(d *xml.Decoder, start *xml.StartElement) (*IntriguePlot, error) { - var ( - obj = IntriguePlot{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "actor_id": - data = nil - case "artifact_id": - data = nil - case "delegated_plot_hfid": - data = nil - case "delegated_plot_id": - data = nil - case "entity_id": - data = nil - case "local_id": - data = nil - case "on_hold": - data = nil - case "parent_plot_hfid": - data = nil - case "parent_plot_id": - data = nil - case "plot_actor": - v, _ := parsePlotActor(d, &t) -obj.PlotActor = v - case "type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "actor_id": - obj.ActorId = n(data) - case "artifact_id": - obj.ArtifactId = n(data) - case "delegated_plot_hfid": - obj.DelegatedPlotHfid = n(data) - case "delegated_plot_id": - obj.DelegatedPlotId = n(data) - case "entity_id": - obj.EntityId = n(data) - case "local_id": - obj.LocalId = n(data) - case "on_hold": - obj.OnHold = string(data) - case "parent_plot_hfid": - obj.ParentPlotHfid = n(data) - case "parent_plot_id": - obj.ParentPlotId = n(data) - case "plot_actor": - - case "type": - obj.Type = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseItem(d *xml.Decoder, start *xml.StartElement) (*Item, error) { - var ( - obj = Item{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "name_string": - data = nil - case "page_number": - data = nil - case "page_written_content_id": - data = nil - case "writing_written_content_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "name_string": - obj.NameString = string(data) - case "page_number": - obj.PageNumber = n(data) - case "page_written_content_id": - obj.PageWrittenContentId = n(data) - case "writing_written_content_id": - obj.WritingWrittenContentId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseLandmass(d *xml.Decoder, start *xml.StartElement) (*Landmass, error) { - var ( - obj = Landmass{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coord_1": - data = nil - case "coord_2": - data = nil - case "id": - data = nil - case "name": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "coord_1": - obj.Coord1 = string(data) - case "coord_2": - obj.Coord2 = string(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseMountainPeak(d *xml.Decoder, start *xml.StartElement) (*MountainPeak, error) { - var ( - obj = MountainPeak{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "height": - data = nil - case "id": - data = nil - case "is_volcano": - data = nil - case "name": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "height": - obj.Height = n(data) - case "id": - obj.Id_ = n(data) - case "is_volcano": - obj.IsVolcano = string(data) - case "name": - obj.Name_ = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseMusicalForm(d *xml.Decoder, start *xml.StartElement) (*MusicalForm, error) { - var ( - obj = MusicalForm{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "description": - data = nil - case "id": - data = nil - case "name": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "description": - obj.Description = string(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseOccasion(d *xml.Decoder, start *xml.StartElement) (*Occasion, error) { - var ( - obj = Occasion{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "event": - data = nil - case "id": - data = nil - case "name": - data = nil - case "schedule": - v, _ := parseSchedule(d, &t) -obj.Schedule = v - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "event": - obj.Event = n(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "schedule": - - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parsePlotActor(d *xml.Decoder, start *xml.StartElement) (*PlotActor, error) { - var ( - obj = PlotActor{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "actor_id": - data = nil - case "agreement_has_messenger": - data = nil - case "agreement_id": - data = nil - case "plot_role": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "actor_id": - obj.ActorId = n(data) - case "agreement_has_messenger": - obj.AgreementHasMessenger = string(data) - case "agreement_id": - obj.AgreementId = n(data) - case "plot_role": - obj.PlotRole = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parsePoeticForm(d *xml.Decoder, start *xml.StartElement) (*PoeticForm, error) { - var ( - obj = PoeticForm{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "description": - data = nil - case "id": - data = nil - case "name": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "description": - obj.Description = string(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseReference(d *xml.Decoder, start *xml.StartElement) (*Reference, error) { - var ( - obj = Reference{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "id": - data = nil - case "type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "id": - obj.Id_ = n(data) - case "type": - obj.Type = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseRegion(d *xml.Decoder, start *xml.StartElement) (*Region, error) { - var ( - obj = Region{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "evilness": - data = nil - case "force_id": - data = nil - case "id": - data = nil - case "name": - data = nil - case "type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "evilness": - obj.Evilness = string(data) - case "force_id": - obj.ForceId = n(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "type": - obj.Type = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseRelationshipProfileHfHistorical(d *xml.Decoder, start *xml.StartElement) (*RelationshipProfileHfHistorical, error) { - var ( - obj = RelationshipProfileHfHistorical{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "fear": - data = nil - case "hf_id": - data = nil - case "love": - data = nil - case "loyalty": - data = nil - case "respect": - data = nil - case "trust": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "fear": - obj.Fear = n(data) - case "hf_id": - obj.HfId = n(data) - case "love": - obj.Love = n(data) - case "loyalty": - obj.Loyalty = n(data) - case "respect": - obj.Respect = n(data) - case "trust": - obj.Trust = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseRelationshipProfileHfVisual(d *xml.Decoder, start *xml.StartElement) (*RelationshipProfileHfVisual, error) { - var ( - obj = RelationshipProfileHfVisual{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "fear": - data = nil - case "hf_id": - data = nil - case "known_identity_id": - data = nil - case "last_meet_seconds72": - data = nil - case "last_meet_year": - data = nil - case "love": - data = nil - case "loyalty": - data = nil - case "meet_count": - data = nil - case "rep_friendly": - data = nil - case "rep_information_source": - data = nil - case "respect": - data = nil - case "trust": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "fear": - obj.Fear = n(data) - case "hf_id": - obj.HfId = n(data) - case "known_identity_id": - obj.KnownIdentityId = n(data) - case "last_meet_seconds72": - obj.LastMeetSeconds72 = n(data) - case "last_meet_year": - obj.LastMeetYear = n(data) - case "love": - obj.Love = n(data) - case "loyalty": - obj.Loyalty = n(data) - case "meet_count": - obj.MeetCount = n(data) - case "rep_friendly": - obj.RepFriendly = n(data) - case "rep_information_source": - obj.RepInformationSource = n(data) - case "respect": - obj.Respect = n(data) - case "trust": - obj.Trust = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseRiver(d *xml.Decoder, start *xml.StartElement) (*River, error) { - var ( - obj = River{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "end_pos": - data = nil - case "name": - data = nil - case "path": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "end_pos": - obj.EndPos = string(data) - case "name": - obj.Name_ = string(data) - case "path": - obj.Path = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseSchedule(d *xml.Decoder, start *xml.StartElement) (*Schedule, error) { - var ( - obj = Schedule{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature": - v, _ := parseFeature(d, &t) -obj.Feature = v - case "id": - data = nil - case "item_subtype": - data = nil - case "item_type": - data = nil - case "reference": - data = nil - case "reference2": - data = nil - case "type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "feature": - - case "id": - obj.Id_ = n(data) - case "item_subtype": - obj.ItemSubtype = string(data) - case "item_type": - obj.ItemType = string(data) - case "reference": - obj.Reference = n(data) - case "reference2": - obj.Reference2 = n(data) - case "type": - obj.Type = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseSite(d *xml.Decoder, start *xml.StartElement) (*Site, error) { - var ( - obj = Site{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "coords": - data = nil - case "cur_owner_id": - data = nil - case "id": - data = nil - case "name": - data = nil - case "rectangle": - data = nil - case "site_properties": - obj.SiteProperties = make(map[int]*SiteProperty) - case "structures": - obj.Structures = make(map[int]*Structure) -parseMap(d, &obj.Structures, parseStructure) - case "type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "coords": - obj.Coords = string(data) - case "cur_owner_id": - obj.CurOwnerId = n(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "rectangle": - obj.Rectangle = string(data) - case "site_properties": - - case "structures": - - case "type": - obj.Type = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseSiteLink(d *xml.Decoder, start *xml.StartElement) (*SiteLink, error) { - var ( - obj = SiteLink{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "link_type": - data = nil - case "occupation_id": - data = nil - case "site_id": - data = nil - case "sub_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "link_type": - obj.LinkType = string(data) - case "occupation_id": - obj.OccupationId = n(data) - case "site_id": - obj.SiteId = n(data) - case "sub_id": - obj.SubId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseSiteProperty(d *xml.Decoder, start *xml.StartElement) (*SiteProperty, error) { - var ( - obj = SiteProperty{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "property_id": - data = nil - case "site_id": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "property_id": - obj.PropertyId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseStructure(d *xml.Decoder, start *xml.StartElement) (*Structure, error) { - var ( - obj = Structure{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "copied_artifact_id": - data = nil - case "deity": - data = nil - case "deity_type": - data = nil - case "dungeon_type": - data = nil - case "entity_id": - data = nil - case "id": - data = nil - case "inhabitant": - data = nil - case "local_id": - data = nil - case "name": - data = nil - case "name2": - data = nil - case "religion": - data = nil - case "subtype": - data = nil - case "type": - data = nil - case "worship_hfid": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "copied_artifact_id": - obj.CopiedArtifactId = n(data) - case "deity": - obj.Deity = n(data) - case "deity_type": - obj.DeityType = n(data) - case "dungeon_type": - obj.DungeonType = n(data) - case "entity_id": - obj.EntityId = n(data) - case "id": - obj.Id_ = n(data) - case "inhabitant": - obj.Inhabitant = n(data) - case "local_id": - obj.LocalId = n(data) - case "name": - obj.Name_ = string(data) - case "name2": - obj.Name2 = string(data) - case "religion": - obj.Religion = n(data) - case "subtype": - obj.Subtype = string(data) - case "type": - obj.Type = string(data) - case "worship_hfid": - obj.WorshipHfid = n(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseUndergroundRegion(d *xml.Decoder, start *xml.StartElement) (*UndergroundRegion, error) { - var ( - obj = UndergroundRegion{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "depth": - data = nil - case "id": - data = nil - case "type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "depth": - obj.Depth = n(data) - case "id": - obj.Id_ = n(data) - case "type": - obj.Type = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseVagueRelationship(d *xml.Decoder, start *xml.StartElement) (*VagueRelationship, error) { - var ( - obj = VagueRelationship{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artistic_buddy": - data = nil - case "atheletic_rival": - data = nil - case "athlete_buddy": - data = nil - case "business_rival": - data = nil - case "childhood_friend": - data = nil - case "grudge": - data = nil - case "hfid": - data = nil - case "jealous_obsession": - data = nil - case "jealous_relationship_grudge": - data = nil - case "persecution_grudge": - data = nil - case "religious_persecution_grudge": - data = nil - case "scholar_buddy": - data = nil - case "supernatural_grudge": - data = nil - case "war_buddy": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "artistic_buddy": - obj.ArtisticBuddy = string(data) - case "atheletic_rival": - obj.AtheleticRival = string(data) - case "athlete_buddy": - obj.AthleteBuddy = string(data) - case "business_rival": - obj.BusinessRival = string(data) - case "childhood_friend": - obj.ChildhoodFriend = string(data) - case "grudge": - obj.Grudge = string(data) - case "hfid": - obj.Hfid = n(data) - case "jealous_obsession": - obj.JealousObsession = string(data) - case "jealous_relationship_grudge": - obj.JealousRelationshipGrudge = string(data) - case "persecution_grudge": - obj.PersecutionGrudge = string(data) - case "religious_persecution_grudge": - obj.ReligiousPersecutionGrudge = string(data) - case "scholar_buddy": - obj.ScholarBuddy = string(data) - case "supernatural_grudge": - obj.SupernaturalGrudge = string(data) - case "war_buddy": - obj.WarBuddy = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseWorldConstruction(d *xml.Decoder, start *xml.StartElement) (*WorldConstruction, error) { - var ( - obj = WorldConstruction{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "id": - data = nil - case "name": - data = nil - case "type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "type": - obj.Type = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func parseWrittenContent(d *xml.Decoder, start *xml.StartElement) (*WrittenContent, error) { - var ( - obj = WrittenContent{} - data []byte - ) - for { - tok, err := d.Token() - if err != nil { - return nil, err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "author": - data = nil - case "author_hfid": - data = nil - case "author_roll": - data = nil - case "form": - data = nil - case "form_id": - data = nil - case "id": - data = nil - case "page_end": - data = nil - case "page_start": - data = nil - case "reference": - v, _ := parseReference(d, &t) -obj.Reference = v - case "style": - data = nil - case "title": - data = nil - case "type": - data = nil - default: - // fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return &obj, nil - } - - switch t.Name.Local { - case "author": - obj.Author = n(data) - case "author_hfid": - obj.AuthorHfid = n(data) - case "author_roll": - obj.AuthorRoll = n(data) - case "form": - obj.Form = string(data) - case "form_id": - obj.FormId = n(data) - case "id": - obj.Id_ = n(data) - case "page_end": - obj.PageEnd = n(data) - case "page_start": - obj.PageStart = n(data) - case "reference": - - case "style": - obj.Style = string(data) - case "title": - obj.Title = string(data) - case "type": - obj.Type = string(data) - default: - // fmt.Println("unknown field", t.Name.Local) - } - } - } -} diff --git a/backend/main.go b/backend/main.go index 09eb877..afc7f8c 100644 --- a/backend/main.go +++ b/backend/main.go @@ -3,8 +3,6 @@ package main import ( "flag" "fmt" - "legendsbrowser/df" - "legendsbrowser/server" "net/http" _ "net/http/pprof" "os" @@ -12,9 +10,11 @@ import ( "github.com/gorilla/mux" "github.com/pkg/profile" + "github.com/robertjanetzko/LegendsBrowser2/backend/model" + "github.com/robertjanetzko/LegendsBrowser2/backend/server" ) -var world *df.DfWorld +var world *model.DfWorld func main() { f := flag.String("f", "", "open a file") @@ -26,7 +26,7 @@ func main() { http.ListenAndServe(":8081", nil) }() - w, err := df.Parse(*f) + w, err := model.Parse(*f) if err != nil { fmt.Println(err) os.Exit(1) diff --git a/backend/model/analyze.go b/backend/model/analyze.go deleted file mode 100644 index ce7695f..0000000 --- a/backend/model/analyze.go +++ /dev/null @@ -1,88 +0,0 @@ -package model - -import ( - "fmt" - "legendsbrowser/util" - "sort" - "strconv" - "strings" - - "github.com/iancoleman/strcase" -) - -func ListOtherElements[T Others](name string, items *[]T) { - fmt.Println() - fmt.Println(name) - fmt.Println() - m := make(map[string]map[string]bool) - cantInt := make(map[string]bool) - isObj := make(map[string]bool) - isMultiple := make(map[string]bool) - for _, item := range *items { - found := make(map[string]bool) - for _, el := range item.Others() { - t := name // item.Type() - if !m[el.XMLName.Local][t] { - if m[el.XMLName.Local] == nil { - m[el.XMLName.Local] = map[string]bool{} - } - m[el.XMLName.Local][t] = true - } - _, err := strconv.Atoi(el.Value) - if err != nil { - cantInt[el.XMLName.Local] = true - } - if strings.Contains(el.Value, "<") { - isObj[el.XMLName.Local] = true - } - if found[el.XMLName.Local] { - isMultiple[el.XMLName.Local] = true - } - found[el.XMLName.Local] = true - } - } - ks := util.Keys(m) - sort.Strings(ks) - for _, k := range ks { - events := util.Keys(m[k]) - sort.Strings(events) - // fmt.Println(strconv.FormatBool(cantInt[k]) + " - " + k + ": " + strings.Join(events, ", ")) - var mult string - if isMultiple[k] { - mult = "[]" - } else { - mult = "" - } - - if isObj[k] { - fmt.Printf("// %s object\n", k) - } else if cantInt[k] { - fmt.Printf("%s *%sstring `xml:\"%s\" json:\"%s,omitempty\"`\n", strcase.ToCamel(k), mult, k, strcase.ToLowerCamel(k)) - } else { - var types []string - if util.ContainsAny(k, "entity_id", "enid", "civ_id", "entity_1", "entity_2") { - types = append(types, "entity") - } - if util.ContainsAny(k, "site_id") { - types = append(types, "site") - } - if util.ContainsAny(k, "structure_id") { - types = append(types, "structure") - } - if util.ContainsAny(k, "hfid", "hist_figure_id", "hist_fig_id") { - types = append(types, "hf") - } - if util.ContainsAny(k, "wcid", "wc_id") { - types = append(types, "wc") - } - if util.ContainsAny(k, "artifact_id") { - types = append(types, "artifact") - } - typestr := strings.Join(types, ",") - if typestr != "" { - typestr = fmt.Sprintf(" legend:\"%s\"", typestr) - } - fmt.Printf("%s *%sint `xml:\"%s\" json:\"%s,omitempty\"%s`\n", strcase.ToCamel(k), mult, k, strcase.ToLowerCamel(k), typestr) - } - } -} diff --git a/backend/model/events.go b/backend/model/events.go deleted file mode 100644 index 3b727d7..0000000 --- a/backend/model/events.go +++ /dev/null @@ -1,242 +0,0 @@ -package model - -type HistoricalEvent struct { - Id_ int `xml:"id" json:"id"` - Year int `xml:"year" json:"year"` - Seconds int `xml:"seconds72" json:"seconds72"` - TypedObject - - ASupportMercEnid *int `xml:"a_support_merc_enid" json:"aSupportMercEnid,omitempty" legend:"entity"` - AccountShift *int `xml:"account_shift" json:"accountShift,omitempty"` - AcquirerEnid *int `xml:"acquirer_enid" json:"acquirerEnid,omitempty" legend:"entity"` - AcquirerHfid *int `xml:"acquirer_hfid" json:"acquirerHfid,omitempty" legend:"hf"` - Action *string `xml:"action" json:"action,omitempty"` - ActorHfid *int `xml:"actor_hfid" json:"actorHfid,omitempty" legend:"hf"` - AgreementId *int `xml:"agreement_id" json:"agreementId,omitempty"` - Allotment *int `xml:"allotment" json:"allotment,omitempty"` - AllotmentIndex *int `xml:"allotment_index" json:"allotmentIndex,omitempty"` - AllyDefenseBonus *int `xml:"ally_defense_bonus" json:"allyDefenseBonus,omitempty"` - AppointerHfid *int `xml:"appointer_hfid" json:"appointerHfid,omitempty" legend:"hf"` - ArrestingEnid *int `xml:"arresting_enid" json:"arrestingEnid,omitempty" legend:"entity"` - ArtifactId *int `xml:"artifact_id" json:"artifactId,omitempty" legend:"artifact"` - AttackerCivId *int `xml:"attacker_civ_id" json:"attackerCivId,omitempty" legend:"entity"` - AttackerGeneralHfid *int `xml:"attacker_general_hfid" json:"attackerGeneralHfid,omitempty" legend:"hf"` - AttackerHfid *int `xml:"attacker_hfid" json:"attackerHfid,omitempty" legend:"hf"` - AttackerMercEnid *int `xml:"attacker_merc_enid" json:"attackerMercEnid,omitempty" legend:"entity"` - BodyState *string `xml:"body_state" json:"bodyState,omitempty"` - BuilderHfid *int `xml:"builder_hfid" json:"builderHfid,omitempty" legend:"hf"` - BuildingProfileId *int `xml:"building_profile_id" json:"buildingProfileId,omitempty"` - Cause *string `xml:"cause" json:"cause,omitempty"` - ChangeeHfid *int `xml:"changee_hfid" json:"changeeHfid,omitempty" legend:"hf"` - ChangerHfid *int `xml:"changer_hfid" json:"changerHfid,omitempty" legend:"hf"` - Circumstance *string `xml:"circumstance" json:"circumstance,omitempty"` - CircumstanceId *int `xml:"circumstance_id" json:"circumstanceId,omitempty"` - CivEntityId *int `xml:"civ_entity_id" json:"civEntityId,omitempty" legend:"entity"` - CivId *int `xml:"civ_id" json:"civId,omitempty" legend:"entity"` - Claim *string `xml:"claim" json:"claim,omitempty"` - CoconspiratorBonus *int `xml:"coconspirator_bonus" json:"coconspiratorBonus,omitempty"` - CompetitorHfid *[]int `xml:"competitor_hfid" json:"competitorHfid,omitempty" legend:"hf"` - ConfessedAfterApbArrestEnid *int `xml:"confessed_after_apb_arrest_enid" json:"confessedAfterApbArrestEnid,omitempty" legend:"entity"` - ConspiratorHfid *[]int `xml:"conspirator_hfid" json:"conspiratorHfid,omitempty" legend:"hf"` - ContactHfid *int `xml:"contact_hfid" json:"contactHfid,omitempty" legend:"hf"` - ConvictIsContact *string `xml:"convict_is_contact" json:"convictIsContact,omitempty"` - ConvictedHfid *int `xml:"convicted_hfid" json:"convictedHfid,omitempty" legend:"hf"` - ConvicterEnid *int `xml:"convicter_enid" json:"convicterEnid,omitempty" legend:"entity"` - Coords *string `xml:"coords" json:"coords,omitempty"` - CorruptConvicterHfid *int `xml:"corrupt_convicter_hfid" json:"corruptConvicterHfid,omitempty" legend:"hf"` - CorruptorHfid *int `xml:"corruptor_hfid" json:"corruptorHfid,omitempty" legend:"hf"` - CorruptorIdentity *int `xml:"corruptor_identity" json:"corruptorIdentity,omitempty"` - CorruptorSeenAs *string `xml:"corruptor_seen_as" json:"corruptorSeenAs,omitempty"` - CreatorHfid *int `xml:"creator_hfid" json:"creatorHfid,omitempty" legend:"hf"` - Crime *string `xml:"crime" json:"crime,omitempty"` - DSupportMercEnid *int `xml:"d_support_merc_enid" json:"dSupportMercEnid,omitempty" legend:"entity"` - DeathPenalty *string `xml:"death_penalty" json:"deathPenalty,omitempty"` - DefenderCivId *int `xml:"defender_civ_id" json:"defenderCivId,omitempty" legend:"entity"` - DefenderGeneralHfid *int `xml:"defender_general_hfid" json:"defenderGeneralHfid,omitempty" legend:"hf"` - DefenderMercEnid *int `xml:"defender_merc_enid" json:"defenderMercEnid,omitempty" legend:"entity"` - Delegated *string `xml:"delegated" json:"delegated,omitempty"` - DestEntityId *int `xml:"dest_entity_id" json:"destEntityId,omitempty" legend:"entity"` - DestSiteId *int `xml:"dest_site_id" json:"destSiteId,omitempty" legend:"site"` - DestStructureId *int `xml:"dest_structure_id" json:"destStructureId,omitempty" legend:"structure"` - DestroyedStructureId *int `xml:"destroyed_structure_id" json:"destroyedStructureId,omitempty" legend:"structure"` - DestroyerEnid *int `xml:"destroyer_enid" json:"destroyerEnid,omitempty" legend:"entity"` - Detected *string `xml:"detected" json:"detected,omitempty"` - DidNotRevealAllInInterrogation *string `xml:"did_not_reveal_all_in_interrogation" json:"didNotRevealAllInInterrogation,omitempty"` - Dispute *string `xml:"dispute" json:"dispute,omitempty"` - DoerHfid *int `xml:"doer_hfid" json:"doerHfid,omitempty" legend:"hf"` - Entity1 *int `xml:"entity_1" json:"entity1,omitempty" legend:"entity"` - Entity2 *int `xml:"entity_2" json:"entity2,omitempty" legend:"entity"` - EntityId *int `xml:"entity_id" json:"entityId,omitempty" legend:"entity"` - EntityId1 *int `xml:"entity_id_1" json:"entityId1,omitempty" legend:"entity"` - EntityId2 *int `xml:"entity_id_2" json:"entityId2,omitempty" legend:"entity"` - Exiled *string `xml:"exiled" json:"exiled,omitempty"` - ExpelledCreature *[]int `xml:"expelled_creature" json:"expelledCreature,omitempty"` - ExpelledHfid *[]int `xml:"expelled_hfid" json:"expelledHfid,omitempty" legend:"hf"` - ExpelledNumber *[]int `xml:"expelled_number" json:"expelledNumber,omitempty"` - ExpelledPopId *[]int `xml:"expelled_pop_id" json:"expelledPopId,omitempty"` - FailedJudgmentTest *string `xml:"failed_judgment_test" json:"failedJudgmentTest,omitempty"` - FeatureLayerId *int `xml:"feature_layer_id" json:"featureLayerId,omitempty"` - First *string `xml:"first" json:"first,omitempty"` - FooledHfid *int `xml:"fooled_hfid" json:"fooledHfid,omitempty" legend:"hf"` - FormId *int `xml:"form_id" json:"formId,omitempty"` - FramerHfid *int `xml:"framer_hfid" json:"framerHfid,omitempty" legend:"hf"` - FromOriginal *string `xml:"from_original" json:"fromOriginal,omitempty"` - GamblerHfid *int `xml:"gambler_hfid" json:"gamblerHfid,omitempty" legend:"hf"` - GiverEntityId *int `xml:"giver_entity_id" json:"giverEntityId,omitempty" legend:"entity"` - GiverHistFigureId *int `xml:"giver_hist_figure_id" json:"giverHistFigureId,omitempty" legend:"hf"` - Group1Hfid *int `xml:"group_1_hfid" json:"group1Hfid,omitempty" legend:"hf"` - Group2Hfid *[]int `xml:"group_2_hfid" json:"group2Hfid,omitempty" legend:"hf"` - GroupHfid *[]int `xml:"group_hfid" json:"groupHfid,omitempty" legend:"hf"` - HeldFirmInInterrogation *string `xml:"held_firm_in_interrogation" json:"heldFirmInInterrogation,omitempty"` - HfRep1Of2 *string `xml:"hf_rep_1_of_2" json:"hfRep1Of2,omitempty"` - HfRep2Of1 *string `xml:"hf_rep_2_of_1" json:"hfRep2Of1,omitempty"` - Hfid *[]int `xml:"hfid" json:"hfid,omitempty" legend:"hf"` - Hfid1 *int `xml:"hfid1" json:"hfid1,omitempty" legend:"hf"` - Hfid2 *int `xml:"hfid2" json:"hfid2,omitempty" legend:"hf"` - HfidTarget *int `xml:"hfid_target" json:"hfidTarget,omitempty" legend:"hf"` - HistFigId *int `xml:"hist_fig_id" json:"histFigId,omitempty" legend:"hf"` - HistFigureId *int `xml:"hist_figure_id" json:"histFigureId,omitempty" legend:"hf"` - HonorId *int `xml:"honor_id" json:"honorId,omitempty"` - IdentityId *int `xml:"identity_id" json:"identityId,omitempty" legend:"entity"` - IdentityId1 *int `xml:"identity_id1" json:"identityId1,omitempty" legend:"entity"` - IdentityId2 *int `xml:"identity_id2" json:"identityId2,omitempty" legend:"entity"` - ImplicatedHfid *[]int `xml:"implicated_hfid" json:"implicatedHfid,omitempty" legend:"hf"` - Inherited *string `xml:"inherited" json:"inherited,omitempty"` - InitiatingEnid *int `xml:"initiating_enid" json:"initiatingEnid,omitempty" legend:"entity"` - InstigatorHfid *int `xml:"instigator_hfid" json:"instigatorHfid,omitempty" legend:"hf"` - Interaction *string `xml:"interaction" json:"interaction,omitempty"` - InterrogatorHfid *int `xml:"interrogator_hfid" json:"interrogatorHfid,omitempty" legend:"hf"` - JoinEntityId *int `xml:"join_entity_id" json:"joinEntityId,omitempty" legend:"entity"` - JoinedEntityId *int `xml:"joined_entity_id" json:"joinedEntityId,omitempty" legend:"entity"` - JoinerEntityId *int `xml:"joiner_entity_id" json:"joinerEntityId,omitempty" legend:"entity"` - JoiningEnid *[]int `xml:"joining_enid" json:"joiningEnid,omitempty" legend:"entity"` - Knowledge *string `xml:"knowledge" json:"knowledge,omitempty"` - LastOwnerHfid *int `xml:"last_owner_hfid" json:"lastOwnerHfid,omitempty" legend:"hf"` - LeaderHfid *int `xml:"leader_hfid" json:"leaderHfid,omitempty" legend:"hf"` - Link *string `xml:"link" json:"link,omitempty"` - LureHfid *int `xml:"lure_hfid" json:"lureHfid,omitempty" legend:"hf"` - MasterWcid *int `xml:"master_wcid" json:"masterWcid,omitempty" legend:"wc"` - Method *string `xml:"method" json:"method,omitempty"` - Modification *string `xml:"modification" json:"modification,omitempty"` - ModifierHfid *int `xml:"modifier_hfid" json:"modifierHfid,omitempty" legend:"hf"` - Mood *string `xml:"mood" json:"mood,omitempty"` - NameOnly *string `xml:"name_only" json:"nameOnly,omitempty"` - NewAbId *int `xml:"new_ab_id" json:"newAbId,omitempty"` - NewAccount *int `xml:"new_account" json:"newAccount,omitempty"` - NewCaste *string `xml:"new_caste" json:"newCaste,omitempty"` - NewEquipmentLevel *int `xml:"new_equipment_level" json:"newEquipmentLevel,omitempty"` - NewLeaderHfid *int `xml:"new_leader_hfid" json:"newLeaderHfid,omitempty" legend:"hf"` - NewRace *string `xml:"new_race" json:"newRace,omitempty"` - NewSiteCivId *int `xml:"new_site_civ_id" json:"newSiteCivId,omitempty" legend:"entity"` - OccasionId *int `xml:"occasion_id" json:"occasionId,omitempty"` - OldAbId *int `xml:"old_ab_id" json:"oldAbId,omitempty"` - OldAccount *int `xml:"old_account" json:"oldAccount,omitempty"` - OldCaste *string `xml:"old_caste" json:"oldCaste,omitempty"` - OldRace *string `xml:"old_race" json:"oldRace,omitempty"` - OverthrownHfid *int `xml:"overthrown_hfid" json:"overthrownHfid,omitempty" legend:"hf"` - PartialIncorporation *string `xml:"partial_incorporation" json:"partialIncorporation,omitempty"` - PersecutorEnid *int `xml:"persecutor_enid" json:"persecutorEnid,omitempty" legend:"entity"` - PersecutorHfid *int `xml:"persecutor_hfid" json:"persecutorHfid,omitempty" legend:"hf"` - PlotterHfid *int `xml:"plotter_hfid" json:"plotterHfid,omitempty" legend:"hf"` - PopFlid *int `xml:"pop_flid" json:"popFlid,omitempty"` - PopNumberMoved *int `xml:"pop_number_moved" json:"popNumberMoved,omitempty"` - PopRace *int `xml:"pop_race" json:"popRace,omitempty"` - PopSrid *int `xml:"pop_srid" json:"popSrid,omitempty"` - PosTakerHfid *int `xml:"pos_taker_hfid" json:"posTakerHfid,omitempty" legend:"hf"` - PositionId *int `xml:"position_id" json:"positionId,omitempty"` - PositionProfileId *int `xml:"position_profile_id" json:"positionProfileId,omitempty"` - PrisonMonths *int `xml:"prison_months" json:"prisonMonths,omitempty"` - ProductionZoneId *int `xml:"production_zone_id" json:"productionZoneId,omitempty"` - PromiseToHfid *int `xml:"promise_to_hfid" json:"promiseToHfid,omitempty" legend:"hf"` - PropertyConfiscatedFromHfid *[]int `xml:"property_confiscated_from_hfid" json:"propertyConfiscatedFromHfid,omitempty" legend:"hf"` - PurchasedUnowned *string `xml:"purchased_unowned" json:"purchasedUnowned,omitempty"` - Quality *int `xml:"quality" json:"quality,omitempty"` - Reason *string `xml:"reason" json:"reason,omitempty"` - ReasonId *int `xml:"reason_id" json:"reasonId,omitempty"` - RebuiltRuined *string `xml:"rebuilt_ruined" json:"rebuiltRuined,omitempty"` - ReceiverEntityId *int `xml:"receiver_entity_id" json:"receiverEntityId,omitempty" legend:"entity"` - ReceiverHistFigureId *int `xml:"receiver_hist_figure_id" json:"receiverHistFigureId,omitempty" legend:"hf"` - Relationship *string `xml:"relationship" json:"relationship,omitempty"` - RelevantEntityId *int `xml:"relevant_entity_id" json:"relevantEntityId,omitempty" legend:"entity"` - RelevantIdForMethod *int `xml:"relevant_id_for_method" json:"relevantIdForMethod,omitempty"` - RelevantPositionProfileId *int `xml:"relevant_position_profile_id" json:"relevantPositionProfileId,omitempty"` - ReligionId *int `xml:"religion_id" json:"religionId,omitempty"` - ResidentCivId *int `xml:"resident_civ_id" json:"residentCivId,omitempty" legend:"entity"` - Return *string `xml:"return" json:"return,omitempty"` - ScheduleId *int `xml:"schedule_id" json:"scheduleId,omitempty"` - SecretGoal *string `xml:"secret_goal" json:"secretGoal,omitempty"` - SeekerHfid *int `xml:"seeker_hfid" json:"seekerHfid,omitempty" legend:"hf"` - ShrineAmountDestroyed *int `xml:"shrine_amount_destroyed" json:"shrineAmountDestroyed,omitempty"` - SiteCivId *int `xml:"site_civ_id" json:"siteCivId,omitempty" legend:"entity"` - SiteEntityId *int `xml:"site_entity_id" json:"siteEntityId,omitempty" legend:"entity"` - SiteHfid *int `xml:"site_hfid" json:"siteHfid,omitempty" legend:"hf"` - SiteId *int `xml:"site_id" json:"siteId,omitempty" legend:"site"` - SiteId1 *int `xml:"site_id1" json:"siteId1,omitempty" legend:"site"` - SiteId2 *int `xml:"site_id2" json:"siteId2,omitempty" legend:"site"` - SiteId_1 *int `xml:"site_id_1" json:"siteId_1,omitempty" legend:"site"` - SiteId_2 *int `xml:"site_id_2" json:"siteId_2,omitempty" legend:"site"` - SitePropertyId *int `xml:"site_property_id" json:"sitePropertyId,omitempty"` - Situation *string `xml:"situation" json:"situation,omitempty"` - SlayerCaste *string `xml:"slayer_caste" json:"slayerCaste,omitempty"` - SlayerHfid *int `xml:"slayer_hfid" json:"slayerHfid,omitempty" legend:"hf"` - SlayerItemId *int `xml:"slayer_item_id" json:"slayerItemId,omitempty"` - SlayerRace *string `xml:"slayer_race" json:"slayerRace,omitempty"` - SlayerShooterItemId *int `xml:"slayer_shooter_item_id" json:"slayerShooterItemId,omitempty"` - SnatcherHfid *int `xml:"snatcher_hfid" json:"snatcherHfid,omitempty" legend:"hf"` - SourceEntityId *int `xml:"source_entity_id" json:"sourceEntityId,omitempty" legend:"entity"` - SourceSiteId *int `xml:"source_site_id" json:"sourceSiteId,omitempty" legend:"site"` - SourceStructureId *int `xml:"source_structure_id" json:"sourceStructureId,omitempty" legend:"structure"` - SpeakerHfid *int `xml:"speaker_hfid" json:"speakerHfid,omitempty" legend:"hf"` - State *string `xml:"state" json:"state,omitempty"` - StructureId *int `xml:"structure_id" json:"structureId,omitempty" legend:"structure"` - StudentHfid *int `xml:"student_hfid" json:"studentHfid,omitempty" legend:"hf"` - SubregionId *int `xml:"subregion_id" json:"subregionId,omitempty"` - Subtype *string `xml:"subtype" json:"subtype,omitempty"` - Successful *string `xml:"successful" json:"successful,omitempty"` - SurveiledContact *string `xml:"surveiled_contact" json:"surveiledContact,omitempty"` - SurveiledConvicted *string `xml:"surveiled_convicted" json:"surveiledConvicted,omitempty"` - TargetEnid *int `xml:"target_enid" json:"targetEnid,omitempty" legend:"entity"` - TargetHfid *int `xml:"target_hfid" json:"targetHfid,omitempty" legend:"hf"` - TargetIdentity *int `xml:"target_identity" json:"targetIdentity,omitempty"` - TargetSeenAs *string `xml:"target_seen_as" json:"targetSeenAs,omitempty"` - TeacherHfid *int `xml:"teacher_hfid" json:"teacherHfid,omitempty" legend:"hf"` - TopFacet *string `xml:"top_facet" json:"topFacet,omitempty"` - TopFacetModifier *int `xml:"top_facet_modifier" json:"topFacetModifier,omitempty"` - TopFacetRating *int `xml:"top_facet_rating" json:"topFacetRating,omitempty"` - TopRelationshipFactor *string `xml:"top_relationship_factor" json:"topRelationshipFactor,omitempty"` - TopRelationshipModifier *int `xml:"top_relationship_modifier" json:"topRelationshipModifier,omitempty"` - TopRelationshipRating *int `xml:"top_relationship_rating" json:"topRelationshipRating,omitempty"` - TopValue *string `xml:"top_value" json:"topValue,omitempty"` - TopValueModifier *int `xml:"top_value_modifier" json:"topValueModifier,omitempty"` - TopValueRating *int `xml:"top_value_rating" json:"topValueRating,omitempty"` - Topic *string `xml:"topic" json:"topic,omitempty"` - TraderEntityId *int `xml:"trader_entity_id" json:"traderEntityId,omitempty" legend:"entity"` - TraderHfid *int `xml:"trader_hfid" json:"traderHfid,omitempty" legend:"hf"` - TricksterHfid *int `xml:"trickster_hfid" json:"tricksterHfid,omitempty" legend:"hf"` - UnitId *int `xml:"unit_id" json:"unitId,omitempty"` - UnitType *string `xml:"unit_type" json:"unitType,omitempty"` - WantedAndRecognized *string `xml:"wanted_and_recognized" json:"wantedAndRecognized,omitempty"` - WcId *int `xml:"wc_id" json:"wcId,omitempty" legend:"wc"` - Wcid *int `xml:"wcid" json:"wcid,omitempty" legend:"wc"` - WinnerHfid *int `xml:"winner_hfid" json:"winnerHfid,omitempty" legend:"hf"` - WoundeeHfid *int `xml:"woundee_hfid" json:"woundeeHfid,omitempty" legend:"hf"` - WounderHfid *int `xml:"wounder_hfid" json:"wounderHfid,omitempty" legend:"hf"` - WrongfulConviction *string `xml:"wrongful_conviction" json:"wrongfulConviction,omitempty"` - - //OtherElements -} - -func (r *HistoricalEvent) Id() int { return r.Id_ } -func (r *HistoricalEvent) Name() string { return r.Type() } - -type EventObject struct { - Events []*HistoricalEvent `json:"events"` -} - -func (r *EventObject) GetEvents() []*HistoricalEvent { return r.Events } -func (r *EventObject) SetEvents(events []*HistoricalEvent) { r.Events = events } - -type HasEvents interface { - GetEvents() []*HistoricalEvent - SetEvents([]*HistoricalEvent) -} diff --git a/backend/model/model.go b/backend/model/model.go index ea2ddee..0b0fa0d 100644 --- a/backend/model/model.go +++ b/backend/model/model.go @@ -1,219 +1,12701 @@ +// Code generated by legendsbrowser; DO NOT EDIT. package model -type Region struct { - NamedObject - Type string `xml:"type" json:"type"` - // OtherElements - EventObject -} - -type UndergroundRegion struct { - NamedObject - Type string `xml:"type" json:"type"` - Depth *int `xml:"depth" json:"depth,omitempty"` - // OtherElements - EventObject -} - -type Landmass struct { - NamedObject - // OtherElements - EventObject -} - -type Site struct { - NamedObject - Type string `xml:"type" json:"type"` - Coords string `xml:"coords" json:"coords"` - Rectangle string `xml:"rectangle" json:"rectangle"` - Structures []Structure `xml:"structures>structure" json:"structures"` - - // OtherElements - EventObject -} - -// func (obj Site) id() int { return obj.Id } -// func (obj Site) name() string { return obj.Name } - -type Structure struct { - LocalId int `xml:"local_id" json:"localId"` - Name string `xml:"name" json:"name"` - Type string `xml:"type" json:"type"` - // OtherElements - EventObject -} - -type WorldConstruction struct { - NamedObject - // OtherElements - EventObject -} +import ( + "encoding/xml" + "github.com/iancoleman/strcase" + "strconv" +) type Artifact struct { - NamedObject - SiteId int `xml:"site_id" json:"siteId"` - AbsTileX *int `xml:"abs_tile_x" json:"absTileX,omitempty"` - AbsTileY *int `xml:"abs_tile_y" json:"absTileY,omitempty"` - AbsTileZ *int `xml:"abs_tile_z" json:"absTileZ,omitempty"` - HolderHfid *int `xml:"holder_hfid" json:"holderHfid,omitempty" legend:"hf"` - // item object - StructureLocalId *int `xml:"structure_local_id" json:"structureLocalId,omitempty"` - SubregionId *int `xml:"subregion_id" json:"subregionId,omitempty"` - - // OtherElements - - EventObject + AbsTileX int `json:"absTileX" legend:"base"` + AbsTileY int `json:"absTileY" legend:"base"` + AbsTileZ int `json:"absTileZ" legend:"base"` + HolderHfid int `json:"holderHfid" legend:"base"` + Id_ int `json:"id" legend:"plus"` + Item *Item `json:"item" legend:"base"` + ItemDescription string `json:"itemDescription" legend:"plus"` + ItemSubtype string `json:"itemSubtype" legend:"plus"` + ItemType string `json:"itemType" legend:"plus"` + Mat string `json:"mat" legend:"plus"` + Name_ string `json:"name" legend:"base"` + PageCount int `json:"pageCount" legend:"plus"` + SiteId int `json:"siteId" legend:"base"` + StructureLocalId int `json:"structureLocalId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + Writing int `json:"writing" legend:"plus"` } -type HistoricalFigure struct { - NamedObject +func (x *Artifact) Id() int { return x.Id_ } +func (x *Artifact) Name() string { return x.Name_ } - Race *string `xml:"race" json:"race"` - // Caste *string `xml:"caste" json:"caste"` - // ActiveInteraction *[]string `xml:"active_interaction" json:"activeInteraction,omitempty"` - // Animated *string `xml:"animated" json:"animated,omitempty"` - // AnimatedString *string `xml:"animated_string" json:"animatedString,omitempty"` - // Appeared *int `xml:"appeared" json:"appeared,omitempty"` - // AssociatedType *string `xml:"associated_type" json:"associatedType,omitempty"` - // BirthSeconds72 *int `xml:"birth_seconds72" json:"birthSeconds72,omitempty"` - // BirthYear *int `xml:"birth_year" json:"birthYear,omitempty"` - // CurrentIdentityId *int `xml:"current_identity_id" json:"currentIdentityId,omitempty" legend:"entity"` - // DeathSeconds72 *int `xml:"death_seconds72" json:"deathSeconds72,omitempty"` - // DeathYear *int `xml:"death_year" json:"deathYear,omitempty"` - // Deity *string `xml:"deity" json:"deity,omitempty"` - // EntPopId *int `xml:"ent_pop_id" json:"entPopId,omitempty"` - // // entity_former_position_link object - // // entity_link object - // // entity_position_link object - // // entity_reputation object - // // entity_squad_link object - // Force *string `xml:"force" json:"force,omitempty"` - // Goal *[]string `xml:"goal" json:"goal,omitempty"` - // // hf_link object - // // hf_skill object - // HoldsArtifact *[]int `xml:"holds_artifact" json:"holdsArtifact,omitempty"` - // // honor_entity object - // InteractionKnowledge *[]string `xml:"interaction_knowledge" json:"interactionKnowledge,omitempty"` - // // intrigue_actor object - // // intrigue_plot object - // JourneyPet *[]string `xml:"journey_pet" json:"journeyPet,omitempty"` - // // relationship_profile_hf_historical object - // // relationship_profile_hf_visual object - // // site_link object - // // site_property object - // Sphere *[]string `xml:"sphere" json:"sphere,omitempty"` - // UsedIdentityId *[]int `xml:"used_identity_id" json:"usedIdentityId,omitempty" legend:"entity"` - // // vague_relationship object - - // OtherElements - - EventObject +type Circumstance struct { + Defeated int `json:"defeated" legend:"plus"` + HistEventCollection int `json:"histEventCollection" legend:"plus"` + Murdered int `json:"murdered" legend:"plus"` + Type string `json:"type" legend:"plus"` +} +type Creature struct { + AllCastesAlive string `json:"allCastesAlive" legend:"plus"` + ArtificialHiveable string `json:"artificialHiveable" legend:"plus"` + BiomeDesertBadland string `json:"biomeDesertBadland" legend:"plus"` + BiomeDesertRock string `json:"biomeDesertRock" legend:"plus"` + BiomeDesertSand string `json:"biomeDesertSand" legend:"plus"` + BiomeForestTaiga string `json:"biomeForestTaiga" legend:"plus"` + BiomeForestTemperateBroadleaf string `json:"biomeForestTemperateBroadleaf" legend:"plus"` + BiomeForestTemperateConifer string `json:"biomeForestTemperateConifer" legend:"plus"` + BiomeForestTropicalConifer string `json:"biomeForestTropicalConifer" legend:"plus"` + BiomeForestTropicalDryBroadleaf string `json:"biomeForestTropicalDryBroadleaf" legend:"plus"` + BiomeForestTropicalMoistBroadleaf string `json:"biomeForestTropicalMoistBroadleaf" legend:"plus"` + BiomeGlacier string `json:"biomeGlacier" legend:"plus"` + BiomeGrasslandTemperate string `json:"biomeGrasslandTemperate" legend:"plus"` + BiomeGrasslandTropical string `json:"biomeGrasslandTropical" legend:"plus"` + BiomeLakeTemperateBrackishwater string `json:"biomeLakeTemperateBrackishwater" legend:"plus"` + BiomeLakeTemperateFreshwater string `json:"biomeLakeTemperateFreshwater" legend:"plus"` + BiomeLakeTemperateSaltwater string `json:"biomeLakeTemperateSaltwater" legend:"plus"` + BiomeLakeTropicalBrackishwater string `json:"biomeLakeTropicalBrackishwater" legend:"plus"` + BiomeLakeTropicalFreshwater string `json:"biomeLakeTropicalFreshwater" legend:"plus"` + BiomeLakeTropicalSaltwater string `json:"biomeLakeTropicalSaltwater" legend:"plus"` + BiomeMarshTemperateFreshwater string `json:"biomeMarshTemperateFreshwater" legend:"plus"` + BiomeMarshTemperateSaltwater string `json:"biomeMarshTemperateSaltwater" legend:"plus"` + BiomeMarshTropicalFreshwater string `json:"biomeMarshTropicalFreshwater" legend:"plus"` + BiomeMarshTropicalSaltwater string `json:"biomeMarshTropicalSaltwater" legend:"plus"` + BiomeMountain string `json:"biomeMountain" legend:"plus"` + BiomeOceanArctic string `json:"biomeOceanArctic" legend:"plus"` + BiomeOceanTemperate string `json:"biomeOceanTemperate" legend:"plus"` + BiomeOceanTropical string `json:"biomeOceanTropical" legend:"plus"` + BiomePoolTemperateBrackishwater string `json:"biomePoolTemperateBrackishwater" legend:"plus"` + BiomePoolTemperateFreshwater string `json:"biomePoolTemperateFreshwater" legend:"plus"` + BiomePoolTemperateSaltwater string `json:"biomePoolTemperateSaltwater" legend:"plus"` + BiomePoolTropicalBrackishwater string `json:"biomePoolTropicalBrackishwater" legend:"plus"` + BiomePoolTropicalFreshwater string `json:"biomePoolTropicalFreshwater" legend:"plus"` + BiomePoolTropicalSaltwater string `json:"biomePoolTropicalSaltwater" legend:"plus"` + BiomeRiverTemperateBrackishwater string `json:"biomeRiverTemperateBrackishwater" legend:"plus"` + BiomeRiverTemperateFreshwater string `json:"biomeRiverTemperateFreshwater" legend:"plus"` + BiomeRiverTemperateSaltwater string `json:"biomeRiverTemperateSaltwater" legend:"plus"` + BiomeRiverTropicalBrackishwater string `json:"biomeRiverTropicalBrackishwater" legend:"plus"` + BiomeRiverTropicalFreshwater string `json:"biomeRiverTropicalFreshwater" legend:"plus"` + BiomeRiverTropicalSaltwater string `json:"biomeRiverTropicalSaltwater" legend:"plus"` + BiomeSavannaTemperate string `json:"biomeSavannaTemperate" legend:"plus"` + BiomeSavannaTropical string `json:"biomeSavannaTropical" legend:"plus"` + BiomeShrublandTemperate string `json:"biomeShrublandTemperate" legend:"plus"` + BiomeShrublandTropical string `json:"biomeShrublandTropical" legend:"plus"` + BiomeSubterraneanChasm string `json:"biomeSubterraneanChasm" legend:"plus"` + BiomeSubterraneanLava string `json:"biomeSubterraneanLava" legend:"plus"` + BiomeSubterraneanWater string `json:"biomeSubterraneanWater" legend:"plus"` + BiomeSwampMangrove string `json:"biomeSwampMangrove" legend:"plus"` + BiomeSwampTemperateFreshwater string `json:"biomeSwampTemperateFreshwater" legend:"plus"` + BiomeSwampTemperateSaltwater string `json:"biomeSwampTemperateSaltwater" legend:"plus"` + BiomeSwampTropicalFreshwater string `json:"biomeSwampTropicalFreshwater" legend:"plus"` + BiomeSwampTropicalSaltwater string `json:"biomeSwampTropicalSaltwater" legend:"plus"` + BiomeTundra string `json:"biomeTundra" legend:"plus"` + CreatureId string `json:"creatureId" legend:"plus"` + DoesNotExist string `json:"doesNotExist" legend:"plus"` + Equipment string `json:"equipment" legend:"plus"` + EquipmentWagon string `json:"equipmentWagon" legend:"plus"` + Evil string `json:"evil" legend:"plus"` + Fanciful string `json:"fanciful" legend:"plus"` + Generated string `json:"generated" legend:"plus"` + Good string `json:"good" legend:"plus"` + HasAnyBenign string `json:"hasAnyBenign" legend:"plus"` + HasAnyCanSwim string `json:"hasAnyCanSwim" legend:"plus"` + HasAnyCannotBreatheAir string `json:"hasAnyCannotBreatheAir" legend:"plus"` + HasAnyCannotBreatheWater string `json:"hasAnyCannotBreatheWater" legend:"plus"` + HasAnyCarnivore string `json:"hasAnyCarnivore" legend:"plus"` + HasAnyCommonDomestic string `json:"hasAnyCommonDomestic" legend:"plus"` + HasAnyCuriousBeast string `json:"hasAnyCuriousBeast" legend:"plus"` + HasAnyDemon string `json:"hasAnyDemon" legend:"plus"` + HasAnyFeatureBeast string `json:"hasAnyFeatureBeast" legend:"plus"` + HasAnyFlier string `json:"hasAnyFlier" legend:"plus"` + HasAnyFlyRaceGait string `json:"hasAnyFlyRaceGait" legend:"plus"` + HasAnyGrasp string `json:"hasAnyGrasp" legend:"plus"` + HasAnyGrazer string `json:"hasAnyGrazer" legend:"plus"` + HasAnyHasBlood string `json:"hasAnyHasBlood" legend:"plus"` + HasAnyImmobile string `json:"hasAnyImmobile" legend:"plus"` + HasAnyIntelligentLearns string `json:"hasAnyIntelligentLearns" legend:"plus"` + HasAnyIntelligentSpeaks string `json:"hasAnyIntelligentSpeaks" legend:"plus"` + HasAnyLargePredator string `json:"hasAnyLargePredator" legend:"plus"` + HasAnyLocalPopsControllable string `json:"hasAnyLocalPopsControllable" legend:"plus"` + HasAnyLocalPopsProduceHeroes string `json:"hasAnyLocalPopsProduceHeroes" legend:"plus"` + HasAnyMegabeast string `json:"hasAnyMegabeast" legend:"plus"` + HasAnyMischievous string `json:"hasAnyMischievous" legend:"plus"` + HasAnyNaturalAnimal string `json:"hasAnyNaturalAnimal" legend:"plus"` + HasAnyNightCreature string `json:"hasAnyNightCreature" legend:"plus"` + HasAnyNightCreatureBogeyman string `json:"hasAnyNightCreatureBogeyman" legend:"plus"` + HasAnyNightCreatureHunter string `json:"hasAnyNightCreatureHunter" legend:"plus"` + HasAnyNightCreatureNightmare string `json:"hasAnyNightCreatureNightmare" legend:"plus"` + HasAnyNotFireimmune string `json:"hasAnyNotFireimmune" legend:"plus"` + HasAnyNotLiving string `json:"hasAnyNotLiving" legend:"plus"` + HasAnyOutsiderControllable string `json:"hasAnyOutsiderControllable" legend:"plus"` + HasAnyRaceGait string `json:"hasAnyRaceGait" legend:"plus"` + HasAnySemimegabeast string `json:"hasAnySemimegabeast" legend:"plus"` + HasAnySlowLearner string `json:"hasAnySlowLearner" legend:"plus"` + HasAnySupernatural string `json:"hasAnySupernatural" legend:"plus"` + HasAnyTitan string `json:"hasAnyTitan" legend:"plus"` + HasAnyUniqueDemon string `json:"hasAnyUniqueDemon" legend:"plus"` + HasAnyUtterances string `json:"hasAnyUtterances" legend:"plus"` + HasAnyVerminHateable string `json:"hasAnyVerminHateable" legend:"plus"` + HasAnyVerminMicro string `json:"hasAnyVerminMicro" legend:"plus"` + HasFemale string `json:"hasFemale" legend:"plus"` + HasMale string `json:"hasMale" legend:"plus"` + LargeRoaming string `json:"largeRoaming" legend:"plus"` + LooseClusters string `json:"looseClusters" legend:"plus"` + MatesToBreed string `json:"matesToBreed" legend:"plus"` + Mundane string `json:"mundane" legend:"plus"` + NamePlural string `json:"namePlural" legend:"plus"` + NameSingular string `json:"nameSingular" legend:"plus"` + OccursAsEntityRace string `json:"occursAsEntityRace" legend:"plus"` + Savage string `json:"savage" legend:"plus"` + SmallRace string `json:"smallRace" legend:"plus"` + TwoGenders string `json:"twoGenders" legend:"plus"` + Ubiquitous string `json:"ubiquitous" legend:"plus"` + VerminEater string `json:"verminEater" legend:"plus"` + VerminFish string `json:"verminFish" legend:"plus"` + VerminGrounder string `json:"verminGrounder" legend:"plus"` + VerminRotter string `json:"verminRotter" legend:"plus"` + VerminSoil string `json:"verminSoil" legend:"plus"` + VerminSoilColony string `json:"verminSoilColony" legend:"plus"` +} +type DanceForm struct { + Description string `json:"description" legend:"base"` + Id_ int `json:"id" legend:"plus"` + Name_ string `json:"name" legend:"plus"` } -func (r *HistoricalFigure) Type() string { return "hf" } +func (x *DanceForm) Id() int { return x.Id_ } +func (x *DanceForm) Name() string { return x.Name_ } -type HistoricalEventCollection struct { - NamedObject - Year int `xml:"year"` - Seconds int `xml:"seconds72"` - EndYear int `xml:"end_year"` - EndSeconds int `xml:"end_seconds72"` - Type string `xml:"type" json:"type"` - - EventIds []int `xml:"event" json:"eventIds"` - - AggressorEntId *int `xml:"aggressor_ent_id" json:"aggressorEntId,omitempty"` - AttackingEnid *int `xml:"attacking_enid" json:"attackingEnid,omitempty" legend:"entity"` - AttackingHfid *[]int `xml:"attacking_hfid" json:"attackingHfid,omitempty" legend:"hf"` - AttackingSquadDeaths *[]int `xml:"attacking_squad_deaths" json:"attackingSquadDeaths,omitempty"` - AttackingSquadEntityPop *[]int `xml:"attacking_squad_entity_pop" json:"attackingSquadEntityPop,omitempty"` - AttackingSquadNumber *[]int `xml:"attacking_squad_number" json:"attackingSquadNumber,omitempty"` - AttackingSquadRace *[]string `xml:"attacking_squad_race" json:"attackingSquadRace,omitempty"` - AttackingSquadSite *[]int `xml:"attacking_squad_site" json:"attackingSquadSite,omitempty"` - CivId *int `xml:"civ_id" json:"civId,omitempty" legend:"entity"` - Coords *string `xml:"coords" json:"coords,omitempty"` - DefenderEntId *int `xml:"defender_ent_id" json:"defenderEntId,omitempty"` - DefendingEnid *int `xml:"defending_enid" json:"defendingEnid,omitempty" legend:"entity"` - DefendingHfid *[]int `xml:"defending_hfid" json:"defendingHfid,omitempty" legend:"hf"` - DefendingSquadDeaths *[]int `xml:"defending_squad_deaths" json:"defendingSquadDeaths,omitempty"` - DefendingSquadEntityPop *[]int `xml:"defending_squad_entity_pop" json:"defendingSquadEntityPop,omitempty"` - DefendingSquadNumber *[]int `xml:"defending_squad_number" json:"defendingSquadNumber,omitempty"` - DefendingSquadRace *[]string `xml:"defending_squad_race" json:"defendingSquadRace,omitempty"` - DefendingSquadSite *[]int `xml:"defending_squad_site" json:"defendingSquadSite,omitempty"` - Eventcol *[]int `xml:"eventcol" json:"eventcol,omitempty"` - FeatureLayerId *int `xml:"feature_layer_id" json:"featureLayerId,omitempty"` - IndividualMerc *[]string `xml:"individual_merc" json:"individualMerc,omitempty"` - NoncomHfid *[]int `xml:"noncom_hfid" json:"noncomHfid,omitempty" legend:"hf"` - OccasionId *int `xml:"occasion_id" json:"occasionId,omitempty"` - Ordinal *int `xml:"ordinal" json:"ordinal,omitempty"` - Outcome *string `xml:"outcome" json:"outcome,omitempty"` - ParentEventcol *int `xml:"parent_eventcol" json:"parentEventcol,omitempty"` - SiteId *int `xml:"site_id" json:"siteId,omitempty" legend:"site"` - StartSeconds72 *int `xml:"start_seconds72" json:"startSeconds72,omitempty"` - StartYear *int `xml:"start_year" json:"startYear,omitempty"` - SubregionId *int `xml:"subregion_id" json:"subregionId,omitempty"` - WarEventcol *int `xml:"war_eventcol" json:"warEventcol,omitempty"` - ASupportMercEnid *int `xml:"a_support_merc_enid" json:"aSupportMercEnid,omitempty" legend:"entity"` - ASupportMercHfid *[]int `xml:"a_support_merc_hfid" json:"aSupportMercHfid,omitempty" legend:"hf"` - AttackingMercEnid *int `xml:"attacking_merc_enid" json:"attackingMercEnid,omitempty" legend:"entity"` - AttackingSquadAnimated *[]string `xml:"attacking_squad_animated" json:"attackingSquadAnimated,omitempty"` - CompanyMerc *[]string `xml:"company_merc" json:"companyMerc,omitempty"` - DSupportMercEnid *int `xml:"d_support_merc_enid" json:"dSupportMercEnid,omitempty" legend:"entity"` - DSupportMercHfid *[]int `xml:"d_support_merc_hfid" json:"dSupportMercHfid,omitempty" legend:"hf"` - DefendingMercEnid *int `xml:"defending_merc_enid" json:"defendingMercEnid,omitempty" legend:"entity"` - DefendingSquadAnimated *[]string `xml:"defending_squad_animated" json:"defendingSquadAnimated,omitempty"` - TargetEntityId *int `xml:"target_entity_id" json:"targetEntityId,omitempty" legend:"entity"` - - // OtherElements +type DfWorld struct { + Altname string `json:"altname" legend:"plus"` + Artifacts map[int]*Artifact `json:"artifacts" legend:"plus"` + CreatureRaw []*Creature `json:"creatureRaw" legend:"plus"` + DanceForms map[int]*DanceForm `json:"danceForms" legend:"plus"` + Entities map[int]*Entity `json:"entities" legend:"plus"` + EntityPopulations map[int]*EntityPopulation `json:"entityPopulations" legend:"plus"` + HistoricalEras []*HistoricalEra `json:"historicalEras" legend:"plus"` + HistoricalEventCollections map[int]*HistoricalEventCollection `json:"historicalEventCollections" legend:"plus"` + HistoricalEventRelationshipSupplements []*HistoricalEventRelationshipSupplement `json:"historicalEventRelationshipSupplements" legend:"plus"` + HistoricalEventRelationships []*HistoricalEventRelationship `json:"historicalEventRelationships" legend:"plus"` + HistoricalEvents map[int]*HistoricalEvent `json:"historicalEvents" legend:"plus"` + HistoricalFigures map[int]*HistoricalFigure `json:"historicalFigures" legend:"plus"` + Identities map[int]*Identity `json:"identities" legend:"plus"` + Landmasses map[int]*Landmass `json:"landmasses" legend:"plus"` + MountainPeaks map[int]*MountainPeak `json:"mountainPeaks" legend:"plus"` + MusicalForms map[int]*MusicalForm `json:"musicalForms" legend:"plus"` + Name_ string `json:"name" legend:"plus"` + PoeticForms map[int]*PoeticForm `json:"poeticForms" legend:"plus"` + Regions map[int]*Region `json:"regions" legend:"plus"` + Rivers []*River `json:"rivers" legend:"plus"` + Sites map[int]*Site `json:"sites" legend:"plus"` + UndergroundRegions map[int]*UndergroundRegion `json:"undergroundRegions" legend:"plus"` + WorldConstructions map[int]*WorldConstruction `json:"worldConstructions" legend:"plus"` + WrittenContents map[int]*WrittenContent `json:"writtenContents" legend:"plus"` } +func (x *DfWorld) Name() string { return x.Name_ } + type Entity struct { - NamedObject - // OtherElements - EventObject + Child int `json:"child" legend:"plus"` + Claims string `json:"claims" legend:"plus"` + EntityLink *EntityLink `json:"entityLink" legend:"plus"` + EntityPosition *EntityPosition `json:"entityPosition" legend:"plus"` + EntityPositionAssignment *EntityPositionAssignment `json:"entityPositionAssignment" legend:"plus"` + HistfigId int `json:"histfigId" legend:"plus"` + Honor *Honor `json:"honor" legend:"base"` + Id_ int `json:"id" legend:"plus"` + Name_ string `json:"name" legend:"base"` + Occasion *Occasion `json:"occasion" legend:"plus"` + Profession string `json:"profession" legend:"plus"` + Race string `json:"race" legend:"plus"` + Type string `json:"type" legend:"plus"` + Weapon string `json:"weapon" legend:"plus"` + WorshipId int `json:"worshipId" legend:"plus"` } +func (x *Entity) Id() int { return x.Id_ } +func (x *Entity) Name() string { return x.Name_ } + +type EntityFormerPositionLink struct { + EndYear int `json:"endYear" legend:"base"` + EntityId int `json:"entityId" legend:"base"` + PositionProfileId int `json:"positionProfileId" legend:"base"` + StartYear int `json:"startYear" legend:"base"` +} +type EntityLink struct { + Strength int `json:"strength" legend:"plus"` + Target int `json:"target" legend:"plus"` + Type string `json:"type" legend:"plus"` +} type EntityPopulation struct { - // OtherElements + CivId int `json:"civId" legend:"plus"` + Id_ int `json:"id" legend:"plus"` + Race string `json:"race" legend:"plus"` } +func (x *EntityPopulation) Id() int { return x.Id_ } + +type EntityPosition struct { + Id_ int `json:"id" legend:"plus"` + Name_ string `json:"name" legend:"plus"` + NameFemale string `json:"nameFemale" legend:"plus"` + NameMale string `json:"nameMale" legend:"plus"` + Spouse string `json:"spouse" legend:"plus"` + SpouseFemale string `json:"spouseFemale" legend:"plus"` + SpouseMale string `json:"spouseMale" legend:"plus"` +} + +func (x *EntityPosition) Id() int { return x.Id_ } +func (x *EntityPosition) Name() string { return x.Name_ } + +type EntityPositionAssignment struct { + Histfig int `json:"histfig" legend:"plus"` + Id_ int `json:"id" legend:"plus"` + PositionId int `json:"positionId" legend:"plus"` + SquadId int `json:"squadId" legend:"plus"` +} + +func (x *EntityPositionAssignment) Id() int { return x.Id_ } + +type EntityPositionLink struct { + EntityId int `json:"entityId" legend:"base"` + PositionProfileId int `json:"positionProfileId" legend:"base"` + StartYear int `json:"startYear" legend:"base"` +} +type EntityReputation struct { + EntityId int `json:"entityId" legend:"base"` + FirstAgelessSeasonCount int `json:"firstAgelessSeasonCount" legend:"base"` + FirstAgelessYear int `json:"firstAgelessYear" legend:"base"` + UnsolvedMurders int `json:"unsolvedMurders" legend:"base"` +} +type EntitySquadLink struct { + EntityId int `json:"entityId" legend:"base"` + SquadId int `json:"squadId" legend:"base"` + SquadPosition int `json:"squadPosition" legend:"base"` + StartYear int `json:"startYear" legend:"base"` +} +type Feature struct { + Reference int `json:"reference" legend:"plus"` + Type string `json:"type" legend:"plus"` +} +type HfLink struct { + Hfid int `json:"hfid" legend:"base"` + LinkStrength int `json:"linkStrength" legend:"base"` + LinkType string `json:"linkType" legend:"base"` +} +type HfSkill struct { + Skill string `json:"skill" legend:"base"` + TotalIp int `json:"totalIp" legend:"base"` +} type HistoricalEra struct { - NamedObject - StartYear *int `xml:"start_year" json:"startYear,omitempty"` - // OtherElements + Name_ string `json:"name" legend:"base"` + StartYear int `json:"startYear" legend:"base"` } -type DanceForm struct { - ArtForm +func (x *HistoricalEra) Name() string { return x.Name_ } + +type HistoricalEvent struct { + Id_ int `json:"id" legend:"plus"` + Seconds72 int `json:"seconds72" legend:"base"` + Year int `json:"year" legend:"base"` + Details any } +func (x *HistoricalEvent) Id() int { return x.Id_ } + +type HistoricalEventAddHfEntityHonor struct { + EntityId int `json:"entityId" legend:"base"` + Hfid int `json:"hfid" legend:"base"` + HonorId int `json:"honorId" legend:"base"` +} +type HistoricalEventAddHfEntityLink struct { + AppointerHfid int `json:"appointerHfid" legend:"plus"` + Civ int `json:"civ" legend:"plus"` + CivId int `json:"civId" legend:"base"` + Hfid int `json:"hfid" legend:"base"` + Histfig int `json:"histfig" legend:"plus"` + Link string `json:"link" legend:"base"` + LinkType string `json:"linkType" legend:"plus"` + Position string `json:"position" legend:"plus"` + PositionId int `json:"positionId" legend:"base"` + PromiseToHfid int `json:"promiseToHfid" legend:"plus"` +} +type HistoricalEventAddHfHfLink struct { + Hf int `json:"hf" legend:"plus"` + HfTarget int `json:"hfTarget" legend:"plus"` + Hfid int `json:"hfid" legend:"base"` + HfidTarget int `json:"hfidTarget" legend:"base"` + LinkType string `json:"linkType" legend:"plus"` +} +type HistoricalEventAddHfSiteLink struct { + Civ int `json:"civ" legend:"plus"` + Histfig int `json:"histfig" legend:"plus"` + LinkType string `json:"linkType" legend:"plus"` + Site int `json:"site" legend:"plus"` + SiteId int `json:"siteId" legend:"base"` + Structure int `json:"structure" legend:"plus"` +} +type HistoricalEventAgreementFormed struct { + Action string `json:"action" legend:"base"` + AgreementId int `json:"agreementId" legend:"base"` + AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` + CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` + Delegated string `json:"delegated" legend:"base"` + FailedJudgmentTest string `json:"failedJudgmentTest" legend:"base"` + Method string `json:"method" legend:"base"` + RelevantEntityId int `json:"relevantEntityId" legend:"base"` + RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` + RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` + Successful string `json:"successful" legend:"base"` + TopFacet string `json:"topFacet" legend:"base"` + TopFacetModifier int `json:"topFacetModifier" legend:"base"` + TopFacetRating int `json:"topFacetRating" legend:"base"` + TopRelationshipFactor string `json:"topRelationshipFactor" legend:"base"` + TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` + TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` + TopValue string `json:"topValue" legend:"base"` + TopValueModifier int `json:"topValueModifier" legend:"base"` + TopValueRating int `json:"topValueRating" legend:"base"` +} +type HistoricalEventArtifactClaimFormed struct { + ArtifactId int `json:"artifactId" legend:"base"` + Circumstance string `json:"circumstance" legend:"base"` + Claim string `json:"claim" legend:"base"` + EntityId int `json:"entityId" legend:"base"` + HistFigureId int `json:"histFigureId" legend:"base"` + PositionProfileId int `json:"positionProfileId" legend:"base"` +} +type HistoricalEventArtifactCopied struct { + ArtifactId int `json:"artifactId" legend:"base"` + DestEntityId int `json:"destEntityId" legend:"base"` + DestSiteId int `json:"destSiteId" legend:"base"` + DestStructureId int `json:"destStructureId" legend:"base"` + FromOriginal string `json:"fromOriginal" legend:"base"` + SourceEntityId int `json:"sourceEntityId" legend:"base"` + SourceSiteId int `json:"sourceSiteId" legend:"base"` + SourceStructureId int `json:"sourceStructureId" legend:"base"` +} +type HistoricalEventArtifactCreated struct { + ArtifactId int `json:"artifactId" legend:"plus"` + Circumstance *Circumstance `json:"circumstance" legend:"plus"` + CreatorHfid int `json:"creatorHfid" legend:"plus"` + CreatorUnitId int `json:"creatorUnitId" legend:"plus"` + HistFigureId int `json:"histFigureId" legend:"base"` + NameOnly string `json:"nameOnly" legend:"base"` + Reason string `json:"reason" legend:"plus"` + SanctifyHf int `json:"sanctifyHf" legend:"plus"` + Site int `json:"site" legend:"plus"` + SiteId int `json:"siteId" legend:"base"` + UnitId int `json:"unitId" legend:"base"` +} +type HistoricalEventArtifactDestroyed struct { + ArtifactId int `json:"artifactId" legend:"base"` + DestroyerEnid int `json:"destroyerEnid" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventArtifactFound struct { + ArtifactId int `json:"artifactId" legend:"base"` + HistFigureId int `json:"histFigureId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + UnitId int `json:"unitId" legend:"base"` +} +type HistoricalEventArtifactGiven struct { + ArtifactId int `json:"artifactId" legend:"base"` + GiverEntityId int `json:"giverEntityId" legend:"base"` + GiverHistFigureId int `json:"giverHistFigureId" legend:"base"` + ReceiverEntityId int `json:"receiverEntityId" legend:"base"` + ReceiverHistFigureId int `json:"receiverHistFigureId" legend:"base"` +} +type HistoricalEventArtifactLost struct { + ArtifactId int `json:"artifactId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SitePropertyId int `json:"sitePropertyId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventArtifactPossessed struct { + ArtifactId int `json:"artifactId" legend:"base"` + Circumstance string `json:"circumstance" legend:"base"` + CircumstanceId int `json:"circumstanceId" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + HistFigureId int `json:"histFigureId" legend:"base"` + Reason string `json:"reason" legend:"base"` + ReasonId int `json:"reasonId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + UnitId int `json:"unitId" legend:"base"` +} +type HistoricalEventArtifactRecovered struct { + ArtifactId int `json:"artifactId" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + HistFigureId int `json:"histFigureId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + UnitId int `json:"unitId" legend:"base"` +} +type HistoricalEventArtifactStored struct { + ArtifactId int `json:"artifactId" legend:"base"` + HistFigureId int `json:"histFigureId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + UnitId int `json:"unitId" legend:"base"` +} +type HistoricalEventAssumeIdentity struct { + IdentityCaste string `json:"identityCaste" legend:"plus"` + IdentityHistfigId int `json:"identityHistfigId" legend:"plus"` + IdentityId int `json:"identityId" legend:"base"` + IdentityName string `json:"identityName" legend:"plus"` + IdentityNemesisId int `json:"identityNemesisId" legend:"plus"` + IdentityRace string `json:"identityRace" legend:"plus"` + Target int `json:"target" legend:"plus"` + TargetEnid int `json:"targetEnid" legend:"base"` + Trickster int `json:"trickster" legend:"plus"` + TricksterHfid int `json:"tricksterHfid" legend:"base"` +} +type HistoricalEventAttackedSite struct { + ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` + AttackerCivId int `json:"attackerCivId" legend:"base"` + AttackerGeneralHfid int `json:"attackerGeneralHfid" legend:"base"` + AttackerMercEnid int `json:"attackerMercEnid" legend:"base"` + DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` + DefenderCivId int `json:"defenderCivId" legend:"base"` + DefenderGeneralHfid int `json:"defenderGeneralHfid" legend:"base"` + DefenderMercEnid int `json:"defenderMercEnid" legend:"base"` + SiteCivId int `json:"siteCivId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventBodyAbused struct { + AbuseType string `json:"abuseType" legend:"plus"` + Bodies int `json:"bodies" legend:"plus"` + Civ int `json:"civ" legend:"plus"` + Coords string `json:"coords" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Histfig int `json:"histfig" legend:"plus"` + Interaction int `json:"interaction" legend:"plus"` + ItemMat string `json:"itemMat" legend:"plus"` + ItemSubtype string `json:"itemSubtype" legend:"plus"` + ItemType string `json:"itemType" legend:"plus"` + PileType string `json:"pileType" legend:"plus"` + Site int `json:"site" legend:"plus"` + SiteId int `json:"siteId" legend:"base"` + Structure int `json:"structure" legend:"plus"` + SubregionId int `json:"subregionId" legend:"base"` + Tree int `json:"tree" legend:"plus"` + VictimEntity int `json:"victimEntity" legend:"plus"` +} +type HistoricalEventBuildingProfileAcquired struct { + AcquirerEnid int `json:"acquirerEnid" legend:"base"` + AcquirerHfid int `json:"acquirerHfid" legend:"base"` + BuildingProfileId int `json:"buildingProfileId" legend:"base"` + Inherited string `json:"inherited" legend:"base"` + LastOwnerHfid int `json:"lastOwnerHfid" legend:"base"` + PurchasedUnowned string `json:"purchasedUnowned" legend:"base"` + RebuiltRuined string `json:"rebuiltRuined" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventCeremony struct { + CivId int `json:"civId" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + OccasionId int `json:"occasionId" legend:"base"` + ScheduleId int `json:"scheduleId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventChangeCreatureType struct { + Changee int `json:"changee" legend:"plus"` + Changer int `json:"changer" legend:"plus"` + NewCaste int `json:"newCaste" legend:"plus"` + NewRace string `json:"newRace" legend:"plus"` + OldCaste int `json:"oldCaste" legend:"plus"` + OldRace string `json:"oldRace" legend:"plus"` +} +type HistoricalEventChangeHfBodyState struct { + BodyState string `json:"bodyState" legend:"base"` + Coords string `json:"coords" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Hfid int `json:"hfid" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventChangeHfJob struct { + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Hfid int `json:"hfid" legend:"plus"` + NewJob string `json:"newJob" legend:"plus"` + OldJob string `json:"oldJob" legend:"plus"` + Site int `json:"site" legend:"plus"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventChangeHfState struct { + Coords string `json:"coords" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Hfid int `json:"hfid" legend:"plus"` + Mood string `json:"mood" legend:"base"` + Reason string `json:"reason" legend:"plus"` + Site int `json:"site" legend:"plus"` + SiteId int `json:"siteId" legend:"base"` + State string `json:"state" legend:"plus"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventChangedCreatureType struct { + ChangeeHfid int `json:"changeeHfid" legend:"base"` + ChangerHfid int `json:"changerHfid" legend:"base"` + NewCaste string `json:"newCaste" legend:"base"` + NewRace string `json:"newRace" legend:"base"` + OldCaste string `json:"oldCaste" legend:"base"` + OldRace string `json:"oldRace" legend:"base"` +} +type HistoricalEventCompetition struct { + CivId int `json:"civId" legend:"base"` + CompetitorHfid int `json:"competitorHfid" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + OccasionId int `json:"occasionId" legend:"base"` + ScheduleId int `json:"scheduleId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + WinnerHfid int `json:"winnerHfid" legend:"base"` +} +type HistoricalEventCreateEntityPosition struct { + Civ int `json:"civ" legend:"plus"` + Histfig int `json:"histfig" legend:"plus"` + Position string `json:"position" legend:"plus"` + Reason string `json:"reason" legend:"plus"` + SiteCiv int `json:"siteCiv" legend:"plus"` +} +type HistoricalEventCreatedBuilding struct { + BuilderHf int `json:"builderHf" legend:"plus"` + Civ int `json:"civ" legend:"plus"` + Rebuild string `json:"rebuild" legend:"plus"` + Site int `json:"site" legend:"plus"` + SiteCiv int `json:"siteCiv" legend:"plus"` + Structure int `json:"structure" legend:"plus"` +} +type HistoricalEventCreatedSite struct { + BuilderHfid int `json:"builderHfid" legend:"base"` + CivId int `json:"civId" legend:"base"` + ResidentCivId int `json:"residentCivId" legend:"base"` + SiteCivId int `json:"siteCivId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventCreatedStructure struct { + BuilderHfid int `json:"builderHfid" legend:"base"` + CivId int `json:"civId" legend:"base"` + Rebuilt string `json:"rebuilt" legend:"base"` + SiteCivId int `json:"siteCivId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` +} +type HistoricalEventCreatedWorldConstruction struct { + CivId int `json:"civId" legend:"base"` + MasterWcid int `json:"masterWcid" legend:"base"` + SiteCivId int `json:"siteCivId" legend:"base"` + SiteId1 int `json:"siteId1" legend:"base"` + SiteId2 int `json:"siteId2" legend:"base"` + Wcid int `json:"wcid" legend:"base"` +} +type HistoricalEventCreatureDevoured struct { + Caste string `json:"caste" legend:"plus"` + Eater int `json:"eater" legend:"plus"` + Entity int `json:"entity" legend:"plus"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Race string `json:"race" legend:"plus"` + Site int `json:"site" legend:"plus"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + Victim int `json:"victim" legend:"plus"` +} +type HistoricalEventDanceFormCreated struct { + Circumstance string `json:"circumstance" legend:"base"` + CircumstanceId int `json:"circumstanceId" legend:"base"` + FormId int `json:"formId" legend:"base"` + HistFigureId int `json:"histFigureId" legend:"base"` + Reason string `json:"reason" legend:"base"` + ReasonId int `json:"reasonId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventDestroyedSite struct { + AttackerCivId int `json:"attackerCivId" legend:"base"` + DefenderCivId int `json:"defenderCivId" legend:"base"` + SiteCivId int `json:"siteCivId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventEntityAction struct { + Action string `json:"action" legend:"plus"` + Entity int `json:"entity" legend:"plus"` + Site int `json:"site" legend:"plus"` + Structure int `json:"structure" legend:"plus"` +} +type HistoricalEventEntityAllianceFormed struct { + InitiatingEnid int `json:"initiatingEnid" legend:"base"` + JoiningEnid int `json:"joiningEnid" legend:"base"` +} +type HistoricalEventEntityBreachFeatureLayer struct { + CivEntityId int `json:"civEntityId" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + SiteEntityId int `json:"siteEntityId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventEntityCreated struct { + CreatorHfid int `json:"creatorHfid" legend:"base"` + EntityId int `json:"entityId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` +} +type HistoricalEventEntityDissolved struct { + EntityId int `json:"entityId" legend:"base"` + Reason string `json:"reason" legend:"base"` +} +type HistoricalEventEntityEquipmentPurchase struct { + EntityId int `json:"entityId" legend:"base"` + Hfid int `json:"hfid" legend:"base"` + NewEquipmentLevel int `json:"newEquipmentLevel" legend:"base"` +} +type HistoricalEventEntityIncorporated struct { + JoinedEntityId int `json:"joinedEntityId" legend:"base"` + JoinerEntityId int `json:"joinerEntityId" legend:"base"` + LeaderHfid int `json:"leaderHfid" legend:"base"` + PartialIncorporation string `json:"partialIncorporation" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventEntityLaw struct { + EntityId int `json:"entityId" legend:"base"` + HistFigureId int `json:"histFigureId" legend:"base"` + LawAdd string `json:"lawAdd" legend:"base"` + LawRemove string `json:"lawRemove" legend:"base"` +} +type HistoricalEventEntityOverthrown struct { + ConspiratorHfid int `json:"conspiratorHfid" legend:"base"` + EntityId int `json:"entityId" legend:"base"` + InstigatorHfid int `json:"instigatorHfid" legend:"base"` + OverthrownHfid int `json:"overthrownHfid" legend:"base"` + PosTakerHfid int `json:"posTakerHfid" legend:"base"` + PositionProfileId int `json:"positionProfileId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventEntityPersecuted struct { + DestroyedStructureId int `json:"destroyedStructureId" legend:"base"` + ExpelledCreature int `json:"expelledCreature" legend:"base"` + ExpelledHfid int `json:"expelledHfid" legend:"base"` + ExpelledNumber int `json:"expelledNumber" legend:"base"` + ExpelledPopId int `json:"expelledPopId" legend:"base"` + PersecutorEnid int `json:"persecutorEnid" legend:"base"` + PersecutorHfid int `json:"persecutorHfid" legend:"base"` + PropertyConfiscatedFromHfid int `json:"propertyConfiscatedFromHfid" legend:"base"` + ShrineAmountDestroyed int `json:"shrineAmountDestroyed" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + TargetEnid int `json:"targetEnid" legend:"base"` +} +type HistoricalEventEntityPrimaryCriminals struct { + EntityId int `json:"entityId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` +} +type HistoricalEventEntityRelocate struct { + EntityId int `json:"entityId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` +} +type HistoricalEventFailedFrameAttempt struct { + ConvicterEnid int `json:"convicterEnid" legend:"base"` + Crime string `json:"crime" legend:"base"` + FooledHfid int `json:"fooledHfid" legend:"base"` + FramerHfid int `json:"framerHfid" legend:"base"` + PlotterHfid int `json:"plotterHfid" legend:"base"` + TargetHfid int `json:"targetHfid" legend:"base"` +} +type HistoricalEventFailedIntrigueCorruption struct { + Action string `json:"action" legend:"base"` + AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` + CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` + CorruptorHfid int `json:"corruptorHfid" legend:"base"` + CorruptorIdentity int `json:"corruptorIdentity" legend:"base"` + FailedJudgmentTest string `json:"failedJudgmentTest" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + LureHfid int `json:"lureHfid" legend:"base"` + Method string `json:"method" legend:"base"` + RelevantEntityId int `json:"relevantEntityId" legend:"base"` + RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` + RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + TargetHfid int `json:"targetHfid" legend:"base"` + TargetIdentity int `json:"targetIdentity" legend:"base"` + TopFacet string `json:"topFacet" legend:"base"` + TopFacetModifier int `json:"topFacetModifier" legend:"base"` + TopFacetRating int `json:"topFacetRating" legend:"base"` + TopRelationshipFactor string `json:"topRelationshipFactor" legend:"base"` + TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` + TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` + TopValue string `json:"topValue" legend:"base"` + TopValueModifier int `json:"topValueModifier" legend:"base"` + TopValueRating int `json:"topValueRating" legend:"base"` +} +type HistoricalEventFieldBattle struct { + ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` + AttackerCivId int `json:"attackerCivId" legend:"base"` + AttackerGeneralHfid int `json:"attackerGeneralHfid" legend:"base"` + AttackerMercEnid int `json:"attackerMercEnid" legend:"base"` + Coords string `json:"coords" legend:"base"` + DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` + DefenderCivId int `json:"defenderCivId" legend:"base"` + DefenderGeneralHfid int `json:"defenderGeneralHfid" legend:"base"` + DefenderMercEnid int `json:"defenderMercEnid" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventGamble struct { + GamblerHfid int `json:"gamblerHfid" legend:"base"` + NewAccount int `json:"newAccount" legend:"base"` + OldAccount int `json:"oldAccount" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` +} +type HistoricalEventHfAbducted struct { + FeatureLayerId int `json:"featureLayerId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SnatcherHfid int `json:"snatcherHfid" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + TargetHfid int `json:"targetHfid" legend:"base"` +} +type HistoricalEventHfActOnBuilding struct { + Action string `json:"action" legend:"plus"` + Histfig int `json:"histfig" legend:"plus"` + Site int `json:"site" legend:"plus"` + Structure int `json:"structure" legend:"plus"` +} +type HistoricalEventHfAttackedSite struct { + AttackerHfid int `json:"attackerHfid" legend:"base"` + DefenderCivId int `json:"defenderCivId" legend:"base"` + SiteCivId int `json:"siteCivId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventHfConfronted struct { + Coords string `json:"coords" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Hfid int `json:"hfid" legend:"base"` + Reason string `json:"reason" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + Situation string `json:"situation" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventHfConvicted struct { + CoconspiratorHfid int `json:"coconspiratorHfid" legend:"base"` + ConfessedAfterApbArrestEnid int `json:"confessedAfterApbArrestEnid" legend:"base"` + ContactHfid int `json:"contactHfid" legend:"base"` + ConvictIsContact string `json:"convictIsContact" legend:"base"` + ConvictedHfid int `json:"convictedHfid" legend:"base"` + ConvicterEnid int `json:"convicterEnid" legend:"base"` + CorruptConvicterHfid int `json:"corruptConvicterHfid" legend:"base"` + Crime string `json:"crime" legend:"base"` + DeathPenalty string `json:"deathPenalty" legend:"base"` + DidNotRevealAllInInterrogation string `json:"didNotRevealAllInInterrogation" legend:"base"` + Exiled string `json:"exiled" legend:"base"` + FooledHfid int `json:"fooledHfid" legend:"base"` + FramerHfid int `json:"framerHfid" legend:"base"` + HeldFirmInInterrogation string `json:"heldFirmInInterrogation" legend:"base"` + ImplicatedHfid int `json:"implicatedHfid" legend:"base"` + InterrogatorHfid int `json:"interrogatorHfid" legend:"base"` + PlotterHfid int `json:"plotterHfid" legend:"base"` + PrisonMonths int `json:"prisonMonths" legend:"base"` + SurveiledCoconspirator string `json:"surveiledCoconspirator" legend:"base"` + SurveiledContact string `json:"surveiledContact" legend:"base"` + SurveiledConvicted string `json:"surveiledConvicted" legend:"base"` + SurveiledTarget string `json:"surveiledTarget" legend:"base"` + TargetHfid int `json:"targetHfid" legend:"base"` + WrongfulConviction string `json:"wrongfulConviction" legend:"base"` +} +type HistoricalEventHfDestroyedSite struct { + AttackerHfid int `json:"attackerHfid" legend:"base"` + DefenderCivId int `json:"defenderCivId" legend:"base"` + SiteCivId int `json:"siteCivId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventHfDied struct { + Cause string `json:"cause" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Hfid int `json:"hfid" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SlayerCaste string `json:"slayerCaste" legend:"base"` + SlayerHfid int `json:"slayerHfid" legend:"base"` + SlayerItemId int `json:"slayerItemId" legend:"base"` + SlayerRace string `json:"slayerRace" legend:"base"` + SlayerShooterItemId int `json:"slayerShooterItemId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventHfDisturbedStructure struct { + HistFigId int `json:"histFigId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` +} +type HistoricalEventHfDoesInteraction struct { + Doer int `json:"doer" legend:"plus"` + DoerHfid int `json:"doerHfid" legend:"base"` + Interaction string `json:"interaction" legend:"base"` + InteractionAction string `json:"interactionAction" legend:"plus"` + Region int `json:"region" legend:"plus"` + Site int `json:"site" legend:"plus"` + Source int `json:"source" legend:"plus"` + Target int `json:"target" legend:"plus"` + TargetHfid int `json:"targetHfid" legend:"base"` +} +type HistoricalEventHfEnslaved struct { + EnslavedHfid int `json:"enslavedHfid" legend:"base"` + MovedToSiteId int `json:"movedToSiteId" legend:"base"` + PayerEntityId int `json:"payerEntityId" legend:"base"` + SellerHfid int `json:"sellerHfid" legend:"base"` +} +type HistoricalEventHfEquipmentPurchase struct { + FeatureLayerId int `json:"featureLayerId" legend:"base"` + GroupHfid int `json:"groupHfid" legend:"base"` + Quality int `json:"quality" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventHfGainsSecretGoal struct { + Hfid int `json:"hfid" legend:"base"` + SecretGoal string `json:"secretGoal" legend:"base"` +} +type HistoricalEventHfInterrogated struct { + ArrestingEnid int `json:"arrestingEnid" legend:"base"` + HeldFirmInInterrogation string `json:"heldFirmInInterrogation" legend:"base"` + InterrogatorHfid int `json:"interrogatorHfid" legend:"base"` + TargetHfid int `json:"targetHfid" legend:"base"` + WantedAndRecognized string `json:"wantedAndRecognized" legend:"base"` +} +type HistoricalEventHfLearnsSecret struct { + Artifact int `json:"artifact" legend:"plus"` + ArtifactId int `json:"artifactId" legend:"base"` + Interaction string `json:"interaction" legend:"base"` + SecretText string `json:"secretText" legend:"plus"` + Student int `json:"student" legend:"plus"` + StudentHfid int `json:"studentHfid" legend:"base"` + Teacher int `json:"teacher" legend:"plus"` + TeacherHfid int `json:"teacherHfid" legend:"base"` +} +type HistoricalEventHfNewPet struct { + Coords string `json:"coords" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + GroupHfid int `json:"groupHfid" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventHfPerformedHorribleExperiments struct { + FeatureLayerId int `json:"featureLayerId" legend:"base"` + GroupHfid int `json:"groupHfid" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventHfPrayedInsideStructure struct { + HistFigId int `json:"histFigId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` +} +type HistoricalEventHfPreach struct { + Entity1 int `json:"entity1" legend:"base"` + Entity2 int `json:"entity2" legend:"base"` + SiteHfid int `json:"siteHfid" legend:"base"` + SpeakerHfid int `json:"speakerHfid" legend:"base"` + Topic string `json:"topic" legend:"base"` +} +type HistoricalEventHfProfanedStructure struct { + HistFigId int `json:"histFigId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` +} +type HistoricalEventHfRecruitedUnitTypeForEntity struct { + EntityId int `json:"entityId" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Hfid int `json:"hfid" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + UnitType string `json:"unitType" legend:"base"` +} +type HistoricalEventHfRelationshipDenied struct { + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Reason string `json:"reason" legend:"base"` + ReasonId int `json:"reasonId" legend:"base"` + Relationship string `json:"relationship" legend:"base"` + SeekerHfid int `json:"seekerHfid" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + TargetHfid int `json:"targetHfid" legend:"base"` +} +type HistoricalEventHfReunion struct { + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Group1Hfid int `json:"group1Hfid" legend:"base"` + Group2Hfid int `json:"group2Hfid" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventHfRevived struct { + ActorHfid int `json:"actorHfid" legend:"base"` + Disturbance string `json:"disturbance" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Hfid int `json:"hfid" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventHfSimpleBattleEvent struct { + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Group1Hfid int `json:"group1Hfid" legend:"base"` + Group2Hfid int `json:"group2Hfid" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + Subtype string `json:"subtype" legend:"base"` +} +type HistoricalEventHfTravel struct { + Coords string `json:"coords" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + GroupHfid int `json:"groupHfid" legend:"base"` + Return string `json:"return" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventHfViewedArtifact struct { + ArtifactId int `json:"artifactId" legend:"base"` + HistFigId int `json:"histFigId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` +} +type HistoricalEventHfWounded struct { + FeatureLayerId int `json:"featureLayerId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + WoundeeHfid int `json:"woundeeHfid" legend:"base"` + WounderHfid int `json:"wounderHfid" legend:"base"` +} +type HistoricalEventHfsFormedIntrigueRelationship struct { + Action string `json:"action" legend:"base"` + AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` + Circumstance string `json:"circumstance" legend:"base"` + CircumstanceId int `json:"circumstanceId" legend:"base"` + CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` + CorruptorHfid int `json:"corruptorHfid" legend:"base"` + CorruptorIdentity int `json:"corruptorIdentity" legend:"base"` + CorruptorSeenAs string `json:"corruptorSeenAs" legend:"base"` + FailedJudgmentTest string `json:"failedJudgmentTest" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + LureHfid int `json:"lureHfid" legend:"base"` + Method string `json:"method" legend:"base"` + RelevantEntityId int `json:"relevantEntityId" legend:"base"` + RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` + RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + Successful string `json:"successful" legend:"base"` + TargetHfid int `json:"targetHfid" legend:"base"` + TargetIdentity int `json:"targetIdentity" legend:"base"` + TargetSeenAs string `json:"targetSeenAs" legend:"base"` + TopFacet string `json:"topFacet" legend:"base"` + TopFacetModifier int `json:"topFacetModifier" legend:"base"` + TopFacetRating int `json:"topFacetRating" legend:"base"` + TopRelationshipFactor string `json:"topRelationshipFactor" legend:"base"` + TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` + TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` + TopValue string `json:"topValue" legend:"base"` + TopValueModifier int `json:"topValueModifier" legend:"base"` + TopValueRating int `json:"topValueRating" legend:"base"` +} +type HistoricalEventHfsFormedReputationRelationship struct { + FeatureLayerId int `json:"featureLayerId" legend:"base"` + HfRep1Of2 string `json:"hfRep1Of2" legend:"base"` + HfRep2Of1 string `json:"hfRep2Of1" legend:"base"` + Hfid1 int `json:"hfid1" legend:"base"` + Hfid2 int `json:"hfid2" legend:"base"` + IdentityId1 int `json:"identityId1" legend:"base"` + IdentityId2 int `json:"identityId2" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventHistFigureDied struct { + ArtifactId int `json:"artifactId" legend:"plus"` + DeathCause string `json:"deathCause" legend:"plus"` + Item int `json:"item" legend:"plus"` + ItemType string `json:"itemType" legend:"plus"` + Site int `json:"site" legend:"plus"` + SlayerCaste int `json:"slayerCaste" legend:"plus"` + SlayerHf int `json:"slayerHf" legend:"plus"` + SlayerRace int `json:"slayerRace" legend:"plus"` + VictimHf int `json:"victimHf" legend:"plus"` +} +type HistoricalEventHistFigureNewPet struct { + Group int `json:"group" legend:"plus"` + Pets string `json:"pets" legend:"plus"` + Site int `json:"site" legend:"plus"` +} +type HistoricalEventHistFigureWounded struct { + BodyPart int `json:"bodyPart" legend:"plus"` + InjuryType string `json:"injuryType" legend:"plus"` + PartLost string `json:"partLost" legend:"plus"` + Site int `json:"site" legend:"plus"` + Woundee int `json:"woundee" legend:"plus"` + WoundeeCaste int `json:"woundeeCaste" legend:"plus"` + WoundeeRace int `json:"woundeeRace" legend:"plus"` + Wounder int `json:"wounder" legend:"plus"` +} +type HistoricalEventHolyCityDeclaration struct { + ReligionId int `json:"religionId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventItemStolen struct { + Circumstance *Circumstance `json:"circumstance" legend:"plus"` + CircumstanceId int `json:"circumstanceId" legend:"base"` + Entity int `json:"entity" legend:"plus"` + Histfig int `json:"histfig" legend:"plus"` + Item int `json:"item" legend:"plus"` + ItemSubtype string `json:"itemSubtype" legend:"plus"` + ItemType string `json:"itemType" legend:"plus"` + Mat string `json:"mat" legend:"plus"` + Matindex int `json:"matindex" legend:"plus"` + Mattype int `json:"mattype" legend:"plus"` + Site int `json:"site" legend:"plus"` + StashSite int `json:"stashSite" legend:"plus"` + Structure int `json:"structure" legend:"plus"` + TheftMethod string `json:"theftMethod" legend:"plus"` +} +type HistoricalEventKnowledgeDiscovered struct { + First string `json:"first" legend:"base"` + Hfid int `json:"hfid" legend:"base"` + Knowledge string `json:"knowledge" legend:"base"` +} +type HistoricalEventModifiedBuilding struct { + Modification string `json:"modification" legend:"base"` + ModifierHfid int `json:"modifierHfid" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` +} +type HistoricalEventMusicalFormCreated struct { + Circumstance string `json:"circumstance" legend:"base"` + CircumstanceId int `json:"circumstanceId" legend:"base"` + FormId int `json:"formId" legend:"base"` + HistFigureId int `json:"histFigureId" legend:"base"` + Reason string `json:"reason" legend:"base"` + ReasonId int `json:"reasonId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventNewSiteLeader struct { + AttackerCivId int `json:"attackerCivId" legend:"base"` + DefenderCivId int `json:"defenderCivId" legend:"base"` + NewLeaderHfid int `json:"newLeaderHfid" legend:"base"` + NewSiteCivId int `json:"newSiteCivId" legend:"base"` + SiteCivId int `json:"siteCivId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventPeaceAccepted struct { + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventPeaceRejected struct { + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventPerformance struct { + CivId int `json:"civId" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + OccasionId int `json:"occasionId" legend:"base"` + ScheduleId int `json:"scheduleId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventPlunderedSite struct { + AttackerCivId int `json:"attackerCivId" legend:"base"` + DefenderCivId int `json:"defenderCivId" legend:"base"` + Detected string `json:"detected" legend:"base"` + SiteCivId int `json:"siteCivId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventPoeticFormCreated struct { + Circumstance string `json:"circumstance" legend:"base"` + FormId int `json:"formId" legend:"base"` + HistFigureId int `json:"histFigureId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventProcession struct { + CivId int `json:"civId" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + OccasionId int `json:"occasionId" legend:"base"` + ScheduleId int `json:"scheduleId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventRazedStructure struct { + CivId int `json:"civId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + StructureId int `json:"structureId" legend:"base"` +} +type HistoricalEventReclaimSite struct { + CivId int `json:"civId" legend:"base"` + SiteCivId int `json:"siteCivId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventRegionpopIncorporatedIntoEntity struct { + JoinEntityId int `json:"joinEntityId" legend:"base"` + PopFlid int `json:"popFlid" legend:"base"` + PopNumberMoved int `json:"popNumberMoved" legend:"base"` + PopRace int `json:"popRace" legend:"base"` + PopSrid int `json:"popSrid" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventRemoveHfEntityLink struct { + Civ int `json:"civ" legend:"plus"` + CivId int `json:"civId" legend:"base"` + Hfid int `json:"hfid" legend:"base"` + Histfig int `json:"histfig" legend:"plus"` + Link string `json:"link" legend:"base"` + LinkType string `json:"linkType" legend:"plus"` + Position int `json:"position" legend:"plus"` + PositionId int `json:"positionId" legend:"base"` +} +type HistoricalEventRemoveHfHfLink struct { + Hfid int `json:"hfid" legend:"base"` + HfidTarget int `json:"hfidTarget" legend:"base"` +} +type HistoricalEventRemoveHfSiteLink struct { + Civ int `json:"civ" legend:"plus"` + Histfig int `json:"histfig" legend:"plus"` + LinkType string `json:"linkType" legend:"plus"` + Site int `json:"site" legend:"plus"` + SiteId int `json:"siteId" legend:"base"` + Structure int `json:"structure" legend:"plus"` +} +type HistoricalEventReplacedBuilding struct { + Civ int `json:"civ" legend:"plus"` + NewStructure int `json:"newStructure" legend:"plus"` + OldStructure int `json:"oldStructure" legend:"plus"` + Site int `json:"site" legend:"plus"` + SiteCiv int `json:"siteCiv" legend:"plus"` +} +type HistoricalEventReplacedStructure struct { + CivId int `json:"civId" legend:"base"` + NewAbId int `json:"newAbId" legend:"base"` + OldAbId int `json:"oldAbId" legend:"base"` + SiteCivId int `json:"siteCivId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventSiteDispute struct { + Dispute string `json:"dispute" legend:"base"` + EntityId1 int `json:"entityId1" legend:"base"` + EntityId2 int `json:"entityId2" legend:"base"` + SiteId1 int `json:"siteId1" legend:"base"` + SiteId2 int `json:"siteId2" legend:"base"` +} +type HistoricalEventSiteTakenOver struct { + AttackerCivId int `json:"attackerCivId" legend:"base"` + DefenderCivId int `json:"defenderCivId" legend:"base"` + NewSiteCivId int `json:"newSiteCivId" legend:"base"` + SiteCivId int `json:"siteCivId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventTrade struct { + AccountShift int `json:"accountShift" legend:"base"` + Allotment int `json:"allotment" legend:"base"` + AllotmentIndex int `json:"allotmentIndex" legend:"base"` + DestSiteId int `json:"destSiteId" legend:"base"` + ProductionZoneId int `json:"productionZoneId" legend:"base"` + SourceSiteId int `json:"sourceSiteId" legend:"base"` + TraderEntityId int `json:"traderEntityId" legend:"base"` + TraderHfid int `json:"traderHfid" legend:"base"` +} +type HistoricalEventWarPeaceAccepted struct { + Destination int `json:"destination" legend:"plus"` + Site int `json:"site" legend:"plus"` + Source int `json:"source" legend:"plus"` + Topic string `json:"topic" legend:"plus"` +} +type HistoricalEventWarPeaceRejected struct { + Destination int `json:"destination" legend:"plus"` + Site int `json:"site" legend:"plus"` + Source int `json:"source" legend:"plus"` + Topic string `json:"topic" legend:"plus"` +} +type HistoricalEventWrittenContentComposed struct { + Circumstance string `json:"circumstance" legend:"base"` + CircumstanceId int `json:"circumstanceId" legend:"base"` + HistFigureId int `json:"histFigureId" legend:"base"` + Reason string `json:"reason" legend:"base"` + ReasonId int `json:"reasonId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + WcId int `json:"wcId" legend:"base"` +} +type HistoricalEventCollection struct { + EndSeconds72 int `json:"endSeconds72" legend:"base"` + EndYear int `json:"endYear" legend:"base"` + Event int `json:"event" legend:"base"` + Eventcol int `json:"eventcol" legend:"base"` + Id_ int `json:"id" legend:"base"` + StartSeconds72 int `json:"startSeconds72" legend:"base"` + StartYear int `json:"startYear" legend:"base"` + Details any +} + +func (x *HistoricalEventCollection) Id() int { return x.Id_ } + +type HistoricalEventCollectionAbduction struct { + AttackingEnid int `json:"attackingEnid" legend:"base"` + Coords string `json:"coords" legend:"base"` + DefendingEnid int `json:"defendingEnid" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Ordinal int `json:"ordinal" legend:"base"` + ParentEventcol int `json:"parentEventcol" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventCollectionBattle struct { + ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` + ASupportMercHfid int `json:"aSupportMercHfid" legend:"base"` + AttackingHfid int `json:"attackingHfid" legend:"base"` + AttackingMercEnid int `json:"attackingMercEnid" legend:"base"` + AttackingSquadAnimated string `json:"attackingSquadAnimated" legend:"base"` + AttackingSquadDeaths int `json:"attackingSquadDeaths" legend:"base"` + AttackingSquadEntityPop int `json:"attackingSquadEntityPop" legend:"base"` + AttackingSquadNumber int `json:"attackingSquadNumber" legend:"base"` + AttackingSquadRace string `json:"attackingSquadRace" legend:"base"` + AttackingSquadSite int `json:"attackingSquadSite" legend:"base"` + CompanyMerc string `json:"companyMerc" legend:"base"` + Coords string `json:"coords" legend:"base"` + DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` + DSupportMercHfid int `json:"dSupportMercHfid" legend:"base"` + DefendingHfid int `json:"defendingHfid" legend:"base"` + DefendingMercEnid int `json:"defendingMercEnid" legend:"base"` + DefendingSquadAnimated string `json:"defendingSquadAnimated" legend:"base"` + DefendingSquadDeaths int `json:"defendingSquadDeaths" legend:"base"` + DefendingSquadEntityPop int `json:"defendingSquadEntityPop" legend:"base"` + DefendingSquadNumber int `json:"defendingSquadNumber" legend:"base"` + DefendingSquadRace string `json:"defendingSquadRace" legend:"base"` + DefendingSquadSite int `json:"defendingSquadSite" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + IndividualMerc string `json:"individualMerc" legend:"base"` + Name_ string `json:"name" legend:"base"` + NoncomHfid int `json:"noncomHfid" legend:"base"` + Outcome string `json:"outcome" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` + WarEventcol int `json:"warEventcol" legend:"base"` +} + +func (x *HistoricalEventCollectionBattle) Name() string { return x.Name_ } + +type HistoricalEventCollectionBeastAttack struct { + Coords string `json:"coords" legend:"base"` + DefendingEnid int `json:"defendingEnid" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Ordinal int `json:"ordinal" legend:"base"` + ParentEventcol int `json:"parentEventcol" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventCollectionCeremony struct { + Ordinal int `json:"ordinal" legend:"base"` +} +type HistoricalEventCollectionCompetition struct { + Ordinal int `json:"ordinal" legend:"base"` +} +type HistoricalEventCollectionDuel struct { + AttackingHfid int `json:"attackingHfid" legend:"base"` + Coords string `json:"coords" legend:"base"` + DefendingHfid int `json:"defendingHfid" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Ordinal int `json:"ordinal" legend:"base"` + ParentEventcol int `json:"parentEventcol" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventCollectionEntityOverthrown struct { + Ordinal int `json:"ordinal" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + TargetEntityId int `json:"targetEntityId" legend:"base"` +} +type HistoricalEventCollectionJourney struct { + Ordinal int `json:"ordinal" legend:"base"` +} +type HistoricalEventCollectionOccasion struct { + CivId int `json:"civId" legend:"base"` + OccasionId int `json:"occasionId" legend:"base"` + Ordinal int `json:"ordinal" legend:"base"` +} +type HistoricalEventCollectionPerformance struct { + Ordinal int `json:"ordinal" legend:"base"` +} +type HistoricalEventCollectionPersecution struct { + Ordinal int `json:"ordinal" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + TargetEntityId int `json:"targetEntityId" legend:"base"` +} +type HistoricalEventCollectionProcession struct { + Ordinal int `json:"ordinal" legend:"base"` +} +type HistoricalEventCollectionPurge struct { + Adjective string `json:"adjective" legend:"base"` + Ordinal int `json:"ordinal" legend:"base"` + SiteId int `json:"siteId" legend:"base"` +} +type HistoricalEventCollectionSiteConquered struct { + AttackingEnid int `json:"attackingEnid" legend:"base"` + DefendingEnid int `json:"defendingEnid" legend:"base"` + Ordinal int `json:"ordinal" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + WarEventcol int `json:"warEventcol" legend:"base"` +} +type HistoricalEventCollectionTheft struct { + AttackingEnid int `json:"attackingEnid" legend:"base"` + Coords string `json:"coords" legend:"base"` + DefendingEnid int `json:"defendingEnid" legend:"base"` + FeatureLayerId int `json:"featureLayerId" legend:"base"` + Ordinal int `json:"ordinal" legend:"base"` + ParentEventcol int `json:"parentEventcol" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubregionId int `json:"subregionId" legend:"base"` +} +type HistoricalEventCollectionWar struct { + AggressorEntId int `json:"aggressorEntId" legend:"base"` + DefenderEntId int `json:"defenderEntId" legend:"base"` + Name_ string `json:"name" legend:"base"` +} + +func (x *HistoricalEventCollectionWar) Name() string { return x.Name_ } + +type HistoricalEventRelationship struct { + Event int `json:"event" legend:"plus"` + Relationship string `json:"relationship" legend:"plus"` + SourceHf int `json:"sourceHf" legend:"plus"` + TargetHf int `json:"targetHf" legend:"plus"` + Year int `json:"year" legend:"plus"` +} +type HistoricalEventRelationshipSupplement struct { + Event int `json:"event" legend:"plus"` + OccasionType int `json:"occasionType" legend:"plus"` + Site int `json:"site" legend:"plus"` + Unk1 int `json:"unk1" legend:"plus"` +} +type HistoricalFigure struct { + ActiveInteraction string `json:"activeInteraction" legend:"base"` + Animated string `json:"animated" legend:"base"` + AnimatedString string `json:"animatedString" legend:"base"` + Appeared int `json:"appeared" legend:"base"` + AssociatedType string `json:"associatedType" legend:"base"` + BirthSeconds72 int `json:"birthSeconds72" legend:"base"` + BirthYear int `json:"birthYear" legend:"base"` + Caste string `json:"caste" legend:"base"` + CurrentIdentityId int `json:"currentIdentityId" legend:"base"` + DeathSeconds72 int `json:"deathSeconds72" legend:"base"` + DeathYear int `json:"deathYear" legend:"base"` + Deity string `json:"deity" legend:"base"` + EntPopId int `json:"entPopId" legend:"base"` + EntityFormerPositionLink *EntityFormerPositionLink `json:"entityFormerPositionLink" legend:"base"` + EntityLink *EntityLink `json:"entityLink" legend:"base"` + EntityPositionLink *EntityPositionLink `json:"entityPositionLink" legend:"base"` + EntityReputation *EntityReputation `json:"entityReputation" legend:"base"` + EntitySquadLink *EntitySquadLink `json:"entitySquadLink" legend:"base"` + Force string `json:"force" legend:"base"` + Goal string `json:"goal" legend:"base"` + HfLink *HfLink `json:"hfLink" legend:"base"` + HfSkill *HfSkill `json:"hfSkill" legend:"base"` + HoldsArtifact int `json:"holdsArtifact" legend:"base"` + HonorEntity *HonorEntity `json:"honorEntity" legend:"base"` + Id_ int `json:"id" legend:"plus"` + InteractionKnowledge string `json:"interactionKnowledge" legend:"base"` + IntrigueActor *IntrigueActor `json:"intrigueActor" legend:"base"` + IntriguePlot *IntriguePlot `json:"intriguePlot" legend:"base"` + JourneyPet string `json:"journeyPet" legend:"base"` + Name_ string `json:"name" legend:"base"` + Race string `json:"race" legend:"plus"` + RelationshipProfileHfHistorical *RelationshipProfileHfHistorical `json:"relationshipProfileHfHistorical" legend:"base"` + RelationshipProfileHfVisual *RelationshipProfileHfVisual `json:"relationshipProfileHfVisual" legend:"base"` + Sex int `json:"sex" legend:"plus"` + SiteLink *SiteLink `json:"siteLink" legend:"base"` + SiteProperty *SiteProperty `json:"siteProperty" legend:"base"` + Sphere string `json:"sphere" legend:"base"` + UsedIdentityId int `json:"usedIdentityId" legend:"base"` + VagueRelationship *VagueRelationship `json:"vagueRelationship" legend:"base"` +} + +func (x *HistoricalFigure) Id() int { return x.Id_ } +func (x *HistoricalFigure) Name() string { return x.Name_ } + +type Honor struct { + ExemptEpid int `json:"exemptEpid" legend:"base"` + ExemptFormerEpid int `json:"exemptFormerEpid" legend:"base"` + GivesPrecedence int `json:"givesPrecedence" legend:"base"` + GrantedToEverybody string `json:"grantedToEverybody" legend:"base"` + Id_ int `json:"id" legend:"base"` + Name_ string `json:"name" legend:"base"` + RequiredBattles int `json:"requiredBattles" legend:"base"` + RequiredKills int `json:"requiredKills" legend:"base"` + RequiredSkill string `json:"requiredSkill" legend:"base"` + RequiredSkillIpTotal int `json:"requiredSkillIpTotal" legend:"base"` + RequiredYears int `json:"requiredYears" legend:"base"` + RequiresAnyMeleeOrRangedSkill string `json:"requiresAnyMeleeOrRangedSkill" legend:"base"` +} + +func (x *Honor) Id() int { return x.Id_ } +func (x *Honor) Name() string { return x.Name_ } + +type HonorEntity struct { + Battles int `json:"battles" legend:"base"` + Entity int `json:"entity" legend:"base"` + HonorId int `json:"honorId" legend:"base"` + Kills int `json:"kills" legend:"base"` +} +type Identity struct { + BirthSecond int `json:"birthSecond" legend:"plus"` + BirthYear int `json:"birthYear" legend:"plus"` + Caste string `json:"caste" legend:"plus"` + EntityId int `json:"entityId" legend:"plus"` + HistfigId int `json:"histfigId" legend:"plus"` + Id_ int `json:"id" legend:"plus"` + Name_ string `json:"name" legend:"plus"` + NemesisId int `json:"nemesisId" legend:"plus"` + Profession string `json:"profession" legend:"plus"` + Race string `json:"race" legend:"plus"` +} + +func (x *Identity) Id() int { return x.Id_ } +func (x *Identity) Name() string { return x.Name_ } + +type IntrigueActor struct { + EntityId int `json:"entityId" legend:"base"` + HandleActorId int `json:"handleActorId" legend:"base"` + Hfid int `json:"hfid" legend:"base"` + LocalId int `json:"localId" legend:"base"` + PromisedActorImmortality string `json:"promisedActorImmortality" legend:"base"` + PromisedMeImmortality string `json:"promisedMeImmortality" legend:"base"` + Role string `json:"role" legend:"base"` + Strategy string `json:"strategy" legend:"base"` + StrategyEnid int `json:"strategyEnid" legend:"base"` + StrategyEppid int `json:"strategyEppid" legend:"base"` +} +type IntriguePlot struct { + ActorId int `json:"actorId" legend:"base"` + ArtifactId int `json:"artifactId" legend:"base"` + DelegatedPlotHfid int `json:"delegatedPlotHfid" legend:"base"` + DelegatedPlotId int `json:"delegatedPlotId" legend:"base"` + EntityId int `json:"entityId" legend:"base"` + LocalId int `json:"localId" legend:"base"` + OnHold string `json:"onHold" legend:"base"` + ParentPlotHfid int `json:"parentPlotHfid" legend:"base"` + ParentPlotId int `json:"parentPlotId" legend:"base"` + PlotActor *PlotActor `json:"plotActor" legend:"base"` + Type string `json:"type" legend:"base"` +} +type Item struct { + NameString string `json:"nameString" legend:"base"` + PageNumber int `json:"pageNumber" legend:"base"` + PageWrittenContentId int `json:"pageWrittenContentId" legend:"base"` + WritingWrittenContentId int `json:"writingWrittenContentId" legend:"base"` +} +type Landmass struct { + Coord1 string `json:"coord1" legend:"plus"` + Coord2 string `json:"coord2" legend:"plus"` + Id_ int `json:"id" legend:"plus"` + Name_ string `json:"name" legend:"plus"` +} + +func (x *Landmass) Id() int { return x.Id_ } +func (x *Landmass) Name() string { return x.Name_ } + +type MountainPeak struct { + Coords string `json:"coords" legend:"plus"` + Height int `json:"height" legend:"plus"` + Id_ int `json:"id" legend:"plus"` + IsVolcano string `json:"isVolcano" legend:"plus"` + Name_ string `json:"name" legend:"plus"` +} + +func (x *MountainPeak) Id() int { return x.Id_ } +func (x *MountainPeak) Name() string { return x.Name_ } + type MusicalForm struct { - ArtForm + Description string `json:"description" legend:"base"` + Id_ int `json:"id" legend:"plus"` + Name_ string `json:"name" legend:"plus"` } -type PoeticForm struct { - ArtForm +func (x *MusicalForm) Id() int { return x.Id_ } +func (x *MusicalForm) Name() string { return x.Name_ } + +type Occasion struct { + Event int `json:"event" legend:"plus"` + Id_ int `json:"id" legend:"plus"` + Name_ string `json:"name" legend:"plus"` + Schedule *Schedule `json:"schedule" legend:"plus"` } +func (x *Occasion) Id() int { return x.Id_ } +func (x *Occasion) Name() string { return x.Name_ } + +type PlotActor struct { + ActorId int `json:"actorId" legend:"base"` + AgreementHasMessenger string `json:"agreementHasMessenger" legend:"base"` + AgreementId int `json:"agreementId" legend:"base"` + PlotRole string `json:"plotRole" legend:"base"` +} +type PoeticForm struct { + Description string `json:"description" legend:"base"` + Id_ int `json:"id" legend:"plus"` + Name_ string `json:"name" legend:"plus"` +} + +func (x *PoeticForm) Id() int { return x.Id_ } +func (x *PoeticForm) Name() string { return x.Name_ } + +type Reference struct { + Id_ int `json:"id" legend:"plus"` + Type string `json:"type" legend:"plus"` +} + +func (x *Reference) Id() int { return x.Id_ } + +type Region struct { + Coords string `json:"coords" legend:"plus"` + Evilness string `json:"evilness" legend:"plus"` + ForceId int `json:"forceId" legend:"plus"` + Id_ int `json:"id" legend:"plus"` + Name_ string `json:"name" legend:"base"` + Type string `json:"type" legend:"base"` +} + +func (x *Region) Id() int { return x.Id_ } +func (x *Region) Name() string { return x.Name_ } + +type RelationshipProfileHfHistorical struct { + Fear int `json:"fear" legend:"base"` + HfId int `json:"hfId" legend:"base"` + Love int `json:"love" legend:"base"` + Loyalty int `json:"loyalty" legend:"base"` + Respect int `json:"respect" legend:"base"` + Trust int `json:"trust" legend:"base"` +} +type RelationshipProfileHfVisual struct { + Fear int `json:"fear" legend:"base"` + HfId int `json:"hfId" legend:"base"` + KnownIdentityId int `json:"knownIdentityId" legend:"base"` + LastMeetSeconds72 int `json:"lastMeetSeconds72" legend:"base"` + LastMeetYear int `json:"lastMeetYear" legend:"base"` + Love int `json:"love" legend:"base"` + Loyalty int `json:"loyalty" legend:"base"` + MeetCount int `json:"meetCount" legend:"base"` + RepFriendly int `json:"repFriendly" legend:"base"` + RepInformationSource int `json:"repInformationSource" legend:"base"` + Respect int `json:"respect" legend:"base"` + Trust int `json:"trust" legend:"base"` +} +type River struct { + EndPos string `json:"endPos" legend:"plus"` + Name_ string `json:"name" legend:"plus"` + Path string `json:"path" legend:"plus"` +} + +func (x *River) Name() string { return x.Name_ } + +type Schedule struct { + Feature *Feature `json:"feature" legend:"plus"` + Id_ int `json:"id" legend:"plus"` + ItemSubtype string `json:"itemSubtype" legend:"plus"` + ItemType string `json:"itemType" legend:"plus"` + Reference int `json:"reference" legend:"plus"` + Reference2 int `json:"reference2" legend:"plus"` + Type string `json:"type" legend:"plus"` +} + +func (x *Schedule) Id() int { return x.Id_ } + +type Site struct { + CivId int `json:"civId" legend:"plus"` + Coords string `json:"coords" legend:"base"` + CurOwnerId int `json:"curOwnerId" legend:"plus"` + Id_ int `json:"id" legend:"plus"` + Name_ string `json:"name" legend:"base"` + Rectangle string `json:"rectangle" legend:"base"` + SiteProperties map[int]*SiteProperty `json:"siteProperties" legend:"base"` + Structures map[int]*Structure `json:"structures" legend:"base"` + Type string `json:"type" legend:"base"` +} + +func (x *Site) Id() int { return x.Id_ } +func (x *Site) Name() string { return x.Name_ } + +type SiteLink struct { + EntityId int `json:"entityId" legend:"base"` + LinkType string `json:"linkType" legend:"base"` + OccupationId int `json:"occupationId" legend:"base"` + SiteId int `json:"siteId" legend:"base"` + SubId int `json:"subId" legend:"base"` +} +type SiteProperty struct { + Id_ int `json:"id" legend:"base"` + OwnerHfid int `json:"ownerHfid" legend:"base"` + StructureId int `json:"structureId" legend:"base"` + Type string `json:"type" legend:"base"` +} + +func (x *SiteProperty) Id() int { return x.Id_ } + +type Structure struct { + CopiedArtifactId int `json:"copiedArtifactId" legend:"base"` + Deity int `json:"deity" legend:"plus"` + DeityType int `json:"deityType" legend:"plus"` + DungeonType int `json:"dungeonType" legend:"plus"` + EntityId int `json:"entityId" legend:"base"` + Id_ int `json:"id" legend:"plus"` + Inhabitant int `json:"inhabitant" legend:"plus"` + LocalId int `json:"localId" legend:"base"` + Name_ string `json:"name" legend:"base"` + Name2 string `json:"name2" legend:"plus"` + Religion int `json:"religion" legend:"plus"` + Subtype string `json:"subtype" legend:"base"` + Type string `json:"type" legend:"base"` + WorshipHfid int `json:"worshipHfid" legend:"base"` +} + +func (x *Structure) Id() int { return x.Id_ } +func (x *Structure) Name() string { return x.Name_ } + +type UndergroundRegion struct { + Coords string `json:"coords" legend:"plus"` + Depth int `json:"depth" legend:"base"` + Id_ int `json:"id" legend:"plus"` + Type string `json:"type" legend:"base"` +} + +func (x *UndergroundRegion) Id() int { return x.Id_ } + +type VagueRelationship struct { + ArtisticBuddy string `json:"artisticBuddy" legend:"base"` + AtheleticRival string `json:"atheleticRival" legend:"base"` + AthleteBuddy string `json:"athleteBuddy" legend:"base"` + BusinessRival string `json:"businessRival" legend:"base"` + ChildhoodFriend string `json:"childhoodFriend" legend:"base"` + Grudge string `json:"grudge" legend:"base"` + Hfid int `json:"hfid" legend:"base"` + JealousObsession string `json:"jealousObsession" legend:"base"` + JealousRelationshipGrudge string `json:"jealousRelationshipGrudge" legend:"base"` + PersecutionGrudge string `json:"persecutionGrudge" legend:"base"` + ReligiousPersecutionGrudge string `json:"religiousPersecutionGrudge" legend:"base"` + ScholarBuddy string `json:"scholarBuddy" legend:"base"` + SupernaturalGrudge string `json:"supernaturalGrudge" legend:"base"` + WarBuddy string `json:"warBuddy" legend:"base"` +} +type WorldConstruction struct { + Coords string `json:"coords" legend:"plus"` + Id_ int `json:"id" legend:"plus"` + Name_ string `json:"name" legend:"plus"` + Type string `json:"type" legend:"plus"` +} + +func (x *WorldConstruction) Id() int { return x.Id_ } +func (x *WorldConstruction) Name() string { return x.Name_ } + type WrittenContent struct { - NamedObject - - AuthorHfid *int `xml:"author_hfid" json:"authorHfid,omitempty" legend:"hf"` - AuthorRoll *int `xml:"author_roll" json:"authorRoll,omitempty"` - Form *string `xml:"form" json:"form,omitempty"` - FormId *int `xml:"form_id" json:"formId,omitempty"` - Style *[]string `xml:"style" json:"style,omitempty"` - Title *string `xml:"title" json:"title,omitempty"` - - // OtherElements - EventObject + Author int `json:"author" legend:"plus"` + AuthorHfid int `json:"authorHfid" legend:"base"` + AuthorRoll int `json:"authorRoll" legend:"base"` + Form string `json:"form" legend:"base"` + FormId int `json:"formId" legend:"base"` + Id_ int `json:"id" legend:"plus"` + PageEnd int `json:"pageEnd" legend:"plus"` + PageStart int `json:"pageStart" legend:"plus"` + Reference *Reference `json:"reference" legend:"plus"` + Style string `json:"style" legend:"plus"` + Title string `json:"title" legend:"plus"` + Type string `json:"type" legend:"plus"` } -type ArtForm struct { - NamedObject +func (x *WrittenContent) Id() int { return x.Id_ } - Description *string `xml:"description" json:"description,omitempty"` +// Parser - // OtherElements - EventObject +func n(d []byte) int { + v, _ := strconv.Atoi(string(d)) + return v +} +func parseArtifact(d *xml.Decoder, start *xml.StartElement) (*Artifact, error) { + var ( + obj = Artifact{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "abs_tile_x": + data = nil + case "abs_tile_y": + data = nil + case "abs_tile_z": + data = nil + case "holder_hfid": + data = nil + case "id": + data = nil + case "item": + v, _ := parseItem(d, &t) + obj.Item = v + case "item_description": + data = nil + case "item_subtype": + data = nil + case "item_type": + data = nil + case "mat": + data = nil + case "name": + data = nil + case "page_count": + data = nil + case "site_id": + data = nil + case "structure_local_id": + data = nil + case "subregion_id": + data = nil + case "writing": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "abs_tile_x": + obj.AbsTileX = n(data) + case "abs_tile_y": + obj.AbsTileY = n(data) + case "abs_tile_z": + obj.AbsTileZ = n(data) + case "holder_hfid": + obj.HolderHfid = n(data) + case "id": + obj.Id_ = n(data) + case "item": + + case "item_description": + obj.ItemDescription = string(data) + case "item_subtype": + obj.ItemSubtype = string(data) + case "item_type": + obj.ItemType = string(data) + case "mat": + obj.Mat = string(data) + case "name": + obj.Name_ = string(data) + case "page_count": + obj.PageCount = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_local_id": + obj.StructureLocalId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "writing": + obj.Writing = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseCircumstance(d *xml.Decoder, start *xml.StartElement) (*Circumstance, error) { + var ( + obj = Circumstance{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "defeated": + data = nil + case "hist_event_collection": + data = nil + case "murdered": + data = nil + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "defeated": + obj.Defeated = n(data) + case "hist_event_collection": + obj.HistEventCollection = n(data) + case "murdered": + obj.Murdered = n(data) + case "type": + obj.Type = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseCreature(d *xml.Decoder, start *xml.StartElement) (*Creature, error) { + var ( + obj = Creature{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "all_castes_alive": + data = nil + case "artificial_hiveable": + data = nil + case "biome_desert_badland": + data = nil + case "biome_desert_rock": + data = nil + case "biome_desert_sand": + data = nil + case "biome_forest_taiga": + data = nil + case "biome_forest_temperate_broadleaf": + data = nil + case "biome_forest_temperate_conifer": + data = nil + case "biome_forest_tropical_conifer": + data = nil + case "biome_forest_tropical_dry_broadleaf": + data = nil + case "biome_forest_tropical_moist_broadleaf": + data = nil + case "biome_glacier": + data = nil + case "biome_grassland_temperate": + data = nil + case "biome_grassland_tropical": + data = nil + case "biome_lake_temperate_brackishwater": + data = nil + case "biome_lake_temperate_freshwater": + data = nil + case "biome_lake_temperate_saltwater": + data = nil + case "biome_lake_tropical_brackishwater": + data = nil + case "biome_lake_tropical_freshwater": + data = nil + case "biome_lake_tropical_saltwater": + data = nil + case "biome_marsh_temperate_freshwater": + data = nil + case "biome_marsh_temperate_saltwater": + data = nil + case "biome_marsh_tropical_freshwater": + data = nil + case "biome_marsh_tropical_saltwater": + data = nil + case "biome_mountain": + data = nil + case "biome_ocean_arctic": + data = nil + case "biome_ocean_temperate": + data = nil + case "biome_ocean_tropical": + data = nil + case "biome_pool_temperate_brackishwater": + data = nil + case "biome_pool_temperate_freshwater": + data = nil + case "biome_pool_temperate_saltwater": + data = nil + case "biome_pool_tropical_brackishwater": + data = nil + case "biome_pool_tropical_freshwater": + data = nil + case "biome_pool_tropical_saltwater": + data = nil + case "biome_river_temperate_brackishwater": + data = nil + case "biome_river_temperate_freshwater": + data = nil + case "biome_river_temperate_saltwater": + data = nil + case "biome_river_tropical_brackishwater": + data = nil + case "biome_river_tropical_freshwater": + data = nil + case "biome_river_tropical_saltwater": + data = nil + case "biome_savanna_temperate": + data = nil + case "biome_savanna_tropical": + data = nil + case "biome_shrubland_temperate": + data = nil + case "biome_shrubland_tropical": + data = nil + case "biome_subterranean_chasm": + data = nil + case "biome_subterranean_lava": + data = nil + case "biome_subterranean_water": + data = nil + case "biome_swamp_mangrove": + data = nil + case "biome_swamp_temperate_freshwater": + data = nil + case "biome_swamp_temperate_saltwater": + data = nil + case "biome_swamp_tropical_freshwater": + data = nil + case "biome_swamp_tropical_saltwater": + data = nil + case "biome_tundra": + data = nil + case "creature_id": + data = nil + case "does_not_exist": + data = nil + case "equipment": + data = nil + case "equipment_wagon": + data = nil + case "evil": + data = nil + case "fanciful": + data = nil + case "generated": + data = nil + case "good": + data = nil + case "has_any_benign": + data = nil + case "has_any_can_swim": + data = nil + case "has_any_cannot_breathe_air": + data = nil + case "has_any_cannot_breathe_water": + data = nil + case "has_any_carnivore": + data = nil + case "has_any_common_domestic": + data = nil + case "has_any_curious_beast": + data = nil + case "has_any_demon": + data = nil + case "has_any_feature_beast": + data = nil + case "has_any_flier": + data = nil + case "has_any_fly_race_gait": + data = nil + case "has_any_grasp": + data = nil + case "has_any_grazer": + data = nil + case "has_any_has_blood": + data = nil + case "has_any_immobile": + data = nil + case "has_any_intelligent_learns": + data = nil + case "has_any_intelligent_speaks": + data = nil + case "has_any_large_predator": + data = nil + case "has_any_local_pops_controllable": + data = nil + case "has_any_local_pops_produce_heroes": + data = nil + case "has_any_megabeast": + data = nil + case "has_any_mischievous": + data = nil + case "has_any_natural_animal": + data = nil + case "has_any_night_creature": + data = nil + case "has_any_night_creature_bogeyman": + data = nil + case "has_any_night_creature_hunter": + data = nil + case "has_any_night_creature_nightmare": + data = nil + case "has_any_not_fireimmune": + data = nil + case "has_any_not_living": + data = nil + case "has_any_outsider_controllable": + data = nil + case "has_any_race_gait": + data = nil + case "has_any_semimegabeast": + data = nil + case "has_any_slow_learner": + data = nil + case "has_any_supernatural": + data = nil + case "has_any_titan": + data = nil + case "has_any_unique_demon": + data = nil + case "has_any_utterances": + data = nil + case "has_any_vermin_hateable": + data = nil + case "has_any_vermin_micro": + data = nil + case "has_female": + data = nil + case "has_male": + data = nil + case "large_roaming": + data = nil + case "loose_clusters": + data = nil + case "mates_to_breed": + data = nil + case "mundane": + data = nil + case "name_plural": + data = nil + case "name_singular": + data = nil + case "occurs_as_entity_race": + data = nil + case "savage": + data = nil + case "small_race": + data = nil + case "two_genders": + data = nil + case "ubiquitous": + data = nil + case "vermin_eater": + data = nil + case "vermin_fish": + data = nil + case "vermin_grounder": + data = nil + case "vermin_rotter": + data = nil + case "vermin_soil": + data = nil + case "vermin_soil_colony": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "all_castes_alive": + obj.AllCastesAlive = string(data) + case "artificial_hiveable": + obj.ArtificialHiveable = string(data) + case "biome_desert_badland": + obj.BiomeDesertBadland = string(data) + case "biome_desert_rock": + obj.BiomeDesertRock = string(data) + case "biome_desert_sand": + obj.BiomeDesertSand = string(data) + case "biome_forest_taiga": + obj.BiomeForestTaiga = string(data) + case "biome_forest_temperate_broadleaf": + obj.BiomeForestTemperateBroadleaf = string(data) + case "biome_forest_temperate_conifer": + obj.BiomeForestTemperateConifer = string(data) + case "biome_forest_tropical_conifer": + obj.BiomeForestTropicalConifer = string(data) + case "biome_forest_tropical_dry_broadleaf": + obj.BiomeForestTropicalDryBroadleaf = string(data) + case "biome_forest_tropical_moist_broadleaf": + obj.BiomeForestTropicalMoistBroadleaf = string(data) + case "biome_glacier": + obj.BiomeGlacier = string(data) + case "biome_grassland_temperate": + obj.BiomeGrasslandTemperate = string(data) + case "biome_grassland_tropical": + obj.BiomeGrasslandTropical = string(data) + case "biome_lake_temperate_brackishwater": + obj.BiomeLakeTemperateBrackishwater = string(data) + case "biome_lake_temperate_freshwater": + obj.BiomeLakeTemperateFreshwater = string(data) + case "biome_lake_temperate_saltwater": + obj.BiomeLakeTemperateSaltwater = string(data) + case "biome_lake_tropical_brackishwater": + obj.BiomeLakeTropicalBrackishwater = string(data) + case "biome_lake_tropical_freshwater": + obj.BiomeLakeTropicalFreshwater = string(data) + case "biome_lake_tropical_saltwater": + obj.BiomeLakeTropicalSaltwater = string(data) + case "biome_marsh_temperate_freshwater": + obj.BiomeMarshTemperateFreshwater = string(data) + case "biome_marsh_temperate_saltwater": + obj.BiomeMarshTemperateSaltwater = string(data) + case "biome_marsh_tropical_freshwater": + obj.BiomeMarshTropicalFreshwater = string(data) + case "biome_marsh_tropical_saltwater": + obj.BiomeMarshTropicalSaltwater = string(data) + case "biome_mountain": + obj.BiomeMountain = string(data) + case "biome_ocean_arctic": + obj.BiomeOceanArctic = string(data) + case "biome_ocean_temperate": + obj.BiomeOceanTemperate = string(data) + case "biome_ocean_tropical": + obj.BiomeOceanTropical = string(data) + case "biome_pool_temperate_brackishwater": + obj.BiomePoolTemperateBrackishwater = string(data) + case "biome_pool_temperate_freshwater": + obj.BiomePoolTemperateFreshwater = string(data) + case "biome_pool_temperate_saltwater": + obj.BiomePoolTemperateSaltwater = string(data) + case "biome_pool_tropical_brackishwater": + obj.BiomePoolTropicalBrackishwater = string(data) + case "biome_pool_tropical_freshwater": + obj.BiomePoolTropicalFreshwater = string(data) + case "biome_pool_tropical_saltwater": + obj.BiomePoolTropicalSaltwater = string(data) + case "biome_river_temperate_brackishwater": + obj.BiomeRiverTemperateBrackishwater = string(data) + case "biome_river_temperate_freshwater": + obj.BiomeRiverTemperateFreshwater = string(data) + case "biome_river_temperate_saltwater": + obj.BiomeRiverTemperateSaltwater = string(data) + case "biome_river_tropical_brackishwater": + obj.BiomeRiverTropicalBrackishwater = string(data) + case "biome_river_tropical_freshwater": + obj.BiomeRiverTropicalFreshwater = string(data) + case "biome_river_tropical_saltwater": + obj.BiomeRiverTropicalSaltwater = string(data) + case "biome_savanna_temperate": + obj.BiomeSavannaTemperate = string(data) + case "biome_savanna_tropical": + obj.BiomeSavannaTropical = string(data) + case "biome_shrubland_temperate": + obj.BiomeShrublandTemperate = string(data) + case "biome_shrubland_tropical": + obj.BiomeShrublandTropical = string(data) + case "biome_subterranean_chasm": + obj.BiomeSubterraneanChasm = string(data) + case "biome_subterranean_lava": + obj.BiomeSubterraneanLava = string(data) + case "biome_subterranean_water": + obj.BiomeSubterraneanWater = string(data) + case "biome_swamp_mangrove": + obj.BiomeSwampMangrove = string(data) + case "biome_swamp_temperate_freshwater": + obj.BiomeSwampTemperateFreshwater = string(data) + case "biome_swamp_temperate_saltwater": + obj.BiomeSwampTemperateSaltwater = string(data) + case "biome_swamp_tropical_freshwater": + obj.BiomeSwampTropicalFreshwater = string(data) + case "biome_swamp_tropical_saltwater": + obj.BiomeSwampTropicalSaltwater = string(data) + case "biome_tundra": + obj.BiomeTundra = string(data) + case "creature_id": + obj.CreatureId = string(data) + case "does_not_exist": + obj.DoesNotExist = string(data) + case "equipment": + obj.Equipment = string(data) + case "equipment_wagon": + obj.EquipmentWagon = string(data) + case "evil": + obj.Evil = string(data) + case "fanciful": + obj.Fanciful = string(data) + case "generated": + obj.Generated = string(data) + case "good": + obj.Good = string(data) + case "has_any_benign": + obj.HasAnyBenign = string(data) + case "has_any_can_swim": + obj.HasAnyCanSwim = string(data) + case "has_any_cannot_breathe_air": + obj.HasAnyCannotBreatheAir = string(data) + case "has_any_cannot_breathe_water": + obj.HasAnyCannotBreatheWater = string(data) + case "has_any_carnivore": + obj.HasAnyCarnivore = string(data) + case "has_any_common_domestic": + obj.HasAnyCommonDomestic = string(data) + case "has_any_curious_beast": + obj.HasAnyCuriousBeast = string(data) + case "has_any_demon": + obj.HasAnyDemon = string(data) + case "has_any_feature_beast": + obj.HasAnyFeatureBeast = string(data) + case "has_any_flier": + obj.HasAnyFlier = string(data) + case "has_any_fly_race_gait": + obj.HasAnyFlyRaceGait = string(data) + case "has_any_grasp": + obj.HasAnyGrasp = string(data) + case "has_any_grazer": + obj.HasAnyGrazer = string(data) + case "has_any_has_blood": + obj.HasAnyHasBlood = string(data) + case "has_any_immobile": + obj.HasAnyImmobile = string(data) + case "has_any_intelligent_learns": + obj.HasAnyIntelligentLearns = string(data) + case "has_any_intelligent_speaks": + obj.HasAnyIntelligentSpeaks = string(data) + case "has_any_large_predator": + obj.HasAnyLargePredator = string(data) + case "has_any_local_pops_controllable": + obj.HasAnyLocalPopsControllable = string(data) + case "has_any_local_pops_produce_heroes": + obj.HasAnyLocalPopsProduceHeroes = string(data) + case "has_any_megabeast": + obj.HasAnyMegabeast = string(data) + case "has_any_mischievous": + obj.HasAnyMischievous = string(data) + case "has_any_natural_animal": + obj.HasAnyNaturalAnimal = string(data) + case "has_any_night_creature": + obj.HasAnyNightCreature = string(data) + case "has_any_night_creature_bogeyman": + obj.HasAnyNightCreatureBogeyman = string(data) + case "has_any_night_creature_hunter": + obj.HasAnyNightCreatureHunter = string(data) + case "has_any_night_creature_nightmare": + obj.HasAnyNightCreatureNightmare = string(data) + case "has_any_not_fireimmune": + obj.HasAnyNotFireimmune = string(data) + case "has_any_not_living": + obj.HasAnyNotLiving = string(data) + case "has_any_outsider_controllable": + obj.HasAnyOutsiderControllable = string(data) + case "has_any_race_gait": + obj.HasAnyRaceGait = string(data) + case "has_any_semimegabeast": + obj.HasAnySemimegabeast = string(data) + case "has_any_slow_learner": + obj.HasAnySlowLearner = string(data) + case "has_any_supernatural": + obj.HasAnySupernatural = string(data) + case "has_any_titan": + obj.HasAnyTitan = string(data) + case "has_any_unique_demon": + obj.HasAnyUniqueDemon = string(data) + case "has_any_utterances": + obj.HasAnyUtterances = string(data) + case "has_any_vermin_hateable": + obj.HasAnyVerminHateable = string(data) + case "has_any_vermin_micro": + obj.HasAnyVerminMicro = string(data) + case "has_female": + obj.HasFemale = string(data) + case "has_male": + obj.HasMale = string(data) + case "large_roaming": + obj.LargeRoaming = string(data) + case "loose_clusters": + obj.LooseClusters = string(data) + case "mates_to_breed": + obj.MatesToBreed = string(data) + case "mundane": + obj.Mundane = string(data) + case "name_plural": + obj.NamePlural = string(data) + case "name_singular": + obj.NameSingular = string(data) + case "occurs_as_entity_race": + obj.OccursAsEntityRace = string(data) + case "savage": + obj.Savage = string(data) + case "small_race": + obj.SmallRace = string(data) + case "two_genders": + obj.TwoGenders = string(data) + case "ubiquitous": + obj.Ubiquitous = string(data) + case "vermin_eater": + obj.VerminEater = string(data) + case "vermin_fish": + obj.VerminFish = string(data) + case "vermin_grounder": + obj.VerminGrounder = string(data) + case "vermin_rotter": + obj.VerminRotter = string(data) + case "vermin_soil": + obj.VerminSoil = string(data) + case "vermin_soil_colony": + obj.VerminSoilColony = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseDanceForm(d *xml.Decoder, start *xml.StartElement) (*DanceForm, error) { + var ( + obj = DanceForm{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "description": + data = nil + case "id": + data = nil + case "name": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "description": + obj.Description = string(data) + case "id": + obj.Id_ = n(data) + case "name": + obj.Name_ = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseDfWorld(d *xml.Decoder, start *xml.StartElement) (*DfWorld, error) { + var ( + obj = DfWorld{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "altname": + data = nil + case "artifacts": + obj.Artifacts = make(map[int]*Artifact) + parseMap(d, &obj.Artifacts, parseArtifact) + case "creature_raw": + parseArray(d, &obj.CreatureRaw, parseCreature) + case "dance_forms": + obj.DanceForms = make(map[int]*DanceForm) + parseMap(d, &obj.DanceForms, parseDanceForm) + case "entities": + obj.Entities = make(map[int]*Entity) + parseMap(d, &obj.Entities, parseEntity) + case "entity_populations": + obj.EntityPopulations = make(map[int]*EntityPopulation) + parseMap(d, &obj.EntityPopulations, parseEntityPopulation) + case "historical_eras": + parseArray(d, &obj.HistoricalEras, parseHistoricalEra) + case "historical_event_collections": + obj.HistoricalEventCollections = make(map[int]*HistoricalEventCollection) + parseMap(d, &obj.HistoricalEventCollections, parseHistoricalEventCollection) + case "historical_event_relationship_supplements": + parseArray(d, &obj.HistoricalEventRelationshipSupplements, parseHistoricalEventRelationshipSupplement) + case "historical_event_relationships": + parseArray(d, &obj.HistoricalEventRelationships, parseHistoricalEventRelationship) + case "historical_events": + obj.HistoricalEvents = make(map[int]*HistoricalEvent) + parseMap(d, &obj.HistoricalEvents, parseHistoricalEvent) + case "historical_figures": + obj.HistoricalFigures = make(map[int]*HistoricalFigure) + parseMap(d, &obj.HistoricalFigures, parseHistoricalFigure) + case "identities": + obj.Identities = make(map[int]*Identity) + parseMap(d, &obj.Identities, parseIdentity) + case "landmasses": + obj.Landmasses = make(map[int]*Landmass) + parseMap(d, &obj.Landmasses, parseLandmass) + case "mountain_peaks": + obj.MountainPeaks = make(map[int]*MountainPeak) + parseMap(d, &obj.MountainPeaks, parseMountainPeak) + case "musical_forms": + obj.MusicalForms = make(map[int]*MusicalForm) + parseMap(d, &obj.MusicalForms, parseMusicalForm) + case "name": + data = nil + case "poetic_forms": + obj.PoeticForms = make(map[int]*PoeticForm) + parseMap(d, &obj.PoeticForms, parsePoeticForm) + case "regions": + obj.Regions = make(map[int]*Region) + parseMap(d, &obj.Regions, parseRegion) + case "rivers": + parseArray(d, &obj.Rivers, parseRiver) + case "sites": + obj.Sites = make(map[int]*Site) + parseMap(d, &obj.Sites, parseSite) + case "underground_regions": + obj.UndergroundRegions = make(map[int]*UndergroundRegion) + parseMap(d, &obj.UndergroundRegions, parseUndergroundRegion) + case "world_constructions": + obj.WorldConstructions = make(map[int]*WorldConstruction) + parseMap(d, &obj.WorldConstructions, parseWorldConstruction) + case "written_contents": + obj.WrittenContents = make(map[int]*WrittenContent) + parseMap(d, &obj.WrittenContents, parseWrittenContent) + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "altname": + obj.Altname = string(data) + case "artifacts": + + case "creature_raw": + + case "dance_forms": + + case "entities": + + case "entity_populations": + + case "historical_eras": + + case "historical_event_collections": + + case "historical_event_relationship_supplements": + + case "historical_event_relationships": + + case "historical_events": + + case "historical_figures": + + case "identities": + + case "landmasses": + + case "mountain_peaks": + + case "musical_forms": + + case "name": + obj.Name_ = string(data) + case "poetic_forms": + + case "regions": + + case "rivers": + + case "sites": + + case "underground_regions": + + case "world_constructions": + + case "written_contents": + + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseEntity(d *xml.Decoder, start *xml.StartElement) (*Entity, error) { + var ( + obj = Entity{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "child": + data = nil + case "claims": + data = nil + case "entity_link": + v, _ := parseEntityLink(d, &t) + obj.EntityLink = v + case "entity_position": + v, _ := parseEntityPosition(d, &t) + obj.EntityPosition = v + case "entity_position_assignment": + v, _ := parseEntityPositionAssignment(d, &t) + obj.EntityPositionAssignment = v + case "histfig_id": + data = nil + case "honor": + v, _ := parseHonor(d, &t) + obj.Honor = v + case "id": + data = nil + case "name": + data = nil + case "occasion": + v, _ := parseOccasion(d, &t) + obj.Occasion = v + case "profession": + data = nil + case "race": + data = nil + case "type": + data = nil + case "weapon": + data = nil + case "worship_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "child": + obj.Child = n(data) + case "claims": + obj.Claims = string(data) + case "entity_link": + + case "entity_position": + + case "entity_position_assignment": + + case "histfig_id": + obj.HistfigId = n(data) + case "honor": + + case "id": + obj.Id_ = n(data) + case "name": + obj.Name_ = string(data) + case "occasion": + + case "profession": + obj.Profession = string(data) + case "race": + obj.Race = string(data) + case "type": + obj.Type = string(data) + case "weapon": + obj.Weapon = string(data) + case "worship_id": + obj.WorshipId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseEntityFormerPositionLink(d *xml.Decoder, start *xml.StartElement) (*EntityFormerPositionLink, error) { + var ( + obj = EntityFormerPositionLink{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "end_year": + data = nil + case "entity_id": + data = nil + case "position_profile_id": + data = nil + case "start_year": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "end_year": + obj.EndYear = n(data) + case "entity_id": + obj.EntityId = n(data) + case "position_profile_id": + obj.PositionProfileId = n(data) + case "start_year": + obj.StartYear = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseEntityLink(d *xml.Decoder, start *xml.StartElement) (*EntityLink, error) { + var ( + obj = EntityLink{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "strength": + data = nil + case "target": + data = nil + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "strength": + obj.Strength = n(data) + case "target": + obj.Target = n(data) + case "type": + obj.Type = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseEntityPopulation(d *xml.Decoder, start *xml.StartElement) (*EntityPopulation, error) { + var ( + obj = EntityPopulation{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ_id": + data = nil + case "id": + data = nil + case "race": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ_id": + obj.CivId = n(data) + case "id": + obj.Id_ = n(data) + case "race": + obj.Race = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseEntityPosition(d *xml.Decoder, start *xml.StartElement) (*EntityPosition, error) { + var ( + obj = EntityPosition{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "id": + data = nil + case "name": + data = nil + case "name_female": + data = nil + case "name_male": + data = nil + case "spouse": + data = nil + case "spouse_female": + data = nil + case "spouse_male": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "id": + obj.Id_ = n(data) + case "name": + obj.Name_ = string(data) + case "name_female": + obj.NameFemale = string(data) + case "name_male": + obj.NameMale = string(data) + case "spouse": + obj.Spouse = string(data) + case "spouse_female": + obj.SpouseFemale = string(data) + case "spouse_male": + obj.SpouseMale = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseEntityPositionAssignment(d *xml.Decoder, start *xml.StartElement) (*EntityPositionAssignment, error) { + var ( + obj = EntityPositionAssignment{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "histfig": + data = nil + case "id": + data = nil + case "position_id": + data = nil + case "squad_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "histfig": + obj.Histfig = n(data) + case "id": + obj.Id_ = n(data) + case "position_id": + obj.PositionId = n(data) + case "squad_id": + obj.SquadId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseEntityPositionLink(d *xml.Decoder, start *xml.StartElement) (*EntityPositionLink, error) { + var ( + obj = EntityPositionLink{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_id": + data = nil + case "position_profile_id": + data = nil + case "start_year": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_id": + obj.EntityId = n(data) + case "position_profile_id": + obj.PositionProfileId = n(data) + case "start_year": + obj.StartYear = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseEntityReputation(d *xml.Decoder, start *xml.StartElement) (*EntityReputation, error) { + var ( + obj = EntityReputation{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_id": + data = nil + case "first_ageless_season_count": + data = nil + case "first_ageless_year": + data = nil + case "unsolved_murders": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_id": + obj.EntityId = n(data) + case "first_ageless_season_count": + obj.FirstAgelessSeasonCount = n(data) + case "first_ageless_year": + obj.FirstAgelessYear = n(data) + case "unsolved_murders": + obj.UnsolvedMurders = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseEntitySquadLink(d *xml.Decoder, start *xml.StartElement) (*EntitySquadLink, error) { + var ( + obj = EntitySquadLink{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_id": + data = nil + case "squad_id": + data = nil + case "squad_position": + data = nil + case "start_year": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_id": + obj.EntityId = n(data) + case "squad_id": + obj.SquadId = n(data) + case "squad_position": + obj.SquadPosition = n(data) + case "start_year": + obj.StartYear = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseFeature(d *xml.Decoder, start *xml.StartElement) (*Feature, error) { + var ( + obj = Feature{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "reference": + data = nil + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "reference": + obj.Reference = n(data) + case "type": + obj.Type = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHfLink(d *xml.Decoder, start *xml.StartElement) (*HfLink, error) { + var ( + obj = HfLink{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "hfid": + data = nil + case "link_strength": + data = nil + case "link_type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "hfid": + obj.Hfid = n(data) + case "link_strength": + obj.LinkStrength = n(data) + case "link_type": + obj.LinkType = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHfSkill(d *xml.Decoder, start *xml.StartElement) (*HfSkill, error) { + var ( + obj = HfSkill{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "skill": + data = nil + case "total_ip": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "skill": + obj.Skill = string(data) + case "total_ip": + obj.TotalIp = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEra(d *xml.Decoder, start *xml.StartElement) (*HistoricalEra, error) { + var ( + obj = HistoricalEra{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "name": + data = nil + case "start_year": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "name": + obj.Name_ = string(data) + case "start_year": + obj.StartYear = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEvent(d *xml.Decoder, start *xml.StartElement) (*HistoricalEvent, error) { + var ( + obj = HistoricalEvent{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "id": + data = nil + case "seconds72": + data = nil + case "type": + data = nil + case "year": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "id": + obj.Id_ = n(data) + case "seconds72": + obj.Seconds72 = n(data) + case "type": + var err error + switch strcase.ToCamel(string(data)) { + case "AddHfEntityHonor": + obj.Details, err = parseHistoricalEventAddHfEntityHonor(d, start) + case "AddHfEntityLink": + obj.Details, err = parseHistoricalEventAddHfEntityLink(d, start) + case "AddHfHfLink": + obj.Details, err = parseHistoricalEventAddHfHfLink(d, start) + case "AddHfSiteLink": + obj.Details, err = parseHistoricalEventAddHfSiteLink(d, start) + case "AgreementFormed": + obj.Details, err = parseHistoricalEventAgreementFormed(d, start) + case "ArtifactClaimFormed": + obj.Details, err = parseHistoricalEventArtifactClaimFormed(d, start) + case "ArtifactCopied": + obj.Details, err = parseHistoricalEventArtifactCopied(d, start) + case "ArtifactCreated": + obj.Details, err = parseHistoricalEventArtifactCreated(d, start) + case "ArtifactDestroyed": + obj.Details, err = parseHistoricalEventArtifactDestroyed(d, start) + case "ArtifactFound": + obj.Details, err = parseHistoricalEventArtifactFound(d, start) + case "ArtifactGiven": + obj.Details, err = parseHistoricalEventArtifactGiven(d, start) + case "ArtifactLost": + obj.Details, err = parseHistoricalEventArtifactLost(d, start) + case "ArtifactPossessed": + obj.Details, err = parseHistoricalEventArtifactPossessed(d, start) + case "ArtifactRecovered": + obj.Details, err = parseHistoricalEventArtifactRecovered(d, start) + case "ArtifactStored": + obj.Details, err = parseHistoricalEventArtifactStored(d, start) + case "AssumeIdentity": + obj.Details, err = parseHistoricalEventAssumeIdentity(d, start) + case "AttackedSite": + obj.Details, err = parseHistoricalEventAttackedSite(d, start) + case "BodyAbused": + obj.Details, err = parseHistoricalEventBodyAbused(d, start) + case "BuildingProfileAcquired": + obj.Details, err = parseHistoricalEventBuildingProfileAcquired(d, start) + case "Ceremony": + obj.Details, err = parseHistoricalEventCeremony(d, start) + case "ChangeCreatureType": + obj.Details, err = parseHistoricalEventChangeCreatureType(d, start) + case "ChangeHfBodyState": + obj.Details, err = parseHistoricalEventChangeHfBodyState(d, start) + case "ChangeHfJob": + obj.Details, err = parseHistoricalEventChangeHfJob(d, start) + case "ChangeHfState": + obj.Details, err = parseHistoricalEventChangeHfState(d, start) + case "ChangedCreatureType": + obj.Details, err = parseHistoricalEventChangedCreatureType(d, start) + case "Competition": + obj.Details, err = parseHistoricalEventCompetition(d, start) + case "CreateEntityPosition": + obj.Details, err = parseHistoricalEventCreateEntityPosition(d, start) + case "CreatedBuilding": + obj.Details, err = parseHistoricalEventCreatedBuilding(d, start) + case "CreatedSite": + obj.Details, err = parseHistoricalEventCreatedSite(d, start) + case "CreatedStructure": + obj.Details, err = parseHistoricalEventCreatedStructure(d, start) + case "CreatedWorldConstruction": + obj.Details, err = parseHistoricalEventCreatedWorldConstruction(d, start) + case "CreatureDevoured": + obj.Details, err = parseHistoricalEventCreatureDevoured(d, start) + case "DanceFormCreated": + obj.Details, err = parseHistoricalEventDanceFormCreated(d, start) + case "DestroyedSite": + obj.Details, err = parseHistoricalEventDestroyedSite(d, start) + case "EntityAction": + obj.Details, err = parseHistoricalEventEntityAction(d, start) + case "EntityAllianceFormed": + obj.Details, err = parseHistoricalEventEntityAllianceFormed(d, start) + case "EntityBreachFeatureLayer": + obj.Details, err = parseHistoricalEventEntityBreachFeatureLayer(d, start) + case "EntityCreated": + obj.Details, err = parseHistoricalEventEntityCreated(d, start) + case "EntityDissolved": + obj.Details, err = parseHistoricalEventEntityDissolved(d, start) + case "EntityEquipmentPurchase": + obj.Details, err = parseHistoricalEventEntityEquipmentPurchase(d, start) + case "EntityIncorporated": + obj.Details, err = parseHistoricalEventEntityIncorporated(d, start) + case "EntityLaw": + obj.Details, err = parseHistoricalEventEntityLaw(d, start) + case "EntityOverthrown": + obj.Details, err = parseHistoricalEventEntityOverthrown(d, start) + case "EntityPersecuted": + obj.Details, err = parseHistoricalEventEntityPersecuted(d, start) + case "EntityPrimaryCriminals": + obj.Details, err = parseHistoricalEventEntityPrimaryCriminals(d, start) + case "EntityRelocate": + obj.Details, err = parseHistoricalEventEntityRelocate(d, start) + case "FailedFrameAttempt": + obj.Details, err = parseHistoricalEventFailedFrameAttempt(d, start) + case "FailedIntrigueCorruption": + obj.Details, err = parseHistoricalEventFailedIntrigueCorruption(d, start) + case "FieldBattle": + obj.Details, err = parseHistoricalEventFieldBattle(d, start) + case "Gamble": + obj.Details, err = parseHistoricalEventGamble(d, start) + case "HfAbducted": + obj.Details, err = parseHistoricalEventHfAbducted(d, start) + case "HfActOnBuilding": + obj.Details, err = parseHistoricalEventHfActOnBuilding(d, start) + case "HfAttackedSite": + obj.Details, err = parseHistoricalEventHfAttackedSite(d, start) + case "HfConfronted": + obj.Details, err = parseHistoricalEventHfConfronted(d, start) + case "HfConvicted": + obj.Details, err = parseHistoricalEventHfConvicted(d, start) + case "HfDestroyedSite": + obj.Details, err = parseHistoricalEventHfDestroyedSite(d, start) + case "HfDied": + obj.Details, err = parseHistoricalEventHfDied(d, start) + case "HfDisturbedStructure": + obj.Details, err = parseHistoricalEventHfDisturbedStructure(d, start) + case "HfDoesInteraction": + obj.Details, err = parseHistoricalEventHfDoesInteraction(d, start) + case "HfEnslaved": + obj.Details, err = parseHistoricalEventHfEnslaved(d, start) + case "HfEquipmentPurchase": + obj.Details, err = parseHistoricalEventHfEquipmentPurchase(d, start) + case "HfGainsSecretGoal": + obj.Details, err = parseHistoricalEventHfGainsSecretGoal(d, start) + case "HfInterrogated": + obj.Details, err = parseHistoricalEventHfInterrogated(d, start) + case "HfLearnsSecret": + obj.Details, err = parseHistoricalEventHfLearnsSecret(d, start) + case "HfNewPet": + obj.Details, err = parseHistoricalEventHfNewPet(d, start) + case "HfPerformedHorribleExperiments": + obj.Details, err = parseHistoricalEventHfPerformedHorribleExperiments(d, start) + case "HfPrayedInsideStructure": + obj.Details, err = parseHistoricalEventHfPrayedInsideStructure(d, start) + case "HfPreach": + obj.Details, err = parseHistoricalEventHfPreach(d, start) + case "HfProfanedStructure": + obj.Details, err = parseHistoricalEventHfProfanedStructure(d, start) + case "HfRecruitedUnitTypeForEntity": + obj.Details, err = parseHistoricalEventHfRecruitedUnitTypeForEntity(d, start) + case "HfRelationshipDenied": + obj.Details, err = parseHistoricalEventHfRelationshipDenied(d, start) + case "HfReunion": + obj.Details, err = parseHistoricalEventHfReunion(d, start) + case "HfRevived": + obj.Details, err = parseHistoricalEventHfRevived(d, start) + case "HfSimpleBattleEvent": + obj.Details, err = parseHistoricalEventHfSimpleBattleEvent(d, start) + case "HfTravel": + obj.Details, err = parseHistoricalEventHfTravel(d, start) + case "HfViewedArtifact": + obj.Details, err = parseHistoricalEventHfViewedArtifact(d, start) + case "HfWounded": + obj.Details, err = parseHistoricalEventHfWounded(d, start) + case "HfsFormedIntrigueRelationship": + obj.Details, err = parseHistoricalEventHfsFormedIntrigueRelationship(d, start) + case "HfsFormedReputationRelationship": + obj.Details, err = parseHistoricalEventHfsFormedReputationRelationship(d, start) + case "HistFigureDied": + obj.Details, err = parseHistoricalEventHistFigureDied(d, start) + case "HistFigureNewPet": + obj.Details, err = parseHistoricalEventHistFigureNewPet(d, start) + case "HistFigureWounded": + obj.Details, err = parseHistoricalEventHistFigureWounded(d, start) + case "HolyCityDeclaration": + obj.Details, err = parseHistoricalEventHolyCityDeclaration(d, start) + case "ItemStolen": + obj.Details, err = parseHistoricalEventItemStolen(d, start) + case "KnowledgeDiscovered": + obj.Details, err = parseHistoricalEventKnowledgeDiscovered(d, start) + case "ModifiedBuilding": + obj.Details, err = parseHistoricalEventModifiedBuilding(d, start) + case "MusicalFormCreated": + obj.Details, err = parseHistoricalEventMusicalFormCreated(d, start) + case "NewSiteLeader": + obj.Details, err = parseHistoricalEventNewSiteLeader(d, start) + case "PeaceAccepted": + obj.Details, err = parseHistoricalEventPeaceAccepted(d, start) + case "PeaceRejected": + obj.Details, err = parseHistoricalEventPeaceRejected(d, start) + case "Performance": + obj.Details, err = parseHistoricalEventPerformance(d, start) + case "PlunderedSite": + obj.Details, err = parseHistoricalEventPlunderedSite(d, start) + case "PoeticFormCreated": + obj.Details, err = parseHistoricalEventPoeticFormCreated(d, start) + case "Procession": + obj.Details, err = parseHistoricalEventProcession(d, start) + case "RazedStructure": + obj.Details, err = parseHistoricalEventRazedStructure(d, start) + case "ReclaimSite": + obj.Details, err = parseHistoricalEventReclaimSite(d, start) + case "RegionpopIncorporatedIntoEntity": + obj.Details, err = parseHistoricalEventRegionpopIncorporatedIntoEntity(d, start) + case "RemoveHfEntityLink": + obj.Details, err = parseHistoricalEventRemoveHfEntityLink(d, start) + case "RemoveHfHfLink": + obj.Details, err = parseHistoricalEventRemoveHfHfLink(d, start) + case "RemoveHfSiteLink": + obj.Details, err = parseHistoricalEventRemoveHfSiteLink(d, start) + case "ReplacedBuilding": + obj.Details, err = parseHistoricalEventReplacedBuilding(d, start) + case "ReplacedStructure": + obj.Details, err = parseHistoricalEventReplacedStructure(d, start) + case "SiteDispute": + obj.Details, err = parseHistoricalEventSiteDispute(d, start) + case "SiteTakenOver": + obj.Details, err = parseHistoricalEventSiteTakenOver(d, start) + case "Trade": + obj.Details, err = parseHistoricalEventTrade(d, start) + case "WarPeaceAccepted": + obj.Details, err = parseHistoricalEventWarPeaceAccepted(d, start) + case "WarPeaceRejected": + obj.Details, err = parseHistoricalEventWarPeaceRejected(d, start) + case "WrittenContentComposed": + obj.Details, err = parseHistoricalEventWrittenContentComposed(d, start) + default: + d.Skip() + } + if err != nil { + return nil, err + } + return &obj, nil + case "year": + obj.Year = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventAddHfEntityHonor(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAddHfEntityHonor, error) { + var ( + obj = HistoricalEventAddHfEntityHonor{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_id": + data = nil + case "hfid": + data = nil + case "honor_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_id": + obj.EntityId = n(data) + case "hfid": + obj.Hfid = n(data) + case "honor_id": + obj.HonorId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventAddHfEntityLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAddHfEntityLink, error) { + var ( + obj = HistoricalEventAddHfEntityLink{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "appointer_hfid": + data = nil + case "civ": + data = nil + case "civ_id": + data = nil + case "hfid": + data = nil + case "histfig": + data = nil + case "link": + data = nil + case "link_type": + data = nil + case "position": + data = nil + case "position_id": + data = nil + case "promise_to_hfid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "appointer_hfid": + obj.AppointerHfid = n(data) + case "civ": + obj.Civ = n(data) + case "civ_id": + obj.CivId = n(data) + case "hfid": + obj.Hfid = n(data) + case "histfig": + obj.Histfig = n(data) + case "link": + obj.Link = string(data) + case "link_type": + obj.LinkType = string(data) + case "position": + obj.Position = string(data) + case "position_id": + obj.PositionId = n(data) + case "promise_to_hfid": + obj.PromiseToHfid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventAddHfHfLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAddHfHfLink, error) { + var ( + obj = HistoricalEventAddHfHfLink{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "hf": + data = nil + case "hf_target": + data = nil + case "hfid": + data = nil + case "hfid_target": + data = nil + case "link_type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "hf": + obj.Hf = n(data) + case "hf_target": + obj.HfTarget = n(data) + case "hfid": + obj.Hfid = n(data) + case "hfid_target": + obj.HfidTarget = n(data) + case "link_type": + obj.LinkType = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventAddHfSiteLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAddHfSiteLink, error) { + var ( + obj = HistoricalEventAddHfSiteLink{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ": + data = nil + case "histfig": + data = nil + case "link_type": + data = nil + case "site": + data = nil + case "site_id": + data = nil + case "structure": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ": + obj.Civ = n(data) + case "histfig": + obj.Histfig = n(data) + case "link_type": + obj.LinkType = string(data) + case "site": + obj.Site = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure": + obj.Structure = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventAgreementFormed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAgreementFormed, error) { + var ( + obj = HistoricalEventAgreementFormed{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "action": + data = nil + case "agreement_id": + data = nil + case "ally_defense_bonus": + data = nil + case "coconspirator_bonus": + data = nil + case "delegated": + data = nil + case "failed_judgment_test": + data = nil + case "method": + data = nil + case "relevant_entity_id": + data = nil + case "relevant_id_for_method": + data = nil + case "relevant_position_profile_id": + data = nil + case "successful": + data = nil + case "top_facet": + data = nil + case "top_facet_modifier": + data = nil + case "top_facet_rating": + data = nil + case "top_relationship_factor": + data = nil + case "top_relationship_modifier": + data = nil + case "top_relationship_rating": + data = nil + case "top_value": + data = nil + case "top_value_modifier": + data = nil + case "top_value_rating": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "action": + obj.Action = string(data) + case "agreement_id": + obj.AgreementId = n(data) + case "ally_defense_bonus": + obj.AllyDefenseBonus = n(data) + case "coconspirator_bonus": + obj.CoconspiratorBonus = n(data) + case "delegated": + obj.Delegated = string(data) + case "failed_judgment_test": + obj.FailedJudgmentTest = string(data) + case "method": + obj.Method = string(data) + case "relevant_entity_id": + obj.RelevantEntityId = n(data) + case "relevant_id_for_method": + obj.RelevantIdForMethod = n(data) + case "relevant_position_profile_id": + obj.RelevantPositionProfileId = n(data) + case "successful": + obj.Successful = string(data) + case "top_facet": + obj.TopFacet = string(data) + case "top_facet_modifier": + obj.TopFacetModifier = n(data) + case "top_facet_rating": + obj.TopFacetRating = n(data) + case "top_relationship_factor": + obj.TopRelationshipFactor = string(data) + case "top_relationship_modifier": + obj.TopRelationshipModifier = n(data) + case "top_relationship_rating": + obj.TopRelationshipRating = n(data) + case "top_value": + obj.TopValue = string(data) + case "top_value_modifier": + obj.TopValueModifier = n(data) + case "top_value_rating": + obj.TopValueRating = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventArtifactClaimFormed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactClaimFormed, error) { + var ( + obj = HistoricalEventArtifactClaimFormed{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact_id": + data = nil + case "circumstance": + data = nil + case "claim": + data = nil + case "entity_id": + data = nil + case "hist_figure_id": + data = nil + case "position_profile_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact_id": + obj.ArtifactId = n(data) + case "circumstance": + obj.Circumstance = string(data) + case "claim": + obj.Claim = string(data) + case "entity_id": + obj.EntityId = n(data) + case "hist_figure_id": + obj.HistFigureId = n(data) + case "position_profile_id": + obj.PositionProfileId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventArtifactCopied(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactCopied, error) { + var ( + obj = HistoricalEventArtifactCopied{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact_id": + data = nil + case "dest_entity_id": + data = nil + case "dest_site_id": + data = nil + case "dest_structure_id": + data = nil + case "from_original": + data = nil + case "source_entity_id": + data = nil + case "source_site_id": + data = nil + case "source_structure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact_id": + obj.ArtifactId = n(data) + case "dest_entity_id": + obj.DestEntityId = n(data) + case "dest_site_id": + obj.DestSiteId = n(data) + case "dest_structure_id": + obj.DestStructureId = n(data) + case "from_original": + obj.FromOriginal = string(data) + case "source_entity_id": + obj.SourceEntityId = n(data) + case "source_site_id": + obj.SourceSiteId = n(data) + case "source_structure_id": + obj.SourceStructureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventArtifactCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactCreated, error) { + var ( + obj = HistoricalEventArtifactCreated{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact_id": + data = nil + case "circumstance": + v, _ := parseCircumstance(d, &t) + obj.Circumstance = v + case "creator_hfid": + data = nil + case "creator_unit_id": + data = nil + case "hist_figure_id": + data = nil + case "name_only": + data = nil + case "reason": + data = nil + case "sanctify_hf": + data = nil + case "site": + data = nil + case "site_id": + data = nil + case "unit_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact_id": + obj.ArtifactId = n(data) + case "circumstance": + + case "creator_hfid": + obj.CreatorHfid = n(data) + case "creator_unit_id": + obj.CreatorUnitId = n(data) + case "hist_figure_id": + obj.HistFigureId = n(data) + case "name_only": + obj.NameOnly = string(data) + case "reason": + obj.Reason = string(data) + case "sanctify_hf": + obj.SanctifyHf = n(data) + case "site": + obj.Site = n(data) + case "site_id": + obj.SiteId = n(data) + case "unit_id": + obj.UnitId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventArtifactDestroyed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactDestroyed, error) { + var ( + obj = HistoricalEventArtifactDestroyed{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact_id": + data = nil + case "destroyer_enid": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact_id": + obj.ArtifactId = n(data) + case "destroyer_enid": + obj.DestroyerEnid = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventArtifactFound(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactFound, error) { + var ( + obj = HistoricalEventArtifactFound{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact_id": + data = nil + case "hist_figure_id": + data = nil + case "site_id": + data = nil + case "unit_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact_id": + obj.ArtifactId = n(data) + case "hist_figure_id": + obj.HistFigureId = n(data) + case "site_id": + obj.SiteId = n(data) + case "unit_id": + obj.UnitId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventArtifactGiven(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactGiven, error) { + var ( + obj = HistoricalEventArtifactGiven{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact_id": + data = nil + case "giver_entity_id": + data = nil + case "giver_hist_figure_id": + data = nil + case "receiver_entity_id": + data = nil + case "receiver_hist_figure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact_id": + obj.ArtifactId = n(data) + case "giver_entity_id": + obj.GiverEntityId = n(data) + case "giver_hist_figure_id": + obj.GiverHistFigureId = n(data) + case "receiver_entity_id": + obj.ReceiverEntityId = n(data) + case "receiver_hist_figure_id": + obj.ReceiverHistFigureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventArtifactLost(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactLost, error) { + var ( + obj = HistoricalEventArtifactLost{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact_id": + data = nil + case "site_id": + data = nil + case "site_property_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact_id": + obj.ArtifactId = n(data) + case "site_id": + obj.SiteId = n(data) + case "site_property_id": + obj.SitePropertyId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventArtifactPossessed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactPossessed, error) { + var ( + obj = HistoricalEventArtifactPossessed{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact_id": + data = nil + case "circumstance": + data = nil + case "circumstance_id": + data = nil + case "feature_layer_id": + data = nil + case "hist_figure_id": + data = nil + case "reason": + data = nil + case "reason_id": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + case "unit_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact_id": + obj.ArtifactId = n(data) + case "circumstance": + obj.Circumstance = string(data) + case "circumstance_id": + obj.CircumstanceId = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "hist_figure_id": + obj.HistFigureId = n(data) + case "reason": + obj.Reason = string(data) + case "reason_id": + obj.ReasonId = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "unit_id": + obj.UnitId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventArtifactRecovered(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactRecovered, error) { + var ( + obj = HistoricalEventArtifactRecovered{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact_id": + data = nil + case "feature_layer_id": + data = nil + case "hist_figure_id": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + case "subregion_id": + data = nil + case "unit_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact_id": + obj.ArtifactId = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "hist_figure_id": + obj.HistFigureId = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "unit_id": + obj.UnitId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventArtifactStored(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactStored, error) { + var ( + obj = HistoricalEventArtifactStored{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact_id": + data = nil + case "hist_figure_id": + data = nil + case "site_id": + data = nil + case "unit_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact_id": + obj.ArtifactId = n(data) + case "hist_figure_id": + obj.HistFigureId = n(data) + case "site_id": + obj.SiteId = n(data) + case "unit_id": + obj.UnitId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventAssumeIdentity(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAssumeIdentity, error) { + var ( + obj = HistoricalEventAssumeIdentity{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "identity_caste": + data = nil + case "identity_histfig_id": + data = nil + case "identity_id": + data = nil + case "identity_name": + data = nil + case "identity_nemesis_id": + data = nil + case "identity_race": + data = nil + case "target": + data = nil + case "target_enid": + data = nil + case "trickster": + data = nil + case "trickster_hfid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "identity_caste": + obj.IdentityCaste = string(data) + case "identity_histfig_id": + obj.IdentityHistfigId = n(data) + case "identity_id": + obj.IdentityId = n(data) + case "identity_name": + obj.IdentityName = string(data) + case "identity_nemesis_id": + obj.IdentityNemesisId = n(data) + case "identity_race": + obj.IdentityRace = string(data) + case "target": + obj.Target = n(data) + case "target_enid": + obj.TargetEnid = n(data) + case "trickster": + obj.Trickster = n(data) + case "trickster_hfid": + obj.TricksterHfid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventAttackedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAttackedSite, error) { + var ( + obj = HistoricalEventAttackedSite{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "a_support_merc_enid": + data = nil + case "attacker_civ_id": + data = nil + case "attacker_general_hfid": + data = nil + case "attacker_merc_enid": + data = nil + case "d_support_merc_enid": + data = nil + case "defender_civ_id": + data = nil + case "defender_general_hfid": + data = nil + case "defender_merc_enid": + data = nil + case "site_civ_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "a_support_merc_enid": + obj.ASupportMercEnid = n(data) + case "attacker_civ_id": + obj.AttackerCivId = n(data) + case "attacker_general_hfid": + obj.AttackerGeneralHfid = n(data) + case "attacker_merc_enid": + obj.AttackerMercEnid = n(data) + case "d_support_merc_enid": + obj.DSupportMercEnid = n(data) + case "defender_civ_id": + obj.DefenderCivId = n(data) + case "defender_general_hfid": + obj.DefenderGeneralHfid = n(data) + case "defender_merc_enid": + obj.DefenderMercEnid = n(data) + case "site_civ_id": + obj.SiteCivId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventBodyAbused(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventBodyAbused, error) { + var ( + obj = HistoricalEventBodyAbused{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "abuse_type": + data = nil + case "bodies": + data = nil + case "civ": + data = nil + case "coords": + data = nil + case "feature_layer_id": + data = nil + case "histfig": + data = nil + case "interaction": + data = nil + case "item_mat": + data = nil + case "item_subtype": + data = nil + case "item_type": + data = nil + case "pile_type": + data = nil + case "site": + data = nil + case "site_id": + data = nil + case "structure": + data = nil + case "subregion_id": + data = nil + case "tree": + data = nil + case "victim_entity": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "abuse_type": + obj.AbuseType = string(data) + case "bodies": + obj.Bodies = n(data) + case "civ": + obj.Civ = n(data) + case "coords": + obj.Coords = string(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "histfig": + obj.Histfig = n(data) + case "interaction": + obj.Interaction = n(data) + case "item_mat": + obj.ItemMat = string(data) + case "item_subtype": + obj.ItemSubtype = string(data) + case "item_type": + obj.ItemType = string(data) + case "pile_type": + obj.PileType = string(data) + case "site": + obj.Site = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure": + obj.Structure = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "tree": + obj.Tree = n(data) + case "victim_entity": + obj.VictimEntity = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventBuildingProfileAcquired(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventBuildingProfileAcquired, error) { + var ( + obj = HistoricalEventBuildingProfileAcquired{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "acquirer_enid": + data = nil + case "acquirer_hfid": + data = nil + case "building_profile_id": + data = nil + case "inherited": + data = nil + case "last_owner_hfid": + data = nil + case "purchased_unowned": + data = nil + case "rebuilt_ruined": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "acquirer_enid": + obj.AcquirerEnid = n(data) + case "acquirer_hfid": + obj.AcquirerHfid = n(data) + case "building_profile_id": + obj.BuildingProfileId = n(data) + case "inherited": + obj.Inherited = string(data) + case "last_owner_hfid": + obj.LastOwnerHfid = n(data) + case "purchased_unowned": + obj.PurchasedUnowned = string(data) + case "rebuilt_ruined": + obj.RebuiltRuined = string(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCeremony(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCeremony, error) { + var ( + obj = HistoricalEventCeremony{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ_id": + data = nil + case "feature_layer_id": + data = nil + case "occasion_id": + data = nil + case "schedule_id": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ_id": + obj.CivId = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "occasion_id": + obj.OccasionId = n(data) + case "schedule_id": + obj.ScheduleId = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventChangeCreatureType(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangeCreatureType, error) { + var ( + obj = HistoricalEventChangeCreatureType{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "changee": + data = nil + case "changer": + data = nil + case "new_caste": + data = nil + case "new_race": + data = nil + case "old_caste": + data = nil + case "old_race": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "changee": + obj.Changee = n(data) + case "changer": + obj.Changer = n(data) + case "new_caste": + obj.NewCaste = n(data) + case "new_race": + obj.NewRace = string(data) + case "old_caste": + obj.OldCaste = n(data) + case "old_race": + obj.OldRace = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventChangeHfBodyState(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangeHfBodyState, error) { + var ( + obj = HistoricalEventChangeHfBodyState{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "body_state": + data = nil + case "coords": + data = nil + case "feature_layer_id": + data = nil + case "hfid": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "body_state": + obj.BodyState = string(data) + case "coords": + obj.Coords = string(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "hfid": + obj.Hfid = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventChangeHfJob(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangeHfJob, error) { + var ( + obj = HistoricalEventChangeHfJob{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "feature_layer_id": + data = nil + case "hfid": + data = nil + case "new_job": + data = nil + case "old_job": + data = nil + case "site": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "hfid": + obj.Hfid = n(data) + case "new_job": + obj.NewJob = string(data) + case "old_job": + obj.OldJob = string(data) + case "site": + obj.Site = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventChangeHfState(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangeHfState, error) { + var ( + obj = HistoricalEventChangeHfState{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "coords": + data = nil + case "feature_layer_id": + data = nil + case "hfid": + data = nil + case "mood": + data = nil + case "reason": + data = nil + case "site": + data = nil + case "site_id": + data = nil + case "state": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "coords": + obj.Coords = string(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "hfid": + obj.Hfid = n(data) + case "mood": + obj.Mood = string(data) + case "reason": + obj.Reason = string(data) + case "site": + obj.Site = n(data) + case "site_id": + obj.SiteId = n(data) + case "state": + obj.State = string(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventChangedCreatureType(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangedCreatureType, error) { + var ( + obj = HistoricalEventChangedCreatureType{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "changee_hfid": + data = nil + case "changer_hfid": + data = nil + case "new_caste": + data = nil + case "new_race": + data = nil + case "old_caste": + data = nil + case "old_race": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "changee_hfid": + obj.ChangeeHfid = n(data) + case "changer_hfid": + obj.ChangerHfid = n(data) + case "new_caste": + obj.NewCaste = string(data) + case "new_race": + obj.NewRace = string(data) + case "old_caste": + obj.OldCaste = string(data) + case "old_race": + obj.OldRace = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCompetition(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCompetition, error) { + var ( + obj = HistoricalEventCompetition{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ_id": + data = nil + case "competitor_hfid": + data = nil + case "feature_layer_id": + data = nil + case "occasion_id": + data = nil + case "schedule_id": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + case "winner_hfid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ_id": + obj.CivId = n(data) + case "competitor_hfid": + obj.CompetitorHfid = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "occasion_id": + obj.OccasionId = n(data) + case "schedule_id": + obj.ScheduleId = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "winner_hfid": + obj.WinnerHfid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCreateEntityPosition(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreateEntityPosition, error) { + var ( + obj = HistoricalEventCreateEntityPosition{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ": + data = nil + case "histfig": + data = nil + case "position": + data = nil + case "reason": + data = nil + case "site_civ": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ": + obj.Civ = n(data) + case "histfig": + obj.Histfig = n(data) + case "position": + obj.Position = string(data) + case "reason": + obj.Reason = string(data) + case "site_civ": + obj.SiteCiv = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCreatedBuilding(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatedBuilding, error) { + var ( + obj = HistoricalEventCreatedBuilding{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "builder_hf": + data = nil + case "civ": + data = nil + case "rebuild": + data = nil + case "site": + data = nil + case "site_civ": + data = nil + case "structure": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "builder_hf": + obj.BuilderHf = n(data) + case "civ": + obj.Civ = n(data) + case "rebuild": + obj.Rebuild = string(data) + case "site": + obj.Site = n(data) + case "site_civ": + obj.SiteCiv = n(data) + case "structure": + obj.Structure = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCreatedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatedSite, error) { + var ( + obj = HistoricalEventCreatedSite{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "builder_hfid": + data = nil + case "civ_id": + data = nil + case "resident_civ_id": + data = nil + case "site_civ_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "builder_hfid": + obj.BuilderHfid = n(data) + case "civ_id": + obj.CivId = n(data) + case "resident_civ_id": + obj.ResidentCivId = n(data) + case "site_civ_id": + obj.SiteCivId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCreatedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatedStructure, error) { + var ( + obj = HistoricalEventCreatedStructure{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "builder_hfid": + data = nil + case "civ_id": + data = nil + case "rebuilt": + data = nil + case "site_civ_id": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "builder_hfid": + obj.BuilderHfid = n(data) + case "civ_id": + obj.CivId = n(data) + case "rebuilt": + obj.Rebuilt = string(data) + case "site_civ_id": + obj.SiteCivId = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCreatedWorldConstruction(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatedWorldConstruction, error) { + var ( + obj = HistoricalEventCreatedWorldConstruction{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ_id": + data = nil + case "master_wcid": + data = nil + case "site_civ_id": + data = nil + case "site_id1": + data = nil + case "site_id2": + data = nil + case "wcid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ_id": + obj.CivId = n(data) + case "master_wcid": + obj.MasterWcid = n(data) + case "site_civ_id": + obj.SiteCivId = n(data) + case "site_id1": + obj.SiteId1 = n(data) + case "site_id2": + obj.SiteId2 = n(data) + case "wcid": + obj.Wcid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCreatureDevoured(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatureDevoured, error) { + var ( + obj = HistoricalEventCreatureDevoured{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "caste": + data = nil + case "eater": + data = nil + case "entity": + data = nil + case "feature_layer_id": + data = nil + case "race": + data = nil + case "site": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + case "victim": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "caste": + obj.Caste = string(data) + case "eater": + obj.Eater = n(data) + case "entity": + obj.Entity = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "race": + obj.Race = string(data) + case "site": + obj.Site = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "victim": + obj.Victim = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventDanceFormCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventDanceFormCreated, error) { + var ( + obj = HistoricalEventDanceFormCreated{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "circumstance": + data = nil + case "circumstance_id": + data = nil + case "form_id": + data = nil + case "hist_figure_id": + data = nil + case "reason": + data = nil + case "reason_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "circumstance": + obj.Circumstance = string(data) + case "circumstance_id": + obj.CircumstanceId = n(data) + case "form_id": + obj.FormId = n(data) + case "hist_figure_id": + obj.HistFigureId = n(data) + case "reason": + obj.Reason = string(data) + case "reason_id": + obj.ReasonId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventDestroyedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventDestroyedSite, error) { + var ( + obj = HistoricalEventDestroyedSite{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "attacker_civ_id": + data = nil + case "defender_civ_id": + data = nil + case "site_civ_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "attacker_civ_id": + obj.AttackerCivId = n(data) + case "defender_civ_id": + obj.DefenderCivId = n(data) + case "site_civ_id": + obj.SiteCivId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventEntityAction(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityAction, error) { + var ( + obj = HistoricalEventEntityAction{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "action": + data = nil + case "entity": + data = nil + case "site": + data = nil + case "structure": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "action": + obj.Action = string(data) + case "entity": + obj.Entity = n(data) + case "site": + obj.Site = n(data) + case "structure": + obj.Structure = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventEntityAllianceFormed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityAllianceFormed, error) { + var ( + obj = HistoricalEventEntityAllianceFormed{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "initiating_enid": + data = nil + case "joining_enid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "initiating_enid": + obj.InitiatingEnid = n(data) + case "joining_enid": + obj.JoiningEnid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventEntityBreachFeatureLayer(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityBreachFeatureLayer, error) { + var ( + obj = HistoricalEventEntityBreachFeatureLayer{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ_entity_id": + data = nil + case "feature_layer_id": + data = nil + case "site_entity_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ_entity_id": + obj.CivEntityId = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "site_entity_id": + obj.SiteEntityId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventEntityCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityCreated, error) { + var ( + obj = HistoricalEventEntityCreated{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "creator_hfid": + data = nil + case "entity_id": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "creator_hfid": + obj.CreatorHfid = n(data) + case "entity_id": + obj.EntityId = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventEntityDissolved(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityDissolved, error) { + var ( + obj = HistoricalEventEntityDissolved{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_id": + data = nil + case "reason": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_id": + obj.EntityId = n(data) + case "reason": + obj.Reason = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventEntityEquipmentPurchase(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityEquipmentPurchase, error) { + var ( + obj = HistoricalEventEntityEquipmentPurchase{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_id": + data = nil + case "hfid": + data = nil + case "new_equipment_level": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_id": + obj.EntityId = n(data) + case "hfid": + obj.Hfid = n(data) + case "new_equipment_level": + obj.NewEquipmentLevel = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventEntityIncorporated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityIncorporated, error) { + var ( + obj = HistoricalEventEntityIncorporated{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "joined_entity_id": + data = nil + case "joiner_entity_id": + data = nil + case "leader_hfid": + data = nil + case "partial_incorporation": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "joined_entity_id": + obj.JoinedEntityId = n(data) + case "joiner_entity_id": + obj.JoinerEntityId = n(data) + case "leader_hfid": + obj.LeaderHfid = n(data) + case "partial_incorporation": + obj.PartialIncorporation = string(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventEntityLaw(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityLaw, error) { + var ( + obj = HistoricalEventEntityLaw{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_id": + data = nil + case "hist_figure_id": + data = nil + case "law_add": + data = nil + case "law_remove": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_id": + obj.EntityId = n(data) + case "hist_figure_id": + obj.HistFigureId = n(data) + case "law_add": + obj.LawAdd = string(data) + case "law_remove": + obj.LawRemove = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventEntityOverthrown(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityOverthrown, error) { + var ( + obj = HistoricalEventEntityOverthrown{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "conspirator_hfid": + data = nil + case "entity_id": + data = nil + case "instigator_hfid": + data = nil + case "overthrown_hfid": + data = nil + case "pos_taker_hfid": + data = nil + case "position_profile_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "conspirator_hfid": + obj.ConspiratorHfid = n(data) + case "entity_id": + obj.EntityId = n(data) + case "instigator_hfid": + obj.InstigatorHfid = n(data) + case "overthrown_hfid": + obj.OverthrownHfid = n(data) + case "pos_taker_hfid": + obj.PosTakerHfid = n(data) + case "position_profile_id": + obj.PositionProfileId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventEntityPersecuted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityPersecuted, error) { + var ( + obj = HistoricalEventEntityPersecuted{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "destroyed_structure_id": + data = nil + case "expelled_creature": + data = nil + case "expelled_hfid": + data = nil + case "expelled_number": + data = nil + case "expelled_pop_id": + data = nil + case "persecutor_enid": + data = nil + case "persecutor_hfid": + data = nil + case "property_confiscated_from_hfid": + data = nil + case "shrine_amount_destroyed": + data = nil + case "site_id": + data = nil + case "target_enid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "destroyed_structure_id": + obj.DestroyedStructureId = n(data) + case "expelled_creature": + obj.ExpelledCreature = n(data) + case "expelled_hfid": + obj.ExpelledHfid = n(data) + case "expelled_number": + obj.ExpelledNumber = n(data) + case "expelled_pop_id": + obj.ExpelledPopId = n(data) + case "persecutor_enid": + obj.PersecutorEnid = n(data) + case "persecutor_hfid": + obj.PersecutorHfid = n(data) + case "property_confiscated_from_hfid": + obj.PropertyConfiscatedFromHfid = n(data) + case "shrine_amount_destroyed": + obj.ShrineAmountDestroyed = n(data) + case "site_id": + obj.SiteId = n(data) + case "target_enid": + obj.TargetEnid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventEntityPrimaryCriminals(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityPrimaryCriminals, error) { + var ( + obj = HistoricalEventEntityPrimaryCriminals{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_id": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_id": + obj.EntityId = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventEntityRelocate(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityRelocate, error) { + var ( + obj = HistoricalEventEntityRelocate{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_id": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_id": + obj.EntityId = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventFailedFrameAttempt(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventFailedFrameAttempt, error) { + var ( + obj = HistoricalEventFailedFrameAttempt{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "convicter_enid": + data = nil + case "crime": + data = nil + case "fooled_hfid": + data = nil + case "framer_hfid": + data = nil + case "plotter_hfid": + data = nil + case "target_hfid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "convicter_enid": + obj.ConvicterEnid = n(data) + case "crime": + obj.Crime = string(data) + case "fooled_hfid": + obj.FooledHfid = n(data) + case "framer_hfid": + obj.FramerHfid = n(data) + case "plotter_hfid": + obj.PlotterHfid = n(data) + case "target_hfid": + obj.TargetHfid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventFailedIntrigueCorruption(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventFailedIntrigueCorruption, error) { + var ( + obj = HistoricalEventFailedIntrigueCorruption{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "action": + data = nil + case "ally_defense_bonus": + data = nil + case "coconspirator_bonus": + data = nil + case "corruptor_hfid": + data = nil + case "corruptor_identity": + data = nil + case "failed_judgment_test": + data = nil + case "feature_layer_id": + data = nil + case "lure_hfid": + data = nil + case "method": + data = nil + case "relevant_entity_id": + data = nil + case "relevant_id_for_method": + data = nil + case "relevant_position_profile_id": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + case "target_hfid": + data = nil + case "target_identity": + data = nil + case "top_facet": + data = nil + case "top_facet_modifier": + data = nil + case "top_facet_rating": + data = nil + case "top_relationship_factor": + data = nil + case "top_relationship_modifier": + data = nil + case "top_relationship_rating": + data = nil + case "top_value": + data = nil + case "top_value_modifier": + data = nil + case "top_value_rating": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "action": + obj.Action = string(data) + case "ally_defense_bonus": + obj.AllyDefenseBonus = n(data) + case "coconspirator_bonus": + obj.CoconspiratorBonus = n(data) + case "corruptor_hfid": + obj.CorruptorHfid = n(data) + case "corruptor_identity": + obj.CorruptorIdentity = n(data) + case "failed_judgment_test": + obj.FailedJudgmentTest = string(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "lure_hfid": + obj.LureHfid = n(data) + case "method": + obj.Method = string(data) + case "relevant_entity_id": + obj.RelevantEntityId = n(data) + case "relevant_id_for_method": + obj.RelevantIdForMethod = n(data) + case "relevant_position_profile_id": + obj.RelevantPositionProfileId = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "target_hfid": + obj.TargetHfid = n(data) + case "target_identity": + obj.TargetIdentity = n(data) + case "top_facet": + obj.TopFacet = string(data) + case "top_facet_modifier": + obj.TopFacetModifier = n(data) + case "top_facet_rating": + obj.TopFacetRating = n(data) + case "top_relationship_factor": + obj.TopRelationshipFactor = string(data) + case "top_relationship_modifier": + obj.TopRelationshipModifier = n(data) + case "top_relationship_rating": + obj.TopRelationshipRating = n(data) + case "top_value": + obj.TopValue = string(data) + case "top_value_modifier": + obj.TopValueModifier = n(data) + case "top_value_rating": + obj.TopValueRating = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventFieldBattle(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventFieldBattle, error) { + var ( + obj = HistoricalEventFieldBattle{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "a_support_merc_enid": + data = nil + case "attacker_civ_id": + data = nil + case "attacker_general_hfid": + data = nil + case "attacker_merc_enid": + data = nil + case "coords": + data = nil + case "d_support_merc_enid": + data = nil + case "defender_civ_id": + data = nil + case "defender_general_hfid": + data = nil + case "defender_merc_enid": + data = nil + case "feature_layer_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "a_support_merc_enid": + obj.ASupportMercEnid = n(data) + case "attacker_civ_id": + obj.AttackerCivId = n(data) + case "attacker_general_hfid": + obj.AttackerGeneralHfid = n(data) + case "attacker_merc_enid": + obj.AttackerMercEnid = n(data) + case "coords": + obj.Coords = string(data) + case "d_support_merc_enid": + obj.DSupportMercEnid = n(data) + case "defender_civ_id": + obj.DefenderCivId = n(data) + case "defender_general_hfid": + obj.DefenderGeneralHfid = n(data) + case "defender_merc_enid": + obj.DefenderMercEnid = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventGamble(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventGamble, error) { + var ( + obj = HistoricalEventGamble{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "gambler_hfid": + data = nil + case "new_account": + data = nil + case "old_account": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "gambler_hfid": + obj.GamblerHfid = n(data) + case "new_account": + obj.NewAccount = n(data) + case "old_account": + obj.OldAccount = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfAbducted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfAbducted, error) { + var ( + obj = HistoricalEventHfAbducted{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "feature_layer_id": + data = nil + case "site_id": + data = nil + case "snatcher_hfid": + data = nil + case "subregion_id": + data = nil + case "target_hfid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "site_id": + obj.SiteId = n(data) + case "snatcher_hfid": + obj.SnatcherHfid = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "target_hfid": + obj.TargetHfid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfActOnBuilding(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfActOnBuilding, error) { + var ( + obj = HistoricalEventHfActOnBuilding{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "action": + data = nil + case "histfig": + data = nil + case "site": + data = nil + case "structure": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "action": + obj.Action = string(data) + case "histfig": + obj.Histfig = n(data) + case "site": + obj.Site = n(data) + case "structure": + obj.Structure = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfAttackedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfAttackedSite, error) { + var ( + obj = HistoricalEventHfAttackedSite{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "attacker_hfid": + data = nil + case "defender_civ_id": + data = nil + case "site_civ_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "attacker_hfid": + obj.AttackerHfid = n(data) + case "defender_civ_id": + obj.DefenderCivId = n(data) + case "site_civ_id": + obj.SiteCivId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfConfronted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfConfronted, error) { + var ( + obj = HistoricalEventHfConfronted{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "coords": + data = nil + case "feature_layer_id": + data = nil + case "hfid": + data = nil + case "reason": + data = nil + case "site_id": + data = nil + case "situation": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "coords": + obj.Coords = string(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "hfid": + obj.Hfid = n(data) + case "reason": + obj.Reason = string(data) + case "site_id": + obj.SiteId = n(data) + case "situation": + obj.Situation = string(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfConvicted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfConvicted, error) { + var ( + obj = HistoricalEventHfConvicted{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "coconspirator_hfid": + data = nil + case "confessed_after_apb_arrest_enid": + data = nil + case "contact_hfid": + data = nil + case "convict_is_contact": + data = nil + case "convicted_hfid": + data = nil + case "convicter_enid": + data = nil + case "corrupt_convicter_hfid": + data = nil + case "crime": + data = nil + case "death_penalty": + data = nil + case "did_not_reveal_all_in_interrogation": + data = nil + case "exiled": + data = nil + case "fooled_hfid": + data = nil + case "framer_hfid": + data = nil + case "held_firm_in_interrogation": + data = nil + case "implicated_hfid": + data = nil + case "interrogator_hfid": + data = nil + case "plotter_hfid": + data = nil + case "prison_months": + data = nil + case "surveiled_coconspirator": + data = nil + case "surveiled_contact": + data = nil + case "surveiled_convicted": + data = nil + case "surveiled_target": + data = nil + case "target_hfid": + data = nil + case "wrongful_conviction": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "coconspirator_hfid": + obj.CoconspiratorHfid = n(data) + case "confessed_after_apb_arrest_enid": + obj.ConfessedAfterApbArrestEnid = n(data) + case "contact_hfid": + obj.ContactHfid = n(data) + case "convict_is_contact": + obj.ConvictIsContact = string(data) + case "convicted_hfid": + obj.ConvictedHfid = n(data) + case "convicter_enid": + obj.ConvicterEnid = n(data) + case "corrupt_convicter_hfid": + obj.CorruptConvicterHfid = n(data) + case "crime": + obj.Crime = string(data) + case "death_penalty": + obj.DeathPenalty = string(data) + case "did_not_reveal_all_in_interrogation": + obj.DidNotRevealAllInInterrogation = string(data) + case "exiled": + obj.Exiled = string(data) + case "fooled_hfid": + obj.FooledHfid = n(data) + case "framer_hfid": + obj.FramerHfid = n(data) + case "held_firm_in_interrogation": + obj.HeldFirmInInterrogation = string(data) + case "implicated_hfid": + obj.ImplicatedHfid = n(data) + case "interrogator_hfid": + obj.InterrogatorHfid = n(data) + case "plotter_hfid": + obj.PlotterHfid = n(data) + case "prison_months": + obj.PrisonMonths = n(data) + case "surveiled_coconspirator": + obj.SurveiledCoconspirator = string(data) + case "surveiled_contact": + obj.SurveiledContact = string(data) + case "surveiled_convicted": + obj.SurveiledConvicted = string(data) + case "surveiled_target": + obj.SurveiledTarget = string(data) + case "target_hfid": + obj.TargetHfid = n(data) + case "wrongful_conviction": + obj.WrongfulConviction = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfDestroyedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfDestroyedSite, error) { + var ( + obj = HistoricalEventHfDestroyedSite{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "attacker_hfid": + data = nil + case "defender_civ_id": + data = nil + case "site_civ_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "attacker_hfid": + obj.AttackerHfid = n(data) + case "defender_civ_id": + obj.DefenderCivId = n(data) + case "site_civ_id": + obj.SiteCivId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfDied(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfDied, error) { + var ( + obj = HistoricalEventHfDied{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "cause": + data = nil + case "feature_layer_id": + data = nil + case "hfid": + data = nil + case "site_id": + data = nil + case "slayer_caste": + data = nil + case "slayer_hfid": + data = nil + case "slayer_item_id": + data = nil + case "slayer_race": + data = nil + case "slayer_shooter_item_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "cause": + obj.Cause = string(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "hfid": + obj.Hfid = n(data) + case "site_id": + obj.SiteId = n(data) + case "slayer_caste": + obj.SlayerCaste = string(data) + case "slayer_hfid": + obj.SlayerHfid = n(data) + case "slayer_item_id": + obj.SlayerItemId = n(data) + case "slayer_race": + obj.SlayerRace = string(data) + case "slayer_shooter_item_id": + obj.SlayerShooterItemId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfDisturbedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfDisturbedStructure, error) { + var ( + obj = HistoricalEventHfDisturbedStructure{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "hist_fig_id": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "hist_fig_id": + obj.HistFigId = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfDoesInteraction(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfDoesInteraction, error) { + var ( + obj = HistoricalEventHfDoesInteraction{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "doer": + data = nil + case "doer_hfid": + data = nil + case "interaction": + data = nil + case "interaction_action": + data = nil + case "region": + data = nil + case "site": + data = nil + case "source": + data = nil + case "target": + data = nil + case "target_hfid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "doer": + obj.Doer = n(data) + case "doer_hfid": + obj.DoerHfid = n(data) + case "interaction": + obj.Interaction = string(data) + case "interaction_action": + obj.InteractionAction = string(data) + case "region": + obj.Region = n(data) + case "site": + obj.Site = n(data) + case "source": + obj.Source = n(data) + case "target": + obj.Target = n(data) + case "target_hfid": + obj.TargetHfid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfEnslaved(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfEnslaved, error) { + var ( + obj = HistoricalEventHfEnslaved{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "enslaved_hfid": + data = nil + case "moved_to_site_id": + data = nil + case "payer_entity_id": + data = nil + case "seller_hfid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "enslaved_hfid": + obj.EnslavedHfid = n(data) + case "moved_to_site_id": + obj.MovedToSiteId = n(data) + case "payer_entity_id": + obj.PayerEntityId = n(data) + case "seller_hfid": + obj.SellerHfid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfEquipmentPurchase(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfEquipmentPurchase, error) { + var ( + obj = HistoricalEventHfEquipmentPurchase{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "feature_layer_id": + data = nil + case "group_hfid": + data = nil + case "quality": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "group_hfid": + obj.GroupHfid = n(data) + case "quality": + obj.Quality = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfGainsSecretGoal(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfGainsSecretGoal, error) { + var ( + obj = HistoricalEventHfGainsSecretGoal{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "hfid": + data = nil + case "secret_goal": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "hfid": + obj.Hfid = n(data) + case "secret_goal": + obj.SecretGoal = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfInterrogated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfInterrogated, error) { + var ( + obj = HistoricalEventHfInterrogated{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "arresting_enid": + data = nil + case "held_firm_in_interrogation": + data = nil + case "interrogator_hfid": + data = nil + case "target_hfid": + data = nil + case "wanted_and_recognized": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "arresting_enid": + obj.ArrestingEnid = n(data) + case "held_firm_in_interrogation": + obj.HeldFirmInInterrogation = string(data) + case "interrogator_hfid": + obj.InterrogatorHfid = n(data) + case "target_hfid": + obj.TargetHfid = n(data) + case "wanted_and_recognized": + obj.WantedAndRecognized = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfLearnsSecret(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfLearnsSecret, error) { + var ( + obj = HistoricalEventHfLearnsSecret{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact": + data = nil + case "artifact_id": + data = nil + case "interaction": + data = nil + case "secret_text": + data = nil + case "student": + data = nil + case "student_hfid": + data = nil + case "teacher": + data = nil + case "teacher_hfid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact": + obj.Artifact = n(data) + case "artifact_id": + obj.ArtifactId = n(data) + case "interaction": + obj.Interaction = string(data) + case "secret_text": + obj.SecretText = string(data) + case "student": + obj.Student = n(data) + case "student_hfid": + obj.StudentHfid = n(data) + case "teacher": + obj.Teacher = n(data) + case "teacher_hfid": + obj.TeacherHfid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfNewPet(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfNewPet, error) { + var ( + obj = HistoricalEventHfNewPet{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "coords": + data = nil + case "feature_layer_id": + data = nil + case "group_hfid": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "coords": + obj.Coords = string(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "group_hfid": + obj.GroupHfid = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfPerformedHorribleExperiments(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfPerformedHorribleExperiments, error) { + var ( + obj = HistoricalEventHfPerformedHorribleExperiments{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "feature_layer_id": + data = nil + case "group_hfid": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "group_hfid": + obj.GroupHfid = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfPrayedInsideStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfPrayedInsideStructure, error) { + var ( + obj = HistoricalEventHfPrayedInsideStructure{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "hist_fig_id": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "hist_fig_id": + obj.HistFigId = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfPreach(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfPreach, error) { + var ( + obj = HistoricalEventHfPreach{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_1": + data = nil + case "entity_2": + data = nil + case "site_hfid": + data = nil + case "speaker_hfid": + data = nil + case "topic": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_1": + obj.Entity1 = n(data) + case "entity_2": + obj.Entity2 = n(data) + case "site_hfid": + obj.SiteHfid = n(data) + case "speaker_hfid": + obj.SpeakerHfid = n(data) + case "topic": + obj.Topic = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfProfanedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfProfanedStructure, error) { + var ( + obj = HistoricalEventHfProfanedStructure{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "hist_fig_id": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "hist_fig_id": + obj.HistFigId = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfRecruitedUnitTypeForEntity(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfRecruitedUnitTypeForEntity, error) { + var ( + obj = HistoricalEventHfRecruitedUnitTypeForEntity{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_id": + data = nil + case "feature_layer_id": + data = nil + case "hfid": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + case "unit_type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_id": + obj.EntityId = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "hfid": + obj.Hfid = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "unit_type": + obj.UnitType = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfRelationshipDenied(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfRelationshipDenied, error) { + var ( + obj = HistoricalEventHfRelationshipDenied{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "feature_layer_id": + data = nil + case "reason": + data = nil + case "reason_id": + data = nil + case "relationship": + data = nil + case "seeker_hfid": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + case "target_hfid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "reason": + obj.Reason = string(data) + case "reason_id": + obj.ReasonId = n(data) + case "relationship": + obj.Relationship = string(data) + case "seeker_hfid": + obj.SeekerHfid = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "target_hfid": + obj.TargetHfid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfReunion(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfReunion, error) { + var ( + obj = HistoricalEventHfReunion{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "feature_layer_id": + data = nil + case "group_1_hfid": + data = nil + case "group_2_hfid": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "group_1_hfid": + obj.Group1Hfid = n(data) + case "group_2_hfid": + obj.Group2Hfid = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfRevived(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfRevived, error) { + var ( + obj = HistoricalEventHfRevived{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "actor_hfid": + data = nil + case "disturbance": + data = nil + case "feature_layer_id": + data = nil + case "hfid": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "actor_hfid": + obj.ActorHfid = n(data) + case "disturbance": + obj.Disturbance = string(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "hfid": + obj.Hfid = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfSimpleBattleEvent(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfSimpleBattleEvent, error) { + var ( + obj = HistoricalEventHfSimpleBattleEvent{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "feature_layer_id": + data = nil + case "group_1_hfid": + data = nil + case "group_2_hfid": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + case "subtype": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "group_1_hfid": + obj.Group1Hfid = n(data) + case "group_2_hfid": + obj.Group2Hfid = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "subtype": + obj.Subtype = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfTravel(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfTravel, error) { + var ( + obj = HistoricalEventHfTravel{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "coords": + data = nil + case "feature_layer_id": + data = nil + case "group_hfid": + data = nil + case "return": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "coords": + obj.Coords = string(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "group_hfid": + obj.GroupHfid = n(data) + case "return": + obj.Return = string(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfViewedArtifact(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfViewedArtifact, error) { + var ( + obj = HistoricalEventHfViewedArtifact{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact_id": + data = nil + case "hist_fig_id": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact_id": + obj.ArtifactId = n(data) + case "hist_fig_id": + obj.HistFigId = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfWounded(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfWounded, error) { + var ( + obj = HistoricalEventHfWounded{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "feature_layer_id": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + case "woundee_hfid": + data = nil + case "wounder_hfid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "woundee_hfid": + obj.WoundeeHfid = n(data) + case "wounder_hfid": + obj.WounderHfid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfsFormedIntrigueRelationship(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfsFormedIntrigueRelationship, error) { + var ( + obj = HistoricalEventHfsFormedIntrigueRelationship{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "action": + data = nil + case "ally_defense_bonus": + data = nil + case "circumstance": + data = nil + case "circumstance_id": + data = nil + case "coconspirator_bonus": + data = nil + case "corruptor_hfid": + data = nil + case "corruptor_identity": + data = nil + case "corruptor_seen_as": + data = nil + case "failed_judgment_test": + data = nil + case "feature_layer_id": + data = nil + case "lure_hfid": + data = nil + case "method": + data = nil + case "relevant_entity_id": + data = nil + case "relevant_id_for_method": + data = nil + case "relevant_position_profile_id": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + case "successful": + data = nil + case "target_hfid": + data = nil + case "target_identity": + data = nil + case "target_seen_as": + data = nil + case "top_facet": + data = nil + case "top_facet_modifier": + data = nil + case "top_facet_rating": + data = nil + case "top_relationship_factor": + data = nil + case "top_relationship_modifier": + data = nil + case "top_relationship_rating": + data = nil + case "top_value": + data = nil + case "top_value_modifier": + data = nil + case "top_value_rating": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "action": + obj.Action = string(data) + case "ally_defense_bonus": + obj.AllyDefenseBonus = n(data) + case "circumstance": + obj.Circumstance = string(data) + case "circumstance_id": + obj.CircumstanceId = n(data) + case "coconspirator_bonus": + obj.CoconspiratorBonus = n(data) + case "corruptor_hfid": + obj.CorruptorHfid = n(data) + case "corruptor_identity": + obj.CorruptorIdentity = n(data) + case "corruptor_seen_as": + obj.CorruptorSeenAs = string(data) + case "failed_judgment_test": + obj.FailedJudgmentTest = string(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "lure_hfid": + obj.LureHfid = n(data) + case "method": + obj.Method = string(data) + case "relevant_entity_id": + obj.RelevantEntityId = n(data) + case "relevant_id_for_method": + obj.RelevantIdForMethod = n(data) + case "relevant_position_profile_id": + obj.RelevantPositionProfileId = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "successful": + obj.Successful = string(data) + case "target_hfid": + obj.TargetHfid = n(data) + case "target_identity": + obj.TargetIdentity = n(data) + case "target_seen_as": + obj.TargetSeenAs = string(data) + case "top_facet": + obj.TopFacet = string(data) + case "top_facet_modifier": + obj.TopFacetModifier = n(data) + case "top_facet_rating": + obj.TopFacetRating = n(data) + case "top_relationship_factor": + obj.TopRelationshipFactor = string(data) + case "top_relationship_modifier": + obj.TopRelationshipModifier = n(data) + case "top_relationship_rating": + obj.TopRelationshipRating = n(data) + case "top_value": + obj.TopValue = string(data) + case "top_value_modifier": + obj.TopValueModifier = n(data) + case "top_value_rating": + obj.TopValueRating = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHfsFormedReputationRelationship(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfsFormedReputationRelationship, error) { + var ( + obj = HistoricalEventHfsFormedReputationRelationship{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "feature_layer_id": + data = nil + case "hf_rep_1_of_2": + data = nil + case "hf_rep_2_of_1": + data = nil + case "hfid1": + data = nil + case "hfid2": + data = nil + case "identity_id1": + data = nil + case "identity_id2": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "hf_rep_1_of_2": + obj.HfRep1Of2 = string(data) + case "hf_rep_2_of_1": + obj.HfRep2Of1 = string(data) + case "hfid1": + obj.Hfid1 = n(data) + case "hfid2": + obj.Hfid2 = n(data) + case "identity_id1": + obj.IdentityId1 = n(data) + case "identity_id2": + obj.IdentityId2 = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHistFigureDied(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHistFigureDied, error) { + var ( + obj = HistoricalEventHistFigureDied{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artifact_id": + data = nil + case "death_cause": + data = nil + case "item": + data = nil + case "item_type": + data = nil + case "site": + data = nil + case "slayer_caste": + data = nil + case "slayer_hf": + data = nil + case "slayer_race": + data = nil + case "victim_hf": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artifact_id": + obj.ArtifactId = n(data) + case "death_cause": + obj.DeathCause = string(data) + case "item": + obj.Item = n(data) + case "item_type": + obj.ItemType = string(data) + case "site": + obj.Site = n(data) + case "slayer_caste": + obj.SlayerCaste = n(data) + case "slayer_hf": + obj.SlayerHf = n(data) + case "slayer_race": + obj.SlayerRace = n(data) + case "victim_hf": + obj.VictimHf = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHistFigureNewPet(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHistFigureNewPet, error) { + var ( + obj = HistoricalEventHistFigureNewPet{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "group": + data = nil + case "pets": + data = nil + case "site": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "group": + obj.Group = n(data) + case "pets": + obj.Pets = string(data) + case "site": + obj.Site = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHistFigureWounded(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHistFigureWounded, error) { + var ( + obj = HistoricalEventHistFigureWounded{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "body_part": + data = nil + case "injury_type": + data = nil + case "part_lost": + data = nil + case "site": + data = nil + case "woundee": + data = nil + case "woundee_caste": + data = nil + case "woundee_race": + data = nil + case "wounder": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "body_part": + obj.BodyPart = n(data) + case "injury_type": + obj.InjuryType = string(data) + case "part_lost": + obj.PartLost = string(data) + case "site": + obj.Site = n(data) + case "woundee": + obj.Woundee = n(data) + case "woundee_caste": + obj.WoundeeCaste = n(data) + case "woundee_race": + obj.WoundeeRace = n(data) + case "wounder": + obj.Wounder = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventHolyCityDeclaration(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHolyCityDeclaration, error) { + var ( + obj = HistoricalEventHolyCityDeclaration{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "religion_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "religion_id": + obj.ReligionId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventItemStolen(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventItemStolen, error) { + var ( + obj = HistoricalEventItemStolen{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "circumstance": + v, _ := parseCircumstance(d, &t) + obj.Circumstance = v + case "circumstance_id": + data = nil + case "entity": + data = nil + case "histfig": + data = nil + case "item": + data = nil + case "item_subtype": + data = nil + case "item_type": + data = nil + case "mat": + data = nil + case "matindex": + data = nil + case "mattype": + data = nil + case "site": + data = nil + case "stash_site": + data = nil + case "structure": + data = nil + case "theft_method": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "circumstance": + + case "circumstance_id": + obj.CircumstanceId = n(data) + case "entity": + obj.Entity = n(data) + case "histfig": + obj.Histfig = n(data) + case "item": + obj.Item = n(data) + case "item_subtype": + obj.ItemSubtype = string(data) + case "item_type": + obj.ItemType = string(data) + case "mat": + obj.Mat = string(data) + case "matindex": + obj.Matindex = n(data) + case "mattype": + obj.Mattype = n(data) + case "site": + obj.Site = n(data) + case "stash_site": + obj.StashSite = n(data) + case "structure": + obj.Structure = n(data) + case "theft_method": + obj.TheftMethod = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventKnowledgeDiscovered(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventKnowledgeDiscovered, error) { + var ( + obj = HistoricalEventKnowledgeDiscovered{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "first": + data = nil + case "hfid": + data = nil + case "knowledge": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "first": + obj.First = string(data) + case "hfid": + obj.Hfid = n(data) + case "knowledge": + obj.Knowledge = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventModifiedBuilding(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventModifiedBuilding, error) { + var ( + obj = HistoricalEventModifiedBuilding{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "modification": + data = nil + case "modifier_hfid": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "modification": + obj.Modification = string(data) + case "modifier_hfid": + obj.ModifierHfid = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventMusicalFormCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventMusicalFormCreated, error) { + var ( + obj = HistoricalEventMusicalFormCreated{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "circumstance": + data = nil + case "circumstance_id": + data = nil + case "form_id": + data = nil + case "hist_figure_id": + data = nil + case "reason": + data = nil + case "reason_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "circumstance": + obj.Circumstance = string(data) + case "circumstance_id": + obj.CircumstanceId = n(data) + case "form_id": + obj.FormId = n(data) + case "hist_figure_id": + obj.HistFigureId = n(data) + case "reason": + obj.Reason = string(data) + case "reason_id": + obj.ReasonId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventNewSiteLeader(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventNewSiteLeader, error) { + var ( + obj = HistoricalEventNewSiteLeader{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "attacker_civ_id": + data = nil + case "defender_civ_id": + data = nil + case "new_leader_hfid": + data = nil + case "new_site_civ_id": + data = nil + case "site_civ_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "attacker_civ_id": + obj.AttackerCivId = n(data) + case "defender_civ_id": + obj.DefenderCivId = n(data) + case "new_leader_hfid": + obj.NewLeaderHfid = n(data) + case "new_site_civ_id": + obj.NewSiteCivId = n(data) + case "site_civ_id": + obj.SiteCivId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventPeaceAccepted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPeaceAccepted, error) { + var ( + obj = HistoricalEventPeaceAccepted{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventPeaceRejected(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPeaceRejected, error) { + var ( + obj = HistoricalEventPeaceRejected{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventPerformance(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPerformance, error) { + var ( + obj = HistoricalEventPerformance{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ_id": + data = nil + case "feature_layer_id": + data = nil + case "occasion_id": + data = nil + case "schedule_id": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ_id": + obj.CivId = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "occasion_id": + obj.OccasionId = n(data) + case "schedule_id": + obj.ScheduleId = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventPlunderedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPlunderedSite, error) { + var ( + obj = HistoricalEventPlunderedSite{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "attacker_civ_id": + data = nil + case "defender_civ_id": + data = nil + case "detected": + data = nil + case "site_civ_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "attacker_civ_id": + obj.AttackerCivId = n(data) + case "defender_civ_id": + obj.DefenderCivId = n(data) + case "detected": + obj.Detected = string(data) + case "site_civ_id": + obj.SiteCivId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventPoeticFormCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPoeticFormCreated, error) { + var ( + obj = HistoricalEventPoeticFormCreated{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "circumstance": + data = nil + case "form_id": + data = nil + case "hist_figure_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "circumstance": + obj.Circumstance = string(data) + case "form_id": + obj.FormId = n(data) + case "hist_figure_id": + obj.HistFigureId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventProcession(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventProcession, error) { + var ( + obj = HistoricalEventProcession{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ_id": + data = nil + case "feature_layer_id": + data = nil + case "occasion_id": + data = nil + case "schedule_id": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ_id": + obj.CivId = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "occasion_id": + obj.OccasionId = n(data) + case "schedule_id": + obj.ScheduleId = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventRazedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRazedStructure, error) { + var ( + obj = HistoricalEventRazedStructure{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ_id": + data = nil + case "site_id": + data = nil + case "structure_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ_id": + obj.CivId = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure_id": + obj.StructureId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventReclaimSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventReclaimSite, error) { + var ( + obj = HistoricalEventReclaimSite{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ_id": + data = nil + case "site_civ_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ_id": + obj.CivId = n(data) + case "site_civ_id": + obj.SiteCivId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventRegionpopIncorporatedIntoEntity(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRegionpopIncorporatedIntoEntity, error) { + var ( + obj = HistoricalEventRegionpopIncorporatedIntoEntity{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "join_entity_id": + data = nil + case "pop_flid": + data = nil + case "pop_number_moved": + data = nil + case "pop_race": + data = nil + case "pop_srid": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "join_entity_id": + obj.JoinEntityId = n(data) + case "pop_flid": + obj.PopFlid = n(data) + case "pop_number_moved": + obj.PopNumberMoved = n(data) + case "pop_race": + obj.PopRace = n(data) + case "pop_srid": + obj.PopSrid = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventRemoveHfEntityLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRemoveHfEntityLink, error) { + var ( + obj = HistoricalEventRemoveHfEntityLink{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ": + data = nil + case "civ_id": + data = nil + case "hfid": + data = nil + case "histfig": + data = nil + case "link": + data = nil + case "link_type": + data = nil + case "position": + data = nil + case "position_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ": + obj.Civ = n(data) + case "civ_id": + obj.CivId = n(data) + case "hfid": + obj.Hfid = n(data) + case "histfig": + obj.Histfig = n(data) + case "link": + obj.Link = string(data) + case "link_type": + obj.LinkType = string(data) + case "position": + obj.Position = n(data) + case "position_id": + obj.PositionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventRemoveHfHfLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRemoveHfHfLink, error) { + var ( + obj = HistoricalEventRemoveHfHfLink{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "hfid": + data = nil + case "hfid_target": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "hfid": + obj.Hfid = n(data) + case "hfid_target": + obj.HfidTarget = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventRemoveHfSiteLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRemoveHfSiteLink, error) { + var ( + obj = HistoricalEventRemoveHfSiteLink{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ": + data = nil + case "histfig": + data = nil + case "link_type": + data = nil + case "site": + data = nil + case "site_id": + data = nil + case "structure": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ": + obj.Civ = n(data) + case "histfig": + obj.Histfig = n(data) + case "link_type": + obj.LinkType = string(data) + case "site": + obj.Site = n(data) + case "site_id": + obj.SiteId = n(data) + case "structure": + obj.Structure = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventReplacedBuilding(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventReplacedBuilding, error) { + var ( + obj = HistoricalEventReplacedBuilding{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ": + data = nil + case "new_structure": + data = nil + case "old_structure": + data = nil + case "site": + data = nil + case "site_civ": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ": + obj.Civ = n(data) + case "new_structure": + obj.NewStructure = n(data) + case "old_structure": + obj.OldStructure = n(data) + case "site": + obj.Site = n(data) + case "site_civ": + obj.SiteCiv = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventReplacedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventReplacedStructure, error) { + var ( + obj = HistoricalEventReplacedStructure{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ_id": + data = nil + case "new_ab_id": + data = nil + case "old_ab_id": + data = nil + case "site_civ_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ_id": + obj.CivId = n(data) + case "new_ab_id": + obj.NewAbId = n(data) + case "old_ab_id": + obj.OldAbId = n(data) + case "site_civ_id": + obj.SiteCivId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventSiteDispute(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSiteDispute, error) { + var ( + obj = HistoricalEventSiteDispute{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "dispute": + data = nil + case "entity_id_1": + data = nil + case "entity_id_2": + data = nil + case "site_id_1": + data = nil + case "site_id_2": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "dispute": + obj.Dispute = string(data) + case "entity_id_1": + obj.EntityId1 = n(data) + case "entity_id_2": + obj.EntityId2 = n(data) + case "site_id_1": + obj.SiteId1 = n(data) + case "site_id_2": + obj.SiteId2 = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventSiteTakenOver(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSiteTakenOver, error) { + var ( + obj = HistoricalEventSiteTakenOver{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "attacker_civ_id": + data = nil + case "defender_civ_id": + data = nil + case "new_site_civ_id": + data = nil + case "site_civ_id": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "attacker_civ_id": + obj.AttackerCivId = n(data) + case "defender_civ_id": + obj.DefenderCivId = n(data) + case "new_site_civ_id": + obj.NewSiteCivId = n(data) + case "site_civ_id": + obj.SiteCivId = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventTrade(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventTrade, error) { + var ( + obj = HistoricalEventTrade{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "account_shift": + data = nil + case "allotment": + data = nil + case "allotment_index": + data = nil + case "dest_site_id": + data = nil + case "production_zone_id": + data = nil + case "source_site_id": + data = nil + case "trader_entity_id": + data = nil + case "trader_hfid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "account_shift": + obj.AccountShift = n(data) + case "allotment": + obj.Allotment = n(data) + case "allotment_index": + obj.AllotmentIndex = n(data) + case "dest_site_id": + obj.DestSiteId = n(data) + case "production_zone_id": + obj.ProductionZoneId = n(data) + case "source_site_id": + obj.SourceSiteId = n(data) + case "trader_entity_id": + obj.TraderEntityId = n(data) + case "trader_hfid": + obj.TraderHfid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventWarPeaceAccepted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventWarPeaceAccepted, error) { + var ( + obj = HistoricalEventWarPeaceAccepted{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "destination": + data = nil + case "site": + data = nil + case "source": + data = nil + case "topic": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "destination": + obj.Destination = n(data) + case "site": + obj.Site = n(data) + case "source": + obj.Source = n(data) + case "topic": + obj.Topic = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventWarPeaceRejected(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventWarPeaceRejected, error) { + var ( + obj = HistoricalEventWarPeaceRejected{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "destination": + data = nil + case "site": + data = nil + case "source": + data = nil + case "topic": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "destination": + obj.Destination = n(data) + case "site": + obj.Site = n(data) + case "source": + obj.Source = n(data) + case "topic": + obj.Topic = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventWrittenContentComposed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventWrittenContentComposed, error) { + var ( + obj = HistoricalEventWrittenContentComposed{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "circumstance": + data = nil + case "circumstance_id": + data = nil + case "hist_figure_id": + data = nil + case "reason": + data = nil + case "reason_id": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + case "wc_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "circumstance": + obj.Circumstance = string(data) + case "circumstance_id": + obj.CircumstanceId = n(data) + case "hist_figure_id": + obj.HistFigureId = n(data) + case "reason": + obj.Reason = string(data) + case "reason_id": + obj.ReasonId = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "wc_id": + obj.WcId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollection(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollection, error) { + var ( + obj = HistoricalEventCollection{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "end_seconds72": + data = nil + case "end_year": + data = nil + case "event": + data = nil + case "eventcol": + data = nil + case "id": + data = nil + case "start_seconds72": + data = nil + case "start_year": + data = nil + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "end_seconds72": + obj.EndSeconds72 = n(data) + case "end_year": + obj.EndYear = n(data) + case "event": + obj.Event = n(data) + case "eventcol": + obj.Eventcol = n(data) + case "id": + obj.Id_ = n(data) + case "start_seconds72": + obj.StartSeconds72 = n(data) + case "start_year": + obj.StartYear = n(data) + case "type": + var err error + switch strcase.ToCamel(string(data)) { + case "Abduction": + obj.Details, err = parseHistoricalEventCollectionAbduction(d, start) + case "Battle": + obj.Details, err = parseHistoricalEventCollectionBattle(d, start) + case "BeastAttack": + obj.Details, err = parseHistoricalEventCollectionBeastAttack(d, start) + case "Ceremony": + obj.Details, err = parseHistoricalEventCollectionCeremony(d, start) + case "Competition": + obj.Details, err = parseHistoricalEventCollectionCompetition(d, start) + case "Duel": + obj.Details, err = parseHistoricalEventCollectionDuel(d, start) + case "EntityOverthrown": + obj.Details, err = parseHistoricalEventCollectionEntityOverthrown(d, start) + case "Journey": + obj.Details, err = parseHistoricalEventCollectionJourney(d, start) + case "Occasion": + obj.Details, err = parseHistoricalEventCollectionOccasion(d, start) + case "Performance": + obj.Details, err = parseHistoricalEventCollectionPerformance(d, start) + case "Persecution": + obj.Details, err = parseHistoricalEventCollectionPersecution(d, start) + case "Procession": + obj.Details, err = parseHistoricalEventCollectionProcession(d, start) + case "Purge": + obj.Details, err = parseHistoricalEventCollectionPurge(d, start) + case "SiteConquered": + obj.Details, err = parseHistoricalEventCollectionSiteConquered(d, start) + case "Theft": + obj.Details, err = parseHistoricalEventCollectionTheft(d, start) + case "War": + obj.Details, err = parseHistoricalEventCollectionWar(d, start) + default: + d.Skip() + } + if err != nil { + return nil, err + } + return &obj, nil + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionAbduction(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionAbduction, error) { + var ( + obj = HistoricalEventCollectionAbduction{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "attacking_enid": + data = nil + case "coords": + data = nil + case "defending_enid": + data = nil + case "feature_layer_id": + data = nil + case "ordinal": + data = nil + case "parent_eventcol": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "attacking_enid": + obj.AttackingEnid = n(data) + case "coords": + obj.Coords = string(data) + case "defending_enid": + obj.DefendingEnid = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "ordinal": + obj.Ordinal = n(data) + case "parent_eventcol": + obj.ParentEventcol = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionBattle(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionBattle, error) { + var ( + obj = HistoricalEventCollectionBattle{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "a_support_merc_enid": + data = nil + case "a_support_merc_hfid": + data = nil + case "attacking_hfid": + data = nil + case "attacking_merc_enid": + data = nil + case "attacking_squad_animated": + data = nil + case "attacking_squad_deaths": + data = nil + case "attacking_squad_entity_pop": + data = nil + case "attacking_squad_number": + data = nil + case "attacking_squad_race": + data = nil + case "attacking_squad_site": + data = nil + case "company_merc": + data = nil + case "coords": + data = nil + case "d_support_merc_enid": + data = nil + case "d_support_merc_hfid": + data = nil + case "defending_hfid": + data = nil + case "defending_merc_enid": + data = nil + case "defending_squad_animated": + data = nil + case "defending_squad_deaths": + data = nil + case "defending_squad_entity_pop": + data = nil + case "defending_squad_number": + data = nil + case "defending_squad_race": + data = nil + case "defending_squad_site": + data = nil + case "feature_layer_id": + data = nil + case "individual_merc": + data = nil + case "name": + data = nil + case "noncom_hfid": + data = nil + case "outcome": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + case "war_eventcol": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "a_support_merc_enid": + obj.ASupportMercEnid = n(data) + case "a_support_merc_hfid": + obj.ASupportMercHfid = n(data) + case "attacking_hfid": + obj.AttackingHfid = n(data) + case "attacking_merc_enid": + obj.AttackingMercEnid = n(data) + case "attacking_squad_animated": + obj.AttackingSquadAnimated = string(data) + case "attacking_squad_deaths": + obj.AttackingSquadDeaths = n(data) + case "attacking_squad_entity_pop": + obj.AttackingSquadEntityPop = n(data) + case "attacking_squad_number": + obj.AttackingSquadNumber = n(data) + case "attacking_squad_race": + obj.AttackingSquadRace = string(data) + case "attacking_squad_site": + obj.AttackingSquadSite = n(data) + case "company_merc": + obj.CompanyMerc = string(data) + case "coords": + obj.Coords = string(data) + case "d_support_merc_enid": + obj.DSupportMercEnid = n(data) + case "d_support_merc_hfid": + obj.DSupportMercHfid = n(data) + case "defending_hfid": + obj.DefendingHfid = n(data) + case "defending_merc_enid": + obj.DefendingMercEnid = n(data) + case "defending_squad_animated": + obj.DefendingSquadAnimated = string(data) + case "defending_squad_deaths": + obj.DefendingSquadDeaths = n(data) + case "defending_squad_entity_pop": + obj.DefendingSquadEntityPop = n(data) + case "defending_squad_number": + obj.DefendingSquadNumber = n(data) + case "defending_squad_race": + obj.DefendingSquadRace = string(data) + case "defending_squad_site": + obj.DefendingSquadSite = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "individual_merc": + obj.IndividualMerc = string(data) + case "name": + obj.Name_ = string(data) + case "noncom_hfid": + obj.NoncomHfid = n(data) + case "outcome": + obj.Outcome = string(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + case "war_eventcol": + obj.WarEventcol = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionBeastAttack(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionBeastAttack, error) { + var ( + obj = HistoricalEventCollectionBeastAttack{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "coords": + data = nil + case "defending_enid": + data = nil + case "feature_layer_id": + data = nil + case "ordinal": + data = nil + case "parent_eventcol": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "coords": + obj.Coords = string(data) + case "defending_enid": + obj.DefendingEnid = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "ordinal": + obj.Ordinal = n(data) + case "parent_eventcol": + obj.ParentEventcol = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionCeremony(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionCeremony, error) { + var ( + obj = HistoricalEventCollectionCeremony{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "ordinal": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "ordinal": + obj.Ordinal = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionCompetition(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionCompetition, error) { + var ( + obj = HistoricalEventCollectionCompetition{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "ordinal": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "ordinal": + obj.Ordinal = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionDuel(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionDuel, error) { + var ( + obj = HistoricalEventCollectionDuel{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "attacking_hfid": + data = nil + case "coords": + data = nil + case "defending_hfid": + data = nil + case "feature_layer_id": + data = nil + case "ordinal": + data = nil + case "parent_eventcol": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "attacking_hfid": + obj.AttackingHfid = n(data) + case "coords": + obj.Coords = string(data) + case "defending_hfid": + obj.DefendingHfid = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "ordinal": + obj.Ordinal = n(data) + case "parent_eventcol": + obj.ParentEventcol = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionEntityOverthrown(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionEntityOverthrown, error) { + var ( + obj = HistoricalEventCollectionEntityOverthrown{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "ordinal": + data = nil + case "site_id": + data = nil + case "target_entity_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "ordinal": + obj.Ordinal = n(data) + case "site_id": + obj.SiteId = n(data) + case "target_entity_id": + obj.TargetEntityId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionJourney(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionJourney, error) { + var ( + obj = HistoricalEventCollectionJourney{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "ordinal": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "ordinal": + obj.Ordinal = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionOccasion(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionOccasion, error) { + var ( + obj = HistoricalEventCollectionOccasion{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ_id": + data = nil + case "occasion_id": + data = nil + case "ordinal": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ_id": + obj.CivId = n(data) + case "occasion_id": + obj.OccasionId = n(data) + case "ordinal": + obj.Ordinal = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionPerformance(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionPerformance, error) { + var ( + obj = HistoricalEventCollectionPerformance{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "ordinal": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "ordinal": + obj.Ordinal = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionPersecution(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionPersecution, error) { + var ( + obj = HistoricalEventCollectionPersecution{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "ordinal": + data = nil + case "site_id": + data = nil + case "target_entity_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "ordinal": + obj.Ordinal = n(data) + case "site_id": + obj.SiteId = n(data) + case "target_entity_id": + obj.TargetEntityId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionProcession(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionProcession, error) { + var ( + obj = HistoricalEventCollectionProcession{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "ordinal": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "ordinal": + obj.Ordinal = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionPurge(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionPurge, error) { + var ( + obj = HistoricalEventCollectionPurge{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "adjective": + data = nil + case "ordinal": + data = nil + case "site_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "adjective": + obj.Adjective = string(data) + case "ordinal": + obj.Ordinal = n(data) + case "site_id": + obj.SiteId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionSiteConquered(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionSiteConquered, error) { + var ( + obj = HistoricalEventCollectionSiteConquered{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "attacking_enid": + data = nil + case "defending_enid": + data = nil + case "ordinal": + data = nil + case "site_id": + data = nil + case "war_eventcol": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "attacking_enid": + obj.AttackingEnid = n(data) + case "defending_enid": + obj.DefendingEnid = n(data) + case "ordinal": + obj.Ordinal = n(data) + case "site_id": + obj.SiteId = n(data) + case "war_eventcol": + obj.WarEventcol = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionTheft(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionTheft, error) { + var ( + obj = HistoricalEventCollectionTheft{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "attacking_enid": + data = nil + case "coords": + data = nil + case "defending_enid": + data = nil + case "feature_layer_id": + data = nil + case "ordinal": + data = nil + case "parent_eventcol": + data = nil + case "site_id": + data = nil + case "subregion_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "attacking_enid": + obj.AttackingEnid = n(data) + case "coords": + obj.Coords = string(data) + case "defending_enid": + obj.DefendingEnid = n(data) + case "feature_layer_id": + obj.FeatureLayerId = n(data) + case "ordinal": + obj.Ordinal = n(data) + case "parent_eventcol": + obj.ParentEventcol = n(data) + case "site_id": + obj.SiteId = n(data) + case "subregion_id": + obj.SubregionId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventCollectionWar(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionWar, error) { + var ( + obj = HistoricalEventCollectionWar{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "aggressor_ent_id": + data = nil + case "defender_ent_id": + data = nil + case "name": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "aggressor_ent_id": + obj.AggressorEntId = n(data) + case "defender_ent_id": + obj.DefenderEntId = n(data) + case "name": + obj.Name_ = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventRelationship(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRelationship, error) { + var ( + obj = HistoricalEventRelationship{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "event": + data = nil + case "relationship": + data = nil + case "source_hf": + data = nil + case "target_hf": + data = nil + case "year": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "event": + obj.Event = n(data) + case "relationship": + obj.Relationship = string(data) + case "source_hf": + obj.SourceHf = n(data) + case "target_hf": + obj.TargetHf = n(data) + case "year": + obj.Year = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalEventRelationshipSupplement(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRelationshipSupplement, error) { + var ( + obj = HistoricalEventRelationshipSupplement{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "event": + data = nil + case "occasion_type": + data = nil + case "site": + data = nil + case "unk_1": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "event": + obj.Event = n(data) + case "occasion_type": + obj.OccasionType = n(data) + case "site": + obj.Site = n(data) + case "unk_1": + obj.Unk1 = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHistoricalFigure(d *xml.Decoder, start *xml.StartElement) (*HistoricalFigure, error) { + var ( + obj = HistoricalFigure{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "active_interaction": + data = nil + case "animated": + data = nil + case "animated_string": + data = nil + case "appeared": + data = nil + case "associated_type": + data = nil + case "birth_seconds72": + data = nil + case "birth_year": + data = nil + case "caste": + data = nil + case "current_identity_id": + data = nil + case "death_seconds72": + data = nil + case "death_year": + data = nil + case "deity": + data = nil + case "ent_pop_id": + data = nil + case "entity_former_position_link": + v, _ := parseEntityFormerPositionLink(d, &t) + obj.EntityFormerPositionLink = v + case "entity_link": + v, _ := parseEntityLink(d, &t) + obj.EntityLink = v + case "entity_position_link": + v, _ := parseEntityPositionLink(d, &t) + obj.EntityPositionLink = v + case "entity_reputation": + v, _ := parseEntityReputation(d, &t) + obj.EntityReputation = v + case "entity_squad_link": + v, _ := parseEntitySquadLink(d, &t) + obj.EntitySquadLink = v + case "force": + data = nil + case "goal": + data = nil + case "hf_link": + v, _ := parseHfLink(d, &t) + obj.HfLink = v + case "hf_skill": + v, _ := parseHfSkill(d, &t) + obj.HfSkill = v + case "holds_artifact": + data = nil + case "honor_entity": + v, _ := parseHonorEntity(d, &t) + obj.HonorEntity = v + case "id": + data = nil + case "interaction_knowledge": + data = nil + case "intrigue_actor": + v, _ := parseIntrigueActor(d, &t) + obj.IntrigueActor = v + case "intrigue_plot": + v, _ := parseIntriguePlot(d, &t) + obj.IntriguePlot = v + case "journey_pet": + data = nil + case "name": + data = nil + case "race": + data = nil + case "relationship_profile_hf_historical": + v, _ := parseRelationshipProfileHfHistorical(d, &t) + obj.RelationshipProfileHfHistorical = v + case "relationship_profile_hf_visual": + v, _ := parseRelationshipProfileHfVisual(d, &t) + obj.RelationshipProfileHfVisual = v + case "sex": + data = nil + case "site_link": + v, _ := parseSiteLink(d, &t) + obj.SiteLink = v + case "site_property": + v, _ := parseSiteProperty(d, &t) + obj.SiteProperty = v + case "sphere": + data = nil + case "used_identity_id": + data = nil + case "vague_relationship": + v, _ := parseVagueRelationship(d, &t) + obj.VagueRelationship = v + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "active_interaction": + obj.ActiveInteraction = string(data) + case "animated": + obj.Animated = string(data) + case "animated_string": + obj.AnimatedString = string(data) + case "appeared": + obj.Appeared = n(data) + case "associated_type": + obj.AssociatedType = string(data) + case "birth_seconds72": + obj.BirthSeconds72 = n(data) + case "birth_year": + obj.BirthYear = n(data) + case "caste": + obj.Caste = string(data) + case "current_identity_id": + obj.CurrentIdentityId = n(data) + case "death_seconds72": + obj.DeathSeconds72 = n(data) + case "death_year": + obj.DeathYear = n(data) + case "deity": + obj.Deity = string(data) + case "ent_pop_id": + obj.EntPopId = n(data) + case "entity_former_position_link": + + case "entity_link": + + case "entity_position_link": + + case "entity_reputation": + + case "entity_squad_link": + + case "force": + obj.Force = string(data) + case "goal": + obj.Goal = string(data) + case "hf_link": + + case "hf_skill": + + case "holds_artifact": + obj.HoldsArtifact = n(data) + case "honor_entity": + + case "id": + obj.Id_ = n(data) + case "interaction_knowledge": + obj.InteractionKnowledge = string(data) + case "intrigue_actor": + + case "intrigue_plot": + + case "journey_pet": + obj.JourneyPet = string(data) + case "name": + obj.Name_ = string(data) + case "race": + obj.Race = string(data) + case "relationship_profile_hf_historical": + + case "relationship_profile_hf_visual": + + case "sex": + obj.Sex = n(data) + case "site_link": + + case "site_property": + + case "sphere": + obj.Sphere = string(data) + case "used_identity_id": + obj.UsedIdentityId = n(data) + case "vague_relationship": + + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHonor(d *xml.Decoder, start *xml.StartElement) (*Honor, error) { + var ( + obj = Honor{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "exempt_epid": + data = nil + case "exempt_former_epid": + data = nil + case "gives_precedence": + data = nil + case "granted_to_everybody": + data = nil + case "id": + data = nil + case "name": + data = nil + case "required_battles": + data = nil + case "required_kills": + data = nil + case "required_skill": + data = nil + case "required_skill_ip_total": + data = nil + case "required_years": + data = nil + case "requires_any_melee_or_ranged_skill": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "exempt_epid": + obj.ExemptEpid = n(data) + case "exempt_former_epid": + obj.ExemptFormerEpid = n(data) + case "gives_precedence": + obj.GivesPrecedence = n(data) + case "granted_to_everybody": + obj.GrantedToEverybody = string(data) + case "id": + obj.Id_ = n(data) + case "name": + obj.Name_ = string(data) + case "required_battles": + obj.RequiredBattles = n(data) + case "required_kills": + obj.RequiredKills = n(data) + case "required_skill": + obj.RequiredSkill = string(data) + case "required_skill_ip_total": + obj.RequiredSkillIpTotal = n(data) + case "required_years": + obj.RequiredYears = n(data) + case "requires_any_melee_or_ranged_skill": + obj.RequiresAnyMeleeOrRangedSkill = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseHonorEntity(d *xml.Decoder, start *xml.StartElement) (*HonorEntity, error) { + var ( + obj = HonorEntity{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "battles": + data = nil + case "entity": + data = nil + case "honor_id": + data = nil + case "kills": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "battles": + obj.Battles = n(data) + case "entity": + obj.Entity = n(data) + case "honor_id": + obj.HonorId = n(data) + case "kills": + obj.Kills = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseIdentity(d *xml.Decoder, start *xml.StartElement) (*Identity, error) { + var ( + obj = Identity{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "birth_second": + data = nil + case "birth_year": + data = nil + case "caste": + data = nil + case "entity_id": + data = nil + case "histfig_id": + data = nil + case "id": + data = nil + case "name": + data = nil + case "nemesis_id": + data = nil + case "profession": + data = nil + case "race": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "birth_second": + obj.BirthSecond = n(data) + case "birth_year": + obj.BirthYear = n(data) + case "caste": + obj.Caste = string(data) + case "entity_id": + obj.EntityId = n(data) + case "histfig_id": + obj.HistfigId = n(data) + case "id": + obj.Id_ = n(data) + case "name": + obj.Name_ = string(data) + case "nemesis_id": + obj.NemesisId = n(data) + case "profession": + obj.Profession = string(data) + case "race": + obj.Race = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseIntrigueActor(d *xml.Decoder, start *xml.StartElement) (*IntrigueActor, error) { + var ( + obj = IntrigueActor{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_id": + data = nil + case "handle_actor_id": + data = nil + case "hfid": + data = nil + case "local_id": + data = nil + case "promised_actor_immortality": + data = nil + case "promised_me_immortality": + data = nil + case "role": + data = nil + case "strategy": + data = nil + case "strategy_enid": + data = nil + case "strategy_eppid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_id": + obj.EntityId = n(data) + case "handle_actor_id": + obj.HandleActorId = n(data) + case "hfid": + obj.Hfid = n(data) + case "local_id": + obj.LocalId = n(data) + case "promised_actor_immortality": + obj.PromisedActorImmortality = string(data) + case "promised_me_immortality": + obj.PromisedMeImmortality = string(data) + case "role": + obj.Role = string(data) + case "strategy": + obj.Strategy = string(data) + case "strategy_enid": + obj.StrategyEnid = n(data) + case "strategy_eppid": + obj.StrategyEppid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseIntriguePlot(d *xml.Decoder, start *xml.StartElement) (*IntriguePlot, error) { + var ( + obj = IntriguePlot{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "actor_id": + data = nil + case "artifact_id": + data = nil + case "delegated_plot_hfid": + data = nil + case "delegated_plot_id": + data = nil + case "entity_id": + data = nil + case "local_id": + data = nil + case "on_hold": + data = nil + case "parent_plot_hfid": + data = nil + case "parent_plot_id": + data = nil + case "plot_actor": + v, _ := parsePlotActor(d, &t) + obj.PlotActor = v + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "actor_id": + obj.ActorId = n(data) + case "artifact_id": + obj.ArtifactId = n(data) + case "delegated_plot_hfid": + obj.DelegatedPlotHfid = n(data) + case "delegated_plot_id": + obj.DelegatedPlotId = n(data) + case "entity_id": + obj.EntityId = n(data) + case "local_id": + obj.LocalId = n(data) + case "on_hold": + obj.OnHold = string(data) + case "parent_plot_hfid": + obj.ParentPlotHfid = n(data) + case "parent_plot_id": + obj.ParentPlotId = n(data) + case "plot_actor": + + case "type": + obj.Type = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseItem(d *xml.Decoder, start *xml.StartElement) (*Item, error) { + var ( + obj = Item{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "name_string": + data = nil + case "page_number": + data = nil + case "page_written_content_id": + data = nil + case "writing_written_content_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "name_string": + obj.NameString = string(data) + case "page_number": + obj.PageNumber = n(data) + case "page_written_content_id": + obj.PageWrittenContentId = n(data) + case "writing_written_content_id": + obj.WritingWrittenContentId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseLandmass(d *xml.Decoder, start *xml.StartElement) (*Landmass, error) { + var ( + obj = Landmass{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "coord_1": + data = nil + case "coord_2": + data = nil + case "id": + data = nil + case "name": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "coord_1": + obj.Coord1 = string(data) + case "coord_2": + obj.Coord2 = string(data) + case "id": + obj.Id_ = n(data) + case "name": + obj.Name_ = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseMountainPeak(d *xml.Decoder, start *xml.StartElement) (*MountainPeak, error) { + var ( + obj = MountainPeak{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "coords": + data = nil + case "height": + data = nil + case "id": + data = nil + case "is_volcano": + data = nil + case "name": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "coords": + obj.Coords = string(data) + case "height": + obj.Height = n(data) + case "id": + obj.Id_ = n(data) + case "is_volcano": + obj.IsVolcano = string(data) + case "name": + obj.Name_ = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseMusicalForm(d *xml.Decoder, start *xml.StartElement) (*MusicalForm, error) { + var ( + obj = MusicalForm{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "description": + data = nil + case "id": + data = nil + case "name": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "description": + obj.Description = string(data) + case "id": + obj.Id_ = n(data) + case "name": + obj.Name_ = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseOccasion(d *xml.Decoder, start *xml.StartElement) (*Occasion, error) { + var ( + obj = Occasion{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "event": + data = nil + case "id": + data = nil + case "name": + data = nil + case "schedule": + v, _ := parseSchedule(d, &t) + obj.Schedule = v + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "event": + obj.Event = n(data) + case "id": + obj.Id_ = n(data) + case "name": + obj.Name_ = string(data) + case "schedule": + + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parsePlotActor(d *xml.Decoder, start *xml.StartElement) (*PlotActor, error) { + var ( + obj = PlotActor{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "actor_id": + data = nil + case "agreement_has_messenger": + data = nil + case "agreement_id": + data = nil + case "plot_role": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "actor_id": + obj.ActorId = n(data) + case "agreement_has_messenger": + obj.AgreementHasMessenger = string(data) + case "agreement_id": + obj.AgreementId = n(data) + case "plot_role": + obj.PlotRole = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parsePoeticForm(d *xml.Decoder, start *xml.StartElement) (*PoeticForm, error) { + var ( + obj = PoeticForm{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "description": + data = nil + case "id": + data = nil + case "name": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "description": + obj.Description = string(data) + case "id": + obj.Id_ = n(data) + case "name": + obj.Name_ = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseReference(d *xml.Decoder, start *xml.StartElement) (*Reference, error) { + var ( + obj = Reference{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "id": + data = nil + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "id": + obj.Id_ = n(data) + case "type": + obj.Type = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseRegion(d *xml.Decoder, start *xml.StartElement) (*Region, error) { + var ( + obj = Region{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "coords": + data = nil + case "evilness": + data = nil + case "force_id": + data = nil + case "id": + data = nil + case "name": + data = nil + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "coords": + obj.Coords = string(data) + case "evilness": + obj.Evilness = string(data) + case "force_id": + obj.ForceId = n(data) + case "id": + obj.Id_ = n(data) + case "name": + obj.Name_ = string(data) + case "type": + obj.Type = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseRelationshipProfileHfHistorical(d *xml.Decoder, start *xml.StartElement) (*RelationshipProfileHfHistorical, error) { + var ( + obj = RelationshipProfileHfHistorical{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "fear": + data = nil + case "hf_id": + data = nil + case "love": + data = nil + case "loyalty": + data = nil + case "respect": + data = nil + case "trust": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "fear": + obj.Fear = n(data) + case "hf_id": + obj.HfId = n(data) + case "love": + obj.Love = n(data) + case "loyalty": + obj.Loyalty = n(data) + case "respect": + obj.Respect = n(data) + case "trust": + obj.Trust = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseRelationshipProfileHfVisual(d *xml.Decoder, start *xml.StartElement) (*RelationshipProfileHfVisual, error) { + var ( + obj = RelationshipProfileHfVisual{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "fear": + data = nil + case "hf_id": + data = nil + case "known_identity_id": + data = nil + case "last_meet_seconds72": + data = nil + case "last_meet_year": + data = nil + case "love": + data = nil + case "loyalty": + data = nil + case "meet_count": + data = nil + case "rep_friendly": + data = nil + case "rep_information_source": + data = nil + case "respect": + data = nil + case "trust": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "fear": + obj.Fear = n(data) + case "hf_id": + obj.HfId = n(data) + case "known_identity_id": + obj.KnownIdentityId = n(data) + case "last_meet_seconds72": + obj.LastMeetSeconds72 = n(data) + case "last_meet_year": + obj.LastMeetYear = n(data) + case "love": + obj.Love = n(data) + case "loyalty": + obj.Loyalty = n(data) + case "meet_count": + obj.MeetCount = n(data) + case "rep_friendly": + obj.RepFriendly = n(data) + case "rep_information_source": + obj.RepInformationSource = n(data) + case "respect": + obj.Respect = n(data) + case "trust": + obj.Trust = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseRiver(d *xml.Decoder, start *xml.StartElement) (*River, error) { + var ( + obj = River{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "end_pos": + data = nil + case "name": + data = nil + case "path": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "end_pos": + obj.EndPos = string(data) + case "name": + obj.Name_ = string(data) + case "path": + obj.Path = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseSchedule(d *xml.Decoder, start *xml.StartElement) (*Schedule, error) { + var ( + obj = Schedule{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "feature": + v, _ := parseFeature(d, &t) + obj.Feature = v + case "id": + data = nil + case "item_subtype": + data = nil + case "item_type": + data = nil + case "reference": + data = nil + case "reference2": + data = nil + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "feature": + + case "id": + obj.Id_ = n(data) + case "item_subtype": + obj.ItemSubtype = string(data) + case "item_type": + obj.ItemType = string(data) + case "reference": + obj.Reference = n(data) + case "reference2": + obj.Reference2 = n(data) + case "type": + obj.Type = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseSite(d *xml.Decoder, start *xml.StartElement) (*Site, error) { + var ( + obj = Site{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "civ_id": + data = nil + case "coords": + data = nil + case "cur_owner_id": + data = nil + case "id": + data = nil + case "name": + data = nil + case "rectangle": + data = nil + case "site_properties": + obj.SiteProperties = make(map[int]*SiteProperty) + parseMap(d, &obj.SiteProperties, parseSiteProperty) + case "structures": + obj.Structures = make(map[int]*Structure) + parseMap(d, &obj.Structures, parseStructure) + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "civ_id": + obj.CivId = n(data) + case "coords": + obj.Coords = string(data) + case "cur_owner_id": + obj.CurOwnerId = n(data) + case "id": + obj.Id_ = n(data) + case "name": + obj.Name_ = string(data) + case "rectangle": + obj.Rectangle = string(data) + case "site_properties": + + case "structures": + + case "type": + obj.Type = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseSiteLink(d *xml.Decoder, start *xml.StartElement) (*SiteLink, error) { + var ( + obj = SiteLink{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "entity_id": + data = nil + case "link_type": + data = nil + case "occupation_id": + data = nil + case "site_id": + data = nil + case "sub_id": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "entity_id": + obj.EntityId = n(data) + case "link_type": + obj.LinkType = string(data) + case "occupation_id": + obj.OccupationId = n(data) + case "site_id": + obj.SiteId = n(data) + case "sub_id": + obj.SubId = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseSiteProperty(d *xml.Decoder, start *xml.StartElement) (*SiteProperty, error) { + var ( + obj = SiteProperty{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "id": + data = nil + case "owner_hfid": + data = nil + case "structure_id": + data = nil + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "id": + obj.Id_ = n(data) + case "owner_hfid": + obj.OwnerHfid = n(data) + case "structure_id": + obj.StructureId = n(data) + case "type": + obj.Type = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseStructure(d *xml.Decoder, start *xml.StartElement) (*Structure, error) { + var ( + obj = Structure{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "copied_artifact_id": + data = nil + case "deity": + data = nil + case "deity_type": + data = nil + case "dungeon_type": + data = nil + case "entity_id": + data = nil + case "id": + data = nil + case "inhabitant": + data = nil + case "local_id": + data = nil + case "name": + data = nil + case "name2": + data = nil + case "religion": + data = nil + case "subtype": + data = nil + case "type": + data = nil + case "worship_hfid": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "copied_artifact_id": + obj.CopiedArtifactId = n(data) + case "deity": + obj.Deity = n(data) + case "deity_type": + obj.DeityType = n(data) + case "dungeon_type": + obj.DungeonType = n(data) + case "entity_id": + obj.EntityId = n(data) + case "id": + obj.Id_ = n(data) + case "inhabitant": + obj.Inhabitant = n(data) + case "local_id": + obj.LocalId = n(data) + case "name": + obj.Name_ = string(data) + case "name2": + obj.Name2 = string(data) + case "religion": + obj.Religion = n(data) + case "subtype": + obj.Subtype = string(data) + case "type": + obj.Type = string(data) + case "worship_hfid": + obj.WorshipHfid = n(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseUndergroundRegion(d *xml.Decoder, start *xml.StartElement) (*UndergroundRegion, error) { + var ( + obj = UndergroundRegion{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "coords": + data = nil + case "depth": + data = nil + case "id": + data = nil + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "coords": + obj.Coords = string(data) + case "depth": + obj.Depth = n(data) + case "id": + obj.Id_ = n(data) + case "type": + obj.Type = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseVagueRelationship(d *xml.Decoder, start *xml.StartElement) (*VagueRelationship, error) { + var ( + obj = VagueRelationship{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "artistic_buddy": + data = nil + case "atheletic_rival": + data = nil + case "athlete_buddy": + data = nil + case "business_rival": + data = nil + case "childhood_friend": + data = nil + case "grudge": + data = nil + case "hfid": + data = nil + case "jealous_obsession": + data = nil + case "jealous_relationship_grudge": + data = nil + case "persecution_grudge": + data = nil + case "religious_persecution_grudge": + data = nil + case "scholar_buddy": + data = nil + case "supernatural_grudge": + data = nil + case "war_buddy": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "artistic_buddy": + obj.ArtisticBuddy = string(data) + case "atheletic_rival": + obj.AtheleticRival = string(data) + case "athlete_buddy": + obj.AthleteBuddy = string(data) + case "business_rival": + obj.BusinessRival = string(data) + case "childhood_friend": + obj.ChildhoodFriend = string(data) + case "grudge": + obj.Grudge = string(data) + case "hfid": + obj.Hfid = n(data) + case "jealous_obsession": + obj.JealousObsession = string(data) + case "jealous_relationship_grudge": + obj.JealousRelationshipGrudge = string(data) + case "persecution_grudge": + obj.PersecutionGrudge = string(data) + case "religious_persecution_grudge": + obj.ReligiousPersecutionGrudge = string(data) + case "scholar_buddy": + obj.ScholarBuddy = string(data) + case "supernatural_grudge": + obj.SupernaturalGrudge = string(data) + case "war_buddy": + obj.WarBuddy = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseWorldConstruction(d *xml.Decoder, start *xml.StartElement) (*WorldConstruction, error) { + var ( + obj = WorldConstruction{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "coords": + data = nil + case "id": + data = nil + case "name": + data = nil + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "coords": + obj.Coords = string(data) + case "id": + obj.Id_ = n(data) + case "name": + obj.Name_ = string(data) + case "type": + obj.Type = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } +} +func parseWrittenContent(d *xml.Decoder, start *xml.StartElement) (*WrittenContent, error) { + var ( + obj = WrittenContent{} + data []byte + ) + for { + tok, err := d.Token() + if err != nil { + return nil, err + } + switch t := tok.(type) { + case xml.StartElement: + switch t.Name.Local { + case "author": + data = nil + case "author_hfid": + data = nil + case "author_roll": + data = nil + case "form": + data = nil + case "form_id": + data = nil + case "id": + data = nil + case "page_end": + data = nil + case "page_start": + data = nil + case "reference": + v, _ := parseReference(d, &t) + obj.Reference = v + case "style": + data = nil + case "title": + data = nil + case "type": + data = nil + default: + // fmt.Println("unknown field", t.Name.Local) + d.Skip() + } + + case xml.CharData: + data = append(data, t...) + + case xml.EndElement: + if t.Name.Local == start.Name.Local { + return &obj, nil + } + + switch t.Name.Local { + case "author": + obj.Author = n(data) + case "author_hfid": + obj.AuthorHfid = n(data) + case "author_roll": + obj.AuthorRoll = n(data) + case "form": + obj.Form = string(data) + case "form_id": + obj.FormId = n(data) + case "id": + obj.Id_ = n(data) + case "page_end": + obj.PageEnd = n(data) + case "page_start": + obj.PageStart = n(data) + case "reference": + + case "style": + obj.Style = string(data) + case "title": + obj.Title = string(data) + case "type": + obj.Type = string(data) + default: + // fmt.Println("unknown field", t.Name.Local) + } + } + } } diff --git a/backend/df/parse.go b/backend/model/parse.go similarity index 77% rename from backend/df/parse.go rename to backend/model/parse.go index 42e14b8..e97f850 100644 --- a/backend/df/parse.go +++ b/backend/model/parse.go @@ -1,16 +1,13 @@ -package df +package model import ( "encoding/xml" "fmt" - "legendsbrowser/util" "os" + + "github.com/robertjanetzko/LegendsBrowser2/backend/util" ) -// type DfWorld struct{} - -// func parseDfWorld(d *xml.Decoder, start *xml.StartElement) (*DfWorld, error) { return nil, nil } - func (e *HistoricalEvent) Name() string { return "" } func (e *HistoricalEventCollection) Name() string { return "" } @@ -38,20 +35,6 @@ func Parse(file string) (*DfWorld, error) { } } } - // return nil, errors.New("Fehler!") -} - -type Identifiable interface { - Id() int -} - -type Parsable interface { - Parse(d *xml.Decoder, start *xml.StartElement) error -} - -type IdentifiableParsable interface { - Identifiable - Parsable } func parseArray[T any](d *xml.Decoder, dest *[]T, creator func(*xml.Decoder, *xml.StartElement) (T, error)) { diff --git a/backend/model/world.go b/backend/model/world.go deleted file mode 100644 index 4958d79..0000000 --- a/backend/model/world.go +++ /dev/null @@ -1,293 +0,0 @@ -package model - -import ( - "encoding/xml" - "errors" - "fmt" - "legendsbrowser/util" - "os" - "reflect" - "strings" -) - -type World struct { - XMLName xml.Name `xml:"df_world"` - Name string `xml:"name"` - AltName string `xml:"altname"` - - OtherElements - - RegionMap map[int]*Region `xml:"regions>region"` - UndergroundRegionMap map[int]*UndergroundRegion `xml:"underground_regions>underground_region"` - LandmassMap map[int]*Landmass `xml:"landmasses>landmass"` - SiteMap map[int]*Site `xml:"sites>site"` - WorldConstructionMap map[int]*WorldConstruction `xml:"world_constructions>world_construction"` - ArtifactMap map[int]*Artifact `xml:"artifacts>artifact"` - HistoricalFigureMap map[int]*HistoricalFigure `xml:"historical_figures>historical_figure"` - HistoricalEventMap map[int]*HistoricalEvent `xml:"historical_events>historical_event"` - HistoricalEventCollectionMap map[int]*HistoricalEventCollection `xml:"historical_event_collections>historical_event_collection"` - HistoricalEraMap map[int]*HistoricalEra `xml:"historical_eras>historical_era"` - EntityMap map[int]*Entity `xml:"entities>entity"` - DanceFormMap map[int]*DanceForm `xml:"dance_forms>dance_form"` - MusicalFormMap map[int]*MusicalForm `xml:"musical_forms>musical_form"` - PoeticFormMap map[int]*PoeticForm `xml:"poetic_forms>poetic_form"` - WrittenContentMap map[int]*WrittenContent `xml:"written_contents>written_content"` -} - -func (w *World) Load(file string) { - xmlFile, err := os.Open(file) - if err != nil { - fmt.Println(err) - } - - fmt.Println("Successfully Opened users.xml") - defer xmlFile.Close() - - converter := util.NewConvertReader(xmlFile) - - // byteValue, _ := io.ReadAll(converter) - // fmt.Println(len(byteValue)) - - fillTypes(reflect.TypeOf(w)) - fmt.Println(types["Region"]) - - d := xml.NewDecoder(converter) - parseObject(d, nil, reflect.ValueOf(w)) - - // err = xml.Unmarshal(byteValue, w) - // if err != nil { - // fmt.Println(err) - // } - fmt.Println("World loaded") -} - -var types = make(map[string]map[string]reflect.StructField) - -func fillTypes(t reflect.Type) { - if t.Kind() == reflect.Pointer { - t = t.Elem() - } - if t.Kind() != reflect.Struct { - return - } - fmt.Println(t.Name()) - - if _, ok := types[t.Name()]; ok { - return - } - - info := make(map[string]reflect.StructField) - DeepFields(t, &info, make([]int, 0)) - - types[t.Name()] = info -} - -func DeepFields(t reflect.Type, info *map[string]reflect.StructField, index []int) { - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - f.Index = append(index, f.Index[0]) - if xml, ok := f.Tag.Lookup("xml"); ok { - if p := strings.Index(xml, ">"); p >= 0 { - (*info)[xml[0:p]] = f - } else { - for _, s := range strings.Split(xml, "|") { - (*info)[s] = f - } - } - if f.Type.Kind() == reflect.Map || f.Type.Kind() == reflect.Slice { - fillTypes(f.Type.Elem()) - } - fmt.Println(i, f) - } - if f.Type.Kind() == reflect.Struct && f.Anonymous { - DeepFields(f.Type, info, f.Index) - } - } -} - -func parseObject(d *xml.Decoder, start *xml.StartElement, val reflect.Value) error { - if start == nil { - for { - tok, err := d.Token() - if err != nil { - return err - } - if t, ok := tok.(xml.StartElement); ok { - start = &t - break - } - } - } - - if val.Kind() == reflect.Pointer { - val = val.Elem() - } - - typ, ok := types[val.Type().Name()] - if !ok { - d.Skip() - return nil - } - -Loop: - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - if ty, ok := typ[t.Name.Local]; ok { - if ty.Type.Kind() == reflect.Map { - fmt.Println(" ", t.Name.Local, val.Type().Name(), ty) - f := val.Field(ty.Index[0]) - if f.IsNil() { - f.Set(reflect.MakeMapWithSize(ty.Type, 0)) - } - parseMap(d, ty, f) - } - } else { - d.Skip() - } - // parseObject(d, &t, val) - case xml.EndElement: - break Loop - } - } - return nil -} - -func parseMap(d *xml.Decoder, field reflect.StructField, dest reflect.Value) error { - x, ok := field.Tag.Lookup("xml") - if !ok { - return errors.New("no xml tag") - } - elementName := strings.Split(x, ">")[1] - - var lastStart *xml.StartElement - var id int - -Loop: - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - if t.Name.Local == elementName { - lastStart = &t - id = -1 - } else if t.Name.Local == "id" { - if id != -1 { - return errors.New("ID at invalid place") - } - d.DecodeElement(&id, &t) - - obj := dest.MapIndex(reflect.ValueOf(id)) - if !obj.IsValid() { - obj = reflect.New(field.Type.Elem().Elem()) - dest.SetMapIndex(reflect.ValueOf(id), obj) - obj.Elem().FieldByIndex(types[obj.Type().Elem().Name()]["id"].Index).SetInt(int64(id)) - } - d.DecodeElement(obj.Interface(), lastStart) - } else { - fmt.Println("SKIP", elementName, t.Name.Local) - d.Skip() - } - case xml.EndElement: - if t.Name.Local != elementName { - break Loop - } - } - } - return nil -} - -func (w *World) Process() { - // w.RegionMap = make(map[int]*Region) - // mapObjects(&w.Regions, &w.RegionMap) - - // w.UndergroundRegionMap = make(map[int]*UndergroundRegion) - // mapObjects(&w.UndergroundRegions, &w.UndergroundRegionMap) - - // w.LandmassMap = make(map[int]*Landmass) - // mapObjects(&w.Landmasses, &w.LandmassMap) - - // w.SiteMap = make(map[int]*Site) - // mapObjects(&w.Sites, &w.SiteMap) - - // w.WorldConstructionMap = make(map[int]*WorldConstruction) - // mapObjects(&w.WorldConstructions, &w.WorldConstructionMap) - - // w.ArtifactMap = make(map[int]*Artifact) - // mapObjects(&w.Artifacts, &w.ArtifactMap) - - // w.HistoricalFigureMap = make(map[int]*HistoricalFigure) - // mapObjects(&w.HistoricalFigures, &w.HistoricalFigureMap) - - // w.HistoricalEventMap = make(map[int]*HistoricalEvent) - // mapObjects(&w.HistoricalEvents, &w.HistoricalEventMap) - - // w.HistoricalEventCollectionMap = make(map[int]*HistoricalEventCollection) - // mapObjects(&w.HistoricalEventCollections, &w.HistoricalEventCollectionMap) - - // w.EntityMap = make(map[int]*Entity) - // mapObjects(&w.Entities, &w.EntityMap) - - w.processEvents() -} - -func (w *World) processEvents() { - legendFields := make(map[string][]int) - - t := reflect.TypeOf(HistoricalEvent{}) - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - l, ok := f.Tag.Lookup("legend") - if ok { - legendFields[l] = append(legendFields[l], i) - } - } - - // for eventIndex := 0; eventIndex < len(w.HistoricalEvents); eventIndex++ { - // e := w.HistoricalEvents[eventIndex] - // v := reflect.ValueOf(*e) - // processEvent(e, &v, legendFields["entity"], &w.EntityMap) - // processEvent(e, &v, legendFields["site"], &w.SiteMap) - // processEvent(e, &v, legendFields["hf"], &w.HistoricalFigureMap) - // processEvent(e, &v, legendFields["artifact"], &w.ArtifactMap) - // // processEvent(e, &v, legendFields["wc"], &w.WorldConstructionMap) - // // processEvent(e, &v, legendFields["structure"], &w.St) - // } -} - -func processEvent[T HasEvents](event *HistoricalEvent, v *reflect.Value, fields []int, objectMap *map[int]T) { - for _, i := range fields { - val := v.Field(i) - if !val.IsZero() { - switch val.Elem().Kind() { - case reflect.Slice: - ids := val.Interface().(*[]int) - for _, id := range *ids { - if x, ok := (*objectMap)[id]; ok { - x.SetEvents(append(x.GetEvents(), event)) - } - } - case reflect.Int: - id := int(val.Elem().Int()) - if x, ok := (*objectMap)[id]; ok { - x.SetEvents(append(x.GetEvents(), event)) - } - default: - fmt.Println("unknown", val.Elem().Kind()) - } - } - } -} - -func mapObjects[T Identifiable](objects *[]T, objectMap *map[int]T) { - for i, obj := range *objects { - (*objectMap)[obj.Id()] = (*objects)[i] - } -} diff --git a/backend/server/resource.go b/backend/server/resource.go index 5b3a0d9..f272006 100644 --- a/backend/server/resource.go +++ b/backend/server/resource.go @@ -3,11 +3,11 @@ package server import ( "encoding/json" "fmt" - "legendsbrowser/model" "net/http" "strconv" "github.com/gorilla/mux" + "github.com/robertjanetzko/LegendsBrowser2/backend/model" ) type Info struct { diff --git a/contributors.go b/contributors.go deleted file mode 100644 index fac27cc..0000000 --- a/contributors.go +++ /dev/null @@ -1,12097 +0,0 @@ -// Code generated by go generate; DO NOT EDIT. -package main - -import ( - "encoding/xml" - "fmt" - "strconv" -) -type Artifact struct { - AbsTileX int `json:"absTileX" legend:"base"` - AbsTileY int `json:"absTileY" legend:"base"` - AbsTileZ int `json:"absTileZ" legend:"base"` - HolderHfid int `json:"holderHfid" legend:"base"` - Id_ int `json:"id" legend:"both"` - Item Item `json:"item" legend:"base"` - ItemDescription string `json:"itemDescription" legend:"plus"` - ItemSubtype string `json:"itemSubtype" legend:"plus"` - ItemType string `json:"itemType" legend:"plus"` - Mat string `json:"mat" legend:"plus"` - Name_ string `json:"name" legend:"base"` - PageCount int `json:"pageCount" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - StructureLocalId int `json:"structureLocalId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - Writing int `json:"writing" legend:"plus"` -} -type Circumstance struct { - Defeated int `json:"defeated" legend:"plus"` - HistEventCollection int `json:"histEventCollection" legend:"plus"` - Murdered int `json:"murdered" legend:"plus"` - Type string `json:"type" legend:"plus"` -} -type Creature struct { - AllCastesAlive string `json:"allCastesAlive" legend:"plus"` - ArtificialHiveable string `json:"artificialHiveable" legend:"plus"` - BiomeDesertBadland string `json:"biomeDesertBadland" legend:"plus"` - BiomeDesertRock string `json:"biomeDesertRock" legend:"plus"` - BiomeDesertSand string `json:"biomeDesertSand" legend:"plus"` - BiomeForestTaiga string `json:"biomeForestTaiga" legend:"plus"` - BiomeForestTemperateBroadleaf string `json:"biomeForestTemperateBroadleaf" legend:"plus"` - BiomeForestTemperateConifer string `json:"biomeForestTemperateConifer" legend:"plus"` - BiomeForestTropicalConifer string `json:"biomeForestTropicalConifer" legend:"plus"` - BiomeForestTropicalDryBroadleaf string `json:"biomeForestTropicalDryBroadleaf" legend:"plus"` - BiomeForestTropicalMoistBroadleaf string `json:"biomeForestTropicalMoistBroadleaf" legend:"plus"` - BiomeGlacier string `json:"biomeGlacier" legend:"plus"` - BiomeGrasslandTemperate string `json:"biomeGrasslandTemperate" legend:"plus"` - BiomeGrasslandTropical string `json:"biomeGrasslandTropical" legend:"plus"` - BiomeLakeTemperateBrackishwater string `json:"biomeLakeTemperateBrackishwater" legend:"plus"` - BiomeLakeTemperateFreshwater string `json:"biomeLakeTemperateFreshwater" legend:"plus"` - BiomeLakeTemperateSaltwater string `json:"biomeLakeTemperateSaltwater" legend:"plus"` - BiomeLakeTropicalBrackishwater string `json:"biomeLakeTropicalBrackishwater" legend:"plus"` - BiomeLakeTropicalFreshwater string `json:"biomeLakeTropicalFreshwater" legend:"plus"` - BiomeLakeTropicalSaltwater string `json:"biomeLakeTropicalSaltwater" legend:"plus"` - BiomeMarshTemperateFreshwater string `json:"biomeMarshTemperateFreshwater" legend:"plus"` - BiomeMarshTemperateSaltwater string `json:"biomeMarshTemperateSaltwater" legend:"plus"` - BiomeMarshTropicalFreshwater string `json:"biomeMarshTropicalFreshwater" legend:"plus"` - BiomeMarshTropicalSaltwater string `json:"biomeMarshTropicalSaltwater" legend:"plus"` - BiomeMountain string `json:"biomeMountain" legend:"plus"` - BiomeOceanArctic string `json:"biomeOceanArctic" legend:"plus"` - BiomeOceanTemperate string `json:"biomeOceanTemperate" legend:"plus"` - BiomeOceanTropical string `json:"biomeOceanTropical" legend:"plus"` - BiomePoolTemperateBrackishwater string `json:"biomePoolTemperateBrackishwater" legend:"plus"` - BiomePoolTemperateFreshwater string `json:"biomePoolTemperateFreshwater" legend:"plus"` - BiomePoolTemperateSaltwater string `json:"biomePoolTemperateSaltwater" legend:"plus"` - BiomePoolTropicalBrackishwater string `json:"biomePoolTropicalBrackishwater" legend:"plus"` - BiomePoolTropicalFreshwater string `json:"biomePoolTropicalFreshwater" legend:"plus"` - BiomePoolTropicalSaltwater string `json:"biomePoolTropicalSaltwater" legend:"plus"` - BiomeRiverTemperateBrackishwater string `json:"biomeRiverTemperateBrackishwater" legend:"plus"` - BiomeRiverTemperateFreshwater string `json:"biomeRiverTemperateFreshwater" legend:"plus"` - BiomeRiverTemperateSaltwater string `json:"biomeRiverTemperateSaltwater" legend:"plus"` - BiomeRiverTropicalBrackishwater string `json:"biomeRiverTropicalBrackishwater" legend:"plus"` - BiomeRiverTropicalFreshwater string `json:"biomeRiverTropicalFreshwater" legend:"plus"` - BiomeRiverTropicalSaltwater string `json:"biomeRiverTropicalSaltwater" legend:"plus"` - BiomeSavannaTemperate string `json:"biomeSavannaTemperate" legend:"plus"` - BiomeSavannaTropical string `json:"biomeSavannaTropical" legend:"plus"` - BiomeShrublandTemperate string `json:"biomeShrublandTemperate" legend:"plus"` - BiomeShrublandTropical string `json:"biomeShrublandTropical" legend:"plus"` - BiomeSubterraneanChasm string `json:"biomeSubterraneanChasm" legend:"plus"` - BiomeSubterraneanLava string `json:"biomeSubterraneanLava" legend:"plus"` - BiomeSubterraneanWater string `json:"biomeSubterraneanWater" legend:"plus"` - BiomeSwampMangrove string `json:"biomeSwampMangrove" legend:"plus"` - BiomeSwampTemperateFreshwater string `json:"biomeSwampTemperateFreshwater" legend:"plus"` - BiomeSwampTemperateSaltwater string `json:"biomeSwampTemperateSaltwater" legend:"plus"` - BiomeSwampTropicalFreshwater string `json:"biomeSwampTropicalFreshwater" legend:"plus"` - BiomeSwampTropicalSaltwater string `json:"biomeSwampTropicalSaltwater" legend:"plus"` - BiomeTundra string `json:"biomeTundra" legend:"plus"` - CreatureId string `json:"creatureId" legend:"plus"` - DoesNotExist string `json:"doesNotExist" legend:"plus"` - Equipment string `json:"equipment" legend:"plus"` - EquipmentWagon string `json:"equipmentWagon" legend:"plus"` - Evil string `json:"evil" legend:"plus"` - Fanciful string `json:"fanciful" legend:"plus"` - Generated string `json:"generated" legend:"plus"` - Good string `json:"good" legend:"plus"` - HasAnyBenign string `json:"hasAnyBenign" legend:"plus"` - HasAnyCanSwim string `json:"hasAnyCanSwim" legend:"plus"` - HasAnyCannotBreatheAir string `json:"hasAnyCannotBreatheAir" legend:"plus"` - HasAnyCannotBreatheWater string `json:"hasAnyCannotBreatheWater" legend:"plus"` - HasAnyCarnivore string `json:"hasAnyCarnivore" legend:"plus"` - HasAnyCommonDomestic string `json:"hasAnyCommonDomestic" legend:"plus"` - HasAnyCuriousBeast string `json:"hasAnyCuriousBeast" legend:"plus"` - HasAnyDemon string `json:"hasAnyDemon" legend:"plus"` - HasAnyFeatureBeast string `json:"hasAnyFeatureBeast" legend:"plus"` - HasAnyFlier string `json:"hasAnyFlier" legend:"plus"` - HasAnyFlyRaceGait string `json:"hasAnyFlyRaceGait" legend:"plus"` - HasAnyGrasp string `json:"hasAnyGrasp" legend:"plus"` - HasAnyGrazer string `json:"hasAnyGrazer" legend:"plus"` - HasAnyHasBlood string `json:"hasAnyHasBlood" legend:"plus"` - HasAnyImmobile string `json:"hasAnyImmobile" legend:"plus"` - HasAnyIntelligentLearns string `json:"hasAnyIntelligentLearns" legend:"plus"` - HasAnyIntelligentSpeaks string `json:"hasAnyIntelligentSpeaks" legend:"plus"` - HasAnyLargePredator string `json:"hasAnyLargePredator" legend:"plus"` - HasAnyLocalPopsControllable string `json:"hasAnyLocalPopsControllable" legend:"plus"` - HasAnyLocalPopsProduceHeroes string `json:"hasAnyLocalPopsProduceHeroes" legend:"plus"` - HasAnyMegabeast string `json:"hasAnyMegabeast" legend:"plus"` - HasAnyMischievous string `json:"hasAnyMischievous" legend:"plus"` - HasAnyNaturalAnimal string `json:"hasAnyNaturalAnimal" legend:"plus"` - HasAnyNightCreature string `json:"hasAnyNightCreature" legend:"plus"` - HasAnyNightCreatureBogeyman string `json:"hasAnyNightCreatureBogeyman" legend:"plus"` - HasAnyNightCreatureHunter string `json:"hasAnyNightCreatureHunter" legend:"plus"` - HasAnyNightCreatureNightmare string `json:"hasAnyNightCreatureNightmare" legend:"plus"` - HasAnyNotFireimmune string `json:"hasAnyNotFireimmune" legend:"plus"` - HasAnyNotLiving string `json:"hasAnyNotLiving" legend:"plus"` - HasAnyOutsiderControllable string `json:"hasAnyOutsiderControllable" legend:"plus"` - HasAnyRaceGait string `json:"hasAnyRaceGait" legend:"plus"` - HasAnySemimegabeast string `json:"hasAnySemimegabeast" legend:"plus"` - HasAnySlowLearner string `json:"hasAnySlowLearner" legend:"plus"` - HasAnySupernatural string `json:"hasAnySupernatural" legend:"plus"` - HasAnyTitan string `json:"hasAnyTitan" legend:"plus"` - HasAnyUniqueDemon string `json:"hasAnyUniqueDemon" legend:"plus"` - HasAnyUtterances string `json:"hasAnyUtterances" legend:"plus"` - HasAnyVerminHateable string `json:"hasAnyVerminHateable" legend:"plus"` - HasAnyVerminMicro string `json:"hasAnyVerminMicro" legend:"plus"` - HasFemale string `json:"hasFemale" legend:"plus"` - HasMale string `json:"hasMale" legend:"plus"` - LargeRoaming string `json:"largeRoaming" legend:"plus"` - LooseClusters string `json:"looseClusters" legend:"plus"` - MatesToBreed string `json:"matesToBreed" legend:"plus"` - Mundane string `json:"mundane" legend:"plus"` - NamePlural string `json:"namePlural" legend:"plus"` - NameSingular string `json:"nameSingular" legend:"plus"` - OccursAsEntityRace string `json:"occursAsEntityRace" legend:"plus"` - Savage string `json:"savage" legend:"plus"` - SmallRace string `json:"smallRace" legend:"plus"` - TwoGenders string `json:"twoGenders" legend:"plus"` - Ubiquitous string `json:"ubiquitous" legend:"plus"` - VerminEater string `json:"verminEater" legend:"plus"` - VerminFish string `json:"verminFish" legend:"plus"` - VerminGrounder string `json:"verminGrounder" legend:"plus"` - VerminRotter string `json:"verminRotter" legend:"plus"` - VerminSoil string `json:"verminSoil" legend:"plus"` - VerminSoilColony string `json:"verminSoilColony" legend:"plus"` -} -type DanceForm struct { - Description string `json:"description" legend:"base"` - Id_ int `json:"id" legend:"both"` - Name_ string `json:"name" legend:"plus"` -} -type DfWorld struct { - Altname string `json:"altname" legend:"plus"` - Artifacts map[int]*Artifact `json:"artifacts" legend:"both"` - CreatureRaw map[int]*Creature `json:"creatureRaw" legend:"plus"` - DanceForms map[int]*DanceForm `json:"danceForms" legend:"both"` - Entities map[int]*Entity `json:"entities" legend:"both"` - EntityPopulations map[int]*EntityPopulation `json:"entityPopulations" legend:"both"` - HistoricalEras map[int]*HistoricalEra `json:"historicalEras" legend:"both"` - HistoricalEventCollections map[int]*HistoricalEventCollection `json:"historicalEventCollections" legend:"both"` - HistoricalEventRelationshipSupplements map[int]*HistoricalEventRelationshipSupplement `json:"historicalEventRelationshipSupplements" legend:"plus"` - HistoricalEventRelationships map[int]*HistoricalEventRelationship `json:"historicalEventRelationships" legend:"plus"` - HistoricalEvents map[int]*HistoricalEvent `json:"historicalEvents" legend:"both"` - HistoricalFigures map[int]*HistoricalFigure `json:"historicalFigures" legend:"both"` - Identities map[int]*Identity `json:"identities" legend:"plus"` - Landmasses map[int]*Landmass `json:"landmasses" legend:"plus"` - MountainPeaks map[int]*MountainPeak `json:"mountainPeaks" legend:"plus"` - MusicalForms map[int]*MusicalForm `json:"musicalForms" legend:"both"` - Name_ string `json:"name" legend:"plus"` - PoeticForms map[int]*PoeticForm `json:"poeticForms" legend:"both"` - Regions map[int]*Region `json:"regions" legend:"both"` - Rivers map[int]*River `json:"rivers" legend:"plus"` - Sites map[int]*Site `json:"sites" legend:"both"` - UndergroundRegions map[int]*UndergroundRegion `json:"undergroundRegions" legend:"both"` - WorldConstructions map[int]*WorldConstruction `json:"worldConstructions" legend:"both"` - WrittenContents map[int]*WrittenContent `json:"writtenContents" legend:"both"` -} -type Entity struct { - Child int `json:"child" legend:""` - Claims int `json:"claims" legend:""` - EntityLink EntityLink `json:"entityLink" legend:""` - EntityPosition EntityPosition `json:"entityPosition" legend:""` - EntityPositionAssignment EntityPositionAssignment `json:"entityPositionAssignment" legend:""` - HistfigId int `json:"histfigId" legend:""` - Honor []Honor `json:"honor" legend:"base"` - Id_ int `json:"id" legend:"both"` - Name_ string `json:"name" legend:"base"` - Occasion Occasion `json:"occasion" legend:""` - Profession int `json:"profession" legend:""` - Race string `json:"race" legend:"plus"` - Type string `json:"type" legend:"plus"` - Weapon int `json:"weapon" legend:""` - WorshipId int `json:"worshipId" legend:""` -} -type EntityFormerPositionLink struct { - EndYear int `json:"endYear" legend:"base"` - EntityId int `json:"entityId" legend:"base"` - PositionProfileId int `json:"positionProfileId" legend:"base"` - StartYear int `json:"startYear" legend:"base"` -} -type EntityLink struct { - EntityId int `json:"entityId" legend:"base"` - LinkStrength int `json:"linkStrength" legend:"base"` - LinkType string `json:"linkType" legend:"base"` -} -type EntityPopulation struct { - CivId int `json:"civId" legend:"plus"` - Id_ int `json:"id" legend:"both"` - Race string `json:"race" legend:"plus"` -} -type EntityPosition struct { - Id_ int `json:"id" legend:""` - Name_ int `json:"name" legend:""` - NameFemale int `json:"nameFemale" legend:""` - NameMale int `json:"nameMale" legend:""` - Spouse int `json:"spouse" legend:""` - SpouseFemale int `json:"spouseFemale" legend:""` - SpouseMale int `json:"spouseMale" legend:""` -} -type EntityPositionAssignment struct { - Histfig int `json:"histfig" legend:""` - Id_ int `json:"id" legend:""` - PositionId int `json:"positionId" legend:""` - SquadId int `json:"squadId" legend:""` -} -type EntityPositionLink struct { - EntityId int `json:"entityId" legend:"base"` - PositionProfileId int `json:"positionProfileId" legend:"base"` - StartYear int `json:"startYear" legend:"base"` -} -type EntityReputation struct { - EntityId int `json:"entityId" legend:"base"` - FirstAgelessSeasonCount int `json:"firstAgelessSeasonCount" legend:"base"` - FirstAgelessYear int `json:"firstAgelessYear" legend:"base"` - UnsolvedMurders int `json:"unsolvedMurders" legend:"base"` -} -type EntitySquadLink struct { - EntityId int `json:"entityId" legend:"base"` - SquadId int `json:"squadId" legend:"base"` - SquadPosition int `json:"squadPosition" legend:"base"` - StartYear int `json:"startYear" legend:"base"` -} -type Feature struct { - Reference int `json:"reference" legend:""` - Type int `json:"type" legend:""` -} -type HfLink struct { - Hfid int `json:"hfid" legend:"base"` - LinkStrength int `json:"linkStrength" legend:"base"` - LinkType string `json:"linkType" legend:"base"` -} -type HfSkill struct { - Skill string `json:"skill" legend:"base"` - TotalIp int `json:"totalIp" legend:"base"` -} -type HistoricalEra struct { - Name_ string `json:"name" legend:"base"` - StartYear int `json:"startYear" legend:"base"` -} -type HistoricalEvent struct { - Id_ int `json:"id" legend:"both"` - Seconds72 int `json:"seconds72" legend:"base"` - Type string `json:"type" legend:"both"` - Year int `json:"year" legend:"base"` -} -type HistoricalEventAddHfEntityHonor struct { - EntityId int `json:"entityId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - HonorId int `json:"honorId" legend:"base"` -} -type HistoricalEventAddHfEntityLink struct { - AppointerHfid int `json:"appointerHfid" legend:"both"` - Civ int `json:"civ" legend:"plus"` - CivId int `json:"civId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - Histfig int `json:"histfig" legend:"plus"` - Link string `json:"link" legend:"base"` - LinkType string `json:"linkType" legend:"plus"` - Position string `json:"position" legend:"plus"` - PositionId int `json:"positionId" legend:"base"` - PromiseToHfid int `json:"promiseToHfid" legend:"both"` -} -type HistoricalEventAddHfHfLink struct { - Hf int `json:"hf" legend:"plus"` - HfTarget int `json:"hfTarget" legend:"plus"` - Hfid int `json:"hfid" legend:"base"` - HfidTarget int `json:"hfidTarget" legend:"base"` - LinkType string `json:"linkType" legend:"plus"` -} -type HistoricalEventAddHfSiteLink struct { - Civ int `json:"civ" legend:"plus"` - Histfig int `json:"histfig" legend:"plus"` - LinkType string `json:"linkType" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - Structure int `json:"structure" legend:"plus"` -} -type HistoricalEventAgreementFormed struct { - Action string `json:"action" legend:"base"` - AgreementId int `json:"agreementId" legend:"base"` - AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` - CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` - Delegated string `json:"delegated" legend:"base"` - FailedJudgmentTest string `json:"failedJudgmentTest" legend:"base"` - Method string `json:"method" legend:"base"` - RelevantEntityId int `json:"relevantEntityId" legend:"base"` - RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` - RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` - Successful string `json:"successful" legend:"base"` - TopFacet string `json:"topFacet" legend:"base"` - TopFacetModifier int `json:"topFacetModifier" legend:"base"` - TopFacetRating int `json:"topFacetRating" legend:"base"` - TopRelationshipFactor string `json:"topRelationshipFactor" legend:"base"` - TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` - TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` - TopValue string `json:"topValue" legend:"base"` - TopValueModifier int `json:"topValueModifier" legend:"base"` - TopValueRating int `json:"topValueRating" legend:"base"` -} -type HistoricalEventArtifactClaimFormed struct { - ArtifactId int `json:"artifactId" legend:"base"` - Circumstance string `json:"circumstance" legend:"base"` - Claim string `json:"claim" legend:"base"` - EntityId int `json:"entityId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - PositionProfileId int `json:"positionProfileId" legend:"base"` -} -type HistoricalEventArtifactCopied struct { - ArtifactId int `json:"artifactId" legend:"base"` - DestEntityId int `json:"destEntityId" legend:"base"` - DestSiteId int `json:"destSiteId" legend:"base"` - DestStructureId int `json:"destStructureId" legend:"base"` - FromOriginal string `json:"fromOriginal" legend:"base"` - SourceEntityId int `json:"sourceEntityId" legend:"base"` - SourceSiteId int `json:"sourceSiteId" legend:"base"` - SourceStructureId int `json:"sourceStructureId" legend:"base"` -} -type HistoricalEventArtifactCreated struct { - ArtifactId int `json:"artifactId" legend:"both"` - Circumstance Circumstance `json:"circumstance" legend:"plus"` - CreatorHfid int `json:"creatorHfid" legend:"plus"` - CreatorUnitId int `json:"creatorUnitId" legend:"plus"` - HistFigureId int `json:"histFigureId" legend:"base"` - NameOnly string `json:"nameOnly" legend:"base"` - Reason string `json:"reason" legend:"plus"` - SanctifyHf int `json:"sanctifyHf" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - UnitId int `json:"unitId" legend:"base"` -} -type HistoricalEventArtifactDestroyed struct { - ArtifactId int `json:"artifactId" legend:"base"` - DestroyerEnid int `json:"destroyerEnid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventArtifactFound struct { - ArtifactId int `json:"artifactId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - UnitId int `json:"unitId" legend:"base"` -} -type HistoricalEventArtifactGiven struct { - ArtifactId int `json:"artifactId" legend:"base"` - GiverEntityId int `json:"giverEntityId" legend:"base"` - GiverHistFigureId int `json:"giverHistFigureId" legend:"base"` - ReceiverEntityId int `json:"receiverEntityId" legend:"base"` - ReceiverHistFigureId int `json:"receiverHistFigureId" legend:"base"` -} -type HistoricalEventArtifactLost struct { - ArtifactId int `json:"artifactId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SitePropertyId int `json:"sitePropertyId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventArtifactPossessed struct { - ArtifactId int `json:"artifactId" legend:"base"` - Circumstance string `json:"circumstance" legend:"base"` - CircumstanceId int `json:"circumstanceId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - Reason string `json:"reason" legend:"base"` - ReasonId int `json:"reasonId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - UnitId int `json:"unitId" legend:"base"` -} -type HistoricalEventArtifactRecovered struct { - ArtifactId int `json:"artifactId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - UnitId int `json:"unitId" legend:"base"` -} -type HistoricalEventArtifactStored struct { - ArtifactId int `json:"artifactId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - UnitId int `json:"unitId" legend:"base"` -} -type HistoricalEventAssumeIdentity struct { - IdentityCaste string `json:"identityCaste" legend:"plus"` - IdentityHistfigId int `json:"identityHistfigId" legend:"plus"` - IdentityId int `json:"identityId" legend:"base"` - IdentityName string `json:"identityName" legend:"plus"` - IdentityNemesisId int `json:"identityNemesisId" legend:"plus"` - IdentityRace string `json:"identityRace" legend:"plus"` - Target int `json:"target" legend:"plus"` - TargetEnid int `json:"targetEnid" legend:"base"` - Trickster int `json:"trickster" legend:"plus"` - TricksterHfid int `json:"tricksterHfid" legend:"base"` -} -type HistoricalEventAttackedSite struct { - ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` - AttackerCivId int `json:"attackerCivId" legend:"base"` - AttackerGeneralHfid int `json:"attackerGeneralHfid" legend:"base"` - AttackerMercEnid int `json:"attackerMercEnid" legend:"base"` - DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - DefenderGeneralHfid int `json:"defenderGeneralHfid" legend:"base"` - DefenderMercEnid int `json:"defenderMercEnid" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventBodyAbused struct { - AbuseType string `json:"abuseType" legend:"plus"` - Bodies []int `json:"bodies" legend:"plus"` - Civ int `json:"civ" legend:"plus"` - Coords string `json:"coords" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Histfig int `json:"histfig" legend:"plus"` - Interaction int `json:"interaction" legend:"plus"` - ItemMat string `json:"itemMat" legend:"plus"` - ItemSubtype string `json:"itemSubtype" legend:"plus"` - ItemType string `json:"itemType" legend:"plus"` - PileType string `json:"pileType" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - Structure int `json:"structure" legend:"plus"` - SubregionId int `json:"subregionId" legend:"base"` - Tree int `json:"tree" legend:"plus"` - VictimEntity int `json:"victimEntity" legend:"plus"` -} -type HistoricalEventBuildingProfileAcquired struct { - AcquirerEnid int `json:"acquirerEnid" legend:"base"` - AcquirerHfid int `json:"acquirerHfid" legend:"base"` - BuildingProfileId int `json:"buildingProfileId" legend:"base"` - Inherited string `json:"inherited" legend:"base"` - LastOwnerHfid int `json:"lastOwnerHfid" legend:"base"` - PurchasedUnowned string `json:"purchasedUnowned" legend:"base"` - RebuiltRuined string `json:"rebuiltRuined" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventCeremony struct { - CivId int `json:"civId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - OccasionId int `json:"occasionId" legend:"base"` - ScheduleId int `json:"scheduleId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventChangeCreatureType struct { - Changee int `json:"changee" legend:"plus"` - Changer int `json:"changer" legend:"plus"` - NewCaste int `json:"newCaste" legend:"plus"` - NewRace string `json:"newRace" legend:"plus"` - OldCaste int `json:"oldCaste" legend:"plus"` - OldRace string `json:"oldRace" legend:"plus"` -} -type HistoricalEventChangeHfBodyState struct { - BodyState string `json:"bodyState" legend:"base"` - Coords string `json:"coords" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventChangeHfJob struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"both"` - NewJob string `json:"newJob" legend:"plus"` - OldJob string `json:"oldJob" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventChangeHfState struct { - Coords string `json:"coords" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"both"` - Mood string `json:"mood" legend:"base"` - Reason string `json:"reason" legend:"both"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - State string `json:"state" legend:"both"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventChangedCreatureType struct { - ChangeeHfid int `json:"changeeHfid" legend:"base"` - ChangerHfid int `json:"changerHfid" legend:"base"` - NewCaste string `json:"newCaste" legend:"base"` - NewRace string `json:"newRace" legend:"base"` - OldCaste string `json:"oldCaste" legend:"base"` - OldRace string `json:"oldRace" legend:"base"` -} -type HistoricalEventCompetition struct { - CivId int `json:"civId" legend:"base"` - CompetitorHfid []int `json:"competitorHfid" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - OccasionId int `json:"occasionId" legend:"base"` - ScheduleId int `json:"scheduleId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - WinnerHfid int `json:"winnerHfid" legend:"base"` -} -type HistoricalEventCreateEntityPosition struct { - Civ int `json:"civ" legend:"plus"` - Histfig int `json:"histfig" legend:"plus"` - Position string `json:"position" legend:"plus"` - Reason string `json:"reason" legend:"plus"` - SiteCiv int `json:"siteCiv" legend:"plus"` -} -type HistoricalEventCreatedBuilding struct { - BuilderHf int `json:"builderHf" legend:"plus"` - Civ int `json:"civ" legend:"plus"` - Rebuild string `json:"rebuild" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteCiv int `json:"siteCiv" legend:"plus"` - Structure int `json:"structure" legend:"plus"` -} -type HistoricalEventCreatedSite struct { - BuilderHfid int `json:"builderHfid" legend:"base"` - CivId int `json:"civId" legend:"base"` - ResidentCivId int `json:"residentCivId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventCreatedStructure struct { - BuilderHfid int `json:"builderHfid" legend:"base"` - CivId int `json:"civId" legend:"base"` - Rebuilt string `json:"rebuilt" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventCreatedWorldConstruction struct { - CivId int `json:"civId" legend:"base"` - MasterWcid int `json:"masterWcid" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId1 int `json:"siteId1" legend:"base"` - SiteId2 int `json:"siteId2" legend:"base"` - Wcid int `json:"wcid" legend:"base"` -} -type HistoricalEventCreatureDevoured struct { - Caste string `json:"caste" legend:"plus"` - Eater int `json:"eater" legend:"plus"` - Entity int `json:"entity" legend:"plus"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Race string `json:"race" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - Victim int `json:"victim" legend:"plus"` -} -type HistoricalEventDanceFormCreated struct { - Circumstance string `json:"circumstance" legend:"base"` - CircumstanceId int `json:"circumstanceId" legend:"base"` - FormId int `json:"formId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - Reason string `json:"reason" legend:"base"` - ReasonId int `json:"reasonId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventDestroyedSite struct { - AttackerCivId int `json:"attackerCivId" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventEntityAction struct { - Action string `json:"action" legend:"plus"` - Entity int `json:"entity" legend:"plus"` - Site int `json:"site" legend:"plus"` - Structure int `json:"structure" legend:"plus"` -} -type HistoricalEventEntityAllianceFormed struct { - InitiatingEnid int `json:"initiatingEnid" legend:"base"` - JoiningEnid []int `json:"joiningEnid" legend:"base"` -} -type HistoricalEventEntityBreachFeatureLayer struct { - CivEntityId int `json:"civEntityId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - SiteEntityId int `json:"siteEntityId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventEntityCreated struct { - CreatorHfid int `json:"creatorHfid" legend:"base"` - EntityId int `json:"entityId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventEntityDissolved struct { - EntityId int `json:"entityId" legend:"base"` - Reason string `json:"reason" legend:"base"` -} -type HistoricalEventEntityEquipmentPurchase struct { - EntityId int `json:"entityId" legend:"base"` - Hfid []int `json:"hfid" legend:"base"` - NewEquipmentLevel int `json:"newEquipmentLevel" legend:"base"` -} -type HistoricalEventEntityIncorporated struct { - JoinedEntityId int `json:"joinedEntityId" legend:"base"` - JoinerEntityId int `json:"joinerEntityId" legend:"base"` - LeaderHfid int `json:"leaderHfid" legend:"base"` - PartialIncorporation string `json:"partialIncorporation" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventEntityLaw struct { - EntityId int `json:"entityId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - LawAdd string `json:"lawAdd" legend:"base"` - LawRemove string `json:"lawRemove" legend:"base"` -} -type HistoricalEventEntityOverthrown struct { - ConspiratorHfid []int `json:"conspiratorHfid" legend:"base"` - EntityId int `json:"entityId" legend:"base"` - InstigatorHfid int `json:"instigatorHfid" legend:"base"` - OverthrownHfid int `json:"overthrownHfid" legend:"base"` - PosTakerHfid int `json:"posTakerHfid" legend:"base"` - PositionProfileId int `json:"positionProfileId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventEntityPersecuted struct { - DestroyedStructureId int `json:"destroyedStructureId" legend:"base"` - ExpelledCreature []int `json:"expelledCreature" legend:"base"` - ExpelledHfid []int `json:"expelledHfid" legend:"base"` - ExpelledNumber []int `json:"expelledNumber" legend:"base"` - ExpelledPopId []int `json:"expelledPopId" legend:"base"` - PersecutorEnid int `json:"persecutorEnid" legend:"base"` - PersecutorHfid int `json:"persecutorHfid" legend:"base"` - PropertyConfiscatedFromHfid []int `json:"propertyConfiscatedFromHfid" legend:"base"` - ShrineAmountDestroyed int `json:"shrineAmountDestroyed" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - TargetEnid int `json:"targetEnid" legend:"base"` -} -type HistoricalEventEntityPrimaryCriminals struct { - EntityId int `json:"entityId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventEntityRelocate struct { - EntityId int `json:"entityId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventFailedFrameAttempt struct { - ConvicterEnid int `json:"convicterEnid" legend:"base"` - Crime string `json:"crime" legend:"base"` - FooledHfid int `json:"fooledHfid" legend:"base"` - FramerHfid int `json:"framerHfid" legend:"base"` - PlotterHfid int `json:"plotterHfid" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` -} -type HistoricalEventFailedIntrigueCorruption struct { - Action string `json:"action" legend:"base"` - AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` - CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` - CorruptorHfid int `json:"corruptorHfid" legend:"base"` - CorruptorIdentity int `json:"corruptorIdentity" legend:"base"` - FailedJudgmentTest string `json:"failedJudgmentTest" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - LureHfid int `json:"lureHfid" legend:"base"` - Method string `json:"method" legend:"base"` - RelevantEntityId int `json:"relevantEntityId" legend:"base"` - RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` - RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` - TargetIdentity int `json:"targetIdentity" legend:"base"` - TopFacet string `json:"topFacet" legend:"base"` - TopFacetModifier int `json:"topFacetModifier" legend:"base"` - TopFacetRating int `json:"topFacetRating" legend:"base"` - TopRelationshipFactor string `json:"topRelationshipFactor" legend:"base"` - TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` - TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` - TopValue string `json:"topValue" legend:"base"` - TopValueModifier int `json:"topValueModifier" legend:"base"` - TopValueRating int `json:"topValueRating" legend:"base"` -} -type HistoricalEventFieldBattle struct { - ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` - AttackerCivId int `json:"attackerCivId" legend:"base"` - AttackerGeneralHfid int `json:"attackerGeneralHfid" legend:"base"` - AttackerMercEnid int `json:"attackerMercEnid" legend:"base"` - Coords string `json:"coords" legend:"base"` - DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - DefenderGeneralHfid int `json:"defenderGeneralHfid" legend:"base"` - DefenderMercEnid int `json:"defenderMercEnid" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventGamble struct { - GamblerHfid int `json:"gamblerHfid" legend:"base"` - NewAccount int `json:"newAccount" legend:"base"` - OldAccount int `json:"oldAccount" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventHfAbducted struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SnatcherHfid int `json:"snatcherHfid" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` -} -type HistoricalEventHfActOnBuilding struct { - Action string `json:"action" legend:"plus"` - Histfig int `json:"histfig" legend:"plus"` - Site int `json:"site" legend:"plus"` - Structure int `json:"structure" legend:"plus"` -} -type HistoricalEventHfAttackedSite struct { - AttackerHfid int `json:"attackerHfid" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventHfConfronted struct { - Coords string `json:"coords" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - Reason []string `json:"reason" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - Situation string `json:"situation" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfConvicted struct { - CoconspiratorHfid int `json:"coconspiratorHfid" legend:"base"` - ConfessedAfterApbArrestEnid int `json:"confessedAfterApbArrestEnid" legend:"base"` - ContactHfid int `json:"contactHfid" legend:"base"` - ConvictIsContact string `json:"convictIsContact" legend:"base"` - ConvictedHfid int `json:"convictedHfid" legend:"base"` - ConvicterEnid int `json:"convicterEnid" legend:"base"` - CorruptConvicterHfid int `json:"corruptConvicterHfid" legend:"base"` - Crime string `json:"crime" legend:"base"` - DeathPenalty string `json:"deathPenalty" legend:"base"` - DidNotRevealAllInInterrogation string `json:"didNotRevealAllInInterrogation" legend:"base"` - Exiled string `json:"exiled" legend:"base"` - FooledHfid int `json:"fooledHfid" legend:"base"` - FramerHfid int `json:"framerHfid" legend:"base"` - HeldFirmInInterrogation string `json:"heldFirmInInterrogation" legend:"base"` - ImplicatedHfid []int `json:"implicatedHfid" legend:"base"` - InterrogatorHfid int `json:"interrogatorHfid" legend:"base"` - PlotterHfid int `json:"plotterHfid" legend:"base"` - PrisonMonths int `json:"prisonMonths" legend:"base"` - SurveiledCoconspirator string `json:"surveiledCoconspirator" legend:"base"` - SurveiledContact string `json:"surveiledContact" legend:"base"` - SurveiledConvicted string `json:"surveiledConvicted" legend:"base"` - SurveiledTarget string `json:"surveiledTarget" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` - WrongfulConviction string `json:"wrongfulConviction" legend:"base"` -} -type HistoricalEventHfDestroyedSite struct { - AttackerHfid int `json:"attackerHfid" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventHfDied struct { - Cause string `json:"cause" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SlayerCaste string `json:"slayerCaste" legend:"base"` - SlayerHfid int `json:"slayerHfid" legend:"base"` - SlayerItemId int `json:"slayerItemId" legend:"base"` - SlayerRace string `json:"slayerRace" legend:"base"` - SlayerShooterItemId int `json:"slayerShooterItemId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfDisturbedStructure struct { - HistFigId int `json:"histFigId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventHfDoesInteraction struct { - Doer int `json:"doer" legend:"plus"` - DoerHfid int `json:"doerHfid" legend:"base"` - Interaction string `json:"interaction" legend:"base"` - InteractionAction string `json:"interactionAction" legend:"plus"` - Region int `json:"region" legend:"plus"` - Site int `json:"site" legend:"plus"` - Source int `json:"source" legend:"plus"` - Target int `json:"target" legend:"plus"` - TargetHfid int `json:"targetHfid" legend:"base"` -} -type HistoricalEventHfEnslaved struct { - EnslavedHfid int `json:"enslavedHfid" legend:"base"` - MovedToSiteId int `json:"movedToSiteId" legend:"base"` - PayerEntityId int `json:"payerEntityId" legend:"base"` - SellerHfid int `json:"sellerHfid" legend:"base"` -} -type HistoricalEventHfEquipmentPurchase struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - GroupHfid int `json:"groupHfid" legend:"base"` - Quality int `json:"quality" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfGainsSecretGoal struct { - Hfid int `json:"hfid" legend:"base"` - SecretGoal string `json:"secretGoal" legend:"base"` -} -type HistoricalEventHfInterrogated struct { - ArrestingEnid int `json:"arrestingEnid" legend:"base"` - HeldFirmInInterrogation string `json:"heldFirmInInterrogation" legend:"base"` - InterrogatorHfid int `json:"interrogatorHfid" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` - WantedAndRecognized string `json:"wantedAndRecognized" legend:"base"` -} -type HistoricalEventHfLearnsSecret struct { - Artifact int `json:"artifact" legend:"plus"` - ArtifactId int `json:"artifactId" legend:"base"` - Interaction string `json:"interaction" legend:"base"` - SecretText string `json:"secretText" legend:"plus"` - Student int `json:"student" legend:"plus"` - StudentHfid int `json:"studentHfid" legend:"base"` - Teacher int `json:"teacher" legend:"plus"` - TeacherHfid int `json:"teacherHfid" legend:"base"` -} -type HistoricalEventHfNewPet struct { - Coords string `json:"coords" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - GroupHfid int `json:"groupHfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfPerformedHorribleExperiments struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - GroupHfid int `json:"groupHfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfPrayedInsideStructure struct { - HistFigId int `json:"histFigId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventHfPreach struct { - Entity1 int `json:"entity1" legend:"base"` - Entity2 int `json:"entity2" legend:"base"` - SiteHfid int `json:"siteHfid" legend:"base"` - SpeakerHfid int `json:"speakerHfid" legend:"base"` - Topic string `json:"topic" legend:"base"` -} -type HistoricalEventHfProfanedStructure struct { - HistFigId int `json:"histFigId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventHfRecruitedUnitTypeForEntity struct { - EntityId int `json:"entityId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - UnitType string `json:"unitType" legend:"base"` -} -type HistoricalEventHfRelationshipDenied struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Reason string `json:"reason" legend:"base"` - ReasonId int `json:"reasonId" legend:"base"` - Relationship string `json:"relationship" legend:"base"` - SeekerHfid int `json:"seekerHfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` -} -type HistoricalEventHfReunion struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Group1Hfid int `json:"group1Hfid" legend:"base"` - Group2Hfid []int `json:"group2Hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfRevived struct { - ActorHfid int `json:"actorHfid" legend:"base"` - Disturbance string `json:"disturbance" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfSimpleBattleEvent struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Group1Hfid int `json:"group1Hfid" legend:"base"` - Group2Hfid int `json:"group2Hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - Subtype string `json:"subtype" legend:"base"` -} -type HistoricalEventHfTravel struct { - Coords string `json:"coords" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - GroupHfid []int `json:"groupHfid" legend:"base"` - Return string `json:"return" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHfViewedArtifact struct { - ArtifactId int `json:"artifactId" legend:"base"` - HistFigId int `json:"histFigId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventHfWounded struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - WoundeeHfid int `json:"woundeeHfid" legend:"base"` - WounderHfid int `json:"wounderHfid" legend:"base"` -} -type HistoricalEventHfsFormedIntrigueRelationship struct { - Action string `json:"action" legend:"base"` - AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` - Circumstance string `json:"circumstance" legend:"base"` - CircumstanceId int `json:"circumstanceId" legend:"base"` - CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` - CorruptorHfid int `json:"corruptorHfid" legend:"base"` - CorruptorIdentity int `json:"corruptorIdentity" legend:"base"` - CorruptorSeenAs string `json:"corruptorSeenAs" legend:"base"` - FailedJudgmentTest string `json:"failedJudgmentTest" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - LureHfid int `json:"lureHfid" legend:"base"` - Method string `json:"method" legend:"base"` - RelevantEntityId int `json:"relevantEntityId" legend:"base"` - RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` - RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - Successful string `json:"successful" legend:"base"` - TargetHfid int `json:"targetHfid" legend:"base"` - TargetIdentity int `json:"targetIdentity" legend:"base"` - TargetSeenAs string `json:"targetSeenAs" legend:"base"` - TopFacet string `json:"topFacet" legend:"base"` - TopFacetModifier int `json:"topFacetModifier" legend:"base"` - TopFacetRating int `json:"topFacetRating" legend:"base"` - TopRelationshipFactor string `json:"topRelationshipFactor" legend:"base"` - TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` - TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` - TopValue string `json:"topValue" legend:"base"` - TopValueModifier int `json:"topValueModifier" legend:"base"` - TopValueRating int `json:"topValueRating" legend:"base"` -} -type HistoricalEventHfsFormedReputationRelationship struct { - FeatureLayerId int `json:"featureLayerId" legend:"base"` - HfRep1Of2 string `json:"hfRep1Of2" legend:"base"` - HfRep2Of1 string `json:"hfRep2Of1" legend:"base"` - Hfid1 int `json:"hfid1" legend:"base"` - Hfid2 int `json:"hfid2" legend:"base"` - IdentityId1 int `json:"identityId1" legend:"base"` - IdentityId2 int `json:"identityId2" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventHistFigureDied struct { - ArtifactId int `json:"artifactId" legend:"plus"` - DeathCause string `json:"deathCause" legend:"plus"` - Item int `json:"item" legend:"plus"` - ItemSubtype string `json:"itemSubtype" legend:"plus"` - ItemType string `json:"itemType" legend:"plus"` - Mat string `json:"mat" legend:"plus"` - Site int `json:"site" legend:"plus"` - SlayerCaste int `json:"slayerCaste" legend:"plus"` - SlayerHf int `json:"slayerHf" legend:"plus"` - SlayerRace int `json:"slayerRace" legend:"plus"` - VictimHf int `json:"victimHf" legend:"plus"` -} -type HistoricalEventHistFigureNewPet struct { - Group int `json:"group" legend:"plus"` - Pets string `json:"pets" legend:"plus"` - Site int `json:"site" legend:"plus"` -} -type HistoricalEventHistFigureWounded struct { - BodyPart int `json:"bodyPart" legend:"plus"` - InjuryType string `json:"injuryType" legend:"plus"` - PartLost string `json:"partLost" legend:"plus"` - Site int `json:"site" legend:"plus"` - Woundee int `json:"woundee" legend:"plus"` - WoundeeCaste int `json:"woundeeCaste" legend:"plus"` - WoundeeRace int `json:"woundeeRace" legend:"plus"` - Wounder int `json:"wounder" legend:"plus"` -} -type HistoricalEventHolyCityDeclaration struct { - ReligionId int `json:"religionId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventItemStolen struct { - Circumstance Circumstance `json:"circumstance" legend:"both"` - CircumstanceId int `json:"circumstanceId" legend:"base"` - Entity int `json:"entity" legend:"plus"` - Histfig int `json:"histfig" legend:"plus"` - Item int `json:"item" legend:"plus"` - ItemSubtype string `json:"itemSubtype" legend:"plus"` - ItemType string `json:"itemType" legend:"plus"` - Mat string `json:"mat" legend:"plus"` - Matindex int `json:"matindex" legend:"plus"` - Mattype int `json:"mattype" legend:"plus"` - Site int `json:"site" legend:"plus"` - StashSite int `json:"stashSite" legend:"plus"` - Structure int `json:"structure" legend:"plus"` - TheftMethod string `json:"theftMethod" legend:"plus"` -} -type HistoricalEventKnowledgeDiscovered struct { - First string `json:"first" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - Knowledge string `json:"knowledge" legend:"base"` -} -type HistoricalEventMasterpieceCreatedItem struct { - ItemId int `json:"itemId" legend:"plus"` - ItemType string `json:"itemType" legend:"plus"` - Maker int `json:"maker" legend:"plus"` - MakerEntity int `json:"makerEntity" legend:"plus"` - Mat string `json:"mat" legend:"plus"` - Site int `json:"site" legend:"plus"` - SkillAtTime string `json:"skillAtTime" legend:"plus"` -} -type HistoricalEventMasterpieceItem struct { - EntityId int `json:"entityId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SkillAtTime int `json:"skillAtTime" legend:"base"` -} -type HistoricalEventMerchant struct { - DepotEntityId int `json:"depotEntityId" legend:"base"` - Destination int `json:"destination" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - Source int `json:"source" legend:"plus"` - TraderEntityId int `json:"traderEntityId" legend:"base"` -} -type HistoricalEventModifiedBuilding struct { - Modification string `json:"modification" legend:"base"` - ModifierHfid int `json:"modifierHfid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventMusicalFormCreated struct { - Circumstance string `json:"circumstance" legend:"base"` - CircumstanceId int `json:"circumstanceId" legend:"base"` - FormId int `json:"formId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - Reason string `json:"reason" legend:"base"` - ReasonId int `json:"reasonId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventNewSiteLeader struct { - AttackerCivId int `json:"attackerCivId" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - NewLeaderHfid int `json:"newLeaderHfid" legend:"base"` - NewSiteCivId int `json:"newSiteCivId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventPerformance struct { - CivId int `json:"civId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - OccasionId int `json:"occasionId" legend:"base"` - ScheduleId int `json:"scheduleId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventPlunderedSite struct { - AttackerCivId int `json:"attackerCivId" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - Detected string `json:"detected" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventPoeticFormCreated struct { - Circumstance string `json:"circumstance" legend:"base"` - FormId int `json:"formId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventProcession struct { - CivId int `json:"civId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - OccasionId int `json:"occasionId" legend:"base"` - ScheduleId int `json:"scheduleId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventRazedStructure struct { - CivId int `json:"civId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` -} -type HistoricalEventReclaimSite struct { - CivId int `json:"civId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventRegionpopIncorporatedIntoEntity struct { - JoinEntityId int `json:"joinEntityId" legend:"base"` - PopFlid int `json:"popFlid" legend:"base"` - PopNumberMoved int `json:"popNumberMoved" legend:"base"` - PopRace int `json:"popRace" legend:"base"` - PopSrid int `json:"popSrid" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventRemoveHfEntityLink struct { - Civ int `json:"civ" legend:"plus"` - CivId int `json:"civId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - Histfig int `json:"histfig" legend:"plus"` - Link string `json:"link" legend:"base"` - LinkType string `json:"linkType" legend:"plus"` - Position string `json:"position" legend:"plus"` - PositionId int `json:"positionId" legend:"base"` -} -type HistoricalEventRemoveHfHfLink struct { - Hfid int `json:"hfid" legend:"base"` - HfidTarget int `json:"hfidTarget" legend:"base"` -} -type HistoricalEventRemoveHfSiteLink struct { - Civ int `json:"civ" legend:"plus"` - Histfig int `json:"histfig" legend:"plus"` - LinkType string `json:"linkType" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteId int `json:"siteId" legend:"base"` - Structure int `json:"structure" legend:"plus"` -} -type HistoricalEventReplacedBuilding struct { - Civ int `json:"civ" legend:"plus"` - NewStructure int `json:"newStructure" legend:"plus"` - OldStructure int `json:"oldStructure" legend:"plus"` - Site int `json:"site" legend:"plus"` - SiteCiv int `json:"siteCiv" legend:"plus"` -} -type HistoricalEventReplacedStructure struct { - CivId int `json:"civId" legend:"base"` - NewAbId int `json:"newAbId" legend:"base"` - OldAbId int `json:"oldAbId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventSiteDispute struct { - Dispute string `json:"dispute" legend:"base"` - EntityId1 int `json:"entityId1" legend:"base"` - EntityId2 int `json:"entityId2" legend:"base"` - SiteId1 int `json:"siteId1" legend:"base"` - SiteId2 int `json:"siteId2" legend:"base"` -} -type HistoricalEventSiteTakenOver struct { - AttackerCivId int `json:"attackerCivId" legend:"base"` - DefenderCivId int `json:"defenderCivId" legend:"base"` - NewSiteCivId int `json:"newSiteCivId" legend:"base"` - SiteCivId int `json:"siteCivId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventSquadVsSquad struct { - AHfid int `json:"aHfid" legend:"base"` - ASquadId int `json:"aSquadId" legend:"base"` - DEffect int `json:"dEffect" legend:"base"` - DInteraction int `json:"dInteraction" legend:"base"` - DNumber int `json:"dNumber" legend:"base"` - DRace int `json:"dRace" legend:"base"` - DSlain int `json:"dSlain" legend:"base"` - DSquadId int `json:"dSquadId" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - StructureId int `json:"structureId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventTacticalSituation struct { - ATacticianHfid int `json:"aTacticianHfid" legend:"base"` - ATacticsRoll int `json:"aTacticsRoll" legend:"base"` - DTacticianHfid int `json:"dTacticianHfid" legend:"base"` - DTacticsRoll int `json:"dTacticsRoll" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - Situation string `json:"situation" legend:"base"` - Start string `json:"start" legend:"base"` - StructureId int `json:"structureId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventTrade struct { - AccountShift int `json:"accountShift" legend:"base"` - Allotment int `json:"allotment" legend:"base"` - AllotmentIndex int `json:"allotmentIndex" legend:"base"` - DestSiteId int `json:"destSiteId" legend:"base"` - ProductionZoneId int `json:"productionZoneId" legend:"base"` - SourceSiteId int `json:"sourceSiteId" legend:"base"` - TraderEntityId int `json:"traderEntityId" legend:"base"` - TraderHfid int `json:"traderHfid" legend:"base"` -} -type HistoricalEventWarPeaceAccepted struct { - Destination int `json:"destination" legend:"plus"` - Site int `json:"site" legend:"plus"` - Source int `json:"source" legend:"plus"` - Topic string `json:"topic" legend:"plus"` -} -type HistoricalEventWarPeaceRejected struct { - Destination int `json:"destination" legend:"plus"` - Site int `json:"site" legend:"plus"` - Source int `json:"source" legend:"plus"` - Topic string `json:"topic" legend:"plus"` -} -type HistoricalEventWrittenContentComposed struct { - Circumstance string `json:"circumstance" legend:"base"` - CircumstanceId int `json:"circumstanceId" legend:"base"` - HistFigureId int `json:"histFigureId" legend:"base"` - Reason string `json:"reason" legend:"base"` - ReasonId int `json:"reasonId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - WcId int `json:"wcId" legend:"base"` -} -type HistoricalEventCollection struct { - EndSeconds72 int `json:"endSeconds72" legend:"base"` - EndYear int `json:"endYear" legend:"base"` - Event []int `json:"event" legend:"base"` - Eventcol []int `json:"eventcol" legend:"base"` - Id_ int `json:"id" legend:"base"` - StartSeconds72 int `json:"startSeconds72" legend:"base"` - StartYear int `json:"startYear" legend:"base"` - Type string `json:"type" legend:"base"` -} -type HistoricalEventCollectionAbduction struct { - AttackingEnid int `json:"attackingEnid" legend:"base"` - Coords string `json:"coords" legend:"base"` - DefendingEnid int `json:"defendingEnid" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` - ParentEventcol int `json:"parentEventcol" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventCollectionBattle struct { - ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` - ASupportMercHfid []int `json:"aSupportMercHfid" legend:"base"` - AttackingHfid []int `json:"attackingHfid" legend:"base"` - AttackingMercEnid int `json:"attackingMercEnid" legend:"base"` - AttackingSquadAnimated []string `json:"attackingSquadAnimated" legend:"base"` - AttackingSquadDeaths []int `json:"attackingSquadDeaths" legend:"base"` - AttackingSquadEntityPop []int `json:"attackingSquadEntityPop" legend:"base"` - AttackingSquadNumber []int `json:"attackingSquadNumber" legend:"base"` - AttackingSquadRace []string `json:"attackingSquadRace" legend:"base"` - AttackingSquadSite []int `json:"attackingSquadSite" legend:"base"` - CompanyMerc []string `json:"companyMerc" legend:"base"` - Coords string `json:"coords" legend:"base"` - DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` - DSupportMercHfid []int `json:"dSupportMercHfid" legend:"base"` - DefendingHfid []int `json:"defendingHfid" legend:"base"` - DefendingMercEnid int `json:"defendingMercEnid" legend:"base"` - DefendingSquadAnimated []string `json:"defendingSquadAnimated" legend:"base"` - DefendingSquadDeaths []int `json:"defendingSquadDeaths" legend:"base"` - DefendingSquadEntityPop []int `json:"defendingSquadEntityPop" legend:"base"` - DefendingSquadNumber []int `json:"defendingSquadNumber" legend:"base"` - DefendingSquadRace []string `json:"defendingSquadRace" legend:"base"` - DefendingSquadSite []int `json:"defendingSquadSite" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - IndividualMerc []string `json:"individualMerc" legend:"base"` - Name_ string `json:"name" legend:"base"` - NoncomHfid []int `json:"noncomHfid" legend:"base"` - Outcome string `json:"outcome" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` - WarEventcol int `json:"warEventcol" legend:"base"` -} -type HistoricalEventCollectionBeastAttack struct { - Coords string `json:"coords" legend:"base"` - DefendingEnid int `json:"defendingEnid" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` - ParentEventcol int `json:"parentEventcol" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventCollectionDuel struct { - AttackingHfid int `json:"attackingHfid" legend:"base"` - Coords string `json:"coords" legend:"base"` - DefendingHfid int `json:"defendingHfid" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` - ParentEventcol int `json:"parentEventcol" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventCollectionEntityOverthrown struct { - Ordinal int `json:"ordinal" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - TargetEntityId int `json:"targetEntityId" legend:"base"` -} -type HistoricalEventCollectionOccasion struct { - CivId int `json:"civId" legend:"base"` - OccasionId int `json:"occasionId" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` -} -type HistoricalEventCollectionPersecution struct { - Ordinal int `json:"ordinal" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - TargetEntityId int `json:"targetEntityId" legend:"base"` -} -type HistoricalEventCollectionPurge struct { - Adjective string `json:"adjective" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` - SiteId int `json:"siteId" legend:"base"` -} -type HistoricalEventCollectionSiteConquered struct { - AttackingEnid int `json:"attackingEnid" legend:"base"` - DefendingEnid int `json:"defendingEnid" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - WarEventcol int `json:"warEventcol" legend:"base"` -} -type HistoricalEventCollectionTheft struct { - AttackingEnid int `json:"attackingEnid" legend:"base"` - Coords string `json:"coords" legend:"base"` - DefendingEnid int `json:"defendingEnid" legend:"base"` - FeatureLayerId int `json:"featureLayerId" legend:"base"` - Ordinal int `json:"ordinal" legend:"base"` - ParentEventcol int `json:"parentEventcol" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubregionId int `json:"subregionId" legend:"base"` -} -type HistoricalEventCollectionWar struct { - AggressorEntId int `json:"aggressorEntId" legend:"base"` - DefenderEntId int `json:"defenderEntId" legend:"base"` - Name_ string `json:"name" legend:"base"` -} -type HistoricalEventRelationship struct { - Event int `json:"event" legend:"plus"` - Relationship string `json:"relationship" legend:"plus"` - SourceHf int `json:"sourceHf" legend:"plus"` - TargetHf int `json:"targetHf" legend:"plus"` - Year int `json:"year" legend:"plus"` -} -type HistoricalEventRelationshipSupplement struct { - Event int `json:"event" legend:"plus"` - OccasionType int `json:"occasionType" legend:"plus"` - Site int `json:"site" legend:"plus"` - Unk1 int `json:"unk1" legend:"plus"` -} -type HistoricalFigure struct { - ActiveInteraction []string `json:"activeInteraction" legend:"base"` - Animated string `json:"animated" legend:"base"` - AnimatedString string `json:"animatedString" legend:"base"` - Appeared int `json:"appeared" legend:"base"` - AssociatedType string `json:"associatedType" legend:"base"` - BirthSeconds72 int `json:"birthSeconds72" legend:"base"` - BirthYear int `json:"birthYear" legend:"base"` - Caste string `json:"caste" legend:"base"` - CurrentIdentityId int `json:"currentIdentityId" legend:"base"` - DeathSeconds72 int `json:"deathSeconds72" legend:"base"` - DeathYear int `json:"deathYear" legend:"base"` - Deity string `json:"deity" legend:"base"` - EntPopId int `json:"entPopId" legend:"base"` - EntityFormerPositionLink []EntityFormerPositionLink `json:"entityFormerPositionLink" legend:"base"` - EntityLink []EntityLink `json:"entityLink" legend:"base"` - EntityPositionLink []EntityPositionLink `json:"entityPositionLink" legend:"base"` - EntityReputation []EntityReputation `json:"entityReputation" legend:"base"` - EntitySquadLink EntitySquadLink `json:"entitySquadLink" legend:"base"` - Force string `json:"force" legend:"base"` - Goal []string `json:"goal" legend:"base"` - HfLink []HfLink `json:"hfLink" legend:"base"` - HfSkill []HfSkill `json:"hfSkill" legend:"base"` - HoldsArtifact []int `json:"holdsArtifact" legend:"base"` - HonorEntity []HonorEntity `json:"honorEntity" legend:"base"` - Id_ int `json:"id" legend:"both"` - InteractionKnowledge []string `json:"interactionKnowledge" legend:"base"` - IntrigueActor []IntrigueActor `json:"intrigueActor" legend:"base"` - IntriguePlot []IntriguePlot `json:"intriguePlot" legend:"base"` - JourneyPet []string `json:"journeyPet" legend:"base"` - Name_ string `json:"name" legend:"base"` - Race string `json:"race" legend:"both"` - RelationshipProfileHfHistorical []RelationshipProfileHfHistorical `json:"relationshipProfileHfHistorical" legend:"base"` - RelationshipProfileHfVisual []RelationshipProfileHfVisual `json:"relationshipProfileHfVisual" legend:"base"` - Sex int `json:"sex" legend:"plus"` - SiteLink []SiteLink `json:"siteLink" legend:"base"` - SiteProperty []SiteProperty `json:"siteProperty" legend:"base"` - Sphere []string `json:"sphere" legend:"base"` - UsedIdentityId []int `json:"usedIdentityId" legend:"base"` - VagueRelationship []VagueRelationship `json:"vagueRelationship" legend:"base"` -} -type Honor struct { - ExemptEpid int `json:"exemptEpid" legend:"base"` - ExemptFormerEpid int `json:"exemptFormerEpid" legend:"base"` - GivesPrecedence int `json:"givesPrecedence" legend:"base"` - GrantedToEverybody string `json:"grantedToEverybody" legend:"base"` - Id_ int `json:"id" legend:"base"` - Name_ string `json:"name" legend:"base"` - RequiredBattles int `json:"requiredBattles" legend:"base"` - RequiredKills int `json:"requiredKills" legend:"base"` - RequiredSkill string `json:"requiredSkill" legend:"base"` - RequiredSkillIpTotal int `json:"requiredSkillIpTotal" legend:"base"` - RequiredYears int `json:"requiredYears" legend:"base"` - RequiresAnyMeleeOrRangedSkill string `json:"requiresAnyMeleeOrRangedSkill" legend:"base"` -} -type HonorEntity struct { - Battles int `json:"battles" legend:"base"` - Entity int `json:"entity" legend:"base"` - HonorId []int `json:"honorId" legend:"base"` - Kills int `json:"kills" legend:"base"` -} -type Identity struct { - BirthSecond int `json:"birthSecond" legend:"plus"` - BirthYear int `json:"birthYear" legend:"plus"` - Caste string `json:"caste" legend:"plus"` - EntityId int `json:"entityId" legend:"plus"` - HistfigId int `json:"histfigId" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"plus"` - NemesisId int `json:"nemesisId" legend:"plus"` - Profession string `json:"profession" legend:"plus"` - Race string `json:"race" legend:"plus"` -} -type IntrigueActor struct { - EntityId int `json:"entityId" legend:"base"` - HandleActorId int `json:"handleActorId" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - LocalId int `json:"localId" legend:"base"` - PromisedActorImmortality string `json:"promisedActorImmortality" legend:"base"` - PromisedMeImmortality string `json:"promisedMeImmortality" legend:"base"` - Role string `json:"role" legend:"base"` - Strategy string `json:"strategy" legend:"base"` - StrategyEnid int `json:"strategyEnid" legend:"base"` - StrategyEppid int `json:"strategyEppid" legend:"base"` -} -type IntriguePlot struct { - ActorId int `json:"actorId" legend:"base"` - ArtifactId int `json:"artifactId" legend:"base"` - DelegatedPlotHfid int `json:"delegatedPlotHfid" legend:"base"` - DelegatedPlotId int `json:"delegatedPlotId" legend:"base"` - EntityId int `json:"entityId" legend:"base"` - LocalId int `json:"localId" legend:"base"` - OnHold string `json:"onHold" legend:"base"` - ParentPlotHfid int `json:"parentPlotHfid" legend:"base"` - ParentPlotId int `json:"parentPlotId" legend:"base"` - PlotActor []PlotActor `json:"plotActor" legend:"base"` - Type string `json:"type" legend:"base"` -} -type Item struct { - NameString string `json:"nameString" legend:"base"` - PageNumber int `json:"pageNumber" legend:"base"` - PageWrittenContentId int `json:"pageWrittenContentId" legend:"base"` - WritingWrittenContentId int `json:"writingWrittenContentId" legend:"base"` -} -type Landmass struct { - Coord1 string `json:"coord1" legend:"plus"` - Coord2 string `json:"coord2" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"plus"` -} -type MountainPeak struct { - Coords string `json:"coords" legend:"plus"` - Height int `json:"height" legend:"plus"` - Id_ int `json:"id" legend:"plus"` - IsVolcano string `json:"isVolcano" legend:"plus"` - Name_ string `json:"name" legend:"plus"` -} -type MusicalForm struct { - Description string `json:"description" legend:"base"` - Id_ int `json:"id" legend:"both"` - Name_ string `json:"name" legend:"plus"` -} -type Occasion struct { - Event int `json:"event" legend:""` - Id_ int `json:"id" legend:""` - Name_ int `json:"name" legend:""` - Schedule Schedule `json:"schedule" legend:""` -} -type PlotActor struct { - ActorId int `json:"actorId" legend:"base"` - AgreementHasMessenger string `json:"agreementHasMessenger" legend:"base"` - AgreementId int `json:"agreementId" legend:"base"` - PlotRole string `json:"plotRole" legend:"base"` -} -type PoeticForm struct { - Description string `json:"description" legend:"base"` - Id_ int `json:"id" legend:"both"` - Name_ string `json:"name" legend:"plus"` -} -type Reference struct { - Id_ int `json:"id" legend:"plus"` - Type string `json:"type" legend:"plus"` -} -type Region struct { - Coords string `json:"coords" legend:"plus"` - Evilness string `json:"evilness" legend:"plus"` - ForceId int `json:"forceId" legend:"plus"` - Id_ int `json:"id" legend:"both"` - Name_ string `json:"name" legend:"base"` - Type string `json:"type" legend:"base"` -} -type RelationshipProfileHfHistorical struct { - Fear int `json:"fear" legend:"base"` - HfId int `json:"hfId" legend:"base"` - Love int `json:"love" legend:"base"` - Loyalty int `json:"loyalty" legend:"base"` - Respect int `json:"respect" legend:"base"` - Trust int `json:"trust" legend:"base"` -} -type RelationshipProfileHfVisual struct { - Fear int `json:"fear" legend:"base"` - HfId int `json:"hfId" legend:"base"` - KnownIdentityId int `json:"knownIdentityId" legend:"base"` - LastMeetSeconds72 int `json:"lastMeetSeconds72" legend:"base"` - LastMeetYear int `json:"lastMeetYear" legend:"base"` - Love int `json:"love" legend:"base"` - Loyalty int `json:"loyalty" legend:"base"` - MeetCount int `json:"meetCount" legend:"base"` - RepFriendly int `json:"repFriendly" legend:"base"` - RepInformationSource int `json:"repInformationSource" legend:"base"` - Respect int `json:"respect" legend:"base"` - Trust int `json:"trust" legend:"base"` -} -type River struct { - EndPos string `json:"endPos" legend:"plus"` - Name_ string `json:"name" legend:"plus"` - Path string `json:"path" legend:"plus"` -} -type Schedule struct { - Feature Feature `json:"feature" legend:""` - Id_ int `json:"id" legend:""` - ItemSubtype int `json:"itemSubtype" legend:""` - ItemType int `json:"itemType" legend:""` - Reference int `json:"reference" legend:""` - Reference2 int `json:"reference2" legend:""` - Type int `json:"type" legend:""` -} -type Site struct { - CivId int `json:"civId" legend:"plus"` - Coords int `json:"coords" legend:""` - CurOwnerId int `json:"curOwnerId" legend:"plus"` - Id_ int `json:"id" legend:"both"` - Name_ int `json:"name" legend:""` - Rectangle int `json:"rectangle" legend:""` - SiteProperties map[int]*SiteProperty `json:"siteProperties" legend:""` - Structures map[int]*Structure `json:"structures" legend:"plus"` - Type string `json:"type" legend:"base"` -} -type SiteLink struct { - EntityId int `json:"entityId" legend:"base"` - LinkType string `json:"linkType" legend:"base"` - OccupationId int `json:"occupationId" legend:"base"` - SiteId int `json:"siteId" legend:"base"` - SubId int `json:"subId" legend:"base"` -} -type SiteProperty struct { - Id_ int `json:"id" legend:""` - OwnerHfid int `json:"ownerHfid" legend:""` - StructureId int `json:"structureId" legend:""` - Type int `json:"type" legend:""` -} -type Structure struct { - CopiedArtifactId int `json:"copiedArtifactId" legend:""` - Deity int `json:"deity" legend:""` - DeityType int `json:"deityType" legend:""` - DungeonType int `json:"dungeonType" legend:""` - EntityId int `json:"entityId" legend:""` - Id_ int `json:"id" legend:"plus"` - Inhabitant int `json:"inhabitant" legend:""` - LocalId int `json:"localId" legend:""` - Name_ int `json:"name" legend:""` - Name2 int `json:"name2" legend:""` - Religion int `json:"religion" legend:""` - Subtype int `json:"subtype" legend:""` - Type string `json:"type" legend:"plus"` - WorshipHfid int `json:"worshipHfid" legend:""` -} -type UndergroundRegion struct { - Coords string `json:"coords" legend:"plus"` - Depth int `json:"depth" legend:""` - Id_ int `json:"id" legend:"both"` - Type string `json:"type" legend:"base"` -} -type VagueRelationship struct { - ArtisticBuddy string `json:"artisticBuddy" legend:"base"` - AtheleticRival string `json:"atheleticRival" legend:"base"` - AthleteBuddy string `json:"athleteBuddy" legend:"base"` - BusinessRival string `json:"businessRival" legend:"base"` - ChildhoodFriend string `json:"childhoodFriend" legend:"base"` - Grudge string `json:"grudge" legend:"base"` - Hfid int `json:"hfid" legend:"base"` - JealousObsession string `json:"jealousObsession" legend:"base"` - JealousRelationshipGrudge string `json:"jealousRelationshipGrudge" legend:"base"` - PersecutionGrudge string `json:"persecutionGrudge" legend:"base"` - ReligiousPersecutionGrudge string `json:"religiousPersecutionGrudge" legend:"base"` - ScholarBuddy string `json:"scholarBuddy" legend:"base"` - SupernaturalGrudge string `json:"supernaturalGrudge" legend:"base"` - WarBuddy string `json:"warBuddy" legend:"base"` -} -type WorldConstruction struct { - Coords int `json:"coords" legend:""` - Id_ int `json:"id" legend:"plus"` - Name_ string `json:"name" legend:"plus"` - Type string `json:"type" legend:"plus"` -} -type WrittenContent struct { - Author int `json:"author" legend:""` - AuthorHfid int `json:"authorHfid" legend:"base"` - AuthorRoll int `json:"authorRoll" legend:"base"` - Form string `json:"form" legend:"base"` - FormId int `json:"formId" legend:"base"` - Id_ int `json:"id" legend:"both"` - PageEnd int `json:"pageEnd" legend:"plus"` - PageStart int `json:"pageStart" legend:"plus"` - Reference []Reference `json:"reference" legend:"plus"` - Style []string `json:"style" legend:"base"` - Title string `json:"title" legend:"both"` - Type string `json:"type" legend:"plus"` -} - -// Parser - -func n(d []byte) int { - v, _ := strconv.Atoi(string(d)) - return v -} -func (obj *Artifact) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "abs_tile_x": - data = nil - case "abs_tile_y": - data = nil - case "abs_tile_z": - data = nil - case "holder_hfid": - data = nil - case "id": - data = nil - case "item": - v := Item{} -v.Parse(d, &t) -obj.Item = v - case "item_description": - data = nil - case "item_subtype": - data = nil - case "item_type": - data = nil - case "mat": - data = nil - case "name": - data = nil - case "page_count": - data = nil - case "site_id": - data = nil - case "structure_local_id": - data = nil - case "subregion_id": - data = nil - case "writing": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "abs_tile_x": - obj.AbsTileX = n(data) - case "abs_tile_y": - obj.AbsTileY = n(data) - case "abs_tile_z": - obj.AbsTileZ = n(data) - case "holder_hfid": - obj.HolderHfid = n(data) - case "id": - obj.Id_ = n(data) - case "item": - - case "item_description": - obj.ItemDescription = string(data) - case "item_subtype": - obj.ItemSubtype = string(data) - case "item_type": - obj.ItemType = string(data) - case "mat": - obj.Mat = string(data) - case "name": - obj.Name_ = string(data) - case "page_count": - obj.PageCount = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_local_id": - obj.StructureLocalId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "writing": - obj.Writing = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Circumstance) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "defeated": - data = nil - case "hist_event_collection": - data = nil - case "murdered": - data = nil - case "type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "defeated": - obj.Defeated = n(data) - case "hist_event_collection": - obj.HistEventCollection = n(data) - case "murdered": - obj.Murdered = n(data) - case "type": - obj.Type = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Creature) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "all_castes_alive": - data = nil - case "artificial_hiveable": - data = nil - case "biome_desert_badland": - data = nil - case "biome_desert_rock": - data = nil - case "biome_desert_sand": - data = nil - case "biome_forest_taiga": - data = nil - case "biome_forest_temperate_broadleaf": - data = nil - case "biome_forest_temperate_conifer": - data = nil - case "biome_forest_tropical_conifer": - data = nil - case "biome_forest_tropical_dry_broadleaf": - data = nil - case "biome_forest_tropical_moist_broadleaf": - data = nil - case "biome_glacier": - data = nil - case "biome_grassland_temperate": - data = nil - case "biome_grassland_tropical": - data = nil - case "biome_lake_temperate_brackishwater": - data = nil - case "biome_lake_temperate_freshwater": - data = nil - case "biome_lake_temperate_saltwater": - data = nil - case "biome_lake_tropical_brackishwater": - data = nil - case "biome_lake_tropical_freshwater": - data = nil - case "biome_lake_tropical_saltwater": - data = nil - case "biome_marsh_temperate_freshwater": - data = nil - case "biome_marsh_temperate_saltwater": - data = nil - case "biome_marsh_tropical_freshwater": - data = nil - case "biome_marsh_tropical_saltwater": - data = nil - case "biome_mountain": - data = nil - case "biome_ocean_arctic": - data = nil - case "biome_ocean_temperate": - data = nil - case "biome_ocean_tropical": - data = nil - case "biome_pool_temperate_brackishwater": - data = nil - case "biome_pool_temperate_freshwater": - data = nil - case "biome_pool_temperate_saltwater": - data = nil - case "biome_pool_tropical_brackishwater": - data = nil - case "biome_pool_tropical_freshwater": - data = nil - case "biome_pool_tropical_saltwater": - data = nil - case "biome_river_temperate_brackishwater": - data = nil - case "biome_river_temperate_freshwater": - data = nil - case "biome_river_temperate_saltwater": - data = nil - case "biome_river_tropical_brackishwater": - data = nil - case "biome_river_tropical_freshwater": - data = nil - case "biome_river_tropical_saltwater": - data = nil - case "biome_savanna_temperate": - data = nil - case "biome_savanna_tropical": - data = nil - case "biome_shrubland_temperate": - data = nil - case "biome_shrubland_tropical": - data = nil - case "biome_subterranean_chasm": - data = nil - case "biome_subterranean_lava": - data = nil - case "biome_subterranean_water": - data = nil - case "biome_swamp_mangrove": - data = nil - case "biome_swamp_temperate_freshwater": - data = nil - case "biome_swamp_temperate_saltwater": - data = nil - case "biome_swamp_tropical_freshwater": - data = nil - case "biome_swamp_tropical_saltwater": - data = nil - case "biome_tundra": - data = nil - case "creature_id": - data = nil - case "does_not_exist": - data = nil - case "equipment": - data = nil - case "equipment_wagon": - data = nil - case "evil": - data = nil - case "fanciful": - data = nil - case "generated": - data = nil - case "good": - data = nil - case "has_any_benign": - data = nil - case "has_any_can_swim": - data = nil - case "has_any_cannot_breathe_air": - data = nil - case "has_any_cannot_breathe_water": - data = nil - case "has_any_carnivore": - data = nil - case "has_any_common_domestic": - data = nil - case "has_any_curious_beast": - data = nil - case "has_any_demon": - data = nil - case "has_any_feature_beast": - data = nil - case "has_any_flier": - data = nil - case "has_any_fly_race_gait": - data = nil - case "has_any_grasp": - data = nil - case "has_any_grazer": - data = nil - case "has_any_has_blood": - data = nil - case "has_any_immobile": - data = nil - case "has_any_intelligent_learns": - data = nil - case "has_any_intelligent_speaks": - data = nil - case "has_any_large_predator": - data = nil - case "has_any_local_pops_controllable": - data = nil - case "has_any_local_pops_produce_heroes": - data = nil - case "has_any_megabeast": - data = nil - case "has_any_mischievous": - data = nil - case "has_any_natural_animal": - data = nil - case "has_any_night_creature": - data = nil - case "has_any_night_creature_bogeyman": - data = nil - case "has_any_night_creature_hunter": - data = nil - case "has_any_night_creature_nightmare": - data = nil - case "has_any_not_fireimmune": - data = nil - case "has_any_not_living": - data = nil - case "has_any_outsider_controllable": - data = nil - case "has_any_race_gait": - data = nil - case "has_any_semimegabeast": - data = nil - case "has_any_slow_learner": - data = nil - case "has_any_supernatural": - data = nil - case "has_any_titan": - data = nil - case "has_any_unique_demon": - data = nil - case "has_any_utterances": - data = nil - case "has_any_vermin_hateable": - data = nil - case "has_any_vermin_micro": - data = nil - case "has_female": - data = nil - case "has_male": - data = nil - case "large_roaming": - data = nil - case "loose_clusters": - data = nil - case "mates_to_breed": - data = nil - case "mundane": - data = nil - case "name_plural": - data = nil - case "name_singular": - data = nil - case "occurs_as_entity_race": - data = nil - case "savage": - data = nil - case "small_race": - data = nil - case "two_genders": - data = nil - case "ubiquitous": - data = nil - case "vermin_eater": - data = nil - case "vermin_fish": - data = nil - case "vermin_grounder": - data = nil - case "vermin_rotter": - data = nil - case "vermin_soil": - data = nil - case "vermin_soil_colony": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "all_castes_alive": - obj.AllCastesAlive = string(data) - case "artificial_hiveable": - obj.ArtificialHiveable = string(data) - case "biome_desert_badland": - obj.BiomeDesertBadland = string(data) - case "biome_desert_rock": - obj.BiomeDesertRock = string(data) - case "biome_desert_sand": - obj.BiomeDesertSand = string(data) - case "biome_forest_taiga": - obj.BiomeForestTaiga = string(data) - case "biome_forest_temperate_broadleaf": - obj.BiomeForestTemperateBroadleaf = string(data) - case "biome_forest_temperate_conifer": - obj.BiomeForestTemperateConifer = string(data) - case "biome_forest_tropical_conifer": - obj.BiomeForestTropicalConifer = string(data) - case "biome_forest_tropical_dry_broadleaf": - obj.BiomeForestTropicalDryBroadleaf = string(data) - case "biome_forest_tropical_moist_broadleaf": - obj.BiomeForestTropicalMoistBroadleaf = string(data) - case "biome_glacier": - obj.BiomeGlacier = string(data) - case "biome_grassland_temperate": - obj.BiomeGrasslandTemperate = string(data) - case "biome_grassland_tropical": - obj.BiomeGrasslandTropical = string(data) - case "biome_lake_temperate_brackishwater": - obj.BiomeLakeTemperateBrackishwater = string(data) - case "biome_lake_temperate_freshwater": - obj.BiomeLakeTemperateFreshwater = string(data) - case "biome_lake_temperate_saltwater": - obj.BiomeLakeTemperateSaltwater = string(data) - case "biome_lake_tropical_brackishwater": - obj.BiomeLakeTropicalBrackishwater = string(data) - case "biome_lake_tropical_freshwater": - obj.BiomeLakeTropicalFreshwater = string(data) - case "biome_lake_tropical_saltwater": - obj.BiomeLakeTropicalSaltwater = string(data) - case "biome_marsh_temperate_freshwater": - obj.BiomeMarshTemperateFreshwater = string(data) - case "biome_marsh_temperate_saltwater": - obj.BiomeMarshTemperateSaltwater = string(data) - case "biome_marsh_tropical_freshwater": - obj.BiomeMarshTropicalFreshwater = string(data) - case "biome_marsh_tropical_saltwater": - obj.BiomeMarshTropicalSaltwater = string(data) - case "biome_mountain": - obj.BiomeMountain = string(data) - case "biome_ocean_arctic": - obj.BiomeOceanArctic = string(data) - case "biome_ocean_temperate": - obj.BiomeOceanTemperate = string(data) - case "biome_ocean_tropical": - obj.BiomeOceanTropical = string(data) - case "biome_pool_temperate_brackishwater": - obj.BiomePoolTemperateBrackishwater = string(data) - case "biome_pool_temperate_freshwater": - obj.BiomePoolTemperateFreshwater = string(data) - case "biome_pool_temperate_saltwater": - obj.BiomePoolTemperateSaltwater = string(data) - case "biome_pool_tropical_brackishwater": - obj.BiomePoolTropicalBrackishwater = string(data) - case "biome_pool_tropical_freshwater": - obj.BiomePoolTropicalFreshwater = string(data) - case "biome_pool_tropical_saltwater": - obj.BiomePoolTropicalSaltwater = string(data) - case "biome_river_temperate_brackishwater": - obj.BiomeRiverTemperateBrackishwater = string(data) - case "biome_river_temperate_freshwater": - obj.BiomeRiverTemperateFreshwater = string(data) - case "biome_river_temperate_saltwater": - obj.BiomeRiverTemperateSaltwater = string(data) - case "biome_river_tropical_brackishwater": - obj.BiomeRiverTropicalBrackishwater = string(data) - case "biome_river_tropical_freshwater": - obj.BiomeRiverTropicalFreshwater = string(data) - case "biome_river_tropical_saltwater": - obj.BiomeRiverTropicalSaltwater = string(data) - case "biome_savanna_temperate": - obj.BiomeSavannaTemperate = string(data) - case "biome_savanna_tropical": - obj.BiomeSavannaTropical = string(data) - case "biome_shrubland_temperate": - obj.BiomeShrublandTemperate = string(data) - case "biome_shrubland_tropical": - obj.BiomeShrublandTropical = string(data) - case "biome_subterranean_chasm": - obj.BiomeSubterraneanChasm = string(data) - case "biome_subterranean_lava": - obj.BiomeSubterraneanLava = string(data) - case "biome_subterranean_water": - obj.BiomeSubterraneanWater = string(data) - case "biome_swamp_mangrove": - obj.BiomeSwampMangrove = string(data) - case "biome_swamp_temperate_freshwater": - obj.BiomeSwampTemperateFreshwater = string(data) - case "biome_swamp_temperate_saltwater": - obj.BiomeSwampTemperateSaltwater = string(data) - case "biome_swamp_tropical_freshwater": - obj.BiomeSwampTropicalFreshwater = string(data) - case "biome_swamp_tropical_saltwater": - obj.BiomeSwampTropicalSaltwater = string(data) - case "biome_tundra": - obj.BiomeTundra = string(data) - case "creature_id": - obj.CreatureId = string(data) - case "does_not_exist": - obj.DoesNotExist = string(data) - case "equipment": - obj.Equipment = string(data) - case "equipment_wagon": - obj.EquipmentWagon = string(data) - case "evil": - obj.Evil = string(data) - case "fanciful": - obj.Fanciful = string(data) - case "generated": - obj.Generated = string(data) - case "good": - obj.Good = string(data) - case "has_any_benign": - obj.HasAnyBenign = string(data) - case "has_any_can_swim": - obj.HasAnyCanSwim = string(data) - case "has_any_cannot_breathe_air": - obj.HasAnyCannotBreatheAir = string(data) - case "has_any_cannot_breathe_water": - obj.HasAnyCannotBreatheWater = string(data) - case "has_any_carnivore": - obj.HasAnyCarnivore = string(data) - case "has_any_common_domestic": - obj.HasAnyCommonDomestic = string(data) - case "has_any_curious_beast": - obj.HasAnyCuriousBeast = string(data) - case "has_any_demon": - obj.HasAnyDemon = string(data) - case "has_any_feature_beast": - obj.HasAnyFeatureBeast = string(data) - case "has_any_flier": - obj.HasAnyFlier = string(data) - case "has_any_fly_race_gait": - obj.HasAnyFlyRaceGait = string(data) - case "has_any_grasp": - obj.HasAnyGrasp = string(data) - case "has_any_grazer": - obj.HasAnyGrazer = string(data) - case "has_any_has_blood": - obj.HasAnyHasBlood = string(data) - case "has_any_immobile": - obj.HasAnyImmobile = string(data) - case "has_any_intelligent_learns": - obj.HasAnyIntelligentLearns = string(data) - case "has_any_intelligent_speaks": - obj.HasAnyIntelligentSpeaks = string(data) - case "has_any_large_predator": - obj.HasAnyLargePredator = string(data) - case "has_any_local_pops_controllable": - obj.HasAnyLocalPopsControllable = string(data) - case "has_any_local_pops_produce_heroes": - obj.HasAnyLocalPopsProduceHeroes = string(data) - case "has_any_megabeast": - obj.HasAnyMegabeast = string(data) - case "has_any_mischievous": - obj.HasAnyMischievous = string(data) - case "has_any_natural_animal": - obj.HasAnyNaturalAnimal = string(data) - case "has_any_night_creature": - obj.HasAnyNightCreature = string(data) - case "has_any_night_creature_bogeyman": - obj.HasAnyNightCreatureBogeyman = string(data) - case "has_any_night_creature_hunter": - obj.HasAnyNightCreatureHunter = string(data) - case "has_any_night_creature_nightmare": - obj.HasAnyNightCreatureNightmare = string(data) - case "has_any_not_fireimmune": - obj.HasAnyNotFireimmune = string(data) - case "has_any_not_living": - obj.HasAnyNotLiving = string(data) - case "has_any_outsider_controllable": - obj.HasAnyOutsiderControllable = string(data) - case "has_any_race_gait": - obj.HasAnyRaceGait = string(data) - case "has_any_semimegabeast": - obj.HasAnySemimegabeast = string(data) - case "has_any_slow_learner": - obj.HasAnySlowLearner = string(data) - case "has_any_supernatural": - obj.HasAnySupernatural = string(data) - case "has_any_titan": - obj.HasAnyTitan = string(data) - case "has_any_unique_demon": - obj.HasAnyUniqueDemon = string(data) - case "has_any_utterances": - obj.HasAnyUtterances = string(data) - case "has_any_vermin_hateable": - obj.HasAnyVerminHateable = string(data) - case "has_any_vermin_micro": - obj.HasAnyVerminMicro = string(data) - case "has_female": - obj.HasFemale = string(data) - case "has_male": - obj.HasMale = string(data) - case "large_roaming": - obj.LargeRoaming = string(data) - case "loose_clusters": - obj.LooseClusters = string(data) - case "mates_to_breed": - obj.MatesToBreed = string(data) - case "mundane": - obj.Mundane = string(data) - case "name_plural": - obj.NamePlural = string(data) - case "name_singular": - obj.NameSingular = string(data) - case "occurs_as_entity_race": - obj.OccursAsEntityRace = string(data) - case "savage": - obj.Savage = string(data) - case "small_race": - obj.SmallRace = string(data) - case "two_genders": - obj.TwoGenders = string(data) - case "ubiquitous": - obj.Ubiquitous = string(data) - case "vermin_eater": - obj.VerminEater = string(data) - case "vermin_fish": - obj.VerminFish = string(data) - case "vermin_grounder": - obj.VerminGrounder = string(data) - case "vermin_rotter": - obj.VerminRotter = string(data) - case "vermin_soil": - obj.VerminSoil = string(data) - case "vermin_soil_colony": - obj.VerminSoilColony = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *DanceForm) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "description": - data = nil - case "id": - data = nil - case "name": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "description": - obj.Description = string(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *DfWorld) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "altname": - data = nil - case "artifacts": - - case "creature_raw": - - case "dance_forms": - - case "entities": - - case "entity_populations": - - case "historical_eras": - - case "historical_event_collections": - - case "historical_event_relationship_supplements": - - case "historical_event_relationships": - - case "historical_events": - - case "historical_figures": - - case "identities": - - case "landmasses": - - case "mountain_peaks": - - case "musical_forms": - - case "name": - data = nil - case "poetic_forms": - - case "regions": - - case "rivers": - - case "sites": - - case "underground_regions": - - case "world_constructions": - - case "written_contents": - - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "altname": - obj.Altname = string(data) - case "artifacts": - - case "creature_raw": - - case "dance_forms": - - case "entities": - - case "entity_populations": - - case "historical_eras": - - case "historical_event_collections": - - case "historical_event_relationship_supplements": - - case "historical_event_relationships": - - case "historical_events": - - case "historical_figures": - - case "identities": - - case "landmasses": - - case "mountain_peaks": - - case "musical_forms": - - case "name": - obj.Name_ = string(data) - case "poetic_forms": - - case "regions": - - case "rivers": - - case "sites": - - case "underground_regions": - - case "world_constructions": - - case "written_contents": - - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Entity) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "child": - data = nil - case "claims": - data = nil - case "entity_link": - v := EntityLink{} -v.Parse(d, &t) -obj.EntityLink = v - case "entity_position": - v := EntityPosition{} -v.Parse(d, &t) -obj.EntityPosition = v - case "entity_position_assignment": - v := EntityPositionAssignment{} -v.Parse(d, &t) -obj.EntityPositionAssignment = v - case "histfig_id": - data = nil - case "honor": - v := Honor{} -v.Parse(d, &t) -obj.Honor = append(obj.Honor, v) - case "id": - data = nil - case "name": - data = nil - case "occasion": - v := Occasion{} -v.Parse(d, &t) -obj.Occasion = v - case "profession": - data = nil - case "race": - data = nil - case "type": - data = nil - case "weapon": - data = nil - case "worship_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "child": - obj.Child = n(data) - case "claims": - obj.Claims = n(data) - case "entity_link": - - case "entity_position": - - case "entity_position_assignment": - - case "histfig_id": - obj.HistfigId = n(data) - case "honor": - - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "occasion": - - case "profession": - obj.Profession = n(data) - case "race": - obj.Race = string(data) - case "type": - obj.Type = string(data) - case "weapon": - obj.Weapon = n(data) - case "worship_id": - obj.WorshipId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *EntityFormerPositionLink) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "end_year": - data = nil - case "entity_id": - data = nil - case "position_profile_id": - data = nil - case "start_year": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "end_year": - obj.EndYear = n(data) - case "entity_id": - obj.EntityId = n(data) - case "position_profile_id": - obj.PositionProfileId = n(data) - case "start_year": - obj.StartYear = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *EntityLink) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "link_strength": - data = nil - case "link_type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "link_strength": - obj.LinkStrength = n(data) - case "link_type": - obj.LinkType = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *EntityPopulation) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "id": - data = nil - case "race": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "id": - obj.Id_ = n(data) - case "race": - obj.Race = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *EntityPosition) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "id": - data = nil - case "name": - data = nil - case "name_female": - data = nil - case "name_male": - data = nil - case "spouse": - data = nil - case "spouse_female": - data = nil - case "spouse_male": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = n(data) - case "name_female": - obj.NameFemale = n(data) - case "name_male": - obj.NameMale = n(data) - case "spouse": - obj.Spouse = n(data) - case "spouse_female": - obj.SpouseFemale = n(data) - case "spouse_male": - obj.SpouseMale = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *EntityPositionAssignment) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "histfig": - data = nil - case "id": - data = nil - case "position_id": - data = nil - case "squad_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "histfig": - obj.Histfig = n(data) - case "id": - obj.Id_ = n(data) - case "position_id": - obj.PositionId = n(data) - case "squad_id": - obj.SquadId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *EntityPositionLink) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "position_profile_id": - data = nil - case "start_year": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "position_profile_id": - obj.PositionProfileId = n(data) - case "start_year": - obj.StartYear = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *EntityReputation) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "first_ageless_season_count": - data = nil - case "first_ageless_year": - data = nil - case "unsolved_murders": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "first_ageless_season_count": - obj.FirstAgelessSeasonCount = n(data) - case "first_ageless_year": - obj.FirstAgelessYear = n(data) - case "unsolved_murders": - obj.UnsolvedMurders = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *EntitySquadLink) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "squad_id": - data = nil - case "squad_position": - data = nil - case "start_year": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "squad_id": - obj.SquadId = n(data) - case "squad_position": - obj.SquadPosition = n(data) - case "start_year": - obj.StartYear = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Feature) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "reference": - data = nil - case "type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "reference": - obj.Reference = n(data) - case "type": - obj.Type = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HfLink) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hfid": - data = nil - case "link_strength": - data = nil - case "link_type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "hfid": - obj.Hfid = n(data) - case "link_strength": - obj.LinkStrength = n(data) - case "link_type": - obj.LinkType = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HfSkill) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "skill": - data = nil - case "total_ip": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "skill": - obj.Skill = string(data) - case "total_ip": - obj.TotalIp = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEra) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "name": - data = nil - case "start_year": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "name": - obj.Name_ = string(data) - case "start_year": - obj.StartYear = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEvent) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "id": - data = nil - case "seconds72": - data = nil - case "type": - data = nil - case "year": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "id": - obj.Id_ = n(data) - case "seconds72": - obj.Seconds72 = n(data) - case "type": - obj.Type = string(data) - case "year": - obj.Year = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventAddHfEntityHonor) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "hfid": - data = nil - case "honor_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "hfid": - obj.Hfid = n(data) - case "honor_id": - obj.HonorId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventAddHfEntityLink) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "appointer_hfid": - data = nil - case "civ": - data = nil - case "civ_id": - data = nil - case "hfid": - data = nil - case "histfig": - data = nil - case "link": - data = nil - case "link_type": - data = nil - case "position": - data = nil - case "position_id": - data = nil - case "promise_to_hfid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "appointer_hfid": - obj.AppointerHfid = n(data) - case "civ": - obj.Civ = n(data) - case "civ_id": - obj.CivId = n(data) - case "hfid": - obj.Hfid = n(data) - case "histfig": - obj.Histfig = n(data) - case "link": - obj.Link = string(data) - case "link_type": - obj.LinkType = string(data) - case "position": - obj.Position = string(data) - case "position_id": - obj.PositionId = n(data) - case "promise_to_hfid": - obj.PromiseToHfid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventAddHfHfLink) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hf": - data = nil - case "hf_target": - data = nil - case "hfid": - data = nil - case "hfid_target": - data = nil - case "link_type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "hf": - obj.Hf = n(data) - case "hf_target": - obj.HfTarget = n(data) - case "hfid": - obj.Hfid = n(data) - case "hfid_target": - obj.HfidTarget = n(data) - case "link_type": - obj.LinkType = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventAddHfSiteLink) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ": - data = nil - case "histfig": - data = nil - case "link_type": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "structure": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ": - obj.Civ = n(data) - case "histfig": - obj.Histfig = n(data) - case "link_type": - obj.LinkType = string(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure": - obj.Structure = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventAgreementFormed) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "action": - data = nil - case "agreement_id": - data = nil - case "ally_defense_bonus": - data = nil - case "coconspirator_bonus": - data = nil - case "delegated": - data = nil - case "failed_judgment_test": - data = nil - case "method": - data = nil - case "relevant_entity_id": - data = nil - case "relevant_id_for_method": - data = nil - case "relevant_position_profile_id": - data = nil - case "successful": - data = nil - case "top_facet": - data = nil - case "top_facet_modifier": - data = nil - case "top_facet_rating": - data = nil - case "top_relationship_factor": - data = nil - case "top_relationship_modifier": - data = nil - case "top_relationship_rating": - data = nil - case "top_value": - data = nil - case "top_value_modifier": - data = nil - case "top_value_rating": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "action": - obj.Action = string(data) - case "agreement_id": - obj.AgreementId = n(data) - case "ally_defense_bonus": - obj.AllyDefenseBonus = n(data) - case "coconspirator_bonus": - obj.CoconspiratorBonus = n(data) - case "delegated": - obj.Delegated = string(data) - case "failed_judgment_test": - obj.FailedJudgmentTest = string(data) - case "method": - obj.Method = string(data) - case "relevant_entity_id": - obj.RelevantEntityId = n(data) - case "relevant_id_for_method": - obj.RelevantIdForMethod = n(data) - case "relevant_position_profile_id": - obj.RelevantPositionProfileId = n(data) - case "successful": - obj.Successful = string(data) - case "top_facet": - obj.TopFacet = string(data) - case "top_facet_modifier": - obj.TopFacetModifier = n(data) - case "top_facet_rating": - obj.TopFacetRating = n(data) - case "top_relationship_factor": - obj.TopRelationshipFactor = string(data) - case "top_relationship_modifier": - obj.TopRelationshipModifier = n(data) - case "top_relationship_rating": - obj.TopRelationshipRating = n(data) - case "top_value": - obj.TopValue = string(data) - case "top_value_modifier": - obj.TopValueModifier = n(data) - case "top_value_rating": - obj.TopValueRating = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventArtifactClaimFormed) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "circumstance": - data = nil - case "claim": - data = nil - case "entity_id": - data = nil - case "hist_figure_id": - data = nil - case "position_profile_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "circumstance": - obj.Circumstance = string(data) - case "claim": - obj.Claim = string(data) - case "entity_id": - obj.EntityId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "position_profile_id": - obj.PositionProfileId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventArtifactCopied) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "dest_entity_id": - data = nil - case "dest_site_id": - data = nil - case "dest_structure_id": - data = nil - case "from_original": - data = nil - case "source_entity_id": - data = nil - case "source_site_id": - data = nil - case "source_structure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "dest_entity_id": - obj.DestEntityId = n(data) - case "dest_site_id": - obj.DestSiteId = n(data) - case "dest_structure_id": - obj.DestStructureId = n(data) - case "from_original": - obj.FromOriginal = string(data) - case "source_entity_id": - obj.SourceEntityId = n(data) - case "source_site_id": - obj.SourceSiteId = n(data) - case "source_structure_id": - obj.SourceStructureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventArtifactCreated) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "circumstance": - v := Circumstance{} -v.Parse(d, &t) -obj.Circumstance = v - case "creator_hfid": - data = nil - case "creator_unit_id": - data = nil - case "hist_figure_id": - data = nil - case "name_only": - data = nil - case "reason": - data = nil - case "sanctify_hf": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "unit_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "circumstance": - - case "creator_hfid": - obj.CreatorHfid = n(data) - case "creator_unit_id": - obj.CreatorUnitId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "name_only": - obj.NameOnly = string(data) - case "reason": - obj.Reason = string(data) - case "sanctify_hf": - obj.SanctifyHf = n(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "unit_id": - obj.UnitId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventArtifactDestroyed) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "destroyer_enid": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "destroyer_enid": - obj.DestroyerEnid = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventArtifactFound) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "hist_figure_id": - data = nil - case "site_id": - data = nil - case "unit_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "site_id": - obj.SiteId = n(data) - case "unit_id": - obj.UnitId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventArtifactGiven) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "giver_entity_id": - data = nil - case "giver_hist_figure_id": - data = nil - case "receiver_entity_id": - data = nil - case "receiver_hist_figure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "giver_entity_id": - obj.GiverEntityId = n(data) - case "giver_hist_figure_id": - obj.GiverHistFigureId = n(data) - case "receiver_entity_id": - obj.ReceiverEntityId = n(data) - case "receiver_hist_figure_id": - obj.ReceiverHistFigureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventArtifactLost) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "site_id": - data = nil - case "site_property_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "site_id": - obj.SiteId = n(data) - case "site_property_id": - obj.SitePropertyId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventArtifactPossessed) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "circumstance": - data = nil - case "circumstance_id": - data = nil - case "feature_layer_id": - data = nil - case "hist_figure_id": - data = nil - case "reason": - data = nil - case "reason_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "unit_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "circumstance": - obj.Circumstance = string(data) - case "circumstance_id": - obj.CircumstanceId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "reason": - obj.Reason = string(data) - case "reason_id": - obj.ReasonId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "unit_id": - obj.UnitId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventArtifactRecovered) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "feature_layer_id": - data = nil - case "hist_figure_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - case "subregion_id": - data = nil - case "unit_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "unit_id": - obj.UnitId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventArtifactStored) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "hist_figure_id": - data = nil - case "site_id": - data = nil - case "unit_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "site_id": - obj.SiteId = n(data) - case "unit_id": - obj.UnitId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventAssumeIdentity) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "identity_caste": - data = nil - case "identity_histfig_id": - data = nil - case "identity_id": - data = nil - case "identity_name": - data = nil - case "identity_nemesis_id": - data = nil - case "identity_race": - data = nil - case "target": - data = nil - case "target_enid": - data = nil - case "trickster": - data = nil - case "trickster_hfid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "identity_caste": - obj.IdentityCaste = string(data) - case "identity_histfig_id": - obj.IdentityHistfigId = n(data) - case "identity_id": - obj.IdentityId = n(data) - case "identity_name": - obj.IdentityName = string(data) - case "identity_nemesis_id": - obj.IdentityNemesisId = n(data) - case "identity_race": - obj.IdentityRace = string(data) - case "target": - obj.Target = n(data) - case "target_enid": - obj.TargetEnid = n(data) - case "trickster": - obj.Trickster = n(data) - case "trickster_hfid": - obj.TricksterHfid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventAttackedSite) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "a_support_merc_enid": - data = nil - case "attacker_civ_id": - data = nil - case "attacker_general_hfid": - data = nil - case "attacker_merc_enid": - data = nil - case "d_support_merc_enid": - data = nil - case "defender_civ_id": - data = nil - case "defender_general_hfid": - data = nil - case "defender_merc_enid": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "a_support_merc_enid": - obj.ASupportMercEnid = n(data) - case "attacker_civ_id": - obj.AttackerCivId = n(data) - case "attacker_general_hfid": - obj.AttackerGeneralHfid = n(data) - case "attacker_merc_enid": - obj.AttackerMercEnid = n(data) - case "d_support_merc_enid": - obj.DSupportMercEnid = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "defender_general_hfid": - obj.DefenderGeneralHfid = n(data) - case "defender_merc_enid": - obj.DefenderMercEnid = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventBodyAbused) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "abuse_type": - data = nil - case "bodies": - data = nil - case "civ": - data = nil - case "coords": - data = nil - case "feature_layer_id": - data = nil - case "histfig": - data = nil - case "interaction": - data = nil - case "item_mat": - data = nil - case "item_subtype": - data = nil - case "item_type": - data = nil - case "pile_type": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "structure": - data = nil - case "subregion_id": - data = nil - case "tree": - data = nil - case "victim_entity": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "abuse_type": - obj.AbuseType = string(data) - case "bodies": - obj.Bodies = append(obj.Bodies, n(data)) - case "civ": - obj.Civ = n(data) - case "coords": - obj.Coords = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "histfig": - obj.Histfig = n(data) - case "interaction": - obj.Interaction = n(data) - case "item_mat": - obj.ItemMat = string(data) - case "item_subtype": - obj.ItemSubtype = string(data) - case "item_type": - obj.ItemType = string(data) - case "pile_type": - obj.PileType = string(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure": - obj.Structure = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "tree": - obj.Tree = n(data) - case "victim_entity": - obj.VictimEntity = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventBuildingProfileAcquired) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "acquirer_enid": - data = nil - case "acquirer_hfid": - data = nil - case "building_profile_id": - data = nil - case "inherited": - data = nil - case "last_owner_hfid": - data = nil - case "purchased_unowned": - data = nil - case "rebuilt_ruined": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "acquirer_enid": - obj.AcquirerEnid = n(data) - case "acquirer_hfid": - obj.AcquirerHfid = n(data) - case "building_profile_id": - obj.BuildingProfileId = n(data) - case "inherited": - obj.Inherited = string(data) - case "last_owner_hfid": - obj.LastOwnerHfid = n(data) - case "purchased_unowned": - obj.PurchasedUnowned = string(data) - case "rebuilt_ruined": - obj.RebuiltRuined = string(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCeremony) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "feature_layer_id": - data = nil - case "occasion_id": - data = nil - case "schedule_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "occasion_id": - obj.OccasionId = n(data) - case "schedule_id": - obj.ScheduleId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventChangeCreatureType) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "changee": - data = nil - case "changer": - data = nil - case "new_caste": - data = nil - case "new_race": - data = nil - case "old_caste": - data = nil - case "old_race": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "changee": - obj.Changee = n(data) - case "changer": - obj.Changer = n(data) - case "new_caste": - obj.NewCaste = n(data) - case "new_race": - obj.NewRace = string(data) - case "old_caste": - obj.OldCaste = n(data) - case "old_race": - obj.OldRace = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventChangeHfBodyState) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "body_state": - data = nil - case "coords": - data = nil - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "body_state": - obj.BodyState = string(data) - case "coords": - obj.Coords = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventChangeHfJob) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "new_job": - data = nil - case "old_job": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "new_job": - obj.NewJob = string(data) - case "old_job": - obj.OldJob = string(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventChangeHfState) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "mood": - data = nil - case "reason": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "state": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "mood": - obj.Mood = string(data) - case "reason": - obj.Reason = string(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "state": - obj.State = string(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventChangedCreatureType) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "changee_hfid": - data = nil - case "changer_hfid": - data = nil - case "new_caste": - data = nil - case "new_race": - data = nil - case "old_caste": - data = nil - case "old_race": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "changee_hfid": - obj.ChangeeHfid = n(data) - case "changer_hfid": - obj.ChangerHfid = n(data) - case "new_caste": - obj.NewCaste = string(data) - case "new_race": - obj.NewRace = string(data) - case "old_caste": - obj.OldCaste = string(data) - case "old_race": - obj.OldRace = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCompetition) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "competitor_hfid": - data = nil - case "feature_layer_id": - data = nil - case "occasion_id": - data = nil - case "schedule_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "winner_hfid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "competitor_hfid": - obj.CompetitorHfid = append(obj.CompetitorHfid, n(data)) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "occasion_id": - obj.OccasionId = n(data) - case "schedule_id": - obj.ScheduleId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "winner_hfid": - obj.WinnerHfid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCreateEntityPosition) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ": - data = nil - case "histfig": - data = nil - case "position": - data = nil - case "reason": - data = nil - case "site_civ": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ": - obj.Civ = n(data) - case "histfig": - obj.Histfig = n(data) - case "position": - obj.Position = string(data) - case "reason": - obj.Reason = string(data) - case "site_civ": - obj.SiteCiv = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCreatedBuilding) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "builder_hf": - data = nil - case "civ": - data = nil - case "rebuild": - data = nil - case "site": - data = nil - case "site_civ": - data = nil - case "structure": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "builder_hf": - obj.BuilderHf = n(data) - case "civ": - obj.Civ = n(data) - case "rebuild": - obj.Rebuild = string(data) - case "site": - obj.Site = n(data) - case "site_civ": - obj.SiteCiv = n(data) - case "structure": - obj.Structure = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCreatedSite) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "builder_hfid": - data = nil - case "civ_id": - data = nil - case "resident_civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "builder_hfid": - obj.BuilderHfid = n(data) - case "civ_id": - obj.CivId = n(data) - case "resident_civ_id": - obj.ResidentCivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCreatedStructure) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "builder_hfid": - data = nil - case "civ_id": - data = nil - case "rebuilt": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "builder_hfid": - obj.BuilderHfid = n(data) - case "civ_id": - obj.CivId = n(data) - case "rebuilt": - obj.Rebuilt = string(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCreatedWorldConstruction) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "master_wcid": - data = nil - case "site_civ_id": - data = nil - case "site_id1": - data = nil - case "site_id2": - data = nil - case "wcid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "master_wcid": - obj.MasterWcid = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id1": - obj.SiteId1 = n(data) - case "site_id2": - obj.SiteId2 = n(data) - case "wcid": - obj.Wcid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCreatureDevoured) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "caste": - data = nil - case "eater": - data = nil - case "entity": - data = nil - case "feature_layer_id": - data = nil - case "race": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "victim": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "caste": - obj.Caste = string(data) - case "eater": - obj.Eater = n(data) - case "entity": - obj.Entity = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "race": - obj.Race = string(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "victim": - obj.Victim = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventDanceFormCreated) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "circumstance": - data = nil - case "circumstance_id": - data = nil - case "form_id": - data = nil - case "hist_figure_id": - data = nil - case "reason": - data = nil - case "reason_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "circumstance": - obj.Circumstance = string(data) - case "circumstance_id": - obj.CircumstanceId = n(data) - case "form_id": - obj.FormId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "reason": - obj.Reason = string(data) - case "reason_id": - obj.ReasonId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventDestroyedSite) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacker_civ_id": - data = nil - case "defender_civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "attacker_civ_id": - obj.AttackerCivId = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventEntityAction) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "action": - data = nil - case "entity": - data = nil - case "site": - data = nil - case "structure": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "action": - obj.Action = string(data) - case "entity": - obj.Entity = n(data) - case "site": - obj.Site = n(data) - case "structure": - obj.Structure = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventEntityAllianceFormed) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "initiating_enid": - data = nil - case "joining_enid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "initiating_enid": - obj.InitiatingEnid = n(data) - case "joining_enid": - obj.JoiningEnid = append(obj.JoiningEnid, n(data)) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventEntityBreachFeatureLayer) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_entity_id": - data = nil - case "feature_layer_id": - data = nil - case "site_entity_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ_entity_id": - obj.CivEntityId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "site_entity_id": - obj.SiteEntityId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventEntityCreated) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "creator_hfid": - data = nil - case "entity_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "creator_hfid": - obj.CreatorHfid = n(data) - case "entity_id": - obj.EntityId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventEntityDissolved) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "reason": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "reason": - obj.Reason = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventEntityEquipmentPurchase) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "hfid": - data = nil - case "new_equipment_level": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "hfid": - obj.Hfid = append(obj.Hfid, n(data)) - case "new_equipment_level": - obj.NewEquipmentLevel = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventEntityIncorporated) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "joined_entity_id": - data = nil - case "joiner_entity_id": - data = nil - case "leader_hfid": - data = nil - case "partial_incorporation": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "joined_entity_id": - obj.JoinedEntityId = n(data) - case "joiner_entity_id": - obj.JoinerEntityId = n(data) - case "leader_hfid": - obj.LeaderHfid = n(data) - case "partial_incorporation": - obj.PartialIncorporation = string(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventEntityLaw) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "hist_figure_id": - data = nil - case "law_add": - data = nil - case "law_remove": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "law_add": - obj.LawAdd = string(data) - case "law_remove": - obj.LawRemove = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventEntityOverthrown) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "conspirator_hfid": - data = nil - case "entity_id": - data = nil - case "instigator_hfid": - data = nil - case "overthrown_hfid": - data = nil - case "pos_taker_hfid": - data = nil - case "position_profile_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "conspirator_hfid": - obj.ConspiratorHfid = append(obj.ConspiratorHfid, n(data)) - case "entity_id": - obj.EntityId = n(data) - case "instigator_hfid": - obj.InstigatorHfid = n(data) - case "overthrown_hfid": - obj.OverthrownHfid = n(data) - case "pos_taker_hfid": - obj.PosTakerHfid = n(data) - case "position_profile_id": - obj.PositionProfileId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventEntityPersecuted) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "destroyed_structure_id": - data = nil - case "expelled_creature": - data = nil - case "expelled_hfid": - data = nil - case "expelled_number": - data = nil - case "expelled_pop_id": - data = nil - case "persecutor_enid": - data = nil - case "persecutor_hfid": - data = nil - case "property_confiscated_from_hfid": - data = nil - case "shrine_amount_destroyed": - data = nil - case "site_id": - data = nil - case "target_enid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "destroyed_structure_id": - obj.DestroyedStructureId = n(data) - case "expelled_creature": - obj.ExpelledCreature = append(obj.ExpelledCreature, n(data)) - case "expelled_hfid": - obj.ExpelledHfid = append(obj.ExpelledHfid, n(data)) - case "expelled_number": - obj.ExpelledNumber = append(obj.ExpelledNumber, n(data)) - case "expelled_pop_id": - obj.ExpelledPopId = append(obj.ExpelledPopId, n(data)) - case "persecutor_enid": - obj.PersecutorEnid = n(data) - case "persecutor_hfid": - obj.PersecutorHfid = n(data) - case "property_confiscated_from_hfid": - obj.PropertyConfiscatedFromHfid = append(obj.PropertyConfiscatedFromHfid, n(data)) - case "shrine_amount_destroyed": - obj.ShrineAmountDestroyed = n(data) - case "site_id": - obj.SiteId = n(data) - case "target_enid": - obj.TargetEnid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventEntityPrimaryCriminals) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventEntityRelocate) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventFailedFrameAttempt) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "convicter_enid": - data = nil - case "crime": - data = nil - case "fooled_hfid": - data = nil - case "framer_hfid": - data = nil - case "plotter_hfid": - data = nil - case "target_hfid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "convicter_enid": - obj.ConvicterEnid = n(data) - case "crime": - obj.Crime = string(data) - case "fooled_hfid": - obj.FooledHfid = n(data) - case "framer_hfid": - obj.FramerHfid = n(data) - case "plotter_hfid": - obj.PlotterHfid = n(data) - case "target_hfid": - obj.TargetHfid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventFailedIntrigueCorruption) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "action": - data = nil - case "ally_defense_bonus": - data = nil - case "coconspirator_bonus": - data = nil - case "corruptor_hfid": - data = nil - case "corruptor_identity": - data = nil - case "failed_judgment_test": - data = nil - case "feature_layer_id": - data = nil - case "lure_hfid": - data = nil - case "method": - data = nil - case "relevant_entity_id": - data = nil - case "relevant_id_for_method": - data = nil - case "relevant_position_profile_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "target_hfid": - data = nil - case "target_identity": - data = nil - case "top_facet": - data = nil - case "top_facet_modifier": - data = nil - case "top_facet_rating": - data = nil - case "top_relationship_factor": - data = nil - case "top_relationship_modifier": - data = nil - case "top_relationship_rating": - data = nil - case "top_value": - data = nil - case "top_value_modifier": - data = nil - case "top_value_rating": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "action": - obj.Action = string(data) - case "ally_defense_bonus": - obj.AllyDefenseBonus = n(data) - case "coconspirator_bonus": - obj.CoconspiratorBonus = n(data) - case "corruptor_hfid": - obj.CorruptorHfid = n(data) - case "corruptor_identity": - obj.CorruptorIdentity = n(data) - case "failed_judgment_test": - obj.FailedJudgmentTest = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "lure_hfid": - obj.LureHfid = n(data) - case "method": - obj.Method = string(data) - case "relevant_entity_id": - obj.RelevantEntityId = n(data) - case "relevant_id_for_method": - obj.RelevantIdForMethod = n(data) - case "relevant_position_profile_id": - obj.RelevantPositionProfileId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "target_hfid": - obj.TargetHfid = n(data) - case "target_identity": - obj.TargetIdentity = n(data) - case "top_facet": - obj.TopFacet = string(data) - case "top_facet_modifier": - obj.TopFacetModifier = n(data) - case "top_facet_rating": - obj.TopFacetRating = n(data) - case "top_relationship_factor": - obj.TopRelationshipFactor = string(data) - case "top_relationship_modifier": - obj.TopRelationshipModifier = n(data) - case "top_relationship_rating": - obj.TopRelationshipRating = n(data) - case "top_value": - obj.TopValue = string(data) - case "top_value_modifier": - obj.TopValueModifier = n(data) - case "top_value_rating": - obj.TopValueRating = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventFieldBattle) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "a_support_merc_enid": - data = nil - case "attacker_civ_id": - data = nil - case "attacker_general_hfid": - data = nil - case "attacker_merc_enid": - data = nil - case "coords": - data = nil - case "d_support_merc_enid": - data = nil - case "defender_civ_id": - data = nil - case "defender_general_hfid": - data = nil - case "defender_merc_enid": - data = nil - case "feature_layer_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "a_support_merc_enid": - obj.ASupportMercEnid = n(data) - case "attacker_civ_id": - obj.AttackerCivId = n(data) - case "attacker_general_hfid": - obj.AttackerGeneralHfid = n(data) - case "attacker_merc_enid": - obj.AttackerMercEnid = n(data) - case "coords": - obj.Coords = string(data) - case "d_support_merc_enid": - obj.DSupportMercEnid = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "defender_general_hfid": - obj.DefenderGeneralHfid = n(data) - case "defender_merc_enid": - obj.DefenderMercEnid = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventGamble) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "gambler_hfid": - data = nil - case "new_account": - data = nil - case "old_account": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "gambler_hfid": - obj.GamblerHfid = n(data) - case "new_account": - obj.NewAccount = n(data) - case "old_account": - obj.OldAccount = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfAbducted) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "site_id": - data = nil - case "snatcher_hfid": - data = nil - case "subregion_id": - data = nil - case "target_hfid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "site_id": - obj.SiteId = n(data) - case "snatcher_hfid": - obj.SnatcherHfid = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "target_hfid": - obj.TargetHfid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfActOnBuilding) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "action": - data = nil - case "histfig": - data = nil - case "site": - data = nil - case "structure": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "action": - obj.Action = string(data) - case "histfig": - obj.Histfig = n(data) - case "site": - obj.Site = n(data) - case "structure": - obj.Structure = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfAttackedSite) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacker_hfid": - data = nil - case "defender_civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "attacker_hfid": - obj.AttackerHfid = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfConfronted) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "reason": - data = nil - case "site_id": - data = nil - case "situation": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "reason": - obj.Reason = append(obj.Reason, string(data)) - case "site_id": - obj.SiteId = n(data) - case "situation": - obj.Situation = string(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfConvicted) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coconspirator_hfid": - data = nil - case "confessed_after_apb_arrest_enid": - data = nil - case "contact_hfid": - data = nil - case "convict_is_contact": - data = nil - case "convicted_hfid": - data = nil - case "convicter_enid": - data = nil - case "corrupt_convicter_hfid": - data = nil - case "crime": - data = nil - case "death_penalty": - data = nil - case "did_not_reveal_all_in_interrogation": - data = nil - case "exiled": - data = nil - case "fooled_hfid": - data = nil - case "framer_hfid": - data = nil - case "held_firm_in_interrogation": - data = nil - case "implicated_hfid": - data = nil - case "interrogator_hfid": - data = nil - case "plotter_hfid": - data = nil - case "prison_months": - data = nil - case "surveiled_coconspirator": - data = nil - case "surveiled_contact": - data = nil - case "surveiled_convicted": - data = nil - case "surveiled_target": - data = nil - case "target_hfid": - data = nil - case "wrongful_conviction": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "coconspirator_hfid": - obj.CoconspiratorHfid = n(data) - case "confessed_after_apb_arrest_enid": - obj.ConfessedAfterApbArrestEnid = n(data) - case "contact_hfid": - obj.ContactHfid = n(data) - case "convict_is_contact": - obj.ConvictIsContact = string(data) - case "convicted_hfid": - obj.ConvictedHfid = n(data) - case "convicter_enid": - obj.ConvicterEnid = n(data) - case "corrupt_convicter_hfid": - obj.CorruptConvicterHfid = n(data) - case "crime": - obj.Crime = string(data) - case "death_penalty": - obj.DeathPenalty = string(data) - case "did_not_reveal_all_in_interrogation": - obj.DidNotRevealAllInInterrogation = string(data) - case "exiled": - obj.Exiled = string(data) - case "fooled_hfid": - obj.FooledHfid = n(data) - case "framer_hfid": - obj.FramerHfid = n(data) - case "held_firm_in_interrogation": - obj.HeldFirmInInterrogation = string(data) - case "implicated_hfid": - obj.ImplicatedHfid = append(obj.ImplicatedHfid, n(data)) - case "interrogator_hfid": - obj.InterrogatorHfid = n(data) - case "plotter_hfid": - obj.PlotterHfid = n(data) - case "prison_months": - obj.PrisonMonths = n(data) - case "surveiled_coconspirator": - obj.SurveiledCoconspirator = string(data) - case "surveiled_contact": - obj.SurveiledContact = string(data) - case "surveiled_convicted": - obj.SurveiledConvicted = string(data) - case "surveiled_target": - obj.SurveiledTarget = string(data) - case "target_hfid": - obj.TargetHfid = n(data) - case "wrongful_conviction": - obj.WrongfulConviction = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfDestroyedSite) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacker_hfid": - data = nil - case "defender_civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "attacker_hfid": - obj.AttackerHfid = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfDied) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "cause": - data = nil - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "site_id": - data = nil - case "slayer_caste": - data = nil - case "slayer_hfid": - data = nil - case "slayer_item_id": - data = nil - case "slayer_race": - data = nil - case "slayer_shooter_item_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "cause": - obj.Cause = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "slayer_caste": - obj.SlayerCaste = string(data) - case "slayer_hfid": - obj.SlayerHfid = n(data) - case "slayer_item_id": - obj.SlayerItemId = n(data) - case "slayer_race": - obj.SlayerRace = string(data) - case "slayer_shooter_item_id": - obj.SlayerShooterItemId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfDisturbedStructure) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hist_fig_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "hist_fig_id": - obj.HistFigId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfDoesInteraction) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "doer": - data = nil - case "doer_hfid": - data = nil - case "interaction": - data = nil - case "interaction_action": - data = nil - case "region": - data = nil - case "site": - data = nil - case "source": - data = nil - case "target": - data = nil - case "target_hfid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "doer": - obj.Doer = n(data) - case "doer_hfid": - obj.DoerHfid = n(data) - case "interaction": - obj.Interaction = string(data) - case "interaction_action": - obj.InteractionAction = string(data) - case "region": - obj.Region = n(data) - case "site": - obj.Site = n(data) - case "source": - obj.Source = n(data) - case "target": - obj.Target = n(data) - case "target_hfid": - obj.TargetHfid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfEnslaved) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "enslaved_hfid": - data = nil - case "moved_to_site_id": - data = nil - case "payer_entity_id": - data = nil - case "seller_hfid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "enslaved_hfid": - obj.EnslavedHfid = n(data) - case "moved_to_site_id": - obj.MovedToSiteId = n(data) - case "payer_entity_id": - obj.PayerEntityId = n(data) - case "seller_hfid": - obj.SellerHfid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfEquipmentPurchase) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "group_hfid": - data = nil - case "quality": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "group_hfid": - obj.GroupHfid = n(data) - case "quality": - obj.Quality = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfGainsSecretGoal) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hfid": - data = nil - case "secret_goal": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "hfid": - obj.Hfid = n(data) - case "secret_goal": - obj.SecretGoal = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfInterrogated) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "arresting_enid": - data = nil - case "held_firm_in_interrogation": - data = nil - case "interrogator_hfid": - data = nil - case "target_hfid": - data = nil - case "wanted_and_recognized": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "arresting_enid": - obj.ArrestingEnid = n(data) - case "held_firm_in_interrogation": - obj.HeldFirmInInterrogation = string(data) - case "interrogator_hfid": - obj.InterrogatorHfid = n(data) - case "target_hfid": - obj.TargetHfid = n(data) - case "wanted_and_recognized": - obj.WantedAndRecognized = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfLearnsSecret) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact": - data = nil - case "artifact_id": - data = nil - case "interaction": - data = nil - case "secret_text": - data = nil - case "student": - data = nil - case "student_hfid": - data = nil - case "teacher": - data = nil - case "teacher_hfid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact": - obj.Artifact = n(data) - case "artifact_id": - obj.ArtifactId = n(data) - case "interaction": - obj.Interaction = string(data) - case "secret_text": - obj.SecretText = string(data) - case "student": - obj.Student = n(data) - case "student_hfid": - obj.StudentHfid = n(data) - case "teacher": - obj.Teacher = n(data) - case "teacher_hfid": - obj.TeacherHfid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfNewPet) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "feature_layer_id": - data = nil - case "group_hfid": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "group_hfid": - obj.GroupHfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfPerformedHorribleExperiments) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "group_hfid": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "group_hfid": - obj.GroupHfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfPrayedInsideStructure) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hist_fig_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "hist_fig_id": - obj.HistFigId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfPreach) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_1": - data = nil - case "entity_2": - data = nil - case "site_hfid": - data = nil - case "speaker_hfid": - data = nil - case "topic": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_1": - obj.Entity1 = n(data) - case "entity_2": - obj.Entity2 = n(data) - case "site_hfid": - obj.SiteHfid = n(data) - case "speaker_hfid": - obj.SpeakerHfid = n(data) - case "topic": - obj.Topic = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfProfanedStructure) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hist_fig_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "hist_fig_id": - obj.HistFigId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfRecruitedUnitTypeForEntity) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "unit_type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "unit_type": - obj.UnitType = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfRelationshipDenied) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "reason": - data = nil - case "reason_id": - data = nil - case "relationship": - data = nil - case "seeker_hfid": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "target_hfid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "reason": - obj.Reason = string(data) - case "reason_id": - obj.ReasonId = n(data) - case "relationship": - obj.Relationship = string(data) - case "seeker_hfid": - obj.SeekerHfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "target_hfid": - obj.TargetHfid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfReunion) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "group_1_hfid": - data = nil - case "group_2_hfid": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "group_1_hfid": - obj.Group1Hfid = n(data) - case "group_2_hfid": - obj.Group2Hfid = append(obj.Group2Hfid, n(data)) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfRevived) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "actor_hfid": - data = nil - case "disturbance": - data = nil - case "feature_layer_id": - data = nil - case "hfid": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "actor_hfid": - obj.ActorHfid = n(data) - case "disturbance": - obj.Disturbance = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hfid": - obj.Hfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfSimpleBattleEvent) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "group_1_hfid": - data = nil - case "group_2_hfid": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "subtype": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "group_1_hfid": - obj.Group1Hfid = n(data) - case "group_2_hfid": - obj.Group2Hfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "subtype": - obj.Subtype = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfTravel) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "feature_layer_id": - data = nil - case "group_hfid": - data = nil - case "return": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "group_hfid": - obj.GroupHfid = append(obj.GroupHfid, n(data)) - case "return": - obj.Return = string(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfViewedArtifact) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "hist_fig_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "hist_fig_id": - obj.HistFigId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfWounded) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "woundee_hfid": - data = nil - case "wounder_hfid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "woundee_hfid": - obj.WoundeeHfid = n(data) - case "wounder_hfid": - obj.WounderHfid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfsFormedIntrigueRelationship) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "action": - data = nil - case "ally_defense_bonus": - data = nil - case "circumstance": - data = nil - case "circumstance_id": - data = nil - case "coconspirator_bonus": - data = nil - case "corruptor_hfid": - data = nil - case "corruptor_identity": - data = nil - case "corruptor_seen_as": - data = nil - case "failed_judgment_test": - data = nil - case "feature_layer_id": - data = nil - case "lure_hfid": - data = nil - case "method": - data = nil - case "relevant_entity_id": - data = nil - case "relevant_id_for_method": - data = nil - case "relevant_position_profile_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "successful": - data = nil - case "target_hfid": - data = nil - case "target_identity": - data = nil - case "target_seen_as": - data = nil - case "top_facet": - data = nil - case "top_facet_modifier": - data = nil - case "top_facet_rating": - data = nil - case "top_relationship_factor": - data = nil - case "top_relationship_modifier": - data = nil - case "top_relationship_rating": - data = nil - case "top_value": - data = nil - case "top_value_modifier": - data = nil - case "top_value_rating": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "action": - obj.Action = string(data) - case "ally_defense_bonus": - obj.AllyDefenseBonus = n(data) - case "circumstance": - obj.Circumstance = string(data) - case "circumstance_id": - obj.CircumstanceId = n(data) - case "coconspirator_bonus": - obj.CoconspiratorBonus = n(data) - case "corruptor_hfid": - obj.CorruptorHfid = n(data) - case "corruptor_identity": - obj.CorruptorIdentity = n(data) - case "corruptor_seen_as": - obj.CorruptorSeenAs = string(data) - case "failed_judgment_test": - obj.FailedJudgmentTest = string(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "lure_hfid": - obj.LureHfid = n(data) - case "method": - obj.Method = string(data) - case "relevant_entity_id": - obj.RelevantEntityId = n(data) - case "relevant_id_for_method": - obj.RelevantIdForMethod = n(data) - case "relevant_position_profile_id": - obj.RelevantPositionProfileId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "successful": - obj.Successful = string(data) - case "target_hfid": - obj.TargetHfid = n(data) - case "target_identity": - obj.TargetIdentity = n(data) - case "target_seen_as": - obj.TargetSeenAs = string(data) - case "top_facet": - obj.TopFacet = string(data) - case "top_facet_modifier": - obj.TopFacetModifier = n(data) - case "top_facet_rating": - obj.TopFacetRating = n(data) - case "top_relationship_factor": - obj.TopRelationshipFactor = string(data) - case "top_relationship_modifier": - obj.TopRelationshipModifier = n(data) - case "top_relationship_rating": - obj.TopRelationshipRating = n(data) - case "top_value": - obj.TopValue = string(data) - case "top_value_modifier": - obj.TopValueModifier = n(data) - case "top_value_rating": - obj.TopValueRating = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHfsFormedReputationRelationship) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature_layer_id": - data = nil - case "hf_rep_1_of_2": - data = nil - case "hf_rep_2_of_1": - data = nil - case "hfid1": - data = nil - case "hfid2": - data = nil - case "identity_id1": - data = nil - case "identity_id2": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "hf_rep_1_of_2": - obj.HfRep1Of2 = string(data) - case "hf_rep_2_of_1": - obj.HfRep2Of1 = string(data) - case "hfid1": - obj.Hfid1 = n(data) - case "hfid2": - obj.Hfid2 = n(data) - case "identity_id1": - obj.IdentityId1 = n(data) - case "identity_id2": - obj.IdentityId2 = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHistFigureDied) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artifact_id": - data = nil - case "death_cause": - data = nil - case "item": - data = nil - case "item_subtype": - data = nil - case "item_type": - data = nil - case "mat": - data = nil - case "site": - data = nil - case "slayer_caste": - data = nil - case "slayer_hf": - data = nil - case "slayer_race": - data = nil - case "victim_hf": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artifact_id": - obj.ArtifactId = n(data) - case "death_cause": - obj.DeathCause = string(data) - case "item": - obj.Item = n(data) - case "item_subtype": - obj.ItemSubtype = string(data) - case "item_type": - obj.ItemType = string(data) - case "mat": - obj.Mat = string(data) - case "site": - obj.Site = n(data) - case "slayer_caste": - obj.SlayerCaste = n(data) - case "slayer_hf": - obj.SlayerHf = n(data) - case "slayer_race": - obj.SlayerRace = n(data) - case "victim_hf": - obj.VictimHf = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHistFigureNewPet) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "group": - data = nil - case "pets": - data = nil - case "site": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "group": - obj.Group = n(data) - case "pets": - obj.Pets = string(data) - case "site": - obj.Site = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHistFigureWounded) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "body_part": - data = nil - case "injury_type": - data = nil - case "part_lost": - data = nil - case "site": - data = nil - case "woundee": - data = nil - case "woundee_caste": - data = nil - case "woundee_race": - data = nil - case "wounder": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "body_part": - obj.BodyPart = n(data) - case "injury_type": - obj.InjuryType = string(data) - case "part_lost": - obj.PartLost = string(data) - case "site": - obj.Site = n(data) - case "woundee": - obj.Woundee = n(data) - case "woundee_caste": - obj.WoundeeCaste = n(data) - case "woundee_race": - obj.WoundeeRace = n(data) - case "wounder": - obj.Wounder = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventHolyCityDeclaration) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "religion_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "religion_id": - obj.ReligionId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventItemStolen) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "circumstance": - v := Circumstance{} -v.Parse(d, &t) -obj.Circumstance = v - case "circumstance_id": - data = nil - case "entity": - data = nil - case "histfig": - data = nil - case "item": - data = nil - case "item_subtype": - data = nil - case "item_type": - data = nil - case "mat": - data = nil - case "matindex": - data = nil - case "mattype": - data = nil - case "site": - data = nil - case "stash_site": - data = nil - case "structure": - data = nil - case "theft_method": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "circumstance": - - case "circumstance_id": - obj.CircumstanceId = n(data) - case "entity": - obj.Entity = n(data) - case "histfig": - obj.Histfig = n(data) - case "item": - obj.Item = n(data) - case "item_subtype": - obj.ItemSubtype = string(data) - case "item_type": - obj.ItemType = string(data) - case "mat": - obj.Mat = string(data) - case "matindex": - obj.Matindex = n(data) - case "mattype": - obj.Mattype = n(data) - case "site": - obj.Site = n(data) - case "stash_site": - obj.StashSite = n(data) - case "structure": - obj.Structure = n(data) - case "theft_method": - obj.TheftMethod = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventKnowledgeDiscovered) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "first": - data = nil - case "hfid": - data = nil - case "knowledge": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "first": - obj.First = string(data) - case "hfid": - obj.Hfid = n(data) - case "knowledge": - obj.Knowledge = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventMasterpieceCreatedItem) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "item_id": - data = nil - case "item_type": - data = nil - case "maker": - data = nil - case "maker_entity": - data = nil - case "mat": - data = nil - case "site": - data = nil - case "skill_at_time": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "item_id": - obj.ItemId = n(data) - case "item_type": - obj.ItemType = string(data) - case "maker": - obj.Maker = n(data) - case "maker_entity": - obj.MakerEntity = n(data) - case "mat": - obj.Mat = string(data) - case "site": - obj.Site = n(data) - case "skill_at_time": - obj.SkillAtTime = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventMasterpieceItem) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "hfid": - data = nil - case "site_id": - data = nil - case "skill_at_time": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "hfid": - obj.Hfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "skill_at_time": - obj.SkillAtTime = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventMerchant) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "depot_entity_id": - data = nil - case "destination": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "source": - data = nil - case "trader_entity_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "depot_entity_id": - obj.DepotEntityId = n(data) - case "destination": - obj.Destination = n(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "source": - obj.Source = n(data) - case "trader_entity_id": - obj.TraderEntityId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventModifiedBuilding) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "modification": - data = nil - case "modifier_hfid": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "modification": - obj.Modification = string(data) - case "modifier_hfid": - obj.ModifierHfid = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventMusicalFormCreated) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "circumstance": - data = nil - case "circumstance_id": - data = nil - case "form_id": - data = nil - case "hist_figure_id": - data = nil - case "reason": - data = nil - case "reason_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "circumstance": - obj.Circumstance = string(data) - case "circumstance_id": - obj.CircumstanceId = n(data) - case "form_id": - obj.FormId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "reason": - obj.Reason = string(data) - case "reason_id": - obj.ReasonId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventNewSiteLeader) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacker_civ_id": - data = nil - case "defender_civ_id": - data = nil - case "new_leader_hfid": - data = nil - case "new_site_civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "attacker_civ_id": - obj.AttackerCivId = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "new_leader_hfid": - obj.NewLeaderHfid = n(data) - case "new_site_civ_id": - obj.NewSiteCivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventPerformance) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "feature_layer_id": - data = nil - case "occasion_id": - data = nil - case "schedule_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "occasion_id": - obj.OccasionId = n(data) - case "schedule_id": - obj.ScheduleId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventPlunderedSite) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacker_civ_id": - data = nil - case "defender_civ_id": - data = nil - case "detected": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "attacker_civ_id": - obj.AttackerCivId = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "detected": - obj.Detected = string(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventPoeticFormCreated) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "circumstance": - data = nil - case "form_id": - data = nil - case "hist_figure_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "circumstance": - obj.Circumstance = string(data) - case "form_id": - obj.FormId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventProcession) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "feature_layer_id": - data = nil - case "occasion_id": - data = nil - case "schedule_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "occasion_id": - obj.OccasionId = n(data) - case "schedule_id": - obj.ScheduleId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventRazedStructure) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventReclaimSite) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventRegionpopIncorporatedIntoEntity) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "join_entity_id": - data = nil - case "pop_flid": - data = nil - case "pop_number_moved": - data = nil - case "pop_race": - data = nil - case "pop_srid": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "join_entity_id": - obj.JoinEntityId = n(data) - case "pop_flid": - obj.PopFlid = n(data) - case "pop_number_moved": - obj.PopNumberMoved = n(data) - case "pop_race": - obj.PopRace = n(data) - case "pop_srid": - obj.PopSrid = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventRemoveHfEntityLink) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ": - data = nil - case "civ_id": - data = nil - case "hfid": - data = nil - case "histfig": - data = nil - case "link": - data = nil - case "link_type": - data = nil - case "position": - data = nil - case "position_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ": - obj.Civ = n(data) - case "civ_id": - obj.CivId = n(data) - case "hfid": - obj.Hfid = n(data) - case "histfig": - obj.Histfig = n(data) - case "link": - obj.Link = string(data) - case "link_type": - obj.LinkType = string(data) - case "position": - obj.Position = string(data) - case "position_id": - obj.PositionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventRemoveHfHfLink) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "hfid": - data = nil - case "hfid_target": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "hfid": - obj.Hfid = n(data) - case "hfid_target": - obj.HfidTarget = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventRemoveHfSiteLink) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ": - data = nil - case "histfig": - data = nil - case "link_type": - data = nil - case "site": - data = nil - case "site_id": - data = nil - case "structure": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ": - obj.Civ = n(data) - case "histfig": - obj.Histfig = n(data) - case "link_type": - obj.LinkType = string(data) - case "site": - obj.Site = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure": - obj.Structure = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventReplacedBuilding) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ": - data = nil - case "new_structure": - data = nil - case "old_structure": - data = nil - case "site": - data = nil - case "site_civ": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ": - obj.Civ = n(data) - case "new_structure": - obj.NewStructure = n(data) - case "old_structure": - obj.OldStructure = n(data) - case "site": - obj.Site = n(data) - case "site_civ": - obj.SiteCiv = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventReplacedStructure) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "new_ab_id": - data = nil - case "old_ab_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "new_ab_id": - obj.NewAbId = n(data) - case "old_ab_id": - obj.OldAbId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventSiteDispute) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "dispute": - data = nil - case "entity_id_1": - data = nil - case "entity_id_2": - data = nil - case "site_id_1": - data = nil - case "site_id_2": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "dispute": - obj.Dispute = string(data) - case "entity_id_1": - obj.EntityId1 = n(data) - case "entity_id_2": - obj.EntityId2 = n(data) - case "site_id_1": - obj.SiteId1 = n(data) - case "site_id_2": - obj.SiteId2 = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventSiteTakenOver) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacker_civ_id": - data = nil - case "defender_civ_id": - data = nil - case "new_site_civ_id": - data = nil - case "site_civ_id": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "attacker_civ_id": - obj.AttackerCivId = n(data) - case "defender_civ_id": - obj.DefenderCivId = n(data) - case "new_site_civ_id": - obj.NewSiteCivId = n(data) - case "site_civ_id": - obj.SiteCivId = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventSquadVsSquad) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "a_hfid": - data = nil - case "a_squad_id": - data = nil - case "d_effect": - data = nil - case "d_interaction": - data = nil - case "d_number": - data = nil - case "d_race": - data = nil - case "d_slain": - data = nil - case "d_squad_id": - data = nil - case "feature_layer_id": - data = nil - case "site_id": - data = nil - case "structure_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "a_hfid": - obj.AHfid = n(data) - case "a_squad_id": - obj.ASquadId = n(data) - case "d_effect": - obj.DEffect = n(data) - case "d_interaction": - obj.DInteraction = n(data) - case "d_number": - obj.DNumber = n(data) - case "d_race": - obj.DRace = n(data) - case "d_slain": - obj.DSlain = n(data) - case "d_squad_id": - obj.DSquadId = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "site_id": - obj.SiteId = n(data) - case "structure_id": - obj.StructureId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventTacticalSituation) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "a_tactician_hfid": - data = nil - case "a_tactics_roll": - data = nil - case "d_tactician_hfid": - data = nil - case "d_tactics_roll": - data = nil - case "feature_layer_id": - data = nil - case "site_id": - data = nil - case "situation": - data = nil - case "start": - data = nil - case "structure_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "a_tactician_hfid": - obj.ATacticianHfid = n(data) - case "a_tactics_roll": - obj.ATacticsRoll = n(data) - case "d_tactician_hfid": - obj.DTacticianHfid = n(data) - case "d_tactics_roll": - obj.DTacticsRoll = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "site_id": - obj.SiteId = n(data) - case "situation": - obj.Situation = string(data) - case "start": - obj.Start = string(data) - case "structure_id": - obj.StructureId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventTrade) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "account_shift": - data = nil - case "allotment": - data = nil - case "allotment_index": - data = nil - case "dest_site_id": - data = nil - case "production_zone_id": - data = nil - case "source_site_id": - data = nil - case "trader_entity_id": - data = nil - case "trader_hfid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "account_shift": - obj.AccountShift = n(data) - case "allotment": - obj.Allotment = n(data) - case "allotment_index": - obj.AllotmentIndex = n(data) - case "dest_site_id": - obj.DestSiteId = n(data) - case "production_zone_id": - obj.ProductionZoneId = n(data) - case "source_site_id": - obj.SourceSiteId = n(data) - case "trader_entity_id": - obj.TraderEntityId = n(data) - case "trader_hfid": - obj.TraderHfid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventWarPeaceAccepted) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "destination": - data = nil - case "site": - data = nil - case "source": - data = nil - case "topic": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "destination": - obj.Destination = n(data) - case "site": - obj.Site = n(data) - case "source": - obj.Source = n(data) - case "topic": - obj.Topic = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventWarPeaceRejected) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "destination": - data = nil - case "site": - data = nil - case "source": - data = nil - case "topic": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "destination": - obj.Destination = n(data) - case "site": - obj.Site = n(data) - case "source": - obj.Source = n(data) - case "topic": - obj.Topic = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventWrittenContentComposed) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "circumstance": - data = nil - case "circumstance_id": - data = nil - case "hist_figure_id": - data = nil - case "reason": - data = nil - case "reason_id": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "wc_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "circumstance": - obj.Circumstance = string(data) - case "circumstance_id": - obj.CircumstanceId = n(data) - case "hist_figure_id": - obj.HistFigureId = n(data) - case "reason": - obj.Reason = string(data) - case "reason_id": - obj.ReasonId = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "wc_id": - obj.WcId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCollection) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "end_seconds72": - data = nil - case "end_year": - data = nil - case "event": - data = nil - case "eventcol": - data = nil - case "id": - data = nil - case "start_seconds72": - data = nil - case "start_year": - data = nil - case "type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "end_seconds72": - obj.EndSeconds72 = n(data) - case "end_year": - obj.EndYear = n(data) - case "event": - obj.Event = append(obj.Event, n(data)) - case "eventcol": - obj.Eventcol = append(obj.Eventcol, n(data)) - case "id": - obj.Id_ = n(data) - case "start_seconds72": - obj.StartSeconds72 = n(data) - case "start_year": - obj.StartYear = n(data) - case "type": - obj.Type = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCollectionAbduction) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacking_enid": - data = nil - case "coords": - data = nil - case "defending_enid": - data = nil - case "feature_layer_id": - data = nil - case "ordinal": - data = nil - case "parent_eventcol": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "attacking_enid": - obj.AttackingEnid = n(data) - case "coords": - obj.Coords = string(data) - case "defending_enid": - obj.DefendingEnid = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "ordinal": - obj.Ordinal = n(data) - case "parent_eventcol": - obj.ParentEventcol = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCollectionBattle) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "a_support_merc_enid": - data = nil - case "a_support_merc_hfid": - data = nil - case "attacking_hfid": - data = nil - case "attacking_merc_enid": - data = nil - case "attacking_squad_animated": - data = nil - case "attacking_squad_deaths": - data = nil - case "attacking_squad_entity_pop": - data = nil - case "attacking_squad_number": - data = nil - case "attacking_squad_race": - data = nil - case "attacking_squad_site": - data = nil - case "company_merc": - data = nil - case "coords": - data = nil - case "d_support_merc_enid": - data = nil - case "d_support_merc_hfid": - data = nil - case "defending_hfid": - data = nil - case "defending_merc_enid": - data = nil - case "defending_squad_animated": - data = nil - case "defending_squad_deaths": - data = nil - case "defending_squad_entity_pop": - data = nil - case "defending_squad_number": - data = nil - case "defending_squad_race": - data = nil - case "defending_squad_site": - data = nil - case "feature_layer_id": - data = nil - case "individual_merc": - data = nil - case "name": - data = nil - case "noncom_hfid": - data = nil - case "outcome": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - case "war_eventcol": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "a_support_merc_enid": - obj.ASupportMercEnid = n(data) - case "a_support_merc_hfid": - obj.ASupportMercHfid = append(obj.ASupportMercHfid, n(data)) - case "attacking_hfid": - obj.AttackingHfid = append(obj.AttackingHfid, n(data)) - case "attacking_merc_enid": - obj.AttackingMercEnid = n(data) - case "attacking_squad_animated": - obj.AttackingSquadAnimated = append(obj.AttackingSquadAnimated, string(data)) - case "attacking_squad_deaths": - obj.AttackingSquadDeaths = append(obj.AttackingSquadDeaths, n(data)) - case "attacking_squad_entity_pop": - obj.AttackingSquadEntityPop = append(obj.AttackingSquadEntityPop, n(data)) - case "attacking_squad_number": - obj.AttackingSquadNumber = append(obj.AttackingSquadNumber, n(data)) - case "attacking_squad_race": - obj.AttackingSquadRace = append(obj.AttackingSquadRace, string(data)) - case "attacking_squad_site": - obj.AttackingSquadSite = append(obj.AttackingSquadSite, n(data)) - case "company_merc": - obj.CompanyMerc = append(obj.CompanyMerc, string(data)) - case "coords": - obj.Coords = string(data) - case "d_support_merc_enid": - obj.DSupportMercEnid = n(data) - case "d_support_merc_hfid": - obj.DSupportMercHfid = append(obj.DSupportMercHfid, n(data)) - case "defending_hfid": - obj.DefendingHfid = append(obj.DefendingHfid, n(data)) - case "defending_merc_enid": - obj.DefendingMercEnid = n(data) - case "defending_squad_animated": - obj.DefendingSquadAnimated = append(obj.DefendingSquadAnimated, string(data)) - case "defending_squad_deaths": - obj.DefendingSquadDeaths = append(obj.DefendingSquadDeaths, n(data)) - case "defending_squad_entity_pop": - obj.DefendingSquadEntityPop = append(obj.DefendingSquadEntityPop, n(data)) - case "defending_squad_number": - obj.DefendingSquadNumber = append(obj.DefendingSquadNumber, n(data)) - case "defending_squad_race": - obj.DefendingSquadRace = append(obj.DefendingSquadRace, string(data)) - case "defending_squad_site": - obj.DefendingSquadSite = append(obj.DefendingSquadSite, n(data)) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "individual_merc": - obj.IndividualMerc = append(obj.IndividualMerc, string(data)) - case "name": - obj.Name_ = string(data) - case "noncom_hfid": - obj.NoncomHfid = append(obj.NoncomHfid, n(data)) - case "outcome": - obj.Outcome = string(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - case "war_eventcol": - obj.WarEventcol = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCollectionBeastAttack) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "defending_enid": - data = nil - case "feature_layer_id": - data = nil - case "ordinal": - data = nil - case "parent_eventcol": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "defending_enid": - obj.DefendingEnid = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "ordinal": - obj.Ordinal = n(data) - case "parent_eventcol": - obj.ParentEventcol = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCollectionDuel) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacking_hfid": - data = nil - case "coords": - data = nil - case "defending_hfid": - data = nil - case "feature_layer_id": - data = nil - case "ordinal": - data = nil - case "parent_eventcol": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "attacking_hfid": - obj.AttackingHfid = n(data) - case "coords": - obj.Coords = string(data) - case "defending_hfid": - obj.DefendingHfid = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "ordinal": - obj.Ordinal = n(data) - case "parent_eventcol": - obj.ParentEventcol = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCollectionEntityOverthrown) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "ordinal": - data = nil - case "site_id": - data = nil - case "target_entity_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "ordinal": - obj.Ordinal = n(data) - case "site_id": - obj.SiteId = n(data) - case "target_entity_id": - obj.TargetEntityId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCollectionOccasion) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "occasion_id": - data = nil - case "ordinal": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "occasion_id": - obj.OccasionId = n(data) - case "ordinal": - obj.Ordinal = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCollectionPersecution) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "ordinal": - data = nil - case "site_id": - data = nil - case "target_entity_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "ordinal": - obj.Ordinal = n(data) - case "site_id": - obj.SiteId = n(data) - case "target_entity_id": - obj.TargetEntityId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCollectionPurge) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "adjective": - data = nil - case "ordinal": - data = nil - case "site_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "adjective": - obj.Adjective = string(data) - case "ordinal": - obj.Ordinal = n(data) - case "site_id": - obj.SiteId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCollectionSiteConquered) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacking_enid": - data = nil - case "defending_enid": - data = nil - case "ordinal": - data = nil - case "site_id": - data = nil - case "war_eventcol": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "attacking_enid": - obj.AttackingEnid = n(data) - case "defending_enid": - obj.DefendingEnid = n(data) - case "ordinal": - obj.Ordinal = n(data) - case "site_id": - obj.SiteId = n(data) - case "war_eventcol": - obj.WarEventcol = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCollectionTheft) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "attacking_enid": - data = nil - case "coords": - data = nil - case "defending_enid": - data = nil - case "feature_layer_id": - data = nil - case "ordinal": - data = nil - case "parent_eventcol": - data = nil - case "site_id": - data = nil - case "subregion_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "attacking_enid": - obj.AttackingEnid = n(data) - case "coords": - obj.Coords = string(data) - case "defending_enid": - obj.DefendingEnid = n(data) - case "feature_layer_id": - obj.FeatureLayerId = n(data) - case "ordinal": - obj.Ordinal = n(data) - case "parent_eventcol": - obj.ParentEventcol = n(data) - case "site_id": - obj.SiteId = n(data) - case "subregion_id": - obj.SubregionId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventCollectionWar) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "aggressor_ent_id": - data = nil - case "defender_ent_id": - data = nil - case "name": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "aggressor_ent_id": - obj.AggressorEntId = n(data) - case "defender_ent_id": - obj.DefenderEntId = n(data) - case "name": - obj.Name_ = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventRelationship) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "event": - data = nil - case "relationship": - data = nil - case "source_hf": - data = nil - case "target_hf": - data = nil - case "year": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "event": - obj.Event = n(data) - case "relationship": - obj.Relationship = string(data) - case "source_hf": - obj.SourceHf = n(data) - case "target_hf": - obj.TargetHf = n(data) - case "year": - obj.Year = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalEventRelationshipSupplement) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "event": - data = nil - case "occasion_type": - data = nil - case "site": - data = nil - case "unk_1": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "event": - obj.Event = n(data) - case "occasion_type": - obj.OccasionType = n(data) - case "site": - obj.Site = n(data) - case "unk_1": - obj.Unk1 = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HistoricalFigure) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "active_interaction": - data = nil - case "animated": - data = nil - case "animated_string": - data = nil - case "appeared": - data = nil - case "associated_type": - data = nil - case "birth_seconds72": - data = nil - case "birth_year": - data = nil - case "caste": - data = nil - case "current_identity_id": - data = nil - case "death_seconds72": - data = nil - case "death_year": - data = nil - case "deity": - data = nil - case "ent_pop_id": - data = nil - case "entity_former_position_link": - v := EntityFormerPositionLink{} -v.Parse(d, &t) -obj.EntityFormerPositionLink = append(obj.EntityFormerPositionLink, v) - case "entity_link": - v := EntityLink{} -v.Parse(d, &t) -obj.EntityLink = append(obj.EntityLink, v) - case "entity_position_link": - v := EntityPositionLink{} -v.Parse(d, &t) -obj.EntityPositionLink = append(obj.EntityPositionLink, v) - case "entity_reputation": - v := EntityReputation{} -v.Parse(d, &t) -obj.EntityReputation = append(obj.EntityReputation, v) - case "entity_squad_link": - v := EntitySquadLink{} -v.Parse(d, &t) -obj.EntitySquadLink = v - case "force": - data = nil - case "goal": - data = nil - case "hf_link": - v := HfLink{} -v.Parse(d, &t) -obj.HfLink = append(obj.HfLink, v) - case "hf_skill": - v := HfSkill{} -v.Parse(d, &t) -obj.HfSkill = append(obj.HfSkill, v) - case "holds_artifact": - data = nil - case "honor_entity": - v := HonorEntity{} -v.Parse(d, &t) -obj.HonorEntity = append(obj.HonorEntity, v) - case "id": - data = nil - case "interaction_knowledge": - data = nil - case "intrigue_actor": - v := IntrigueActor{} -v.Parse(d, &t) -obj.IntrigueActor = append(obj.IntrigueActor, v) - case "intrigue_plot": - v := IntriguePlot{} -v.Parse(d, &t) -obj.IntriguePlot = append(obj.IntriguePlot, v) - case "journey_pet": - data = nil - case "name": - data = nil - case "race": - data = nil - case "relationship_profile_hf_historical": - v := RelationshipProfileHfHistorical{} -v.Parse(d, &t) -obj.RelationshipProfileHfHistorical = append(obj.RelationshipProfileHfHistorical, v) - case "relationship_profile_hf_visual": - v := RelationshipProfileHfVisual{} -v.Parse(d, &t) -obj.RelationshipProfileHfVisual = append(obj.RelationshipProfileHfVisual, v) - case "sex": - data = nil - case "site_link": - v := SiteLink{} -v.Parse(d, &t) -obj.SiteLink = append(obj.SiteLink, v) - case "site_property": - v := SiteProperty{} -v.Parse(d, &t) -obj.SiteProperty = append(obj.SiteProperty, v) - case "sphere": - data = nil - case "used_identity_id": - data = nil - case "vague_relationship": - v := VagueRelationship{} -v.Parse(d, &t) -obj.VagueRelationship = append(obj.VagueRelationship, v) - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "active_interaction": - obj.ActiveInteraction = append(obj.ActiveInteraction, string(data)) - case "animated": - obj.Animated = string(data) - case "animated_string": - obj.AnimatedString = string(data) - case "appeared": - obj.Appeared = n(data) - case "associated_type": - obj.AssociatedType = string(data) - case "birth_seconds72": - obj.BirthSeconds72 = n(data) - case "birth_year": - obj.BirthYear = n(data) - case "caste": - obj.Caste = string(data) - case "current_identity_id": - obj.CurrentIdentityId = n(data) - case "death_seconds72": - obj.DeathSeconds72 = n(data) - case "death_year": - obj.DeathYear = n(data) - case "deity": - obj.Deity = string(data) - case "ent_pop_id": - obj.EntPopId = n(data) - case "entity_former_position_link": - - case "entity_link": - - case "entity_position_link": - - case "entity_reputation": - - case "entity_squad_link": - - case "force": - obj.Force = string(data) - case "goal": - obj.Goal = append(obj.Goal, string(data)) - case "hf_link": - - case "hf_skill": - - case "holds_artifact": - obj.HoldsArtifact = append(obj.HoldsArtifact, n(data)) - case "honor_entity": - - case "id": - obj.Id_ = n(data) - case "interaction_knowledge": - obj.InteractionKnowledge = append(obj.InteractionKnowledge, string(data)) - case "intrigue_actor": - - case "intrigue_plot": - - case "journey_pet": - obj.JourneyPet = append(obj.JourneyPet, string(data)) - case "name": - obj.Name_ = string(data) - case "race": - obj.Race = string(data) - case "relationship_profile_hf_historical": - - case "relationship_profile_hf_visual": - - case "sex": - obj.Sex = n(data) - case "site_link": - - case "site_property": - - case "sphere": - obj.Sphere = append(obj.Sphere, string(data)) - case "used_identity_id": - obj.UsedIdentityId = append(obj.UsedIdentityId, n(data)) - case "vague_relationship": - - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Honor) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "exempt_epid": - data = nil - case "exempt_former_epid": - data = nil - case "gives_precedence": - data = nil - case "granted_to_everybody": - data = nil - case "id": - data = nil - case "name": - data = nil - case "required_battles": - data = nil - case "required_kills": - data = nil - case "required_skill": - data = nil - case "required_skill_ip_total": - data = nil - case "required_years": - data = nil - case "requires_any_melee_or_ranged_skill": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "exempt_epid": - obj.ExemptEpid = n(data) - case "exempt_former_epid": - obj.ExemptFormerEpid = n(data) - case "gives_precedence": - obj.GivesPrecedence = n(data) - case "granted_to_everybody": - obj.GrantedToEverybody = string(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "required_battles": - obj.RequiredBattles = n(data) - case "required_kills": - obj.RequiredKills = n(data) - case "required_skill": - obj.RequiredSkill = string(data) - case "required_skill_ip_total": - obj.RequiredSkillIpTotal = n(data) - case "required_years": - obj.RequiredYears = n(data) - case "requires_any_melee_or_ranged_skill": - obj.RequiresAnyMeleeOrRangedSkill = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *HonorEntity) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "battles": - data = nil - case "entity": - data = nil - case "honor_id": - data = nil - case "kills": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "battles": - obj.Battles = n(data) - case "entity": - obj.Entity = n(data) - case "honor_id": - obj.HonorId = append(obj.HonorId, n(data)) - case "kills": - obj.Kills = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Identity) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "birth_second": - data = nil - case "birth_year": - data = nil - case "caste": - data = nil - case "entity_id": - data = nil - case "histfig_id": - data = nil - case "id": - data = nil - case "name": - data = nil - case "nemesis_id": - data = nil - case "profession": - data = nil - case "race": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "birth_second": - obj.BirthSecond = n(data) - case "birth_year": - obj.BirthYear = n(data) - case "caste": - obj.Caste = string(data) - case "entity_id": - obj.EntityId = n(data) - case "histfig_id": - obj.HistfigId = n(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "nemesis_id": - obj.NemesisId = n(data) - case "profession": - obj.Profession = string(data) - case "race": - obj.Race = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *IntrigueActor) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "handle_actor_id": - data = nil - case "hfid": - data = nil - case "local_id": - data = nil - case "promised_actor_immortality": - data = nil - case "promised_me_immortality": - data = nil - case "role": - data = nil - case "strategy": - data = nil - case "strategy_enid": - data = nil - case "strategy_eppid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "handle_actor_id": - obj.HandleActorId = n(data) - case "hfid": - obj.Hfid = n(data) - case "local_id": - obj.LocalId = n(data) - case "promised_actor_immortality": - obj.PromisedActorImmortality = string(data) - case "promised_me_immortality": - obj.PromisedMeImmortality = string(data) - case "role": - obj.Role = string(data) - case "strategy": - obj.Strategy = string(data) - case "strategy_enid": - obj.StrategyEnid = n(data) - case "strategy_eppid": - obj.StrategyEppid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *IntriguePlot) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "actor_id": - data = nil - case "artifact_id": - data = nil - case "delegated_plot_hfid": - data = nil - case "delegated_plot_id": - data = nil - case "entity_id": - data = nil - case "local_id": - data = nil - case "on_hold": - data = nil - case "parent_plot_hfid": - data = nil - case "parent_plot_id": - data = nil - case "plot_actor": - v := PlotActor{} -v.Parse(d, &t) -obj.PlotActor = append(obj.PlotActor, v) - case "type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "actor_id": - obj.ActorId = n(data) - case "artifact_id": - obj.ArtifactId = n(data) - case "delegated_plot_hfid": - obj.DelegatedPlotHfid = n(data) - case "delegated_plot_id": - obj.DelegatedPlotId = n(data) - case "entity_id": - obj.EntityId = n(data) - case "local_id": - obj.LocalId = n(data) - case "on_hold": - obj.OnHold = string(data) - case "parent_plot_hfid": - obj.ParentPlotHfid = n(data) - case "parent_plot_id": - obj.ParentPlotId = n(data) - case "plot_actor": - - case "type": - obj.Type = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Item) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "name_string": - data = nil - case "page_number": - data = nil - case "page_written_content_id": - data = nil - case "writing_written_content_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "name_string": - obj.NameString = string(data) - case "page_number": - obj.PageNumber = n(data) - case "page_written_content_id": - obj.PageWrittenContentId = n(data) - case "writing_written_content_id": - obj.WritingWrittenContentId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Landmass) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coord_1": - data = nil - case "coord_2": - data = nil - case "id": - data = nil - case "name": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "coord_1": - obj.Coord1 = string(data) - case "coord_2": - obj.Coord2 = string(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *MountainPeak) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "height": - data = nil - case "id": - data = nil - case "is_volcano": - data = nil - case "name": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "height": - obj.Height = n(data) - case "id": - obj.Id_ = n(data) - case "is_volcano": - obj.IsVolcano = string(data) - case "name": - obj.Name_ = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *MusicalForm) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "description": - data = nil - case "id": - data = nil - case "name": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "description": - obj.Description = string(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Occasion) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "event": - data = nil - case "id": - data = nil - case "name": - data = nil - case "schedule": - v := Schedule{} -v.Parse(d, &t) -obj.Schedule = v - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "event": - obj.Event = n(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = n(data) - case "schedule": - - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *PlotActor) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "actor_id": - data = nil - case "agreement_has_messenger": - data = nil - case "agreement_id": - data = nil - case "plot_role": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "actor_id": - obj.ActorId = n(data) - case "agreement_has_messenger": - obj.AgreementHasMessenger = string(data) - case "agreement_id": - obj.AgreementId = n(data) - case "plot_role": - obj.PlotRole = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *PoeticForm) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "description": - data = nil - case "id": - data = nil - case "name": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "description": - obj.Description = string(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Reference) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "id": - data = nil - case "type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "id": - obj.Id_ = n(data) - case "type": - obj.Type = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Region) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "evilness": - data = nil - case "force_id": - data = nil - case "id": - data = nil - case "name": - data = nil - case "type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "evilness": - obj.Evilness = string(data) - case "force_id": - obj.ForceId = n(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "type": - obj.Type = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *RelationshipProfileHfHistorical) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "fear": - data = nil - case "hf_id": - data = nil - case "love": - data = nil - case "loyalty": - data = nil - case "respect": - data = nil - case "trust": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "fear": - obj.Fear = n(data) - case "hf_id": - obj.HfId = n(data) - case "love": - obj.Love = n(data) - case "loyalty": - obj.Loyalty = n(data) - case "respect": - obj.Respect = n(data) - case "trust": - obj.Trust = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *RelationshipProfileHfVisual) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "fear": - data = nil - case "hf_id": - data = nil - case "known_identity_id": - data = nil - case "last_meet_seconds72": - data = nil - case "last_meet_year": - data = nil - case "love": - data = nil - case "loyalty": - data = nil - case "meet_count": - data = nil - case "rep_friendly": - data = nil - case "rep_information_source": - data = nil - case "respect": - data = nil - case "trust": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "fear": - obj.Fear = n(data) - case "hf_id": - obj.HfId = n(data) - case "known_identity_id": - obj.KnownIdentityId = n(data) - case "last_meet_seconds72": - obj.LastMeetSeconds72 = n(data) - case "last_meet_year": - obj.LastMeetYear = n(data) - case "love": - obj.Love = n(data) - case "loyalty": - obj.Loyalty = n(data) - case "meet_count": - obj.MeetCount = n(data) - case "rep_friendly": - obj.RepFriendly = n(data) - case "rep_information_source": - obj.RepInformationSource = n(data) - case "respect": - obj.Respect = n(data) - case "trust": - obj.Trust = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *River) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "end_pos": - data = nil - case "name": - data = nil - case "path": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "end_pos": - obj.EndPos = string(data) - case "name": - obj.Name_ = string(data) - case "path": - obj.Path = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Schedule) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "feature": - v := Feature{} -v.Parse(d, &t) -obj.Feature = v - case "id": - data = nil - case "item_subtype": - data = nil - case "item_type": - data = nil - case "reference": - data = nil - case "reference2": - data = nil - case "type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "feature": - - case "id": - obj.Id_ = n(data) - case "item_subtype": - obj.ItemSubtype = n(data) - case "item_type": - obj.ItemType = n(data) - case "reference": - obj.Reference = n(data) - case "reference2": - obj.Reference2 = n(data) - case "type": - obj.Type = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Site) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "civ_id": - data = nil - case "coords": - data = nil - case "cur_owner_id": - data = nil - case "id": - data = nil - case "name": - data = nil - case "rectangle": - data = nil - case "site_properties": - - case "structures": - - case "type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "civ_id": - obj.CivId = n(data) - case "coords": - obj.Coords = n(data) - case "cur_owner_id": - obj.CurOwnerId = n(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = n(data) - case "rectangle": - obj.Rectangle = n(data) - case "site_properties": - - case "structures": - - case "type": - obj.Type = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *SiteLink) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "entity_id": - data = nil - case "link_type": - data = nil - case "occupation_id": - data = nil - case "site_id": - data = nil - case "sub_id": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "entity_id": - obj.EntityId = n(data) - case "link_type": - obj.LinkType = string(data) - case "occupation_id": - obj.OccupationId = n(data) - case "site_id": - obj.SiteId = n(data) - case "sub_id": - obj.SubId = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *SiteProperty) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "id": - data = nil - case "owner_hfid": - data = nil - case "structure_id": - data = nil - case "type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "id": - obj.Id_ = n(data) - case "owner_hfid": - obj.OwnerHfid = n(data) - case "structure_id": - obj.StructureId = n(data) - case "type": - obj.Type = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *Structure) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "copied_artifact_id": - data = nil - case "deity": - data = nil - case "deity_type": - data = nil - case "dungeon_type": - data = nil - case "entity_id": - data = nil - case "id": - data = nil - case "inhabitant": - data = nil - case "local_id": - data = nil - case "name": - data = nil - case "name2": - data = nil - case "religion": - data = nil - case "subtype": - data = nil - case "type": - data = nil - case "worship_hfid": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "copied_artifact_id": - obj.CopiedArtifactId = n(data) - case "deity": - obj.Deity = n(data) - case "deity_type": - obj.DeityType = n(data) - case "dungeon_type": - obj.DungeonType = n(data) - case "entity_id": - obj.EntityId = n(data) - case "id": - obj.Id_ = n(data) - case "inhabitant": - obj.Inhabitant = n(data) - case "local_id": - obj.LocalId = n(data) - case "name": - obj.Name_ = n(data) - case "name2": - obj.Name2 = n(data) - case "religion": - obj.Religion = n(data) - case "subtype": - obj.Subtype = n(data) - case "type": - obj.Type = string(data) - case "worship_hfid": - obj.WorshipHfid = n(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *UndergroundRegion) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "depth": - data = nil - case "id": - data = nil - case "type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = string(data) - case "depth": - obj.Depth = n(data) - case "id": - obj.Id_ = n(data) - case "type": - obj.Type = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *VagueRelationship) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "artistic_buddy": - data = nil - case "atheletic_rival": - data = nil - case "athlete_buddy": - data = nil - case "business_rival": - data = nil - case "childhood_friend": - data = nil - case "grudge": - data = nil - case "hfid": - data = nil - case "jealous_obsession": - data = nil - case "jealous_relationship_grudge": - data = nil - case "persecution_grudge": - data = nil - case "religious_persecution_grudge": - data = nil - case "scholar_buddy": - data = nil - case "supernatural_grudge": - data = nil - case "war_buddy": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "artistic_buddy": - obj.ArtisticBuddy = string(data) - case "atheletic_rival": - obj.AtheleticRival = string(data) - case "athlete_buddy": - obj.AthleteBuddy = string(data) - case "business_rival": - obj.BusinessRival = string(data) - case "childhood_friend": - obj.ChildhoodFriend = string(data) - case "grudge": - obj.Grudge = string(data) - case "hfid": - obj.Hfid = n(data) - case "jealous_obsession": - obj.JealousObsession = string(data) - case "jealous_relationship_grudge": - obj.JealousRelationshipGrudge = string(data) - case "persecution_grudge": - obj.PersecutionGrudge = string(data) - case "religious_persecution_grudge": - obj.ReligiousPersecutionGrudge = string(data) - case "scholar_buddy": - obj.ScholarBuddy = string(data) - case "supernatural_grudge": - obj.SupernaturalGrudge = string(data) - case "war_buddy": - obj.WarBuddy = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *WorldConstruction) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "coords": - data = nil - case "id": - data = nil - case "name": - data = nil - case "type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "coords": - obj.Coords = n(data) - case "id": - obj.Id_ = n(data) - case "name": - obj.Name_ = string(data) - case "type": - obj.Type = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} -func (obj *WrittenContent) Parse(d *xml.Decoder, start *xml.StartElement) error { - var data []byte - - for { - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case xml.StartElement: - switch t.Name.Local { - case "author": - data = nil - case "author_hfid": - data = nil - case "author_roll": - data = nil - case "form": - data = nil - case "form_id": - data = nil - case "id": - data = nil - case "page_end": - data = nil - case "page_start": - data = nil - case "reference": - v := Reference{} -v.Parse(d, &t) -obj.Reference = append(obj.Reference, v) - case "style": - data = nil - case "title": - data = nil - case "type": - data = nil - default: - fmt.Println("unknown field", t.Name.Local) - d.Skip() - } - - case xml.CharData: - data = append(data, t...) - - case xml.EndElement: - if t.Name.Local == start.Name.Local { - return nil - } - - switch t.Name.Local { - case "author": - obj.Author = n(data) - case "author_hfid": - obj.AuthorHfid = n(data) - case "author_roll": - obj.AuthorRoll = n(data) - case "form": - obj.Form = string(data) - case "form_id": - obj.FormId = n(data) - case "id": - obj.Id_ = n(data) - case "page_end": - obj.PageEnd = n(data) - case "page_start": - obj.PageStart = n(data) - case "reference": - - case "style": - obj.Style = append(obj.Style, string(data)) - case "title": - obj.Title = string(data) - case "type": - obj.Type = string(data) - default: - fmt.Println("unknown field", t.Name.Local) - } - } - } -} diff --git a/generate.go b/generate.go deleted file mode 100644 index 76395cf..0000000 --- a/generate.go +++ /dev/null @@ -1,7 +0,0 @@ -//go:build ignore - -package main - -// func main() { -// generate.Generate() -// }