Board Thread:Development/@comment-26393217-20170201131119/@comment-26393217-20170516001647

Hello there, I bring two good news.

1) I figured how to add accentuated characters inside xcr files. I've been fooled all these month (years) by my xcr editor displaying text in clear and proposing a save file feature. This has been handy for changing text in encoded xcr archives, such as (e.g.) a .loc file in campaign.xcr. The drawback of the saving feature is that it scrambles any accentuated character that is added this way (that is, while editing from the editor's window). I figured a few days ago that I could hexedit extracted files just as I hexedit other uncrypted data files from other games (e.g. Age of Wonders2). It works. The method is thus:


 * 1) extract (and decode if stored encrypted) the desired file from the xcr archive.
 * 2) open the extracted file with an hexeditor and change the hexadecimal code of character needing accentuation (e.g. 0x65 'e' -> 0xe9 'é' or 0xe8 'è' ...). We are however limited to one byte-codes (0xff), so that I don't know if all the ligatures are possible.
 * 3) save and exit the hexeditor.
 * 4) reencode the altered file using the xcr editor feature.
 * 5) replace original file by the new version in the xcr archive.

Basically, it's the same procedure I use to change a unit or building file from a xcr archive. Mercenaries.xcr is very easy to convert because it's only one file. Items.xcr, I can't open it. Campaign.xcr, however, is a long task because each one file inside of it has to be extracted (decrypted), changed, encrypted and replaced. .LOC, .ACT, .NIS files can be accentuated this way, as well as the hints and the campaign bonus texts.

On a side note, I got accentuated characters in the History.xml too. I may have altered the file long ago, and I could since then only get escaped apostroph (&a_pos;). After comparison with v1.03 English file, I deleted a  line and any accentuated character is now correctly displayed in game.

2) I found the blood colour byte. I was spurred on by the preceding messages but it was soon obvious that the 0x104-105 bytes in .ARM files wouldn't lead to blood colour as the same byte value was shared by red-blood and green-blood unit. However as .ANI files are short, I took a look and decided to make a diff between files from a few red-blood (Penguin, Goblin Shaman, Ant, Eye of Oros, Scorpion, Scartauri...) and a few green-blood (Goblin, Orc, Troll, Wolf Rider, Spider, ...) units, searching for small valued bytes only (00, 01 or 02). Bingo, 5 such bytes take the same value for a given blood colour. I was lucky as the first one only seems to govern the colour.

Byte 0x16 can take 4 different values as it seems (tested on snow):
 * 00: Red splash upon hit and death + red stains on the ground
 * 01: Golden splash upon hit and death + NO stains
 * 02: Green splash upon hit and death + green stains on the ground
 * 03: Red splash upon hit and death + NO stains

04 & 05 are the same as 00. I tried to change the second byte to no visible result. '01' value is used by the Undead, Sword, Siege Weapons, ...