info.cdat and info.txt files

anglosaxon

New member
Elder
Joined
Dec 9, 2008
Messages
331
After 7 or so years I've decided to get back into BW2 modding. Among other things I was looking at the info.txt and info.cdat files in the /script folder. There are a lot of interesting values in these files and the documentation explains them all, for example I can non-destructively remove the little shield on japanese soldiers, or give troops different weapons, formations or even skins at higher experience levels.

Altering these values does nothing as of yet, so I assume (judging by the file size) that info.cdat is the compile of the .txt files. If this is the case, I was wondering if anyone knows anything about the .cdat file format to allow it to be recompiled.

Initially I was looking to find what it was that made aztec archers spawn as female so I could control it, but oddly enough there is nothing about this in any of the info.txt files, or the gamebalancearmy file for that matter.

Thanks in advance for any answers.
 
I don't even have info.txt in my scripts folder, only info.cdat - I assume info.txt is provided with the scripting tools perhaps?

The info.cdat appears to be a proprietary format made by Lionhead with the header: LiOnHeAdInfoAmmendments. I can probably make a compiler/decompiler for it in a couple of days, could you post your full info.txt file for me would be a lot of help :) (You can upload it as an attachment or on pastebin)
 
anglosaxon said:
Initially I was looking to find what it was that made aztec archers spawn as female so I could control it, but oddly enough there is nothing about this in any of the info.txt files, or the gamebalancearmy file for that matter.

I think that's either hard coded into the game's binary executable - or it's possibly part of the original scripts which you can find here: http://www.bwfiles.com/forum/index.php?topic=7960.0

edit: found it in the scripts

For example to create male platoons you would do:

Code:
TownDefenders[Ctr] = create platoon PLATOON_INFO_AZTEC_MELEE_1 at {TownDefenderPos[Ctr]} with 12 men and 0 women

So to create female platoons I guess you could just do:

Code:
TownDefenders[Ctr] = create platoon PLATOON_INFO_AZTEC_MELEE_1 at {TownDefenderPos[Ctr]} with 0 men and 12 women

I also found some lore in older unused scripts about the female aztec archers (from 2003):

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Female archers – Land 7
// -----------------------
//
// The Amazonian women were known to be excellent archers; however they were also known not to be sympathetic to men.
// They do not need to be Amazonian however; they can just be disaffected women from the opposing tribe on this land.
// They are tech 2 level archers and so hold the key to you producing this upgraded version of an archer.
// They hang around a fairly remote part of the land; protecting any nearby female workers if they are ever under threat.
// Voices such as: "Leave these women alone!"
// However, any male workers nearby will be shot at and given vocal threats such as:
// "Keep away from us you men!"...  "Men - they're all bar-stewards"...
// They live on a high plateau that is a strong defensive position. The path up to them is a bit of a zigzag and narrow.
// This means that anyone attacking will have a hard time of it to not be shot by the archers on the way up.
// The Archers will occasionally send a raiding party down to nearby areas to protect any females and harass/shoot any
// males in the vicinity. They will then retreat to the safety of their plateau.
// The Archers will hang around lamenting the loss of their female leader and that they have no willingness to fight
// anyone without her. They will agree to give you the tech 2 archer blueprint if you find a strong warrior or hero to
// lead them; but they will not directly ask for a female leader to follow.
// They will simply have a scroll above their camp that will explain their situation.
// The player will have to work out that they require this “hero” to lead them and that they must be female.
// The player must create a female warrior/archer and use her to win a small battle. She will then become a female
// leader/hero; with much reaction and delight/surprise from the advisors.
// Whilst not part of your army they will re-gather if many of them are killed by either side; i.e. they will
// re-spawn nearby out of sight and then join the group. However, if you slaughter them all they will die out;
// though this will be tough to do due to their strong defensive position. If you raid the camp in this way and destroy
// their buildings you will find the archer tech 2 level blueprint in one of the buildings.
//
// Note: The Amazonian squad will refuse to leave the land if you try to take them at the end of the level.
//   However you will have the tech 2 archer blueprint…
//
// Rewards: Tech level 2 archers blueprint.
// If good, the archer squad will support you for the rest of the level.
// If by evil means, they will send out
// Drawbacks:
//
// Start date: 4/4/03 By: Phil
// Last Update: 4/4/03 By: Phil
//
// Requires: Norse creature in and AI created so it attacks the farm now and again.
// All onto Level 2 rather than on 3 which is where I'm creating this (all waypoints etc)
// Ability to increase the speed of food production of the player's town
//
// Work Needed: Changeover to land 7 once created.
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
Handsome Matt said:
I don't even have info.txt in my scripts folder, only info.cdat - I assume info.txt is provided with the scripting tools perhaps?

