• Welcome to Valhalla Legends Archive.
 

Request for Research: The Starcraft Game Protocol

Started by Arta, July 06, 2005, 09:20 AM

Previous topic - Next topic

Ringo

#15
I was re-doing a few things to my chat bot today, one of witch was to refresh my ingame UDP support for all older clients, mainly to check for changes in the latest patch's.
Why i was doing this, i decided to document some of the command2 packets as i went long.

Hope this comes in helpfull to anyone adding SC/BW UDP ingame protocol to there bot:
(Feel free to correct mistakes, and unknowns)


[EDIT]: oops, incoming packet header format for command 2:

00 00 00 00 92 11 0D 00 9E 03 9E 03 02 00 05 00

(DWORD) Null Padding - 00 00 00 00
(WORD) UDP Checksum - 92 11
(WORD) Packet Lengh (Discludes null-padding) - 0D 00
(WORD) Sent Packets To Player - 9E 03
(WORD) Recv Packets From Player - 9E 03
(BYTE) Packet Type/command - 02
(BYTE) Unused - 00
(BYTE) Senders Player ID - 05
(BYTE) Status - 00
(VOID) Packets






0x09
In Game - Unit Click/Selection
Lengh = 2 + (2nd byte * 2)

09 01 5D 0E
(BYTE) Num of Units selected
~For each unit selected~
(WORD) Unit ID

This packet notifys ALL other ingame players of new unit selections.



0x0A
In Game - Add Unit To Selection
Lengh = 2 + (2nd byte * 2)

0A 01 2C 0E
(BYTE) Num of Units selected
~For each unit selected~
(WORD) Unit ID

This packet notifys ALL other ingame players of new units being add to the selection buffer.



0x0C
In Game - Building being constructed/now Landing
Lengh = 8

0C 1F 09 00 5C 00 9C 00
(BYTE) Unknown
(WORD) Map Square X
(WORD) Map Square Y
(WORD) Building's Unique Code

This packet notifys ALL other ingame players when a peon is commanded to build a building, or when a building is commanded to land on the map.



0x14
In Game - Move Selected Units
Lengh = 10

14 8E 00 75 0F 00 00 E4 00 00
(WORD) Location X
(WORD) Location Y
(WORD) Unit ID
(WORD) Unknown - 0xE4
(BYTE) Unknown - 0x00

This packet notifys ALL other ingame players when you click to move your selected units to a location to the map/another unit.
If the unit ID field is null, then the location is map, otherwise it should specify the unit ID your now moveing your selected units to, in witch case the correct action would automaticly be triggerd. (like mine a mineral for IE)



0x15
In Game - Selected Units Action
Lengh = 11

15 76 00 37 0B 59 0E E4 00 4F 00
(WORD) Location X
(WORD) Location Y
(WORD) Unit ID
(WORD) Unknown - 0xE4
(WORD) Unit Action

This packet notifys ALL other ingame players when you trigger a action command and then uses it to command your selected units in your unit buffer to do there *Action* on the targeted map/other unit.
Unit ID Field will be null if it was targeted on the map and not a unit.



0x18
In Game - Cancel Selected Building
Lengh = 1

18
Blank

This packet notifys ALL other ingame players that you canceled a selected building from building.



0x19
In Game - Cancel Unit Morphing
Lengh = 1

19
Blank

This packet notifys ALL other ingame players that you Canceled the selected Zerg Egg from morphing into a unit.



0x1A
In Game - Stop Selected Units
Lengh = 2

1A 00
(BYTE) Unknown - 0x00 (Action?)

This packet notifys ALL other ingame players that the units in your selected unit buffer have been commanded to stop what they are doing.



0x1E
In Game - Selected Units Return
Lengh = 2

1E 00
(BYTE) Unknown - 0x00 (Action?)

This packet notifys ALL other ingame players that the units in your selected unit buffer have been commanded to return there cargo.



