Post by ncpiro on Mar 24, 2016 4:40:51 GMT
Public Type BININFO
BOM(3) As Byte
Version As Long
MapW As Long
MapH As Long
End Type
Public Type BINTILE
BackTile As Byte
BackIdx As Byte
BackRefX As Byte
BackRefY As Byte
ForeTile As Byte
ForeIdx As Byte
ForeRefX As Byte
ForeRefY As Byte
WaterEdge As Byte
LandEdge As Byte
Unknown10 As Byte
Unknown11 As Byte
End Type
Public Type BTLINFO
Version As Long
MapID As Long
MapX As Long 'Start pos in full map
MapY As Long 'Start pos in full map
MapW As Long 'BTLTILEV2 number = MapW * MapH
MapH As Long
LegionCount As Long 'BTLLEGIONV2 number
BuildCount As Long 'BTLTILEV2 number
ArmyCount As Long 'BTLARMYV2 number
EventCount As Long 'BTLEVENTV2 number
ShopCount As Long 'BTLSHOPV2 number
VictoryType As Long
VictoryRound As Long
GreatVictoryRound As Long
BarCount As Long 'BTLBARV2 number
Commander As Long 'intro's CommanderID
FireCount As Long 'BTLFIREV2 number
Unknown17 As Long
End Type
Public Type BTLLEGIONV2
Price As Long
Industry As Long
Food As Long
IsNPC As Long
Camp As Long
Defeat As Long
Legion(15) As Byte 'is a 16 byte string
Country(15) As Byte 'is a 16 byte string
TaxRate As Single
Strength As Single
Color As Long 'r g b alpha
Technologies(25) As Long
CommanderCount As Long 'can use commanders
Unknown13 As Long
End Type
Public Type BTLTILEV2
Legion As Byte 'LegionID
End Type
Public Type BTLBUILDV2
Index As Integer 'full map index
AreaName As Integer
ConstructionType As Byte
ConstructionLevel As Byte
ConstructionShop As Byte
ConstructionStyle As Byte
CapitalStyle As Byte
InstallationType As Byte
StrongPoint As Byte
Event As Byte 'EventID
Bridges(2) As Byte '3 type bridge
FireType As Byte
End Type
Public Type BTLARMYV2
Index As Integer 'full map index
ArmyType As Byte
ArmyGrade As Byte
StrengthNow As Integer
StrengthMax As Integer
DamageCount As Long 'exp
Training As Byte
Movement As Byte
Morale As Byte
Unknown09 As Byte
Commander As Integer
Moved As Byte
StrongPoint As Byte
Unknown13 As Byte
Dir As Byte 'direction
HasTroopship As Byte
Attacked As Byte
Unknown17 As Byte
Unknown18 As Byte
Event As Byte
BuildRound As Byte
Unknown21 As Integer
Unknown22 As Byte
FireType As Byte
End Type
Public Type BTLFIREV2
Index As Long
FireType As Long
End Type
Public Type BTLSHOPV2ITEM
ItemID As Long
Number As Long
End Type
Public Type BTLSHOPV2
Items(13) As BTLSHOPV2ITEM 'BTLSHOPV2ITEM * 14
Index As Long
End Type
Public Type BTLBARV2COMMANDER
CommanderID As Long
Price As Long
Industry As Long
Medal As Long
Round As Long
End Type
Public Type BTLBARV2
Commanders(4) As BTLBARV2COMMANDER 'BTLBARV2COMMANDER * 5
Slot As Long
Index As Long
End Type
Public Type BTLEVENTV2
EventID As Long
Trigger As Long
Status As Long
Round As Long
Dialogue As Long
Index As Long
Legion(19) As Byte 'Legion name
End Type
additional, the .sav file structure is base on .btl, you can trans .sav to .btl
Public Type SAVINFO
BOM(3) As Byte
Version As Long
MapID As Long
Legion(39) As Byte
MapX As Single
MapY As Single
Scale As Single
CurrentLegion As Long
Unknown08 As Long
Unknown09 As Long
TimeYear As Long
TimeMonth As Long
TimeDay As Long
TimeHour As Long
TimeMinute As Long
Compaign As Long
Battle As Long
End Type
Public Type SAVLEGION
DefaultCommander(7) As Long
UserCommander(5) As Long
Unknown16(47) As Long
End Type