The info.cdat appears to be a proprietary format made by Lionhead with the header: LiOnHeAdInfoAmmendments. I can probably make a compiler/decompiler for it in a couple of days, could you post your full info.txt file for me would be a lot of help :) (You can upload it as an attachment or on pastebin)

https://www.dropbox.com/sh/mfbljxga5utmfnu/AAAH4XznN-2oIc5KOdNlAovEa?dl=0

Here are the info.txt files from my backup BW2 folder. Oddly enough there is now an "editinfo.dat" file; judging by the edit date I'm pretty sure this was created by the .exe. No such thing in my normal folder though. I've uploaded this along with the .txt files.

Handsome Matt said:
I think that's either hard coded into the game's binary executable - or it's possibly part of the original scripts which you can find here: http://www.bwfiles.com/forum/index.php?topic=7960.0

edit: found it in the scripts

For example to create male platoons you would do:

Code:
TownDefenders[Ctr] = create platoon PLATOON_INFO_AZTEC_MELEE_1 at {TownDefenderPos[Ctr]} with 12 men and 0 women

So to create female platoons I guess you could just do:

Code:
TownDefenders[Ctr] = create platoon PLATOON_INFO_AZTEC_MELEE_1 at {TownDefenderPos[Ctr]} with 0 men and 12 women

I'm unsure of this. I'm currently using a stripped-down version of the generic .chl script, but in order to create platoons it uses this operation:

Code:
recruit ARMY_UNIT_TYPE_MELEE_1 town oTown platoon of size nRecruitSize

No references to women here or anywhere else in the file, but the aztec archers still have female voices and their corpses have female names.

Interesting find though. It's equal parts baffling and tragic as to how much material was siphoned out of this game.
 
The command:
Code:
TownDefenders[Ctr] = create platoon PLATOON_INFO_AZTEC_MELEE_1 at {TownDefenderPos[Ctr]} with 12 men and 0 women
Will simply create an army from nothing at the location provided, it will not take the villagers from any town. The other command:
Code:
recruit ARMY_UNIT_TYPE_MELEE_1 town oTown platoon of size nRecruitSize
Will create a tent, take villagers from the given town, the platoon created from this command doesn't just pop into existence.

An interesting test you can do is this: create a very simple landscape and give player 0 an Aztec town (Make sure the player starts with armories of Aztec construction), load the land up and start a new game. Then recruit a ranged army. It'll be interesting to know who runs into the tent men or women.

This  test will hopefully tell us whether the game knows that for this type of village ranged armies are only women not men, giving us a better idea of where this feature is located.
 
I recall having tried something like this before, and the result was that I received normal greeks with the normal flag. It won't hurt to try it again though.

Perhaps understandably the AI operates under different rules; a norse AI player took an aztec city off me and recruited some troops which were aztec. This would imply that the main player is always greek.

I've never seen any evidence of the "recruit" operation actually taking villagers from a settlement, the only visible difference appears to be that the soldiers appear from a tent rather than simply spawning in formation. With my modified script the AI recruits hundreds of men in short order while the population remains constant.
 
I recall having tried something like this before, and the result was that I received normal greeks with the normal flag. It won't hurt to try it again though.

Perhaps understandably the AI operates under different rules; a norse AI player took an aztec city off me and recruited some troops which were aztec. I did the same and got greeks. This would imply that the main player is always greek.

I've never seen any evidence of the "recruit" operation actually taking villagers from a settlement, the only visible difference appears to be that the soldiers appear from a tent rather than simply spawning in formation. With my modified script the AI recruits hundreds of men in short order while the population remains constant.
 
Back
Top