0x1F
In Game - Build Unit
Lengh = 3

1F 40 00
(WORD) Unit's Unique Code

This packet notifys ALL other ingame players that the building in your selected unit buffer has been commanded to build a unit.



0x20
In Game - Cancel Build Unit
Lengh = 3

20 01 00
(WORD) Unit Slot

This packet notifys ALL other ingame players that the building in your selected unit buffer has been commanded to Stop building a unit.
The WORD In this packet notifys you what number in the queue the unit was, witch got canceled.



0x21
In Game - Cloak Unit
Lengh = 2

21 00
(BYTE) Unknown - 0x00

This packet notifys ALL other ingame players that the units in your selected unit buffer are being commanded to Cloak.



0x22
In Game - Uncloak Unit
Lengh = 2

22 00
(BYTE) Unknown - 0x00

This packet notifys ALL other ingame players that your units on your selected unit buffer are being commanded to Uncloak.



0x23
In Game - Morph Selected Unit's
Lengh = 3

23 29 00
(WORD) Unit's Unique Code

This packet notifys ALL other ingame players that your units in your selected unit buffer are being commanded to morph into new unit's.



0x25
In Game - Unsiege Tank
Lengh = 2

25 00
(BYTE) Unknown - 0x00

This packet notifys ALL other ingame players that your tanks in your selected unit buffer are being commanded to unsiege.



0x26
In Game - Siege Tank
Lengh = 2

26 00
(BYTE) Unknown - 0x00

This packet notifys ALL other ingame players that your tanks in your selected unit buffer are being commanded to siege.



0x27
In Game - Add To Unit's Build Queue
Lengh = 1

27
Blank

This packet notifys ALL other ingame players that you have add unit thingys to your unit.
Like scabs, intersepters etc etc.
(0x20 would notify of cancel)



0x29
In Game - Unload a selected unit
Lengh = 3

29 0B 0E
(WORD) Unit ID

This packet notifys ALL other ingame players that you have selected a single unit to be unloaded from a dropship/overlord/shuttle etc.



0x2A
In Game - Morph Archon
Lengh = 1

2A
Blank

This packet notifys ALL other ingame players that your High Templars in your selected unit buffer are being morphed into Archons.



0x2C
In Game - Burrow Units
Lengh = 2

2C 00
(BYTE) Unknown - 0x00

This packet notifys ALL other ingame players that your supporting-zerg units in your selected unit buffer are being commanded to Burrow.



0x2D
In Game - UnBurrow Units
Lengh = 2

2D 00
(BYTE) Unknown - 0x00

This packet notifys ALL other ingame players that your supporting-zerg units in your selected unit buffer are being commanded to Unburrow.



0x2F
In Game - Building Liftoff
Lengh = 5

2F E0 0E 30 05
(BYTE) Unknown
(BYTE) Unknown
(BYTE) Unit ID? - unknown ;/
(BYTE) Unknown (always lowish number)

This packet notifys ALL other ingame players that your building in your selected unit buffer has lifted off.



0x30
In Game - Upgrade Type 1
Lengh = 2

30 01
(BYTE) Upgrade Type 1

This packet notifys ALL other ingame players that your building in your selected unit buffer has been commanded to Upgrade to the next level.



0x31
In Game - Cancel Upgrade Type 1
Lengh = 1

31
Blank

This packet notifys ALL other ingame players that your building in your selected unit buffer has been commanded to cancel the Upgrade.



0x32
In Game - Upgrade Type 2
Lengh = 2

32 0F
(BYTE) Upgrade Type 2

This packet notifys ALL other ingame players that your building in your selected unit buffer has been commanded to Upgrade.



0x33
In Game - Cancel Upgrade Type 2
Lengh = 1

33
Blank

This packet notifys ALL other ingame players that your building in your selected unit buffer has been commanded to cancel the Upgrade.



0x35
In Game - Morph Zerg Building
Lengh = 3

