Post by ππ³π°π΅π΄π¬πΊ on Apr 26, 2022 21:01:01 GMT
EW4 .x-mod XML-files
π§π§ Under construction - This guide is work in progress and NOT FINISHED π§π§
XML is a universal and human-readable file-format to store different types of data.
EW4 uses XML-files for:
- Spritelibs use XML-files to define the position and size of all single images contained in the spritelib.
- The layout is defined with different layout*.xml files for different screen-sizes.
- Most EW4 settings are defined with different xml-files.
- The tutorial-scripts are programmed in xml
- Effects are programmed with xml-files.
XML-Basics:
XML-files are key-sensitive !
All tag must be closed
<!-- COMMENT --> Comments start with <!-- and end with -->. Comments can be added in line 1 or line 2 (safe). ET does not always support comments at other locations.
If You want to use quotes (") inside your values, (see umlautz), You can use single quotes (') for quoting the value.
For comfortable modding I changed some names and functionality. This document describes all the settings for new EW4 .x mods. For correct formation, set your editor's Tab-width to 4.
List of XML-files in assets/config/:
def_areaname.xml
def_army.xml
def_battle.xml
def_campaign.xml
def_capital.xml
def_card.xml
def_commander.xml
def_construction.xml
def_dialogues.xml
def_effectsanim.xml
def_elementanim.xml
def_installation.xml
def_item.xml
def_map.xml
def_mapterrain.xml
def_motion.xml
def_princess.xml
def_terraintype.xml
def_warzonetech.xml
config/device_resource.xml
config/font_resource.xml
config/def_.xml
def_areaname.xml
Names for installations (cities, factories, stables and ports)
The ID is referenced in the BTL-Files
<areanames> <areanamelist>
<areaname β />
</areanames>
<areaname β />
</areanames>
β Attibutes <areaname> | |
---|---|
id | (0-65535) decimal reference |
name | displayed name |
def_army.xml
Defines all attibutes for all units and countries - country-system.
<armies>
<country β>
<army β />
</country>
<country name="" ref="" />
</armies>
<country β>
<army β />
</country>
<country name="" ref="" />
</armies>
β Attibutes <country> | |
---|---|
name | 3L code |
ref | 3L code of already defined country - no Army enntries |
β Attibutes <army> | |
---|---|
type | infantry | cavalry | artillery | warship | fort |
name | Militia |
grade | 0 | 1=double | 2=tripple |
strength | HP |
movement | ... |
minatk | DOES NOT WORK ! |
maxatk | maxatk per formation |
weapon | gun | guns | mgun | cannon | rocket | cold |
minatkrange | ... |
maxatkrange | ... |
consumption | food consumption |
def_battle.xml def_battlelist.xml
Reference to all btl - files (except tutorial)
The amount of possible campaign-stars is calculated by this setting.
<battles>
<battle β>
</battles>
<battle β>
</battles>
β Attibutes <battle> | |
---|---|
name | name xx (fix sheme ?) X: name must be a scene in anim_mapflag (strategicmap_hd.bin) |
countries | campaign: optional; one or two 3l-Code |
file , file1 | btl-file, with 2 countries you must also define file1 |
hide | hide="1" locks this mission |
age | Age text |
agex , agey | Text center (800*600) |
centerx , centery | Centerpoint of map (800*600) |
scale | Optional - Map and Tactic scaling Attn rescales all coords |
commander | only for campaign, intro commander by name, if missing: Napoleon |
map, warzone | unused |
Scaling:
The coordinates refer to map size of 800*600
Map scaling can be achieved by scale attribute - changes also scale and position of the tactical map.
def_campaign.xml def_battleline.xml
Settings for campaign selection. 6 <list> required, one for each name.
Attn: Comments only in line 1
<campaigns> <battleliist>
<list β />
</campaigns>
<list β />
</campaigns>
β Attibutes <list> | |
---|---|
name | imperialeagle | coalition | romanempire | eastern | america | neversets |
age | displayed age |
countries | displayed flags. 3l codes separed with , |
def_capital.xml
Immage and Tax for LV7 cities (capitals).
<capitals>
<capital β />
</capitals>
<capital β />
</capitals>
β Attibutes <capital> | |
---|---|
id | (0-255) decimal ID |
name | unused |
tax | Income |
image | Image in buildings.xml |
def_card.xml
Building cost
<cards>
<card β />
...
</cards>
<card β />
...
</cards>
β Attibutes <card> | |
---|---|
id | 0-46 CardId (some functions are hard-coded) |
type | recruit | fortress | installation | special |
name | name for fortress | installation | special Attn: the parameter must be present |
army | Unit-Name |
grade | 0-2 Formation |
buildround | for type=fortress: rounds to build |
price | Price Gold |
industry | Price Iron |
def_commander.xml
Attributes for all commander and princess.
Attn: Only with an unlocked APK you can edit this file!
<commanders>
<commander β />
</commanders>
<commander β />
</commanders>
β Attibutes <commander> | |
---|---|
id |
def_construction.xml
Settings for all constructions (Build)
<constructions>
<construction β />
</constructions>
<construction β />
</constructions>
β Attibutes <construction> | |
---|---|
id |
<constructions>
<construction β>
<level β>
<recruit β/>
...
</level>
...
</construction>
...
</constructions>
β Attibutes <construction> | |
---|---|
type | city | industry | stable | port | farmland |
maxlevel | 0-6 The |
β Attibutes <level> | |
---|---|
idx | Level-IDX: 0=I 1=II 2=III 3=IV 4=V 5=VI 6=VII (Capital) |
tax,industry,food | Production / round |
supply | Healing HP / round |
avoid | Construction defense (All) |
β Attibutes <recruit> | |
---|---|
name | Unit Name |
grade | 0 | 1 | 2 = max formation |
def_dialog.xml
Dialogs for BTL-Events
<dialogs>
<dialog β />
...
</dialogs>
<dialog β />
...
</dialogs>
β Attibutes <dialog> | |
---|---|
id |
def_effectsanim.xml
Effects
<effectsanims>
<effectsanim β />
</effectsanims>
<effectsanim β />
</effectsanims>
β Attibutes <effectsanim> | |
---|---|
id |
def_elementanim.xml
Animations
<elementanims>
<elementanim β />
</elementanims>
<elementanim β />
</elementanims>
β Attibutes <elementanim> | |
---|---|
id |
def_installation.xml
Settings for trench etc.
<installations>
<installation β />
</installations>
<installation β />
</installations>
β Attibutes <installation> | |
---|---|
id |
def_item.xml
Attributes for all commander and princess.
Attn: Only with an unlocked APK you can edit this file!
<items>
<item β />
</items>
<item β />
</items>
β Attibutes <item> | |
---|---|
id |
def_map.xml
Map definition.
Attn: Only ID=1 or ID=2 are supported.
<maps>
<map β />
</maps>
<map β />
</maps>
β Attibutes <map> | |
---|---|
id |
def_mapterrain.xml
Assets setup for maps
<mapterrains>
<mapterrain β />
</mapterrains>
<mapterrain β />
</mapterrains>
β Attibutes <mapterrain> | |
---|---|
id |
def_motion.xml
Animations for each unit and country
<motions>
<motion β />
</motions>
<motion β />
</motions>
β Attibutes <motion> | |
---|---|
id |
def_princess.xml
Reward system (princess)
<princesss>
<princess β />
</princesss>
<princess β />
</princesss>
β Attibutes <princess> | |
---|---|
id |
def_terraintype.xml
Movement and evasion setup
<terraintypes>
<terraintype β />
</terraintypes>
<terraintype β />
</terraintypes>
β Attibutes <terraintype> | |
---|---|
id |
def_warzonetech.xml
Predefined tech-level (cheverons)
<warzonetechs>
<warzonetech β />
</warzonetechs>
<warzonetech β />
</warzonetechs>
β Attibutes <warzonetech> | |
---|---|
id |
οΈποΈ 28.Apr.22
Just a reminder - to be deleted
def_areaname.xml
def_army.xml
def_battle.xml
def_campaign.xml
def_capital.xml
def_card.xml
def_commander.xml
def_construction.xml
def_dialogues.xml
def_effectsanim.xml
def_elementanim.xml
def_installation.xml
def_item.xml
def_map.xml
def_mapterrain.xml
def_motion.xml
def_princess.xml
def_terraintype.xml
def_warzonetech.xml
device_resource.xml
eff.xml
font_resource.xml
global_data.xml
layout-1024.xml
layout-512h.xml
layout-534h.xml
layout-568h.xml
layout.xml
locstrings.xml
\=([a-z]*)\=
\n
\n
def_areaname.xml
def_army.xml
def_battle.xml
def_campaign.xml
def_capital.xml
def_card.xml
def_commander.xml
def_construction.xml
def_dialogues.xml
def_effectsanim.xml
def_elementanim.xml
def_installation.xml
def_item.xml
def_map.xml
def_mapterrain.xml
def_motion.xml
def_princess.xml
def_terraintype.xml
def_warzonetech.xml
device_resource.xml
eff.xml
font_resource.xml
global_data.xml
layout-1024.xml
layout-512h.xml
layout-534h.xml
layout-568h.xml
layout.xml
locstrings.xml
\=([a-z]*)\=
\n
<$1s>\n <$1 β />\n</$1s>
\n=$1=\n
β Attibutes <$1> | |
---|---|
id |