Register for your free account! | Forgot your password?

Go Back   elitepvpers › MMORPGs › 9Dragons
You last visited: Today at 01:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] Reading map_XXXX.xns

Discussion on [Release] Reading map_XXXX.xns within the 9Dragons forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2006
Posts: 102
Received Thanks: 125
[Release] Reading map_XXXX.xns

This is the file structure for the .xns map files. With this information you should be able to change which NPC is spawned at which location. I haven't tested it, but I'm sure someone will be able to find a use for this. Please feel free to let anyone know what you've successfully changed with this information.

Code:
typedef struct
{
    int objectIndex;
    struct
    {
        float m[ 4 ]; // float m[ 4 ][ 4 ]
    } D3DMATRIX[ 4 ]; // no multidimensional array support in 010 editor :(
} XOBJECT;

typedef struct
{
    int enable;
    int conditionClass;
    int compareClass1 : 8;
    int compareClass2 : 8;
    int compareClass3 : 8;
    int compareClass4 : 8;
    int numericValue1;
    int numericValue2;
    int numericValue3;
    int numericValue4;
} XNPC_SUBSCRIPT_CONDITION;

typedef struct
{
    int conditionID;
    char conditionString[ 64 ];
    XNPC_SUBSCRIPT_CONDITION npcSubscriptCondition;

    int strLength;

    if ( strLength > 0 )
        char str[ strLength ]; 
} XNPC_SCRIPTCONDITIONITEM;

typedef struct
{
    int msgLength1;
    if( msgLength1 > 0 )
        char prevGreetingMsg[ msgLength1 ]; // client fseeks past ( read in by .xsd )
    int msgLength2;
    if( msgLength2 > 0 )
        char greetingGeneralMsg[ msgLength2 ]; // client fseeks past ( read in by .xsd )
    int msgLength3;
    if( msgLength3 > 0 )
        char greetingHostilityMsg[ msgLength3 ]; // client fseeks past ( read in by .xsd )
    int msgLength4;
    if( msgLength4 > 0 )
        char greetingCustomerMsg[ msgLength4 ]; // client fseeks past ( read in by .xsd )
    int msgLength5;
    if( msgLength5 > 0 )
        char greetingHeroStayMsg[ msgLength5 ]; // client fseeks past ( read in by .xsd )

    int indexPrevGreetingSound;
    int indexGreetingGeneralSound;
    int indexGreetingHostilitySound;
    int indexGreetingCustomerSound;
    int indexGreetingHeroStaySound;
} XNPC_GREETING_SOUNDMSG;

typedef struct
{
    int msgLength;
    if( msgLength > 0 )
        char goodbyeMessage[ msgLength ];
} XNPC_GOODBYE_MSG;

typedef struct
{
    int msgLength1;
    if( msgLength1 > 0 )
        char strMessage1[ msgLength1 ]; // client fseeks past ( read in by .xsd )
    int msgLength2;
    if( msgLength2 > 0 )
        char strMessage2[ msgLength2 ]; // client fseeks past ( read in by .xsd )
    int msgLength3;
    if( msgLength3 > 0 )
        char strMessage3[ msgLength3 ]; // client fseeks past ( read in by .xsd )
} XNPC_STRMSG;

typedef struct
{
    int enable;
    int scriptClass;
    int compareClass;
    int condition1;
    int condition2;
    int condition3;
    int condition4;
    int condition5;
    int condition6;
    int condition7;
    int condition8;
    int condition9;
    int condition10;
    int condition11;
    int condition12;
    int condition13;
    int quantityNumber1;
    int quantityNumber2;
    int quantityNumber3;
    int quantityNumber4;
    int quantityNumber5;

    int quantityStrLength;
    if( quantityStrLength > 0 )
        char quantityStr[ quantityStrLength ]; // client fseeks past ( read in by .xsd )

    int messageLength;
    if( messageLength > 0 )
        char messageStr[ messageLength ]; // client fseeks past ( read in by .xsd )

    XNPC_STRMSG strMsg[ 5 ];

    int subscriptConditionCount;
    if( subscriptConditionCount > 0 )
        XNPC_SCRIPTCONDITIONITEM conditionItem[ subscriptConditionCount ];
} XNPC_SCRIPTITEM;

