Warlords: Battlecry ARM: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Ikskoks
imported>Ikskoks
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
== ARM ==  
== ARM ==  
* ''' Game ''':    Warlords: Battlecry <br>  
* ''' Game ''':    Warlords: Battlecry 3<br>  
* ''' Format Type ''':    Misc <br>  
* ''' Format Type ''':    Misc <br>  
* ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br>
* ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br>
Line 9: Line 9:
<div class="toccolours mw-collapsible" id="mw-customcollapsible-myDivision" style="width:800px; overflow:auto;">
<div class="toccolours mw-collapsible" id="mw-customcollapsible-myDivision" style="width:800px; overflow:auto;">
<pre>
<pre>
// Warlords: Battlecry  
// Warlords: Battlecry 3
// ARM file format
// ARM file format


Line 16: Line 16:
4 bytes (char) - unit ID // "ATHX", "AHHX", "AHBX" etc.
4 bytes (char) - unit ID // "ATHX", "AHHX", "AHBX" etc.
1 byte (uint8) - reserved // always "1"
1 byte (uint8) - reserved // always "1"
1 byte (uint8) - unit movement type //  0= Grounded  
1 byte (uint8) - unit movement type //  0=Grounded  
                                     //  1= Flyer  
                                     //  1=Flyer  
                                     //  2= Boat  
                                     //  2=Boat  
                                     //  3= Floater (crosses water)
                                     //  3=Floater (crosses water)
 
20 bytes (char) - unit name        //  e.g. "Peasant" or "Human Hero"
20 bytes (char) - unit name        //  e.g. "Peasant" or "Human Hero"
2 bytes (uint16) - unknown
2 bytes (uint16) - unknown
2 bytes (uint16) - unit production time (in seconds)
2 bytes (uint16) - combat
2 bytes (uint16) - speed
2 bytes (uint16) - resistance
2 bytes (uint16) - HP
2 bytes (uint16) - View
2 bytes (uint16) - Armor
2 bytes (uint16) - Strong vs. // 0=Piercing
                              // 1=Frost
                              // 2=Electric
                              // 3=Fire
                              // 4=Magic
                              // 5=Crushing
                              // 6=Slashing
                              // 7=All Psychical
                              // 8=Piercing and Slashing
                              // 9=All Elemental
                              // 10=All damage
                              // E=Fire
                              // FFFF=none
2 bytes (uint16) - Weak vs.  // as above
x bytes - other unit data  //TODO
</pre>
</pre>
</div>
</div>
Full ARM file format is available [http://www.infinite-interactive.com/forum/showthread.php?481-Unit-Editor-MFC-tool&p=3348&viewfull=1#post3348 here].


=== MultiEx BMS Script ===  
=== MultiEx BMS Script ===  
Line 31: Line 59:
=== Notes and Comments ===  
=== Notes and Comments ===  


* ARM files are encrypted with custom algorithm. Special 256-bytes key is needed for decryption. Key starts with string "mr8".
* ARM files are encrypted with custom algorithm (substitution cipher). Special 256-bytes key is needed for decryption. Key starts with string "mr8".


=== Decryption algorithm ===  
=== Decryption algorithm ===  
Line 63: Line 91:
[[Category:File Format]]
[[Category:File Format]]
[[Category:Custom encryption]]
[[Category:Custom encryption]]
[[Category:Substitution cipher]]

Latest revision as of 15:19, 18 December 2020

ARM

  • Game : Warlords: Battlecry 3
  • Format Type : Misc
  • Endian Order : Little Endian


Format Specifications

// Warlords: Battlecry 3
// ARM file format

// little endian

4 bytes (char) - unit ID // "ATHX", "AHHX", "AHBX" etc.
1 byte (uint8) - reserved // always "1"
1 byte (uint8) - unit movement type //  0=Grounded 
                                    //  1=Flyer 
                                    //  2=Boat 
                                    //  3=Floater (crosses water)

20 bytes (char) - unit name         //  e.g. "Peasant" or "Human Hero"
2 bytes (uint16) - unknown
2 bytes (uint16) - unit production time (in seconds)
2 bytes (uint16) - combat
2 bytes (uint16) - speed
2 bytes (uint16) - resistance
2 bytes (uint16) - HP
2 bytes (uint16) - View
2 bytes (uint16) - Armor
2 bytes (uint16) - Strong vs. // 0=Piercing 
                              // 1=Frost 
                              // 2=Electric 
                              // 3=Fire 
                              // 4=Magic 
                              // 5=Crushing 
                              // 6=Slashing 
                              // 7=All Psychical 
                              // 8=Piercing and Slashing 
                              // 9=All Elemental 
                              // 10=All damage 
                              // E=Fire 
                              // FFFF=none

2 bytes (uint16) - Weak vs.   // as above


x bytes - other unit data  //TODO

Full ARM file format is available here.

MultiEx BMS Script

Not written yet.

Notes and Comments

  • ARM files are encrypted with custom algorithm (substitution cipher). Special 256-bytes key is needed for decryption. Key starts with string "mr8".

Decryption algorithm

Below is Python implementation of decryption algorithm:

arm_size = os.path.getsize(in_file_path)
    
for i in range(arm_size):
    arm_byte = struct.unpack("B", arm_file.read(1))[0]
    key_file.seek(arm_byte)
    out_byte = key_file.read(1)
    out_file.write(out_byte)

Compatible Programs