From afe29fdadfa2bbb8ba3e30670794dcdce576fce0 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Sun, 9 May 2010 21:46:41 +0000 Subject: [PATCH] Fix errors and inconsistencies in entity template XML files This was SVN commit r7532. --- .../entities/structures/rome_civil_centre.xml | 4 +- .../units/pers_cavalry_spearman_b.xml | 6 +- .../units/pers_cavalry_swordsman_b.xml | 6 +- .../entities/units/pers_ship_trireme.xml | 4 +- .../units/rome_cavalry_spearman_e.xml | 8 +- .../units/rome_infantry_javelinist_e.xml | 6 +- .../units/rome_mechanical_siege_scorpio.xml | 6 +- .../entities/units/rome_ship_quinquereme.xml | 4 +- .../templates/units/pers_ship_trireme.xml | 4 + .../units/rome_cavalry_spearman_e.xml | 6 +- .../templates/units/rome_ship_quinquereme.xml | 4 + .../entities/structures/celt_barracks.xml | 6 +- .../entities/structures/celt_civil_centre.xml | 6 +- .../entities/structures/celt_fortress_g.xml | 4 +- .../entities/structures/hele_barracks.xml | 4 +- .../public/entities/structures/hele_dock.xml | 4 +- .../public/entities/structures/hele_mill.xml | 6 +- .../mods/public/entities/template_corpse.xml | 8 +- .../public/entities/template_unit_hero.xml | 4 +- .../entities/template_unit_hero_cavalry.xml | 4 +- .../entities/template_unit_hero_infantry.xml | 4 +- .../entities/template_unit_hero_ranged.xml | 4 +- .../public/entities/template_unit_super.xml | 2 +- .../public/entities/template_unit_support.xml | 4 +- .../units/celt_cavalry_spearman_a.xml | 4 +- .../units/celt_cavalry_spearman_b.xml | 4 +- .../units/celt_cavalry_spearman_e.xml | 4 +- .../units/celt_cavalry_swordsman_b.xml | 4 +- .../units/celt_infantry_spearman_b.xml | 4 +- .../units/hele_cavalry_swordsman_a.xml | 6 +- .../units/hele_cavalry_swordsman_e.xml | 6 +- .../entities/units/hele_infantry_archer_a.xml | 6 +- .../entities/units/hele_infantry_archer_e.xml | 6 +- .../hele_mechanical_siege_lithobolos.xml | 6 +- .../units/hele_mechanical_siege_oxybeles.xml | 6 +- .../units/hele_ship_trireme_corinthian.xml | 4 +- .../simulation/templates/template_corpse.xml | 6 - .../units/hele_cavalry_swordsman_a.xml | 3 + .../units/hele_cavalry_swordsman_e.xml | 3 + .../units/hele_infantry_archer_a.xml | 3 + .../units/hele_infantry_archer_e.xml | 3 + .../units/hele_ship_trireme_corinthian.xml | 4 + source/tools/entconvert/entconvert.pl | 44 ++- source/tools/entconvert/oldformat.rnc | 255 ++++++++++++++++++ 44 files changed, 387 insertions(+), 112 deletions(-) delete mode 100644 binaries/data/mods/public/simulation/templates/template_corpse.xml create mode 100644 source/tools/entconvert/oldformat.rnc diff --git a/binaries/data/mods/internal/entities/structures/rome_civil_centre.xml b/binaries/data/mods/internal/entities/structures/rome_civil_centre.xml index 99b813057c..71e7d4e08c 100644 --- a/binaries/data/mods/internal/entities/structures/rome_civil_centre.xml +++ b/binaries/data/mods/internal/entities/structures/rome_civil_centre.xml @@ -1,7 +1,6 @@ - structures/romans/civic_centre.xml Municipium @@ -20,4 +19,5 @@ - \ No newline at end of file + structures/romans/civic_centre.xml + diff --git a/binaries/data/mods/internal/entities/units/pers_cavalry_spearman_b.xml b/binaries/data/mods/internal/entities/units/pers_cavalry_spearman_b.xml index 7ea61283b6..45de5c8101 100644 --- a/binaries/data/mods/internal/entities/units/pers_cavalry_spearman_b.xml +++ b/binaries/data/mods/internal/entities/units/pers_cavalry_spearman_b.xml @@ -19,11 +19,7 @@ - - - - units/persians/cavalry_spearman_b.xml - \ No newline at end of file + diff --git a/binaries/data/mods/internal/entities/units/pers_cavalry_swordsman_b.xml b/binaries/data/mods/internal/entities/units/pers_cavalry_swordsman_b.xml index 8290aa2cec..3d4d91124c 100644 --- a/binaries/data/mods/internal/entities/units/pers_cavalry_swordsman_b.xml +++ b/binaries/data/mods/internal/entities/units/pers_cavalry_swordsman_b.xml @@ -19,11 +19,7 @@ - - - - units/persians/cavalry_swordsman_b.xml - \ No newline at end of file + diff --git a/binaries/data/mods/internal/entities/units/pers_ship_trireme.xml b/binaries/data/mods/internal/entities/units/pers_ship_trireme.xml index a127c4a874..b98b9a7964 100644 --- a/binaries/data/mods/internal/entities/units/pers_ship_trireme.xml +++ b/binaries/data/mods/internal/entities/units/pers_ship_trireme.xml @@ -15,14 +15,14 @@ - - 6.0 50.0 8.0 + + diff --git a/binaries/data/mods/internal/entities/units/rome_cavalry_spearman_e.xml b/binaries/data/mods/internal/entities/units/rome_cavalry_spearman_e.xml index 3c77457fb2..bc20df44ea 100644 --- a/binaries/data/mods/internal/entities/units/rome_cavalry_spearman_e.xml +++ b/binaries/data/mods/internal/entities/units/rome_cavalry_spearman_e.xml @@ -2,10 +2,6 @@ - - - units/romans/cavalry_spearman_e.xml - - + units/romans/cavalry_spearman_e.xml - \ No newline at end of file + diff --git a/binaries/data/mods/internal/entities/units/rome_infantry_javelinist_e.xml b/binaries/data/mods/internal/entities/units/rome_infantry_javelinist_e.xml index 8f7f11281b..32867523ad 100644 --- a/binaries/data/mods/internal/entities/units/rome_infantry_javelinist_e.xml +++ b/binaries/data/mods/internal/entities/units/rome_infantry_javelinist_e.xml @@ -2,8 +2,6 @@ - units/romans/infantry_javelinist_e.xml - 105 @@ -40,4 +38,6 @@ - \ No newline at end of file + units/romans/infantry_javelinist_e.xml + + diff --git a/binaries/data/mods/internal/entities/units/rome_mechanical_siege_scorpio.xml b/binaries/data/mods/internal/entities/units/rome_mechanical_siege_scorpio.xml index b8f47c6e05..7e8f2d0c85 100644 --- a/binaries/data/mods/internal/entities/units/rome_mechanical_siege_scorpio.xml +++ b/binaries/data/mods/internal/entities/units/rome_mechanical_siege_scorpio.xml @@ -2,8 +2,6 @@ - units/romans/siege_scorpio.xml - @@ -38,4 +36,6 @@ - \ No newline at end of file + units/romans/siege_scorpio.xml + + diff --git a/binaries/data/mods/internal/entities/units/rome_ship_quinquereme.xml b/binaries/data/mods/internal/entities/units/rome_ship_quinquereme.xml index 1c71167af7..ec7a0a7198 100644 --- a/binaries/data/mods/internal/entities/units/rome_ship_quinquereme.xml +++ b/binaries/data/mods/internal/entities/units/rome_ship_quinquereme.xml @@ -15,14 +15,14 @@ - - 6.0 50.0 8.0 + + diff --git a/binaries/data/mods/internal/simulation/templates/units/pers_ship_trireme.xml b/binaries/data/mods/internal/simulation/templates/units/pers_ship_trireme.xml index 436c752b87..f7d4862250 100644 --- a/binaries/data/mods/internal/simulation/templates/units/pers_ship_trireme.xml +++ b/binaries/data/mods/internal/simulation/templates/units/pers_ship_trireme.xml @@ -10,4 +10,8 @@ structures/persians/trireme.xml + + + 8.0 + diff --git a/binaries/data/mods/internal/simulation/templates/units/rome_cavalry_spearman_e.xml b/binaries/data/mods/internal/simulation/templates/units/rome_cavalry_spearman_e.xml index f3f0b12805..81161599bf 100644 --- a/binaries/data/mods/internal/simulation/templates/units/rome_cavalry_spearman_e.xml +++ b/binaries/data/mods/internal/simulation/templates/units/rome_cavalry_spearman_e.xml @@ -1,10 +1,6 @@ - - - units/romans/cavalry_spearman_e.xml - - + units/romans/cavalry_spearman_e.xml diff --git a/binaries/data/mods/internal/simulation/templates/units/rome_ship_quinquereme.xml b/binaries/data/mods/internal/simulation/templates/units/rome_ship_quinquereme.xml index 25a30e64ba..1222336f7f 100644 --- a/binaries/data/mods/internal/simulation/templates/units/rome_ship_quinquereme.xml +++ b/binaries/data/mods/internal/simulation/templates/units/rome_ship_quinquereme.xml @@ -10,4 +10,8 @@ structures/romans/quinquereme.xml + + + 8.0 + diff --git a/binaries/data/mods/public/entities/structures/celt_barracks.xml b/binaries/data/mods/public/entities/structures/celt_barracks.xml index 3a490697ab..2bc1bbd028 100644 --- a/binaries/data/mods/public/entities/structures/celt_barracks.xml +++ b/binaries/data/mods/public/entities/structures/celt_barracks.xml @@ -20,8 +20,6 @@ - structures/celts/barracks.xml - @@ -36,4 +34,6 @@ - \ No newline at end of file + structures/celts/barracks.xml + + diff --git a/binaries/data/mods/public/entities/structures/celt_civil_centre.xml b/binaries/data/mods/public/entities/structures/celt_civil_centre.xml index 74fe7cadf4..272605e7a8 100644 --- a/binaries/data/mods/public/entities/structures/celt_civil_centre.xml +++ b/binaries/data/mods/public/entities/structures/celt_civil_centre.xml @@ -17,8 +17,6 @@ - structures/celts/civil_centre.xml - @@ -31,4 +29,6 @@ - \ No newline at end of file + structures/celts/civil_centre.xml + + diff --git a/binaries/data/mods/public/entities/structures/celt_fortress_g.xml b/binaries/data/mods/public/entities/structures/celt_fortress_g.xml index e763bc6c9a..155e8e0799 100644 --- a/binaries/data/mods/public/entities/structures/celt_fortress_g.xml +++ b/binaries/data/mods/public/entities/structures/celt_fortress_g.xml @@ -1,7 +1,6 @@ - structures/celts/fortress_gallic.xml Gallic Dun @@ -28,4 +27,5 @@ - \ No newline at end of file + structures/celts/fortress_gallic.xml + diff --git a/binaries/data/mods/public/entities/structures/hele_barracks.xml b/binaries/data/mods/public/entities/structures/hele_barracks.xml index a522fd90f1..5f48a4a9ed 100644 --- a/binaries/data/mods/public/entities/structures/hele_barracks.xml +++ b/binaries/data/mods/public/entities/structures/hele_barracks.xml @@ -1,7 +1,6 @@ - structures/hellenes/barracks.xml Strategion @@ -33,4 +32,5 @@ - \ No newline at end of file + structures/hellenes/barracks.xml + diff --git a/binaries/data/mods/public/entities/structures/hele_dock.xml b/binaries/data/mods/public/entities/structures/hele_dock.xml index 068fbd8de3..1c167a52b2 100644 --- a/binaries/data/mods/public/entities/structures/hele_dock.xml +++ b/binaries/data/mods/public/entities/structures/hele_dock.xml @@ -1,7 +1,6 @@ -structures/hellenes/dock.xml Limenos @@ -30,4 +29,5 @@ - \ No newline at end of file + structures/hellenes/dock.xml + diff --git a/binaries/data/mods/public/entities/structures/hele_mill.xml b/binaries/data/mods/public/entities/structures/hele_mill.xml index f7ce5a70e3..5568f3ffe2 100644 --- a/binaries/data/mods/public/entities/structures/hele_mill.xml +++ b/binaries/data/mods/public/entities/structures/hele_mill.xml @@ -15,8 +15,6 @@ - structures/hellenes/mill.xml - @@ -30,4 +28,6 @@ - \ No newline at end of file + structures/hellenes/mill.xml + + diff --git a/binaries/data/mods/public/entities/template_corpse.xml b/binaries/data/mods/public/entities/template_corpse.xml index c8c2a18f2b..8202d2646c 100644 --- a/binaries/data/mods/public/entities/template_corpse.xml +++ b/binaries/data/mods/public/entities/template_corpse.xml @@ -10,12 +10,12 @@ Corpse + + 0.0 + 1.0 + - - 0.0 - 1.0 - diff --git a/binaries/data/mods/public/entities/template_unit_hero.xml b/binaries/data/mods/public/entities/template_unit_hero.xml index de7aa32272..a4eded5f6a 100644 --- a/binaries/data/mods/public/entities/template_unit_hero.xml +++ b/binaries/data/mods/public/entities/template_unit_hero.xml @@ -34,7 +34,7 @@ 1000 10 - 10 + 10 10 100 @@ -75,4 +75,4 @@ audio/actor/human/death/death.xml - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/template_unit_hero_cavalry.xml b/binaries/data/mods/public/entities/template_unit_hero_cavalry.xml index d50705be59..8b927399bf 100644 --- a/binaries/data/mods/public/entities/template_unit_hero_cavalry.xml +++ b/binaries/data/mods/public/entities/template_unit_hero_cavalry.xml @@ -41,7 +41,7 @@ 1000 15 - 10 + 10 10 100 @@ -81,4 +81,4 @@ audio/actor/fauna/death/death_horse.xml - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/template_unit_hero_infantry.xml b/binaries/data/mods/public/entities/template_unit_hero_infantry.xml index 3b0f93d832..dbeea68c7d 100644 --- a/binaries/data/mods/public/entities/template_unit_hero_infantry.xml +++ b/binaries/data/mods/public/entities/template_unit_hero_infantry.xml @@ -34,7 +34,7 @@ 1000 10 - 10 + 10 10 100 @@ -75,4 +75,4 @@ audio/actor/human/death/death.xml - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/template_unit_hero_ranged.xml b/binaries/data/mods/public/entities/template_unit_hero_ranged.xml index bd15e6d685..dd72ed51c4 100644 --- a/binaries/data/mods/public/entities/template_unit_hero_ranged.xml +++ b/binaries/data/mods/public/entities/template_unit_hero_ranged.xml @@ -29,7 +29,7 @@ 1000 10 - 10 + 10 10 100 @@ -58,4 +58,4 @@ - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/template_unit_super.xml b/binaries/data/mods/public/entities/template_unit_super.xml index 102b54bbdf..a10ca2bc8d 100644 --- a/binaries/data/mods/public/entities/template_unit_super.xml +++ b/binaries/data/mods/public/entities/template_unit_super.xml @@ -12,7 +12,7 @@ 150 5 - 5 + 5 5 10 diff --git a/binaries/data/mods/public/entities/template_unit_support.xml b/binaries/data/mods/public/entities/template_unit_support.xml index 3835559667..a5b870cebd 100644 --- a/binaries/data/mods/public/entities/template_unit_support.xml +++ b/binaries/data/mods/public/entities/template_unit_support.xml @@ -18,7 +18,7 @@ 10 1 - 1 + 1 1 1 @@ -33,4 +33,4 @@ - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/units/celt_cavalry_spearman_a.xml b/binaries/data/mods/public/entities/units/celt_cavalry_spearman_a.xml index 17296113a4..9a7e3ee891 100644 --- a/binaries/data/mods/public/entities/units/celt_cavalry_spearman_a.xml +++ b/binaries/data/mods/public/entities/units/celt_cavalry_spearman_a.xml @@ -41,13 +41,13 @@ 6.0 0.0 3.6 + 46.0 16.0 3.6 - units/celts/cavalry_spearman_a.xml - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/units/celt_cavalry_spearman_b.xml b/binaries/data/mods/public/entities/units/celt_cavalry_spearman_b.xml index bb82a6375f..4bc92bd7b2 100644 --- a/binaries/data/mods/public/entities/units/celt_cavalry_spearman_b.xml +++ b/binaries/data/mods/public/entities/units/celt_cavalry_spearman_b.xml @@ -43,12 +43,12 @@ 0.0 0.0 0.5 + 40.0 0.0 0.5 - 10.0 @@ -58,4 +58,4 @@ units/celts/cavalry_spearman_b.xml - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/units/celt_cavalry_spearman_e.xml b/binaries/data/mods/public/entities/units/celt_cavalry_spearman_e.xml index c7d5f57d5e..a29bd3cddc 100644 --- a/binaries/data/mods/public/entities/units/celt_cavalry_spearman_e.xml +++ b/binaries/data/mods/public/entities/units/celt_cavalry_spearman_e.xml @@ -38,13 +38,13 @@ 7.0 0.0 3.6 + 47.0 17.0 3.6 - units/celts/cavalry_spearman_e.xml - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/units/celt_cavalry_swordsman_b.xml b/binaries/data/mods/public/entities/units/celt_cavalry_swordsman_b.xml index a08b67cf85..35b9d50555 100644 --- a/binaries/data/mods/public/entities/units/celt_cavalry_swordsman_b.xml +++ b/binaries/data/mods/public/entities/units/celt_cavalry_swordsman_b.xml @@ -25,11 +25,11 @@ 18.0 0.0 0.0 + 54.0 0.0 - 14.0 @@ -39,4 +39,4 @@ units/celts/cavalry_swordsman_b.xml - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/units/celt_infantry_spearman_b.xml b/binaries/data/mods/public/entities/units/celt_infantry_spearman_b.xml index c74b5f66a3..49ffab44e9 100644 --- a/binaries/data/mods/public/entities/units/celt_infantry_spearman_b.xml +++ b/binaries/data/mods/public/entities/units/celt_infantry_spearman_b.xml @@ -44,7 +44,7 @@ - /* Charge power increased by 2 because of celts special speed */ + 32.0 12.0 @@ -58,4 +58,4 @@ units/celts/infantry_spearman_b.xml - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/units/hele_cavalry_swordsman_a.xml b/binaries/data/mods/public/entities/units/hele_cavalry_swordsman_a.xml index 928d9a026d..8c98613194 100644 --- a/binaries/data/mods/public/entities/units/hele_cavalry_swordsman_a.xml +++ b/binaries/data/mods/public/entities/units/hele_cavalry_swordsman_a.xml @@ -2,9 +2,9 @@ - + 19 - + hele_cavalry_swordsman_e @@ -46,4 +46,4 @@ units/hellenes/cavalry_swordsman_a.xml - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/units/hele_cavalry_swordsman_e.xml b/binaries/data/mods/public/entities/units/hele_cavalry_swordsman_e.xml index 9d15604b6d..8518a44fe8 100644 --- a/binaries/data/mods/public/entities/units/hele_cavalry_swordsman_e.xml +++ b/binaries/data/mods/public/entities/units/hele_cavalry_swordsman_e.xml @@ -2,9 +2,9 @@ - + 20 - + 160 0.4 @@ -42,4 +42,4 @@ units/hellenes/cavalry_swordsman_e.xml - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/units/hele_infantry_archer_a.xml b/binaries/data/mods/public/entities/units/hele_infantry_archer_a.xml index 5b9548fff4..6aa7f530e3 100644 --- a/binaries/data/mods/public/entities/units/hele_infantry_archer_a.xml +++ b/binaries/data/mods/public/entities/units/hele_infantry_archer_a.xml @@ -2,9 +2,9 @@ - + 10 - + hele_infantry_archer_e @@ -37,4 +37,4 @@ units/hellenes/infantry_archer_a.xml - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/units/hele_infantry_archer_e.xml b/binaries/data/mods/public/entities/units/hele_infantry_archer_e.xml index 7796ca172a..2c6e6d5d06 100644 --- a/binaries/data/mods/public/entities/units/hele_infantry_archer_e.xml +++ b/binaries/data/mods/public/entities/units/hele_infantry_archer_e.xml @@ -2,9 +2,9 @@ - + 11 - + 105 0.4 @@ -40,4 +40,4 @@ units/hellenes/infantry_archer_e.xml - \ No newline at end of file + diff --git a/binaries/data/mods/public/entities/units/hele_mechanical_siege_lithobolos.xml b/binaries/data/mods/public/entities/units/hele_mechanical_siege_lithobolos.xml index 9bc1dafef1..385759fc44 100644 --- a/binaries/data/mods/public/entities/units/hele_mechanical_siege_lithobolos.xml +++ b/binaries/data/mods/public/entities/units/hele_mechanical_siege_lithobolos.xml @@ -2,8 +2,6 @@ - units/hellenes/siege_rock.xml - @@ -38,4 +36,6 @@ - \ No newline at end of file + units/hellenes/siege_rock.xml + + diff --git a/binaries/data/mods/public/entities/units/hele_mechanical_siege_oxybeles.xml b/binaries/data/mods/public/entities/units/hele_mechanical_siege_oxybeles.xml index 8e57375218..48cc09636c 100644 --- a/binaries/data/mods/public/entities/units/hele_mechanical_siege_oxybeles.xml +++ b/binaries/data/mods/public/entities/units/hele_mechanical_siege_oxybeles.xml @@ -2,8 +2,6 @@ - units/hellenes/siege_spear.xml - @@ -38,4 +36,6 @@ - \ No newline at end of file + units/hellenes/siege_spear.xml + + diff --git a/binaries/data/mods/public/entities/units/hele_ship_trireme_corinthian.xml b/binaries/data/mods/public/entities/units/hele_ship_trireme_corinthian.xml index fc7a84068e..59dfb52ff7 100644 --- a/binaries/data/mods/public/entities/units/hele_ship_trireme_corinthian.xml +++ b/binaries/data/mods/public/entities/units/hele_ship_trireme_corinthian.xml @@ -15,14 +15,14 @@ - - 6.0 50.0 8.0 + + diff --git a/binaries/data/mods/public/simulation/templates/template_corpse.xml b/binaries/data/mods/public/simulation/templates/template_corpse.xml deleted file mode 100644 index 0585feb6f8..0000000000 --- a/binaries/data/mods/public/simulation/templates/template_corpse.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - Corpse - - diff --git a/binaries/data/mods/public/simulation/templates/units/hele_cavalry_swordsman_a.xml b/binaries/data/mods/public/simulation/templates/units/hele_cavalry_swordsman_a.xml index 1a971cbd2c..4981d01ef5 100644 --- a/binaries/data/mods/public/simulation/templates/units/hele_cavalry_swordsman_a.xml +++ b/binaries/data/mods/public/simulation/templates/units/hele_cavalry_swordsman_a.xml @@ -1,5 +1,8 @@ + + 19 + 1.5 diff --git a/binaries/data/mods/public/simulation/templates/units/hele_cavalry_swordsman_e.xml b/binaries/data/mods/public/simulation/templates/units/hele_cavalry_swordsman_e.xml index dbbc79a331..2b220bbb29 100644 --- a/binaries/data/mods/public/simulation/templates/units/hele_cavalry_swordsman_e.xml +++ b/binaries/data/mods/public/simulation/templates/units/hele_cavalry_swordsman_e.xml @@ -1,5 +1,8 @@ + + 20 + 2.0 diff --git a/binaries/data/mods/public/simulation/templates/units/hele_infantry_archer_a.xml b/binaries/data/mods/public/simulation/templates/units/hele_infantry_archer_a.xml index a3dc2deea0..c7f574cbd9 100644 --- a/binaries/data/mods/public/simulation/templates/units/hele_infantry_archer_a.xml +++ b/binaries/data/mods/public/simulation/templates/units/hele_infantry_archer_a.xml @@ -1,5 +1,8 @@ + + 10 + 1.5 diff --git a/binaries/data/mods/public/simulation/templates/units/hele_infantry_archer_e.xml b/binaries/data/mods/public/simulation/templates/units/hele_infantry_archer_e.xml index f5e844422b..b7fe35271d 100644 --- a/binaries/data/mods/public/simulation/templates/units/hele_infantry_archer_e.xml +++ b/binaries/data/mods/public/simulation/templates/units/hele_infantry_archer_e.xml @@ -1,5 +1,8 @@ + + 11 + 2.0 diff --git a/binaries/data/mods/public/simulation/templates/units/hele_ship_trireme_corinthian.xml b/binaries/data/mods/public/simulation/templates/units/hele_ship_trireme_corinthian.xml index 3bfe1c6d5d..b8c9256ad8 100644 --- a/binaries/data/mods/public/simulation/templates/units/hele_ship_trireme_corinthian.xml +++ b/binaries/data/mods/public/simulation/templates/units/hele_ship_trireme_corinthian.xml @@ -10,4 +10,8 @@ structures/hellenes/trireme_cor.xml + + + 8.0 + diff --git a/source/tools/entconvert/entconvert.pl b/source/tools/entconvert/entconvert.pl index 9be4c2238e..086bb62ebf 100644 --- a/source/tools/entconvert/entconvert.pl +++ b/source/tools/entconvert/entconvert.pl @@ -3,6 +3,7 @@ use warnings; use File::Find; use XML::Simple; +use XML::LibXML; use Data::Dumper; my $vfsroot = '../../../binaries/data/mods'; @@ -10,6 +11,10 @@ my $vfsroot = '../../../binaries/data/mods'; my (%dot_actor, %dot_inherit); my %xml = ('template_entity_full.xml' => 1, 'template_entity_quasi.xml' => 1); +my $tro = `trang oldformat.rnc oldformat.rng 2>&1`; +die $tro if $tro; +my $rngschema = XML::LibXML::RelaxNG->new(location => 'oldformat.rng'); + convert_all("$vfsroot/public"); convert_all("$vfsroot/internal") if -e "$vfsroot/internal"; @@ -33,6 +38,17 @@ sub convert_all { $name =~ s/\.xml$//; next if $name =~ /^(template_foundation|foundation_)/; + next if $name =~ /^(template_corpse)$/; + + my $doc = XML::LibXML->new->parse_file("$dir/$xml"); + eval { + $rngschema->validate($doc); + }; + if ($@) { + warn $@; + open my $f, "$dir/$xml"; + print <$f>; + } my %opt = (KeyAttr => []); @@ -239,9 +255,9 @@ sub convert { if ($data->{Traits}[0]{Footprint}) { my $r = ''; - $r = ' replace=""' if - ($data->{Traits}[0]{Footprint}[0]{Width} and $data->{Parent} =~ /^template_(unit|unit_mechanical|unit_mechanical_siege|unit_mechanical_siege_onager|unit_(super|hero)_ranged)$/) or - ($data->{Traits}[0]{Footprint}[0]{Radius} and $data->{Parent} =~ /^template_structure_(special|military_fortress)$/); + $r = ' replace=""' if $data->{Parent} and + (($data->{Traits}[0]{Footprint}[0]{Width} and $data->{Parent} =~ /^template_(unit|unit_mechanical|unit_mechanical_siege|unit_mechanical_siege_onager|unit_(super|hero)_ranged)$/) or + ($data->{Traits}[0]{Footprint}[0]{Radius} and $data->{Parent} =~ /^template_structure_(special|military_fortress)$/)); $out .= qq{$i\n}; if ($data->{Traits}[0]{Footprint}[0]{Radius}) { $out .= qq{$i$i\n}; @@ -328,16 +344,18 @@ digraph g node [fontname=ArialN fontsize=8]; node [shape=rectangle]; EOF -for (sort grep { not $dot_actor{$_} } keys %dot_actor) { - print $dot qq{"$_";\n}; -} -print $dot qq{node [style=filled fillcolor=lightgray]\n}; -for (sort grep { $dot_actor{$_} } keys %dot_actor) { - print $dot qq{"$_";\n}; -} -print $dot qq{node [style=solid shape=ellipse]\n}; -for (sort grep { $dot_actor{$_} } keys %dot_actor) { - print $dot qq{"$dot_actor{$_}[0]" -> "$_";\n}; +if (0) { + for (sort grep { not $dot_actor{$_} } keys %dot_actor) { + print $dot qq{"$_";\n}; + } + print $dot qq{node [style=filled fillcolor=lightgray]\n}; + for (sort grep { $dot_actor{$_} } keys %dot_actor) { + print $dot qq{"$_";\n}; + } + print $dot qq{node [style=solid shape=ellipse]\n}; + for (sort grep { $dot_actor{$_} } keys %dot_actor) { + print $dot qq{"$dot_actor{$_}[0]" -> "$_";\n}; #" + } } for my $p (sort keys %dot_inherit) { for my $c (sort keys %{$dot_inherit{$p}}) { diff --git a/source/tools/entconvert/oldformat.rnc b/source/tools/entconvert/oldformat.rnc new file mode 100644 index 0000000000..0ca8a0bc5d --- /dev/null +++ b/source/tools/entconvert/oldformat.rnc @@ -0,0 +1,255 @@ +element Entity { + attribute Parent { text }?, + element Traits { + attribute Extant { "true" }? & # ignore + attribute extant { "" }? & # ignore + element Corpse { text }? & # ignore + element Id { + element Internal_Only { empty }? & # ignore + element Generic { text }? & # ok + element Specific { text }? & # ok + element Icon { text }? & # ok + element Icon_Cell { xsd:integer }? & # ok + element Classes { text }? & # TODO + element Rollover { text }? & # TODO + element Tooltip { text }? & # TODO + element History { text }? & # TODO + element Civ { text }? & # ok + element Civ_Code { text }? # ignore + }? & + element IsTerritoryCentre { "true" }? & # TODO + element Audio { + element Path { text } # ignore + }? & + element Population { + element Rem { xsd:integer }?, # ok + element Add { xsd:integer }? # ok + }? & + element Creation { + element Foundation { text }? & # ok + element Time { xsd:decimal }? & # ok + element Resource { + element Wood { xsd:integer }? & # ok + element Metal { xsd:integer }? & # ok + element Food { xsd:integer }? & # ok + element Stone { xsd:integer }? # ok + }? & + element Socket { "Settlement" }? & # TODO + element BuildingLimitCategory { text }? & # TODO + element TerritoryRestriction { "All" | "Allied" }? # TODO + }? & + element Anchor { + element Type { "Ground" | "Water" }?, # TODO + element ConformX { xsd:decimal }?, # TODO + element ConformZ { xsd:decimal }? # TODO + }? & + element Footprint { + element Radius { xsd:decimal }?, # ok + element Width { xsd:decimal }?, # ok + element Depth { xsd:decimal }?, # ok + element Height { xsd:decimal } # ok + }? & + element Garrison { + element Max { xsd:integer } # TODO + }? & + element Health { + element Max { xsd:integer }?, # ok + element RegenRate { xsd:decimal }?, # ok + element BarHeight { xsd:decimal }?, # TODO + element Bar_Size { xsd:integer }?, # TODO + element Repairable { empty }?, # TODO + element Healable { empty }? # TODO + }? & + element Armour { + element Hack { xsd:decimal }?, # ok + element Pierce { xsd:decimal }?, # ok + element Crush { xsd:decimal }? # ok + }? & + element Stamina { + element Max { xsd:decimal }?, # TODO + element BarHeight { xsd:decimal }?, # TODO + element Bar_Size { xsd:integer }? # TODO + }? & + element Rank { + element Height { xsd:decimal } # TODO + }? & + element Ai { + element Behaviour { "Aggressive" | "Violent" | "Skittish" | "Passive" | "Defensive" } # TODO + }? & + element MiniMap { + element Type { text }, # ok + element Red { xsd:integer }?, # ok + element Green { xsd:integer }?, # ok + element Blue { xsd:integer }? # ok + }? & + element Vision { + element Los { xsd:decimal }?, # TODO + element Permanent { xsd:boolean }? # TODO + }? & + element Supply { + element Max { xsd:integer }, # ok + element Type { text }, # ok + element SubType { text }? # ok + }? & + element Loot { + element Xp { xsd:integer }?, # TODO + element Food { xsd:decimal }?, # TODO + element Wood { xsd:decimal }?, # TODO + element Stone { xsd:integer }?, # TODO + element Metal { xsd:integer }? # TODO + }? & + element Auras { # TODO + element (Dropsite | Infidelity | Allure | Trample | Heal | Fear | Courage) { + element Radius { xsd:decimal }? & + element Bonus { xsd:integer }? & + element Rate { xsd:integer }? & + element Time { xsd:integer }? & + element Speed { xsd:integer }? & + element Duration { xsd:integer }? & + element Crush { xsd:decimal }? & + element Hack { xsd:decimal }? & + element Pierce { xsd:decimal }? & + element Types { + element Food { empty }?, + element Wood { empty }?, + element Stone { empty }?, + element Metal { empty }? + }? & + element r { xsd:decimal }? & + element g { xsd:decimal }? & + element b { xsd:decimal }? & + element a { xsd:decimal }? + }+ + }? & + element Display { # TODO + element Bars { + element Enabled { xsd:boolean }, + element Offset { xsd:decimal }, + element Width { xsd:decimal }, + element Height { xsd:decimal } + } + }? & + element Promotion { # TODO + element Entity { text }?, + element Req { xsd:integer }? + }? & + element Formation { # TODO + element Category { "Melee" }, + element Curr { "Loose" }, + element List { + element * { empty }+ + } + }? + }?, + element Actions { + element Attack { + element Hack { xsd:decimal }?, # TODO + element Pierce { xsd:decimal }?, # TODO + element Crush { xsd:decimal }?, # TODO + element Ranged { + (element Hack { xsd:decimal }? & # ok + element Pierce { xsd:decimal }? & # ok + element Crush { xsd:decimal }?), # ok + element MinRange { xsd:decimal }?, # ok + element Range { xsd:decimal }?, # ok + element Speed { xsd:integer }?, # ok + element ProjectileSpeed { xsd:decimal }? # ok + }?, + element Melee { + element Hack { xsd:decimal }?, # ok + element Pierce { xsd:decimal }?, # ok + element Crush { xsd:decimal }?, # ok + element Range { xsd:decimal }?, # ok + element RangeMin { xsd:decimal }?, # ok + element Speed { xsd:integer }? # ok + }?, + element Charge { # TODO + element Hack { xsd:decimal }?, + element Pierce { xsd:decimal }?, + element Crush { xsd:decimal }?, + element Range { xsd:decimal }?, + element RangeMin { xsd:decimal }?, + element Speed { xsd:integer }? + }? + }? & + element Create { + element List { + element StructCiv { + element * { empty }+ # ok + }?, + element StructMil { + element * { empty }+ # ok + }?, + element Train { + element * { empty }+ # ok + }?, + element Research { + element * { empty }* # TODO + }? + }?, + element Speed { xsd:integer }?, # TODO + element Rally { empty }? # TODO + }? & + element Explore { empty }? & # TODO + element Patrol { empty }? & # TODO + element Escort { + element Distance { xsd:decimal } # TODO + }? & + element Barter { + element List { + element Food { empty }, # TODO + element Wood { empty }, # TODO + element Stone { empty }, # TODO + element Metal { empty } # TODO + } + }? & + element Move { + element Speed { xsd:decimal }, # ok + element Speed_Curr { empty }?, # TODO + element TurningRadius { xsd:decimal }?, # TODO + element Run { + element Speed { xsd:decimal } & # TODO + element Range { xsd:decimal }? & # TODO + element RangeMin { xsd:decimal }? & # TODO + element RegenRate { xsd:decimal }? & # TODO + element DecayRate { xsd:decimal }? # TODO + }?, + element PassThroughAllies { "true" }? # TODO + }? & + element Gather { + element Resource { + element Food { + element Fruit { xsd:decimal }?, # ok + element Grain { xsd:decimal }?, # ok + element Meat { xsd:decimal }, # ok + element Fish { xsd:decimal }? # ok + } & + element Wood { xsd:decimal }? & # ok + element Metal { xsd:decimal }? & # ok + element Stone { xsd:decimal }? # ok + }?, + element AffectedByAllure { "true" }?, # TODO + element Range { xsd:decimal }?, # TODO + element Speed { xsd:integer } # ok + }? & + element Repair { + element Rate { xsd:decimal }, # TODO + element Speed { xsd:integer } # TODO + }? & + element Build { + element Rate { xsd:decimal }, # TODO + element Speed { xsd:integer } # TODO + }? & + element Loot { + element Resources { empty }?, # TODO + element Xp { empty }? # TODO + }? & + element TownBell { empty }? # TODO + }?, + element Actor { text }?, # ok + element SoundGroups { + element (Walk|Run|Melee|Death|Build|Gather_Fruit|Gather_Grain|Gather_Wood|Gather_Stone|Gather_Metal) { text }+ # ok + }?, + element Script { attribute File { text } }?, # TODO + element Event { attribute On { text }, attribute Function { text } }* # TODO +}