using (ScriptAPI) {
    AddUShort("SessionID");
    count = AddByte("Character Count");
    for(i=0; i<count; i++)
    {
		StartNode("Character " + i);
		AddUInt("ID");
		AddField("Name",20);
		AddUShort("Char Level");
		AddByte("Slot");
		AddPaddedString("Mapname",12);
		
		StartNode("DelInfo");
		AddByte("DeleteYear");
		AddByte("DeleteMonth");
		AddByte("DeleteDay");
		AddByte("DeleteHour");
		AddByte("DeleteMin");
		EndNode(0);
		
		StartNode("Look");			       
		AddByte("JobGender");
		AddByte("Hair");
		AddByte("Haircolor");
		AddByte("Face");
		EndNode(0);
		
		StartNode("Equipment");		   
		AddUShort("Hat");
		AddUShort("Mouth");
		AddUShort("RightHand");
		AddUShort("Body");
		AddUShort("LeftHand");
		AddUShort("Pant");
		AddUShort("Boot");
		AddUShort("AccBoot");
		AddUShort("AccPant");
		AddUShort("AccBody");
		AddUShort("AccHeadA");
		AddUShort("MiniMon_R");
		AddUShort("Eye");
		AddUShort("AccLeftHand");
		AddUShort("AccRightHand");
		AddUShort("AccBack");
		AddUShort("CosEff");
		AddUShort("AccHip");
		AddUShort("MiniMon");
		AddUShort("AccShield");
		EndNode(0);
		     
		StartNode("Refinement");
		AddByte("ref1");
		AddByte("ref2");
		AddByte("ref3");
		EndNode(0);
		 
		AddUInt("nKQHandle");
		AddPaddedString("MapIndex",12);
		AddUInt("XPos");
		AddUInt("YPos");
		
		AddUInt("KQDate?");
		AddByte("bNeedChangeID?");
		AddByte("Init?");
		AddUInt("RowNo");
		
		AddByte("TutorialState");
		AddByte("TutorialStep");
		
		AddField("Unk00",3);
		
		EndNode(0);
    }
}