help me about this question pls

Results 1 to 7 of 7
  1. #1
    Member sbobetcom is offline
    MemberRank
    Oct 2011 Join Date
    58Posts

    help me about this question pls

    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
    Last edited by sbobetcom; 08-04-12 at 11:43 PM. Reason: edit


  2. #2
    Member cffazot is offline
    MemberRank
    Mar 2012 Join Date
    53Posts

    Re: help me about this question pls

    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.
    Last edited by cffazot; 09-04-12 at 03:06 AM.

  3. #3
    Account Upgraded | Title Enabled! Slingshot is offline
    MemberRank
    Apr 2011 Join Date
    C:\Win\System32Location
    443Posts

    Re: help me about this question pls

    Quote Originally Posted by sbobetcom View Post
    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
    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.

  4. #4
    Member sbobetcom is offline
    MemberRank
    Oct 2011 Join Date
    58Posts

    Re: help me about this question pls

    #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
    i found this one i only change Spec_Item to PropItem then i can work with PropItem?

    Thank for advice

  5. #5
    Now you can tag me! Detox is offline
    MemberRank
    May 2009 Join Date
    NorwayLocation
    1,822Posts

    Re: help me about this question pls

    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.

  6. #6
    Account Upgraded | Title Enabled! Slingshot is offline
    MemberRank
    Apr 2011 Join Date
    C:\Win\System32Location
    443Posts

    Re: help me about this question pls

    Quote Originally Posted by ๖̶̶̶ۣۜYyZz View Post
    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.
    But if he uses the old npc editor, It asks for propItem.txt so in order for it to work, a lil treak would be renaming Spec_Item to propItem temporarily.

  7. #7
    Member cffazot is offline
    MemberRank
    Mar 2012 Join Date
    53Posts

    Re: help me about this question pls

    Quote Originally Posted by ๖̶̶̶ۣۜYyZz View Post
    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.


    i found this one i only change Spec_Item to PropItem then i can work with PropItem?
    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:

    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
    To this:
    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
    It looks like you've got some source that can support either of them (old OR new).
    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:

    Code:
    #define __NEW_PROP_PARAMETER
    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.
    Like 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
    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.

    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?
    Last edited by cffazot; 09-04-12 at 02:37 PM.



Advertisement