35 92 00
(WORD) Building's Unique Code

This packet notifys ALL other ingame players that your zerg-building in your selected unit buffer has been commanded to morph into the upgraded version.



0x36
In Game - Stim Selected Units
Lengh = 1

36
Blank

This packet notifys ALL other ingame players that your infentory in your selected unit buffer have been commanded to stim.



0x3C
Game Room Start Game
Lengh = 1

3C
Blank

This Packet Notifys other clients that the host has started the game.



0x3E
Game Room Slots
Lengh = 6 (5th byte maybe?)

3E 07 FF 08 06 00
3E 06 FF 08 06 00
3E 05 05 02 06 00
3E 04 04 02 06 00
3E 03 03 02 06 00
3E 02 02 02 06 00
3E 01 01 02 06 00
3E 00 00 02 06 00
(BYTE) Game Room Slot Number
(BYTE) Player ID (In this slot)
(BYTE) Forgot this one
(BYTE) Players Race
(BYTE) Unknown - 0x00

This packet notifys you of whos where in the game room.
Races:
0x00 = Zerg
0x01 = Terran
0x02 = Protoss
0x06 = Random



0x41
Players race change?
Lengh = 3

41 08 06
(BYTE) unknown - 0x08
(BYTE) Players Race

This packet notifys you of other players race's and race change's in the game room.
Races:
0x00 = Zerg
0x01 = Terran
0x02 = Protoss
0x06 = Random



0x5A
In Game - Morph Dark Archon
Lengh = 1

5A
Blank

This packet notifys ALL other ingame players that your Dark Templars in your selected unit buffer are being morphed into Dark Archons.

Ringo

#16

