Preface
Please note that this document is a preliminary draft that needs further elaboration and subject to change without notice
Directory structure of KUF:TC
default KUF:TC directory : SteamsteamappscommonKUF Crusader
FX : shader asembly source codes (mostly VS/PS1.1, some are VS/PS2.0). If you are famillar with shader assembly, you can modify shader effects on your own!
DATA : all the data of KUF : TC except shader source codes. note that data1.dat, data2.dat … files are packed file and other files are loose files.
DATAAI : Mission NPC AI definitions. These AI definitions are text format and you can change on your own.
DATACamera : Camera settings. Binary files. not modifiable without proper tools.
DATAFX : fx definitions. Binary files. not modifiable without proper tools.
DATAInterface : Interface definitions and textures. txt files can be modified.
DATAMap : object definition for map.
DATATEXT : all the texts in the game except UI ones.
Packed file(.DAT) vs Loose File
.DAT file contains game files especially for graphic resources.
These files are packed into .DAT file, but if you extract or substitue these files in their relevent directory it has priority over the ones in .DAT file.
For example, if you delete or rename the control_image.dds file in the Data/Interface folder, you will see the original XBOX controller instead of the XBOX One S controller on the Controller Help screen of the In-Game Settings menu.
The control_image.dds file in the Data/interface folder has priority for files with the same name in data4.dat.
We have made a small utility that extract files from .DAT file.
go to [link] and grab the KUFTC_DAT_Manager.exe
In first dialog, select .dat file to extract.
In second dialog, you can see all the files in .dat file. right click on file/dir/.dat to extract. then select “extract to…”
In third dialog, choose folder to files are placed.
SOX data file
soxfilename : in game data.
soxfilename_STRING means localized string sox file counterpart of SOX. they are located in DATA/SOX/[COUNTRY] folders.
SOX file data types
int : 4byte integer float : 4byte single precision floating-point short : 2byte short integer char : 1byte signed char bool : 4byte boolean (0 : false, others : true) struct SOXString { short namesize; // 2byte short char string[namesize]; }
Notice that all the “char”, “short” data have sizeof integer(4 byte) in files.
Except for namesize(they are stored in short – 2 byte) or specifically stated.
SOX file common header
int Version; // Shoud be 100 in KUF : TC int Count; // Data row count
UnitUVID
struct SOXUnitUVData { enum { NUM_UV_ID = 17 }; int nCharId; int nUVID[NUM_UV_ID]; };
UnitUVInfoData
struct SOXUnitUVInfoData { int nUVID; int nPrtU2; //portrait info int nPrtV2; int nPrtRevisionX; int nPrtRevisionY; int nBdyU2; //body info int nBdyV2; int nBdyRevisionX; int nBdyRevisionY; };
TroopInfo
struct TroopInfo { int job; // troop job type (defined in K2JobDef.h) int typeID; // troop type ID (defined in K2TroopDef.h) float movSpeed; // max move speed float rotRate; // max rotate rate float movAcc; float movDec; // move acceleration/deceleration float sightRange; // visible range float attRangeMax; float attRangeMin; // ranged attack range (0 if troop lacks ranged attack) float attFrontRange; // frontal attack range (0 if troop lacks frontal attack) float directAtk; // direct attack strength (melee/frontal) float indirectAtk; // indirect attack strength (ranged) float def; // defense strength float baseWidth; // base troop size // resistance to attack types float resistMelee; float resistRanged; float resistUnblockable; float resistFrontal; float resistFire; float resistLightning; float resistIce; float resistHoly; float resistPoison; float resistCurse; float m_fMaxUnitSpeedMultiplier; float m_fDefaultUnitHP; char m_nFormationRandom; char m_nDefaultUnitNumX; char m_nDefaultUnitNumY; float fUnitHPLevUp; enum { NUM_SKILLS = 3 }; struct LevelUpData { int nSkillID; float fSkillPerLevel } LevelUpData[NUM_SKILLS]; float m_fDamageDistribution; };
TroopInfo_STRING
struct TroopInfoString { int job; SOXString name; }
CharInfo
// All the “char” types have size of integer(4) in files.
struct SOXUnitData { char m_nCharType; char m_nK2AType; char m_nK2AType2; // 기병의 말, 등 – Horse of cavalry, etc. char m_nK2ASubType; // 궁병등이 칼뽑았을때 보병으로 – When archers draws sword, treat it as infantry // Melee AI param (0 – 100) char m_nAttackChance; char m_nBlockChance; char m_nFarAttackChance; char m_nCounterChargeChance; char m_nBattleCryChance; char m_nCombatMoveChance; char m_nRandomMoveChance; int m_nRandomMoveRange; // world 상 거리 – Distance in world float m_fAttackRange; float m_fHeight; float m_fSubmergeHeight; float m_fWeight; float m_fBSRadius; float m_fMaxSpeed; float m_fMinSpeed; float m_fWalkSpeed; float m_fRunSpeed; float m_fSideStepSpeed; float m_fAcceleration; float m_fMaxRotateSpeed; // Hand bones; Head, Jaw bone for lip sync char m_nLeftHandBoneID; char m_nRightHandBoneID; char m_nSubWeaponBoneID; char m_nHeadBoneID; char m_nJawBoneID; char m_fMinJawAngle; char m_fMaxJawAngle; char m_nRandomSizeRange; short m_nHPAsLeader; short m_nHPIncreasePerLevel; }
CharInfo_STRING
struct SOXUnitDataString { int CharType; SOXString name; }
abilityInfo
struct SOX_ABILITY_INFO { short nId; bool bCon_User; // leader/troop short nSetType; // Job에따라세팅하는지, Job과Skill에 따라 세팅하는지 User가 직접 세팅하는지 short nType; // 어느 근처에 가서 사용하는건지 바로 사용하는건지 액션모드에서 사용하는건지 short nRange; // 마법 사용 범위 short nEffectRange;// 마법 영향 범위 short nDuration; // 지속 시간 short nDamage; // damage short nSP; // SP사용량 int nParm1; // parm1 int nParm2; // parm2 #define MAX_ABILITY_REQUIRE_SKILL 2 struct _STATE_INFO { int nId; int nValue; } Con_Skill[MAX_ABILITY_REQUIRE_SKILL] // condition (Skill) SOXString pIconName; SOXString pImageFN; };
abilityInfo_STRING
struct SOX_ABILITY_INFO_STRING { int abilityID; SOXString pName; SOXString pHelp; }
ItemTypeInfo
struct _BASIC_ITEM_INFO { int nTypeId; int costMax; int costMin; const int NUM_SET = 2; struct _SKILL_INFO { short modifierSkillID; short modifierSkillMin; short modifierSkillMax; } SkillInfo[NUM_SET]; short attributeProbability; short attribute[2]; short imageNum; char equipPos; bool bBow; bool bMagical; struct _RESIST_INFO { short modifierResisID; short modifierResisMin; short modifierResisMax; } ResistInfo[NUM_SET]; short modifierElementalProbability; short modifierElementalMin; short modifierElementalMax; bool modifierElementalEnableHoly; struct _SPECIAL_ITEM { short modifierBonusProbability; short modifierBonusMin1; short modifierBonusMax1; short modifierBonusMin2; short modifierBonusMax2; short priceRate; } modifierBonus[3]; SOXString imageName; };
ItemTypeInfo_STRING
struct _BASIC_ITEM_INFO_STRING { int itemType; SOXString modifierBonusName[3]; }
AbilityByJob
struct _ABILITYBYJOB_INFO { int job; const int MAX_JOB_ABILITY = 5; int abilityIDs[MAX_JOB_ABILITY]; };
SpecialNames
struct SOXNameEntry { SOXString compareStr; SOXString soundBankStr; }
SpecialNames_STRING
struct SOXNameEntryString { SOXString nameStr; }
SkillInfo
struct SOX_SKILL_INFO { int nId; SOXString pIconName; SOXString pImageFN; int nScale; int nMax; }
SkillInfo_STRING
struct SOX_SKILL_INFO { int nId; SOXString pName; SOXString pHelp; }
JobInfo
struct SOX_JOB_INFO { int nId; int nPos[2]; int nConnectJob[8]; #define MAX_JOB_REQUIRED_SKILL 3 struct _STATE_INFO { short nId; short nValue; } RqrSkill[MAX_JOB_REQUIRED_SKILL]; SOXString pIconName; SOXString pImageFN; }