Quote:
Originally Posted by khoint08
I can't export file NPCQuest.Sdata to CSV via SHStudio 0803 [or] shay_data_edit_0-1c [...]
|
As you do or should know, a CSV file contains a fixed number of fields (or columns, ...) and 1 or several lines whose format of all of them match that definition.
(The 1st line containing names of fields is optional, but when not present, the format is infered from the 1st line of data).
That said what does mean exporting the data of a NPCQuest.sdata file with csv format ?
As you know, or may know, the format of the NPCQuest.sdata file is as follows:
Code:
struct __PString {
__int32 length;
char* value; // MBS encoded with implicit (!) codepage
} PString;
enum Type {
tMerchant = 1,
tGateKeeper,
tBlacksmith,
tPvPManager,
tGamblingHouse,
tWarehouse,
tNormal,
tGuard,
tAnimal,
tApprentice,
tGuildMaster,
tDeadNPC,
tCombatCommander
};
struct __StandardNPC {
__int8 type; // Type value (3 .. 13)
__int16 idnt;
__int32 shape;
__int32 unkn1, unkn2;
__int32 cntr;
PString name; // displayed name of NPC
PString welc; // welcome msg
__int32 cntInQuests;
__int16* inQuestIDs;
__int32 cntOutQuests;
__int16* outQuestIDs;
} StandardNPC;
struct __StandardNPCs {
__int32 count;
StandardNPC* npc;
} StandardNPCs;
enum MerchantType {
GenericMerchant = 0,
WeaponMerchant = 1,
ProtectionMerchant = 2,
AccessoryMerchant = 3,
LiquidMedecineMerchant = 4,
ProfessionalTrader = 5,
RidingMerchant = 6,
MantleMerchant = 7,
BadgeMerchant = 8,
BankTeller = 9,
GoldBarMerchant = 10,
Episo6Merchant = 11,
ProfessionalBlacksmith1 = 15,
ProfessionalBlacksmith2 = 16,
EtinManager = 100,
EtinSeller = 101,
ActionBoard = 117,
PvP_Quests = 200
};
struct __SoldItem {
__int8 type;
__int8 typeID;
} SoldItem;
struct __Merchant {
__int8 type; // Type value (1)
__int16 idnt;
__int8 prof; // MerchantType
__int32 shape;
__int32 unkn1, unkn2;
__int32 cntr;
PString name; // displayed name of NPC
PString welc; // welcome msg
__int32 cntSoldItems;
SoldItem* items;
__int32 cntInQuests;
__int16* inQuestIDs;
__int32 cntOutQuests;
__int16* outQuestIDs;
} Merchant;
struct __Merchants {
__int32 count;
Merchant* merchants;
} Merchants;
struct __GateTarget {
__int16 map; // id of destination map
float x, y, z; // coords of target location
PString name; // displayed name of target
__int32 price;
} GateTarget;
struct __GateKeeper {
__int8 type; // Type value (2)
__int16 idnt;
__int32 shape;
__int32 unkn1, unkn2;
__int32 cntr;
PString name; // displayed name of NPC
PString welc; // welcome msg
GateTarget dest1;
GateTarget dest2;
GateTarget dest3;
__int32 cntInQuests;
__int16* inQuestIDs;
__int32 cntOutQuests;
__int16* outQuestIDs;
} GateKeeper;
struct __GateKeepers {
__int32 count;
GateKeeper* keepers;
} GateKeepers;
struct __Quest {
// up to 96 bytes of data + 9 up to 12 strings
} Quest;
struct __NpcQuestFile {
Merchants merchants;
GateKeepers gateKeepers;
StandardNPCs blacksmiths;
StandardNPCs pvPManagers;
StandardNPCs gamblingHouse;
StandardNPCs warehouses;
StandardNPCs normalNPCs;
StandardNPCs guards;
StandardNPCs animals;
StandardNPCs apprentices;
StandardNPCs guildMasters;
StandardNPCs deadNPCs;
StandardNPCs combatCommanders;
__int8* unknownData; // required and not understood, unspecified variable length (+500kb)
__int32 countQuests;
Quests* quests;
} NpcQuestFile;
It is so not possible to export its whole content of this file with CSV format.
So, yes there is an error in shStudio, it is the availability of the "Export..." menu-item.
(The server relies on the availability of the same NpcQuest.sdata file (in plain) and not on any SQL data).