0x00 = Terran - Marine
0x01 = Terran - Ghost
0x02 = Terran - Vulture
0x03 = Terran - Goliath
0x04 =
0x05 = Terran - Tank
0x06 =
0x07 = Terran - SCV
0x08 = Terran - Wraith
0x09 = Terran - Science Vessel
0x0A =
0x0B = Terran - Dropship
0x0C = Terran - BattleCruiser
0x0D =
0x0E = Terran - Nuke
0x0F =
0x10 =
0x11 =
0x12 =
0x13 =
0x14 =
0x15 =
0x16 =
0x18 =
0x19 =
0x1A =
0x1B =
0x1C =
0x1D =
0x1E =
0x1F =
0x20 = Terran - Firebat
0x21 =
0x22 = Terran - Medic
0x23 =
0x24 =
0x25 = Zerg - Zergling
0x26 = Zerg - Hydralisk
0x27 = Zerg - Ultralisk
0x28 =
0x29 = Zerg - Drone
0x2A = Zerg - Overlord
0x2B = Zerg - Muta
0x2C = Zerg - Guardian
0x2D = Zerg - Queen
0x2E = Zerg - Defiler
0x2F = Zerg - Scourge
0x30 =
0x31 =
0x32 =
0x33 =
0x34 =
0x35 =
0x36 =
0x37 =
0x38 =
0x39 =
0x3A = Terran - Valkyrie
0x3B =
0x3C = Protoss - Corsair
0x3D = Protoss - Dark Templar
0x3E = Zerg - Devourer
0x3F =
0x40 = Protoss - Probe
0x41 = Protoss - Zealot
0x42 = Protoss - Dragoon
0x43 = Protoss - High Templar
0x44 =
0x45 = Protoss - Shuttle
0x46 = Protoss - Scout
0x47 = Protoss - Arbiter
0x48 = Protoss - Carrier
0x49 =
0x4A =
0x4B =
0x4C =
0x4D =
0x4E =
0x4F =
0x50 =
0x51 =
0x52 =
0x53 = Protoss - Reaver
0x54 = Protoss - Observer
0x55 =
0x56 =
0x57 =
0x58 =
0x59 =
0x5A =
0x5B =
0x5C =
0x5D =
0x5E =
0x5F =
0x60 =
0x61 =
0x62 =
0x63 =
0x64 =
0x65 =
0x66 =
0x67 = Zerg - Lurker
0x68 =
0x69 =
0x6A = Terran - Command Center
0x6B = Terran - Comsat Station (CC addon)
0x6C = Terran - Nuclear Silo (CC addon)
0x6D = Terran - Supply Depot
0x6E = Terran - Refinery
0x6F = Terran - Barracks
0x70 = Terran - Academy
0x71 = Terran - Factory
0x72 = Terran - Starport
0x73 = Terran - Controll Tower (Starport addon)
0x74 = Terran - Science Facility
0x75 = Terran - Covert Ops (Science Facility addon)
0x76 = Terran - Physics Lab (Science Facility addon)
0x77 =
0x78 = Terran - Machine Shop (Factory addon)
0x79 =
0x7A = Terran - Engineering Bay
0x7B = Terran - Armory
0x7C = Terran - Turret
0x7D = Terran - Bunker
0x7E =
0x7F =
0x80 =
0x81 =
0x82 =
0x83 = Zerg - Hatchery
0x84 = Zerg - Lair
0x85 = Zerg - Hive
0x86 = Zerg - Nydus Canal
0x87 = Zerg - Hydralisk Den
0x88 = Zerg - Defiler Mound
0x89 = Zerg - Greater Spire
0x8A = Zerg - Queens Nest
0x8B = Zerg - Evoulion Chamber
0x8C = Zerg - Ultralist Cavern
0x8D = Zerg - Spire
0x8E = Zerg - Spawning Pool
0x8F = Zerg - Creep Colony
0x90 = Zerg - Spore Colony
0x91 =
0x92 = Zerg - Sunken Colony
0x93 =
0x94 =
0x95 = Zerg - Extractor (Gas)
0x96 =
0x97 =
0x98 =
0x99 =
0x9A = Protoss - Nexus
0x9B = Protoss - Robotics Facility
0x9C = Protoss - Pylon
0x9D = Protoss - Assimilator (gas)
0x9F = Protoss - Observatory
0xA0 = Protoss - Gateway
0xA2 = Protoss - Photon Cannon
0xA3 = Protoss - Citadel Of Adun
0xA4 = Protoss - Cybernetics Core
0xA5 = Protoss - Templar Archives
0xA6 = Protoss - Forge
0xA7 = Protoss - Stargate
0xA9 = Protoss - Fleet Beacon
0xAA = Protoss - Arbiter Tribunal
0xAB = Protoss - Robotics Support Bay
0xAC = Protoss - Shield Battery



Ringo


0x06 = *Move* to map location
0x08 = *Attack Move* on unit
0x0E = *Attack Move* to map
0x12 = *Attack* on map
0x13 = *Attack* on unit
0x1B = *Infest Command Center* on burning CC only
0x22 = *Repair* on mechanical unit only
0x27 = *Set Rally Point* on unit
0x28 = *Set Rally Point* on map
0x43 = *Recharge Shields* on unit/map
0x4F = *Gather* on mineral/Gas
0x5E = *Load* on unit (Drop ships)
0x70 = *Unload All* on unit/map (Drop ships)
0x71 = *Yamato Gun* on unit only
0x73 = *Lock Down* on mechanical unit only
0x77 = *Dark Swarm* on unit/map
0x78 = *Parasite* on unit only
0x79 = *Spawn Broodlings* on non-robotic unit only
0x7A = *EMP Shockwave* on unit/map
0x7E = *Nuke* on unit/map
0x89 = *Recall* on unit/map
0x8B = *Comsat Scan Sweep* on unit/map
0x8D = *Defencive Matrix* on unit only
0x8E = *Psionic Storm* on unit/map
0x8F = *Irradiate* on non-building unit only
0x90 = *Plague* on unit/map
0x91 = *Consume* on unit only
0x92 = *Ensnare* on unit/map
0x93 = *Stasis* on unit/map
0x94 = *Hallucination* on unit only
0x98 = *Patrol* on unit/map
0xB1 = *Heal* on non-mechanical ground unit/map
0xB4 = *Restoration* on unit/map
0xB5 = *Disruption Web* on unit/map
0xB6 = *Mind Controll* on unit only
0xB9 = *Optical Flare* on unit only
0xBA = *Mealstorm* on unit/map
0xB8 = *Feed back* on unit only

