Global sound cmd id?
Moderators: Nefarius, Havvoric
Global sound cmd id?
In 1.10f 6FCBC480.
D2UpdateUnit(D2UnitStrc* pUnit, int nParamId, D2UnitStrc* pTarget)
nParamId=18 unit say "I can't do that"
nParamId=85 merc say "I can't use that"
nParamId=87 merc say "I'll put that to good use"
Is there other soundId can be used with this function, that can be used to make unit say something?
And is there a way to play a sound to a Player?
D2UpdateUnit(D2UnitStrc* pUnit, int nParamId, D2UnitStrc* pTarget)
nParamId=18 unit say "I can't do that"
nParamId=85 merc say "I can't use that"
nParamId=87 merc say "I'll put that to good use"
Is there other soundId can be used with this function, that can be used to make unit say something?
And is there a way to play a sound to a Player?
- Necrolis
- Throne
- Posts: 9125
- Joined: Sat Mar 25, 2006 1:22 pm
- Location: The Land of the Dead
- Contact:
Re: Global sound cmd id?
You'd have to document the switch case on the client, but almost every sound triggered as part of a server validated action has one.
From the client there is a D2 client function for this, which should be in the function list sticky. If you want it from the server I'd suggest hooking the existing message and adding a flag to signify thats its a direct sounds.txt index.
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal
Re: Global sound cmd id?
Great! Thanks for giving tips. I will try it from the clientside.Necrolis wrote: ↑Wed Apr 28, 2021 9:30 pmYou'd have to document the switch case on the client, but almost every sound triggered as part of a server validated action has one.From the client there is a D2 client function for this, which should be in the function list sticky. If you want it from the server I'd suggest hooking the existing message and adding a flag to signify thats its a direct sounds.txt index.
Re: Global sound cmd id?
Sir, I am getting more confuse with this function. This function does not send a packet to client directly.
This function will set the UnitStrc 0x6E which means "nUpdateType". I can't find more information about the "nUpdateType".
With a breakpoint on this function. The more info about this.
2 = levelup
19 = impossible
23 = over burdened
34 = enter wild but not complete A1Q1
35 = clear cave of A1Q1
...
nUpdateType(0x6e) and pUpdateUnit(0x70) are used by this function.
This function will set the UnitStrc 0x6E which means "nUpdateType". I can't find more information about the "nUpdateType".
With a breakpoint on this function. The more info about this.
2 = levelup
19 = impossible
23 = over burdened
34 = enter wild but not complete A1Q1
35 = clear cave of A1Q1
...
nUpdateType(0x6e) and pUpdateUnit(0x70) are used by this function.
- Necrolis
- Throne
- Posts: 9125
- Joined: Sat Mar 25, 2006 1:22 pm
- Location: The Land of the Dead
- Contact:
Re: Global sound cmd id?
Its queuing polymorphic messages on the units message chain (this are then dispatched to the players at the end of the frame). These are used to queue information specific to each unit (such as life updates). When it comes to sounds most of the time its queued directly to the players message queue. Except in the case of the mercs sounds, this is so it can apply a few volume modulations to it base on the mercs distance etc.karlock wrote: ↑Thu Apr 29, 2021 8:56 amSir, I am getting more confuse with this function. This function does not send a packet to client directly.
This function will set the UnitStrc 0x6E which means "nUpdateType". I can't find more information about the "nUpdateType".
With a breakpoint on this function. The more info about this.
2 = levelup
19 = impossible
23 = over burdened
34 = enter wild but not complete A1Q1
35 = clear cave of A1Q1
...
nUpdateType(0x6e) and pUpdateUnit(0x70) are used by this function.
This is why you need to inspect the client side processor for the packet; unfortunately Blizzard sought fit to make a huge amount of switch cases for the sound messages, a lot are used for quest based sounds:
Code: Select all
enum eD2ClientSoundComands
{
SOUNDCMD_INVALID = -1,
SOUNDCMD_TRAP = 0x0,
SOUNDCMD_ITEM_PICKUP = 0x1,
SOUNDCMD_LEVELUP = 0x2,
SOUNDCMD_QUEST_CUBE = 0x3,
SOUNDCMD_TRANSMUTE = 0x4,
SOUNDCMD_SHATTER = 0x5,
SOUNDCMD_IDENTIFY = 0x6, //REFRESHINV
SOUNDCMD_CREATE_PORTAL = 0x7,
SOUNDCMD_EXIT_PORTAL = 0x8,
SOUNDCMD_ITEM_BREAK = 0x9,
SOUNDCMD_HEAL = 0xA,
SOUNDCMD_UNLOCK_CHEST = 0xB,
SOUNDCMD_EVADE = 0xC,
SOUNDCMD_NULL_3 = 0xD,
SOUNDCMD_NULL_4 = 0xE,
SOUNDCMD_NULL_5 = 0xF,
SOUNDCMD_MON_TAUNT = 0x10,
SOUNDCMD_NULL_7 = 0x11,
SOUNDCMD_NULL_8 = 0x12,
SOUNDCMD_IMPOSSIBLE = 0x13,
SOUNDCMD_NO_USE = 0x14,
SOUNDCMD_NEED_MANA = 0x15,
SOUNDCMD_NEED_KEY = 0x16,
SOUNDCMD_OVERBURDENED = 0x17,
SOUNDCMD_NOT_IN_TOWN = 0x18,
SOUNDCMD_HELP = 0x19,
SOUNDCMD_FOLLOW = 0x1A,
SOUNDCMD_FOR_YOU = 0x1B,
SOUNDCMD_THANKS = 0x1C,
SOUNDCMD_FORGIVE_ME = 0x1D, //the necro's versions are funny :P
SOUNDCMD_BYE = 0x1E,
SOUNDCMD_DIE = 0x1F,
SOUNDCMD_NULL_9 = 0x20,
//QUEST
SOUNDCMD_QUEST_COMPLETE_A1_Q6 = 0x21,
SOUNDCMD_NULL_10 = 0x22,
SOUNDCMD_QUEST_COMPLETE_A1_Q1 = 0x23,
SOUNDCMD_QUEST_COMPLETE_A1_Q5 = 0x24,
SOUNDCMD_NULL_11 = 0x25,
SOUNDCMD_QUEST_ENTER_AREA_A1_Q2 = 0x26,
SOUNDCMD_QUEST_ENTER_AREA_A1_Q3 = 0x27,
SOUNDCMD_QUEST_ENTER_AREA_A1_Q4 = 0x28,
SOUNDCMD_QUEST_ENTER_AREA_A1_Q6 = 0x29,
//the rest are more quest sounds
SOUNDCMD_MERCCANNOTEQUIP = 0x55,
SOUNDCMD_MERCTHANKS = 0x56,
SOUNDCMD_MERCCANNOTUSETHAT = 0x57,
SOUNDCMD_MERCLEVELUP = 0x5B
};
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal
Re: Global sound cmd id?
That is beyond my knowledge. It is tough to get the packet mechanic of d2 fully understood. I need do more research about this part if I have time.
Thanks for enlightment.
Thanks for enlightment.