is it possible if i wanna change from Spec_item.txt to propItem.txt?
and if possible how can i do? advice me pls
thank you
Printable View
is it possible if i wanna change from Spec_item.txt to propItem.txt?
and if possible how can i do? advice me pls
thank you
Yes, it's possible. Depends what exactly you mean by "Spec_item.txt to propItem.txt".
If you only want to change the name, you open Project.cpp in _Common folder (source users only) and look for "Spec_Item.txt". You do the same for Project.cpp in the databaseserver folder.
If you wanted to change the Spec_Item.txt to be read same as propItem.txt is, you'd have to remove some bits and pieces from the source as Spec_Item consists of a few more columns (you could take it from some older source(?)) and remove the extra columns. I don't really see why you would do that though.
Why would you wanna change it?
If that's for the old npc editor that asks for the propItem.txt then, Just rename Spec_Item.txt to propItem.txt before opening npc editor, after you've done those stuffs that's needed to be done, just rename it back to Spec_Item.txt :)
If that's for the npc editor though.
i found this one i only change Spec_Item to PropItem then i can work with PropItem?Quote:
#ifdef __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "Spec_Item.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#else // __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "propItem.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#endif // __NEW_PROP_PARAMETER
Thank for advice
SpecItem is the same file as Propitem.txt, just with another name.
You won't need to change the name of the file in order to edit it. Just do as you normally would.
And that's where you're wrong. Spec_Item has alot more fields (or columns if you like) than propItem. Pls do some research before bs all over the place, giving people false info. Cheers.
Again, it depends what exactly you want to do with this; If you want to work with new Spec_Item.txt but only rename it to something else, then you only need to change this:Quote:
i found this one i only change Spec_Item to PropItem then i can work with PropItem?
To this:Code:#ifdef __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "Spec_Item.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#else // __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "propItem.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#endif // __NEW_PROP_PARAMETER
It looks like you've got some source that can support either of them (old OR new).Code:#ifdef __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "propItem.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#else // __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "propItem.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#endif // __NEW_PROP_PARAMETER
If you want to work with the OLD propItem.txt (no extra fields included), just go to every VersionCommon.h in which it was defined (probably all of them: AccountServer, CACHESERVER, CORESERVER, databaseserver, LOGINSERVER, Neuz and WORLDSERVER) and change this:
to this:Code:#define __NEW_PROP_PARAMETER
Because if you look at the code you posted, if __NEW_PROP_PARAMETER is defined, it will support the new Spec_Item.txt, but if it is NOT defined, it will support the old propItem.txt.Code://#define __NEW_PROP_PARAMETER
Like this:
If __NEW_PROP_PARAMETER in VersionCommon.h is defined ("#define __NEW_PROP_PARAMETER"), the bit in green will be compiled, however if __NEW_PROP_PARAMETER is NOT defined or is commented out ("//#define __NEW_PROP_PARAMETER") , the bit in blue will be compiled instead. Obviously __NEW_PROP_PARAMETER stretches all over the place, among different files, but this is just an example how it works. Bottom line, if you use propItem.txt, you will work with less features.Code:#ifdef __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "Spec_Item.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#else // __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "propItem.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#endif // __NEW_PROP_PARAMETER
Note that when you comment it out in VersionCommon, you will not only rename it, but it will read the old propItem, so you can't just rename Spec_Item.txt file to propItem.txt or you will get errors.
Do you understand it now?