Ringo


0x00 = Terran - Stim Pack (Infantry)
0x01 = Terran - Lock Down (Ghost)
0x02 = Terran - EMP Shockwave (Science Vessel)
0x03 = Terran - Spider Mines (Vulture)
0x04 =
0x05 = Terran - Siege Mode (Tank)
0x06 =
0x07 = Terran - Irradiate (Science Vessel)
0x08 = Terran - Yamato Gun (BattleCruiser)
0x09 = Terran - Cloaking Field (Wraith)
0x0A = Terran - Personnel Cloaking (Ghost)
0x0B = Zerg - Burrowing
0x0C =
0x0D = Zerg - Spawn Broodlings (Queen)
0x0E = Terran - Optical Flare (Medic)
0x0F = Zerg - Plague (Defiler)
0x10 = Zerg - Consume (Defiler)
0x11 = Zerg - Ensnare (Queen)
0x12 =
0x13 =
0x14 =
0x15 =
0x16 =
0x17 =
0x18 = Terran - Restoration (Medic)
0x19 =
0x1A =
0x1B =
0x1C =
0x1D =
0x1E =
0x1F =
0x20 = Zerg - Lurker Aspect (Hyralist)




Ringo

Terran:

0x00 = Terran - Infantry Armor
0x01 = Terran - Ground Armor
0x07 = Terran - Infantry Wepons
0x08 = Terran - Ground Wepons
0x10 = Terran - Marine Attack Range
0x11 = Terran - Vulture Movment
0x13 = Terran - Science Vessel +50 Energy
0x14 = Terran - Ghost Sight Range
0x15 = Terran - Ghost +50 Energy
0x16 = Terran - Wraith +50 Energy
0x33 = Terran - Medic +50 Energy
0x36 = Terran - Goliath Attack Range




Protoss:

0x05 = Protoss - Ground Armor
0x06 = Protoss - Air Armor
0x0D = Protoss - Ground Wepons
0x0E = Protoss - Air Weapons
0x0F = Protoss - Plasma Shields
0x13 = Protoss - Psionic Storm
0x14 = Protoss - Hallucination
0x15 = Protoss - Recall
0x16 = Protoss - Stasis
0x19 = Protoss - Disruption Web
0x1B = Protoss - Mind Controll
0x1F = Protoss - MealStorm
0x21 = Protoss - Dragoon Attack Range
0x22 = Protoss - Zealot Speed
0x23 = Protoss - Scarab Damage
0x24 = Protoss - Reaver Capacity
0x25 = Protoss - Shuttle Movment
0x26 = Protoss - Observer Sight Range
0x27 = Protoss - Observer Movment
0x28 = Protoss - High Templar +50 Energy
0x29 = Protoss - Scout Sight Range
0x2A = Protoss - Scout Movment
0x2B = Protoss - Carrier Capacity
0x2C = Protoss - Arbiter +50 Energy
0x2F = Protoss - Corsair +50 Energy
0x31 = Protoss - Dark Archon +50 Energy




Zerg:

