
Originally Posted by
Eliana Gherbaz
For the number you posted seems you are talking about Monster ID. I need to ask you a question first before answering:
Are you able to perform the command /summon2 on your server? if you are, just type /summon2 and press enter, a help of the use of the command will appear, what msg help you get?
1.- [USAGE] /summon [MONSTER-ID] [POP_COUNT] [8|9] (MONSTER-ID:2001~2999, 8:neutral, 9:aggressive)
or
2.-[USAGE] /summon [MONSTER-ID] [POP_COUNT] [8|9] (MONSTER-ID:2001~2999, 3501~3999 8:neutral, 9:aggressive)
if you get the 2do help msg, then you can add mob IDs till 3999.
I didnt reach 3999 mobs yet, and I dont think I will reach it, anyways there are more than 1 place where Zone check those values to perform operations, I did not check what those operations do, but all them check for the range of ID mentioned:
2001 in Hex = 7D1
2999 in Hex = 0BB7
3501 in Hex = DAD
3999 in Hex = 0F9F
There are 5 places where HTLauncher check those 4 values (at least in my client), and 2 places where Zone checks them (at least in my Server) so if you need to change the last one you need to change it in all those places. But take care because you can mess up both(client and server) using IDs reserved for other things, for example IDs reserved for items starts on 4001, and I really dont know if making mobs with ID from 4000 to 4999 will work as expected. If i were you, instead of changing that 3999 for 4999 I will prefer to extend the Server and Client code adding new code that handles the new range of IDs you want to add using IDs that are not used for anything else, that was what Hambitsoft did when they expanded on v5, for example for Armors, when they reached the max ID, they open a new range starting on 34501, they did the same for weapons and items
- - - Updated - - -
I dont know how many of you knows the importance of the objects ID, and because I didnt read any about that I will say some of the things I know about it.
Starting on Items name color: the color that appears on the name of the item is defined by its ID. for those who wants to test it:
One hand weapons: the whole range of their IDs are from 4001 to 4300, on k5 that was expanded with a new range from 34001 to 34200
that means that for 1 hand weapon is not only the sType you have to be aware off, you need to be aware of its ID too.
one hand weapons are divided in NOT MAGIC and MAGIC (i think i dont need to explain the diff)
the color is defined as follow:
from 4001 to 4110 are NORMAL NOT MAGIC(white color on the name)
from 4111 to 4140 are NORMAL MAGIC(white color on the name)
from 34001 to 34075 are NORMAL (white color on the name)
from 4141 to 4250 are RARE NOT MAGIC (gold color in the name)
from 4251 to 4280 are RARE MAGIC (gold color in the name)
from 34076 to 34150 are RARE (gold color in the name)
from 4281 to 4288 are UNIQUE NOT MAGIC(purple color in the name)
from 4289 to 4290 are UNIQUE MAGIC(purple color in the name)
from 34151 to 34180 are UNIQUE (purple color in the name)
from 4291 to 4298 are QUEST NOT MAGIC(blue color on the name)
from 4299 to 4300 are QUEST MAGIC(blue color on the name)
from 34181 to 34200 are QUEST (blue color on the name)
So for example if you want to create a new rare item, you have to use an ID inside the range of rares, otherwise the item will not have that gold color on the name.
those IDs are used also to recognize the type of the object it is, at Server, client and GM Tools. For example: on the GM Tool the ids are used to put that object in the corresponding type : is a collection item or is a quest one or is a weapon, a Pant etc, so for example if you add a new 1 hand weapon and use the ID of a Pant, then it will be on the pants section instead of the weapons one.
As I said server detects the kind of the item by its ID, so for example refining a RARE item is different from refining a normal one.
if you want to create a Charged item you must use the ID range for those so will work as expected, charged item are not the same as usable item, so if you use a wrong code for any of them (usable or charged) they wont work as expected, Mounts have their range too, but i didnt test what happens if i make a new one with wrong code.
For those who have dig on NPC dialogs, the IDs of those dialogs define in which array will server and client store them, and will perform the search based on the ID, for example as you may see on Mandara_NPC Defense_Que starts on 10001, Accessory_Que in 20001 and so on. Server used those IDs to define in which array will the data be stored as an example here is a part of the server code that use those ids to know to which NPC you are talking:
#define HT_IS_WEPON_QUE( i ) ( i >= HT_ID_WEPON_QUE_START ) && ( i <= HT_ID_WEPON_QUE_END ) ? HT_TRUE : HT_FALSE
#define HT_IS_DEFENSE_QUE( i ) ( i >= HT_ID_DEFENSE_QUE_START ) && ( i <= HT_ID_DEFENSE_QUE_END ) ? HT_TRUE : HT_FALSE
For those who dont know what code is: those are declaring functions that will return true or false depending on the ID that is stored in a defined var:
#define HT_ID_WEPON_QUE_START 1
#define HT_ID_WEPON_QUE_END 10000
#define HT_ID_DEFENSE_QUE_START 10001
#define HT_ID_DEFENSE_QUE_END 20000
And those functions are used in Methods like for example:
HTtchar* HTNPCScriptMgr::HT_pGetTableName( HTdword dwID )
{
m_iQuestion = dwID;
if ( HT_IS_SELECT(dwID) )
return ( HT_RES_TABLENAME_SELECT );
else if ( HT_IS_WEPON_QUE(dwID) )
return ( HT_RES_TABLENAME_WEAPON );
else if ( HT_IS_DEFENSE_QUE(dwID) )
return ( HT_RES_TABLENAME_DEFENSE );
and so on.
So messing up server and client with wrong IDs is really easy for those who dont know what ID needs to be use when adding anything at xml files. So for example if you want to add more dialogs for WEPON_QUE you have to change the 10000 for the new value, and the DEFENSE_QUE_START 10001 too to not mess up the NPC dialogs.