typedef struct
{
    char scriptName[ 32 ];
    int compareClass;
    int npcScriptConditionCount;
    if ( npcScriptConditionCount > 0 )
        XNPC_SCRIPTCONDITIONITEM npcConditionItem[ npcScriptConditionCount ];

    XNPC_GREETING_SOUNDMSG greetSoundMsg[ 5 ];
    XNPC_GOODBYE_MSG goodbyeMsg[ 4 ];
    int indexGoodbyeSound[ 4 ];

    int subscriptCount;
    if( subscriptCount > 0 )
        XNPC_SCRIPTITEM subscriptConditionCount[ subscriptCount ];
} XNPC_MAINSCRIPT;

typedef struct
{
    int uniqueID;
    int npcJobClass;
    int tradeItemClass;
    int npcClass;
    int npcClanClass;

    int npcRelationMapID;
    int npcRelationVillageID;
    int npcRelationRoleID;

    int npcNameLength;
    if( npcNameLength > 0 )
        char npcName[ npcNameLength ]; // client fseek's past this

    int npcRoleLength;
    if( npcRoleLength > 0 )
        char npcRole[ npcRoleLength ]; // client fseek's past this

    XOBJECT savedObject;

    int scriptCount;
    XNPC_MAINSCRIPT mainScript[ scriptCount ];
} XNPC_OBJECTARRAY;

struct
{
    char npcListFileName[ 260 ]; // MAX_PATH
    int objectCount;
    XNPC_OBJECTARRAY npcObjectArray[ objectCount ];
} theFile;
Template for 010 Editor 7.0 attached below.
Attached Files
File Type: zip map_xns.zip (1.3 KB, 233 views)
Plastic is offline  
Thanks
5 Users
Old   #2
 
elite*gold: 0
Join Date: Aug 2006
Posts: 102
Received Thanks: 125
Referencing which NPC an object refers to is as easy as:

Code:
npcName = ( uniqueID * 1000 ) + 1
roleName = ( uniqueID * 1000 ) + 2


prevGreetMsg = ( uniqueID * 1000 ) + 11 + arrayIndex
greetingGeneralMsg = ( uniqueID * 1000 ) + 16 + arrayIndex
greetingHostilityMsg = ( uniqueID* 1000 ) + 21 + arrayIndex
greetingCustomerMsg = ( uniqueID * 1000 ) + 26 + arrayIndex
greetingHeroStayMsg = ( uniqueID * 1000 ) + 31 + arrayIndex

goodbyeMessage = ( uniqueID * 1000 ) + 41 + arrayIndex
Using the XSD Editor that saweet made with map_beegoong ( SF Clan Base ):

Plastic is offline  
Thanks
7 Users
Old   #3
 
elite*gold: 0
Join Date: Sep 2011
Posts: 9
Received Thanks: 0
How i add new npc on the map?
hoannguyet is offline  
Reply


Similar Threads Similar Threads
[Release] Reading monster_ref.bmo
02/03/2017 - 9Dragons - 1 Replies
This is the structure for the monster_ref.bmo file. Everything marked with the comment "// not a monster attribute" means that it is ignored on the client. I believe it's only used on the server. You cannot change the text of "toolName" on the server monster_ref.bmo unless you modify the server executable, since it looks for "EOD Monster Ref" or it fails to load. typedef struct { char toolName; short version1; short version2; SYSTEMTIME systemTime; // SYSTEMTIME is...
[Release] Reading map_XXXX.xzi
01/26/2017 - 9Dragons - 0 Replies
This is the file structure for reading the map .xzi files. With this information you should be able to change what areas gates will lead to for each map. typedef struct { float x; float z; } XAREA_POINTSTRUCT; typedef struct {
[Release]NAS - Server Streaming / Reading programm
06/25/2013 - .NET Languages - 3 Replies
Hallo will hier nen Kleinen Source code von mir Veröffentlichen ^^ Public Class Form1 Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim di As New System.IO.DirectoryInfo("\\fritz.box\BKA-Funk wagen2\Storage-00") For Each fi As System.IO.FileInfo In di.GetFiles("*.*", System.IO.SearchOption.AllDirectories) ComboBox1.Items.Add(fi.FullName) Next
config skill warlock :reading spellbook and release
10/19/2012 - Ragnarok Online - 0 Replies
hy there, can anyone help , how to set config "bot" ragnarok online with char warlock who have skill : reading spell book and release ?anyone please help ,cos a'im stuck.



All times are GMT +2. The time now is 01:20.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.