0x03 = Zerg - Carapace (Zerg Shields)
0x04 = Zerg - Air Armor
0x0A = Zerg - Melee Wepons
0x0B = Zerg - Missile Wepons
0x0C = Zerg - Air Wepons
0x18 = Zerg - Overlord Transporting
0x19 = Zerg - Overlord Sight Range
0z1A = Zerg - Overlord Movment
0x1B = Zerg - Zergling Movment
0x1C = Zerg - Zergling Attack Speed
0x1D = Zerg - Hydralist Movment
0x1E = Zerg - Hydralist Attack Range
0x1F = Zerg - Queen +50 Energy
0x20 = Zerg - Defiler +50 Energy
0x25 = Zerg - Ultralist Movment
0x34 = Zerg - Ultralist Armor


Arta


rabbit

The last byte in 0x3E is the map % download (I think).  I still have to check this out more, but I'm fairly sure.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Joe[x86]

Quote0x41
Players race change?
Lengh = 3

41 08 06
(BYTE) unknown - 0x08
(BYTE) Players Race

This packet notifys you of other players race's and race change's in the game room.
Races:
0x00 = Zerg
0x01 = Terran
0x02 = Protoss
0x06 = Random

Theory on the 0x08: the players position in the room. Has to say it somewhere.

Quote0x3E
Game Room Slots
Lengh = 6 (5th byte maybe?)

3E 07 FF 08 06 00
3E 06 FF 08 06 00
3E 05 05 02 06 00
3E 04 04 02 06 00
3E 03 03 02 06 00
3E 02 02 02 06 00
3E 01 01 02 06 00
3E 00 00 02 06 00
(BYTE) Game Room Slot Number
(BYTE) Player ID (In this slot)
(BYTE) Forgot this one
(BYTE) Players Race
(BYTE) Unknown - 0x00

0xFF in (BYTE) Player ID means that a player isn't in that slot, I asume?
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

Ringo

Quote from: Arta[vL] on October 13, 2005, 01:14 PM
Neat, thanks :)
np :)

Quote from: rabbit on October 13, 2005, 04:59 PM
The last byte in 0x3E is the map % download (I think).  I still have to check this out more, but I'm fairly sure.
cool, i will look into it if you/somone else doesnt first.

Quote from: Joe on October 13, 2005, 07:52 PM
Quote0x41
Players race change?
Lengh = 3

41 08 06
(BYTE) unknown - 0x08
(BYTE) Players Race

This packet notifys you of other players race's and race change's in the game room.
Races:
0x00 = Zerg
0x01 = Terran
0x02 = Protoss
0x06 = Random

Theory on the 0x08: the players position in the room. Has to say it somewhere.

I think that byte is static (always 0x08), theres also a command 0 packet that gets sent along with this one, i think 0x0E, but i cant remember with out checking.


Quote0x3E
Game Room Slots
Lengh = 6 (5th byte maybe?)

3E 07 FF 08 06 00
3E 06 FF 08 06 00
3E 05 05 02 06 00
3E 04 04 02 06 00
3E 03 03 02 06 00
3E 02 02 02 06 00
3E 01 01 02 06 00
3E 00 00 02 06 00
(BYTE) Game Room Slot Number
(BYTE) Player ID (In this slot)
(BYTE) Forgot this one
(BYTE) Players Race
(BYTE) Unknown - 0x00

0xFF in (BYTE) Player ID means that a player isn't in that slot, I asume?
ye, i was player ID 0x05 (6th player) in that instance i think*, in a 6 player game.

Joe[x86]

So then an 0xFF denotes that the slot is closed? Then I suppose an 0x00 would be that there is no player in the slot.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

MysT_DooM

#25

(BYTE) Slot Packet ID - 3E
(BYTE) GameSlot ID
(BYTE) Player ID*
(BYTE) Slot Status**
(BYTE) Player Race Selection
(BYTE) Force***
(BYTE) Unknown ID - 3F
(BYTE) Player ID
(WORD) Null
(WORD) 01 00
(WORD) 05 00

*
When no player is there it is 0xFF

**
Not Used   0x00 (Meaning for example, you're in Lost Temple and there are only 4 slots allowed, the other 4 0x3E's won't even be used)
Human      0x02
Computer  0x05
Empty       0x06
Closed      0x08

***
No Force  0x00
Force 1    0x01
Force 2    0x02
etc..


vb6, something about that combination of numbers and letters is sexy

IceOnMe

#26
Quote from: MysT_DooM on February 04, 2007, 02:16 PM

(BYTE) Slot Packet ID - 3E
(BYTE) GameSlot ID
(BYTE) Player ID*
(BYTE) Slot Status**
(BYTE) Player Race Selection
(BYTE) Force***
(BYTE) Unknown ID - 3F
(BYTE) Player ID
(WORD) Null
(WORD) 01 00
(WORD) 05 00

*
When no player is there it is 0xFF

**
Not Used   0x00 (Meaning for example, you're in Lost Temple and there are only 4 slots allowed, the other 4 0x3E's won't even be used)
Human      0x02
Computer  0x05
Empty       0x06
Closed      0x08

***
No Force  0x00
Force 1    0x01
Force 2    0x02
etc..


I agree with you ..

when use "team vs bottom"  the last bytes of 0x3e will be 0x01 or 0x02
and the decription of slot status is also correct and a great job

I'd like to ask what function does 0x3f and 0x3d which appears ahead 0x3e have.

my packets here:
Quote
32 b7 4e 00 12 00 13 00 02 00 00 00  // which known to us as the header
3d 64   //I'm wondering whether to separate 3d 64 from the upper bytes

3e 07 ff 06 06 02
3e 06 ff 06 06 02
3e 05 ff 06 06 02
3e 04 ff 06 06 02 
3e 03 ff 06 06 01
3e 02 ff 06 06 01
3e 01 01 02 06 01
3e 00 00 02 06 01

3f 01 00 00 01 00 05 00
3f 00 00 00 01 00 05 00


I am new here, and i am eager to learn from all of you.:)

Ringo

#27
Well, what you are looking at, is the message the host will send to each player when the game room changes, such as a player changes race, slot, team, quits etc

It generaly goes, to each player:
0x3E for all 8 possible slots
0x3F for each player

Packet 0x3D:

(BYTE) Packet ID - 0x3D
(BYTE) Map Download Percent (1 to 100, other wise invisible)


Packet 0x3E:

(BYTE) Packet ID - 0x3E
(BYTE) Game Room Slot Index
(BYTE) Player ID (In this slot, 0 to 7, 0xFF = none)
(BYTE) Slot Status
        '0x00 = slot doesnt exist
        '0x02 = slot is Taken by player
        '0x05 = slot is Computer
        '0x06 = slot is Empty
        '0x08 = slot is Closed
(BYTE) Players Race
        '0x00 = Zerg
        '0x01 = Terran
        '0x02 = Protosss
        '0x06 = Random
(BYTE) Ownership Team (the team/force index of this game room slot)


Packet 0x3F:

(BYTE) Packet ID - 0x3F
(BYTE) Player ID
(WORD) Unused - 0x00
(WORD) Const - 0x01
(WORD) Const - 0x05


The reassion they are sent together, is because of the way command 2 works.
Command 2 Data should be bufferd and sent each game tick (about every 250ms)

Hope this helps

IceOnMe

Thanks for your helpful reply.

I'd like to propose another question: How to collect game results in both BN mode and LAN game mode?

I have made many tests but failed to figure it out, need help ???

Ringo

Quote from: IceOnMe on February 09, 2007, 10:41 AM
Thanks for your helpful reply.

I'd like to propose another question: How to collect game results in both BN mode and LAN game mode?

I have made many tests but failed to figure it out, need help ???
Im not to sure about LAN games, but the end game BN results are in 0x2C SID_GAMERESULTS

If your working with the game client its self, you need to capture the packets that SC sends and recv's.
I think* Adron made a winsock hook active X control that can be found by searching this forum.
That should be quick and easy for this.

|